/* ==========================================================================
   Blog — listing (blog.php) and article pages (article.php)
   Loaded after style.css; reuses its tokens (--primary, --dark, fonts).
   ========================================================================== */

.bl-page { padding-top: 112px; }
@media (max-width: 640px) { .bl-page { padding-top: 92px; } }

/* ---------------------------------------------------------------- listing */

.bl-hero {
    max-width: 820px; margin: 0 auto; padding: 1.5rem 1.25rem 2rem; text-align: center;
}
.bl-kicker {
    display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .12em;
    text-transform: uppercase; color: var(--primary); background: rgba(30, 64, 175, .08);
    padding: .4rem .85rem; border-radius: 999px; margin-bottom: 1rem;
}
.bl-hero h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); line-height: 1.12; margin-bottom: .9rem; }
.bl-hero p { color: var(--gray-600); font-size: 1.12rem; line-height: 1.65; }

.bl-cats {
    display: flex; flex-wrap: wrap; gap: .5rem; justify-content: center;
    max-width: 1120px; margin: 0 auto 2rem; padding: 0 1.25rem;
}
.bl-cats a {
    font-size: .88rem; font-weight: 600; color: var(--gray-700); text-decoration: none;
    padding: .45rem 1rem; border-radius: 999px; background: #fff; border: 1px solid #e2e8f0;
    transition: all .18s ease;
}
.bl-cats a:hover { border-color: var(--primary-light); color: var(--primary); }
.bl-cats a.on { background: var(--primary); border-color: var(--primary); color: #fff; }
.bl-cats .n { opacity: .6; font-weight: 500; margin-left: .25rem; }

.bl-wrap { max-width: 1120px; margin: 0 auto; padding: 0 1.25rem; }

/* Card image: a fixed 16:9 frame so mixed photos still line up. */
.bl-media {
    position: relative; aspect-ratio: 16 / 9; overflow: hidden; background: #0b2447;
    display: block;
}
.bl-media img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    transition: transform .5s cubic-bezier(.2, .7, .2, 1);
}
.bl-media.fallback {
    background:
        radial-gradient(120% 90% at 100% 0%, rgba(94, 159, 213, .55) 0%, rgba(94, 159, 213, 0) 60%),
        linear-gradient(135deg, #002B5E 0%, #0B4C8C 100%);
    display: flex; align-items: flex-end; padding: 1.1rem 1.2rem;
}
.bl-media.fallback span {
    color: rgba(255, 255, 255, .92); font-family: var(--font-display); font-size: 1.25rem;
    line-height: 1.25; max-width: 90%;
}

.bl-card {
    display: flex; flex-direction: column; background: #fff; border-radius: 16px; overflow: hidden;
    border: 1px solid #e6ebf2; box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
    transition: transform .25s ease, box-shadow .25s ease; text-decoration: none; color: inherit;
}
.bl-card:hover { transform: translateY(-4px); box-shadow: 0 18px 38px rgba(15, 23, 42, .11); }
.bl-card:hover .bl-media img { transform: scale(1.04); }
.bl-card:focus-visible { outline: 3px solid var(--primary-light); outline-offset: 3px; }
.bl-body { padding: 1.25rem 1.35rem 1.4rem; display: flex; flex-direction: column; gap: .55rem; flex: 1; }
.bl-cat {
    font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--primary);
}
.bl-title {
    font-family: var(--font-primary); font-size: 1.18rem; font-weight: 700; line-height: 1.35;
    color: var(--dark); margin: 0;
}
.bl-excerpt {
    color: var(--gray-600); line-height: 1.6; font-size: .95rem; margin: 0;
    display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden;
}
.bl-meta { margin-top: auto; padding-top: .4rem; font-size: .82rem; color: var(--gray-500); }

.bl-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 1.6rem;
}

/* The newest article leads the first page at full width. */
.bl-featured { margin-bottom: 2.2rem; }
.bl-featured .bl-card { display: grid; grid-template-columns: 1.25fr 1fr; }
.bl-featured .bl-media { aspect-ratio: auto; min-height: 340px; }
.bl-featured .bl-body { padding: 2rem 2.2rem; justify-content: center; gap: .8rem; }
.bl-featured .bl-title { font-family: var(--font-display); font-size: clamp(1.5rem, 2.6vw, 2.1rem); line-height: 1.2; }
.bl-featured .bl-excerpt { font-size: 1.04rem; -webkit-line-clamp: 4; }
.bl-featured .bl-meta { margin-top: .4rem; }
.bl-read { font-weight: 700; color: var(--primary); font-size: .95rem; }
@media (max-width: 860px) {
    .bl-featured .bl-card { grid-template-columns: 1fr; }
    .bl-featured .bl-media { aspect-ratio: 16 / 9; min-height: 0; }
    .bl-featured .bl-body { padding: 1.4rem 1.4rem 1.6rem; }
}

.bl-pager { display: flex; justify-content: center; align-items: center; gap: .5rem; margin: 2.6rem 0 1rem; flex-wrap: wrap; }
.bl-pager a, .bl-pager span {
    min-width: 42px; height: 42px; display: inline-flex; align-items: center; justify-content: center;
    padding: 0 .9rem; border-radius: 10px; font-weight: 600; text-decoration: none;
    border: 1px solid #e2e8f0; color: var(--gray-700); background: #fff;
}
.bl-pager a:hover { border-color: var(--primary-light); color: var(--primary); }
.bl-pager .current { background: var(--primary); border-color: var(--primary); color: #fff; }

.bl-empty {
    max-width: 620px; margin: 1rem auto 3rem; text-align: center; background: #fff;
    border: 1px solid #e6ebf2; border-radius: 18px; padding: 2.6rem 2rem;
    box-shadow: 0 4px 18px rgba(15, 23, 42, .05);
}
.bl-empty h2 { font-size: 1.6rem; margin-bottom: .6rem; }
.bl-empty p { color: var(--gray-600); line-height: 1.7; margin-bottom: 1.3rem; }
.bl-empty .btns { display: flex; gap: .7rem; justify-content: center; flex-wrap: wrap; }

.bl-section-gap { height: 3.5rem; }

/* ---------------------------------------------------------------- article */

.ar-preview {
    position: sticky; top: 0; z-index: 2000; background: #B5822A; color: #fff; text-align: center;
    font-weight: 600; font-size: .92rem; padding: .6rem 1rem;
}

.ar { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }

.ar-crumbs { font-size: .85rem; color: var(--gray-500); margin: .5rem 0 1.4rem; display: flex; flex-wrap: wrap; gap: .4rem; }
.ar-crumbs a { color: var(--gray-600); text-decoration: none; }
.ar-crumbs a:hover { color: var(--primary); text-decoration: underline; }
.ar-crumbs .sep { opacity: .5; }

.ar-head { margin-bottom: 1.8rem; }
.ar-cat {
    display: inline-block; font-size: .75rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
    color: var(--primary); text-decoration: none; margin-bottom: .8rem;
}
.ar-head h1 { font-size: clamp(2rem, 4.4vw, 3rem); line-height: 1.14; color: var(--dark); margin-bottom: 1rem; }
.ar-dek { font-size: 1.2rem; line-height: 1.6; color: var(--gray-600); margin-bottom: 1.4rem; }

.ar-byline { display: flex; align-items: center; gap: .85rem; font-size: .92rem; color: var(--gray-600); line-height: 1.5; }
.ar-byline a { color: var(--dark); font-weight: 700; text-decoration: none; }
.ar-byline a:hover { color: var(--primary); }
.ar-av {
    width: 46px; height: 46px; flex: 0 0 46px; border-radius: 50%; display: grid; place-items: center;
    background: linear-gradient(135deg, #002B5E, #1565B0); color: #fff; font-weight: 800; font-size: .95rem;
    letter-spacing: .02em;
}

.ar-hero { margin: 0 auto 2.2rem; max-width: 960px; padding: 0 1.25rem; }
.ar-hero img {
    width: 100%; height: auto; display: block; border-radius: 18px;
    box-shadow: 0 18px 50px rgba(15, 23, 42, .14); background: #e9eef5;
}

/* Long-form reading type. The editor in the CRM mirrors these proportions. */
.prose { font-size: 1.1rem; line-height: 1.78; color: #1f2a3a; }
.prose > * + * { margin-top: 1.15em; }
.prose p { margin: 0; }
.prose > * + p { margin-top: 1.15em; }
.prose h2, .prose h3, .prose h4 { font-family: var(--font-primary); color: var(--dark); line-height: 1.3; }
.prose h2 { font-size: 1.62rem; font-weight: 800; margin-top: 2em; letter-spacing: -.01em; }
.prose h3 { font-size: 1.3rem; font-weight: 700; margin-top: 1.7em; }
.prose h4 { font-size: 1.1rem; font-weight: 700; margin-top: 1.5em; }
.prose h2 + *, .prose h3 + *, .prose h4 + * { margin-top: .6em; }
.prose a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; }
.prose a:hover { color: var(--primary-dark); text-decoration-thickness: 2px; }
.prose strong { color: var(--dark); font-weight: 700; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .45em; }
.prose li::marker { color: var(--primary); }
.prose blockquote {
    margin-left: 0; margin-right: 0; padding: 1rem 1.3rem; border-left: 4px solid var(--primary-light);
    background: #f4f8fd; border-radius: 0 12px 12px 0; color: #24344a; font-style: italic;
}
.prose img { max-width: 100%; height: auto; border-radius: 12px; display: block; margin: 0 auto; }
.prose figure { margin-left: 0; margin-right: 0; }
.prose figcaption { font-size: .88rem; color: var(--gray-500); text-align: center; margin-top: .5rem; }
.prose hr { border: none; border-top: 1px solid #e2e8f0; margin: 2.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-size: .97rem; display: block; overflow-x: auto; }
.prose th, .prose td { border: 1px solid #e2e8f0; padding: .6rem .8rem; text-align: left; vertical-align: top; }
.prose th { background: #f4f8fd; font-weight: 700; color: var(--dark); }
.prose code { font-size: .92em; background: #f1f5f9; padding: .1em .35em; border-radius: 5px; }
.prose pre { background: #0f172a; color: #e2e8f0; padding: 1rem 1.2rem; border-radius: 12px; overflow-x: auto; }
.prose pre code { background: none; padding: 0; }

.ar-share { display: flex; align-items: center; gap: .55rem; flex-wrap: wrap; margin: 2.6rem 0 2rem; padding-top: 1.6rem; border-top: 1px solid #e2e8f0; }
.ar-share .lbl { font-size: .85rem; font-weight: 700; color: var(--gray-600); margin-right: .2rem; }
.ar-share a, .ar-share button {
    display: inline-flex; align-items: center; gap: .4rem; font: inherit; font-size: .85rem; font-weight: 600;
    color: var(--gray-700); background: #fff; border: 1px solid #e2e8f0; border-radius: 999px;
    padding: .45rem .9rem; cursor: pointer; text-decoration: none; transition: all .18s ease;
}
.ar-share a:hover, .ar-share button:hover { border-color: var(--primary-light); color: var(--primary); }
.ar-share svg { width: 15px; height: 15px; }

.ar-author {
    display: grid; grid-template-columns: auto 1fr; gap: 1.1rem 1.2rem; align-items: start;
    background: linear-gradient(135deg, #f6f9fd 0%, #eef4fb 100%); border: 1px solid #dde7f3;
    border-radius: 18px; padding: 1.6rem 1.7rem;
}
.ar-author .ar-av { width: 60px; height: 60px; flex-basis: 60px; font-size: 1.15rem; }
.ar-author h2 { font-family: var(--font-primary); font-size: 1.12rem; font-weight: 800; color: var(--dark); margin: 0 0 .35rem; }
.ar-author p { color: #3b4a5e; line-height: 1.65; font-size: .97rem; margin: 0; }
.ar-author .btns { grid-column: 2; display: flex; gap: .6rem; flex-wrap: wrap; }
.ar-author .btns .btn { padding: .7rem 1.25rem; font-size: .9rem; }
@media (max-width: 560px) {
    .ar-author { grid-template-columns: 1fr; }
    .ar-author .btns { grid-column: 1; }
}

.ar-disclaimer { font-size: .82rem; color: var(--gray-500); line-height: 1.6; margin: 1.4rem 0 0; }

.ar-related { max-width: 1120px; margin: 4rem auto 0; padding: 0 1.25rem; }
.ar-related h2 { font-size: clamp(1.6rem, 3vw, 2.1rem); margin-bottom: 1.4rem; text-align: center; }

.ar-missing { max-width: 620px; margin: 2rem auto 4rem; text-align: center; padding: 0 1.25rem; }
.ar-missing h1 { font-size: clamp(2rem, 4vw, 2.6rem); margin-bottom: .8rem; }
.ar-missing p { color: var(--gray-600); line-height: 1.7; margin-bottom: 1.4rem; }

.bl-cta { margin-top: 4rem; }
