@import url("home.css");

/* =========================================================
   BLOG SHARED CONTAINER
   ========================================================= */

.blog-hero .container,
.blog-listing .container,
.blog-post-wrap .container {
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 20px;
    padding-right: 20px;
}


/* =========================================================
   BLOG HERO
   ========================================================= */

.blog-hero {
    position: relative;
    overflow: hidden;
    padding: clamp(5rem, 10vw, 8rem) 0 4rem;
    background: linear-gradient(
        135deg,
        #101d34 0%,
        #19385a 62%,
        #e6b817 170%
    );
    color: #fff;
}

.blog-hero::after {
    content: "";
    position: absolute;
    width: 28rem;
    height: 28rem;
    right: -9rem;
    top: -10rem;
    border-radius: 50%;
    background: rgba(255, 210, 0, 0.15);
    filter: blur(2px);
}

.blog-hero .container {
    position: relative;
    z-index: 1;
}

.blog-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin: 0 0 1rem;
    color: #ffd200;
    font-size: 0.78rem;
    font-weight: 800;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.blog-hero h1 {
    max-width: 760px;
    margin: 0 0 1rem;
    color: #fff;
    font-size: clamp(2.2rem, 5vw, 4rem);
    line-height: 1.04;
}

.blog-hero p {
    max-width: 670px;
    margin: 0;
    color: #d9e4f0;
    font-size: 1.1rem;
    line-height: 1.7;
}


/* =========================================================
   BLOG LISTING
   ========================================================= */

.blog-listing {
    padding: clamp(3.5rem, 7vw, 6rem) 0;
}

.blog-listing .section-heading {
    max-width: 700px;
    margin-bottom: 2rem;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.5rem;
}

.blog-card {
    display: flex;
    min-width: 0;
    overflow: hidden;
    flex-direction: column;
    background: #fff;
    border: 1px solid #e5eaf0;
    border-radius: 1.2rem;
    box-shadow: 0 14px 38px rgba(16, 29, 52, 0.08);
    transition:
        transform 0.25s ease,
        box-shadow 0.25s ease;
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(16, 29, 52, 0.15);
}

.blog-card-media {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #dce9f2;
}

.blog-card-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.45s ease;
}

.blog-card:hover .blog-card-media img {
    transform: scale(1.06);
}

.blog-card-placeholder {
    display: grid;
    place-items: center;
    height: 100%;
    background: linear-gradient(135deg, #d9e9f6, #fff2be);
    color: #19385a;
    font-size: 3rem;
    font-weight: 800;
}

.blog-card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: 1.35rem 1.4rem 1.5rem;
}

.blog-card-meta {
    margin-bottom: 0.65rem;
    color: #69798e;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.blog-card h2 {
    display: -webkit-box;
    min-height: 4.7em;
    margin: 0 0 0.7rem;
    overflow: hidden;
    color: #14233b;
    font-size: 1.25rem;
    line-height: 1.25;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    text-wrap: balance;
}

.blog-card h2 a,
.blog-card h2 a:visited {
    color: #14233b;
    text-decoration: none;
}

.blog-card h2 a:hover,
.blog-card h2 a:focus-visible {
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.blog-card p {
    margin: 0 0 1.2rem;
    color: #596a7f;
    line-height: 1.65;
}

.blog-readmore,
.blog-readmore:visited {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    margin-top: auto;
    color: #0b628d;
    font-size: 0.9rem;
    font-weight: 800;
    text-decoration: none;
}

.blog-readmore:hover,
.blog-readmore:focus-visible {
    text-decoration: underline;
    text-underline-offset: 3px;
}

.blog-pagination {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 2.5rem;
}

.blog-pagination a,
.blog-pagination span {
    display: grid;
    place-items: center;
    min-width: 2.5rem;
    height: 2.5rem;
    padding: 0 0.7rem;
    border-radius: 0.55rem;
    color: #19385a;
    font-weight: 800;
}

.blog-pagination a {
    border: 1px solid #d7e1ea;
}

.blog-pagination a:hover,
.blog-pagination .is-current {
    background: #ffd200;
    border-color: #ffd200;
    color: #14233b;
}

.blog-empty,
.blog-db-notice {
    padding: 2rem;
    border: 1px dashed #bdcad8;
    border-radius: 1rem;
    color: #596a7f;
    text-align: center;
}


/* =========================================================
   BLOG POST PAGE
   ========================================================= */

.blog-post-wrap {
    padding: 64px 0 80px;
    background: #f8fbfd;
    min-height: 65vh;
}

.blog-post-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 290px;
    gap: 48px;
    align-items: start;
    max-width: 1100px;
    margin: 0 auto;
}

.blog-post {
    min-width: 0;
    max-width: 100%;
    padding: clamp(1.4rem, 3vw, 2.4rem);
    background: #fff !important;
    border: 1px solid #e1e9f0;
    border-radius: 1.2rem;
    box-shadow: 0 14px 38px rgba(16, 29, 52, 0.08);
}


/* =========================================================
   BLOG POST HEADER
   IMPORTANT:
   home.css has a global "header" selector with display:flex.
   This specifically overrides it for the article header.
   ========================================================= */

main .blog-post > header.blog-post-header {
    display: grid !important;
    grid-template-columns: 1fr !important;
    grid-template-rows: auto auto auto !important;

    position: static !important;
    float: none !important;
    width: 100% !important;
    max-width: none !important;

    margin: 0 0 32px !important;
    padding: 0 !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    align-items: start !important;
    justify-content: start !important;
    gap: 0 !important;

    transform: none !important;
    z-index: auto !important;
}

main .blog-post > header.blog-post-header .blog-post-meta {
    display: inline-flex !important;
    align-items: center !important;
    width: fit-content !important;

    margin: 0 0 20px !important;
    padding: 8px 14px !important;

    border-radius: 999px !important;
    background: #e8f0f6 !important;

    color: #46657e !important;
    font-size: 0.85rem !important;
    font-weight: 700 !important;
    line-height: 1.3 !important;
    letter-spacing: 0.04em !important;
}

main .blog-post > header.blog-post-header h1 {
    display: block !important;
    grid-column: 1 !important;

    width: 100% !important;
    max-width: 900px !important;

    margin: 0 0 22px !important;
    padding: 0 !important;

    color: #14233b !important;
    background: transparent !important;

    font-size: clamp(2.2rem, 5vw, 4.2rem) !important;
    font-weight: 800 !important;
    line-height: 1.08 !important;
    letter-spacing: -0.025em !important;

    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    word-wrap: normal !important;
    hyphens: none !important;

    text-shadow: none !important;
    opacity: 1 !important;
    position: static !important;
}

main .blog-post > header.blog-post-header p,
main .blog-post > header.blog-post-header > p {
    display: block !important;
    grid-column: 1 !important;

    width: 100% !important;
    max-width: 820px !important;

    margin: 0 !important;
    padding: 0 !important;

    color: #596a7f !important;
    background: transparent !important;

    font-size: 1.08rem !important;
    line-height: 1.7 !important;

    position: static !important;
    opacity: 1 !important;
}


/* =========================================================
   BLOG POST COVER IMAGE
   ========================================================= */

.blog-post-cover {
    display: block !important;

    position: static !important;

    width: 100% !important;
    height: auto !important;

    aspect-ratio: 1200 / 627;
    object-fit: cover;

    margin: 0 0 40px !important;

    border-radius: 18px;
    background: #dce9f2;
}


/* =========================================================
   BLOG POST BODY
   ========================================================= */

.blog-post-body {
    width: 100%;
    max-width: 820px;
    color: #33465d !important;
    background: transparent !important;
    font-size: 1.08rem;
    line-height: 1.8;
}

.blog-post-body h2,
.blog-post-body h3,
.blog-post-body h4 {
    margin-top: 2em;
    margin-bottom: 0.7em;
    color: #14233b;
    line-height: 1.25;
}

.blog-post-body p {
    margin: 0 0 1.25em;
}

.blog-post-body ul,
.blog-post-body ol {
    padding-left: 1.4rem;
}

.blog-post-body blockquote {
    margin: 1.5rem 0;
    padding: 1rem 1.25rem;
    border-left: 4px solid #ffd200;
    background: #fff8d9;
    color: #53657b;
}

.blog-post-body pre {
    overflow: auto;
    padding: 1rem;
    border-radius: 0.7rem;
    background: #14233b;
    color: #eef4fa;
}

.blog-post-body a {
    color: #0b628d;
    text-decoration: underline;
}

.blog-post-body img {
    max-width: 100%;
    height: auto;
    border-radius: 0.7rem;
}


/* =========================================================
   BLOG POST SIDEBAR
   ========================================================= */

.blog-post-aside {
    align-self: start;

    position: sticky;
    top: 110px;

    width: 100%;
    padding: 28px;

    border: 1px solid #e1e8ef;
    border-radius: 18px;

    background: #f8fbfd;
}

.blog-post-aside h2 {
    margin: 0 0 12px;
    color: #14233b !important;
    background: transparent !important;
    font-size: 1rem;
    text-shadow: none !important;
}

.blog-post-aside p {
    margin: 0 0 20px;
    color: #596a7f;
    font-size: 0.95rem;
    line-height: 1.6;
}

.blog-back-link {
    display: inline-block;
    color: #0b628d;
    font-size: 0.9rem;
    font-weight: 800;
}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 900px) {

    .blog-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .blog-post-wrap {
        padding: 48px 0 64px;
    }

    .blog-post-layout {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .blog-post-aside {
        position: static;
        width: 100%;
    }

    main .blog-post > header.blog-post-header h1 {
        max-width: 100% !important;
        font-size: clamp(2.2rem, 7vw, 3.5rem) !important;
    }

    .blog-post-body {
        max-width: 100%;
    }
}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 600px) {

    .blog-grid {
        grid-template-columns: 1fr;
    }

    .blog-hero {
        padding-top: 4rem;
    }

    .blog-card h2 {
        min-height: 3.9em;
        -webkit-line-clamp: 3;
    }

    .blog-post-wrap {
        padding: 32px 0 48px;
    }

    .blog-post-layout {
        gap: 32px;
    }

    .blog-post {
        padding: 20px;
        border-radius: 14px;
    }

    main .blog-post > header.blog-post-header {
        margin-bottom: 24px !important;
    }

    main .blog-post > header.blog-post-header .blog-post-meta {
        margin-bottom: 16px !important;
        padding: 7px 11px !important;
        font-size: 0.78rem !important;
    }

    main .blog-post > header.blog-post-header h1 {
        max-width: 100% !important;
        margin-bottom: 18px !important;

        font-size: clamp(2rem, 9vw, 2.8rem) !important;
        line-height: 1.1 !important;
        letter-spacing: -0.025em !important;
    }

    main .blog-post > header.blog-post-header p,
    main .blog-post > header.blog-post-header > p {
        max-width: 100% !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    .blog-post-cover {
        margin-bottom: 28px !important;
        border-radius: 14px;
    }

    .blog-post-body {
        font-size: 1rem;
        line-height: 1.75;
    }

    .blog-post-aside {
        padding: 22px;
        border-radius: 14px;
    }
}

/* =========================================================
   FINAL FIX — BLOG ARTICLE HEADER MUST BE VERTICAL
   ========================================================= */

main .blog-post > header.blog-post-header {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;

    position: static !important;
    float: none !important;

    padding: 0 !important;
    margin: 0 0 32px !important;

    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;

    transform: none !important;
}

/* Every header child gets its own full-width row */
main .blog-post > header.blog-post-header > * {
    display: block !important;
    float: none !important;
    position: static !important;

    width: 100% !important;
    max-width: 100% !important;

    margin-left: 0 !important;
    margin-right: 0 !important;
    transform: none !important;
}

/* Published badge */
main .blog-post > header.blog-post-header > .blog-post-meta {
    display: inline-flex !important;
    width: fit-content !important;
    margin: 0 0 20px !important;
}

/* Main title */
main .blog-post > header.blog-post-header > h1 {
    display: block !important;

    width: 100% !important;
    max-width: 900px !important;

    margin: 0 0 22px !important;
    padding: 0 !important;

    font-size: clamp(2.2rem, 5vw, 4.2rem) !important;
    line-height: 1.08 !important;
    font-weight: 800 !important;

    color: #14233b !important;
    background: transparent !important;

    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: normal !important;
    word-wrap: normal !important;
    hyphens: none !important;
}

/* Excerpt */
main .blog-post > header.blog-post-header > p {
    display: block !important;

    width: 100% !important;
    max-width: 820px !important;

    margin: 0 !important;
    padding: 0 !important;

    font-size: 1.08rem !important;
    line-height: 1.7 !important;

    color: #596a7f !important;
    background: transparent !important;
}

@media (max-width: 600px) {

    main .blog-post > header.blog-post-header > h1 {
        max-width: 100% !important;
        font-size: clamp(2rem, 9vw, 2.8rem) !important;
        line-height: 1.1 !important;
    }

    main .blog-post > header.blog-post-header > p {
        max-width: 100% !important;
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }
}

/* =========================================================
   BLOG POST: highlighted date + intro line (navy / yellow)
   ========================================================= */

/* "Published September 8, 2026" pill */
main .blog-post > header.blog-post-header .blog-post-meta {
    background: #0B192C !important;
    color: #FFD700 !important;
    padding: 9px 18px !important;
    font-size: 0.9rem !important;
    font-weight: 800 !important;
    letter-spacing: 0.04em !important;
    text-transform: uppercase !important;
    box-shadow: 0 6px 16px rgba(11, 25, 44, 0.18) !important;
}

main .blog-post > header.blog-post-header .blog-post-meta * {
    color: #FFD700 !important;
}

/* Intro line under the title */
main .blog-post > header.blog-post-header > p:not(.blog-post-meta) {
    color: #1E3E62 !important;
    font-size: clamp(1.15rem, 2vw, 1.4rem) !important;
    font-weight: 600 !important;
    line-height: 1.6 !important;
    padding: 4px 0 4px 20px !important;
    border-left: 5px solid #FFD700 !important;
}