/* styles/blog.css */
.blog-wrapper {
    /* Apply the top clearance globally for ALL screen sizes */
    padding-top: calc(var(--spacing-section) + 5rem);
    padding-bottom: var(--spacing-section);
    background-color: var(--color-bg-light);
}

/* =========================================
   HEADER STYLING
========================================= */
.blog-header-wrapper {
    margin-bottom: 4rem;
}

.page-kicker {
    display: block;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 700;
    color: var(--color-accent-red);
    margin-bottom: 0.5rem;
}

.page-title {
    font-size: clamp(3rem, 6vw, 5.5rem);
    line-height: 1;
    font-weight: 700;
    font-style: normal; /* Strictly straight serif */
    color: var(--color-accent-black);
    margin-bottom: 1.5rem;
}

.red-dot {
    color: var(--color-accent-red);
}

.header-bottom-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.page-subtitle {
    font-size: 1.1rem;
    color: var(--color-text-light);
    max-width: 600px;
}

.header-socials {
    display: flex;
    gap: 1rem;
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    color: var(--color-accent-black);
    border: 1px solid rgba(17, 17, 17, 0.2);
    border-radius: 4px; /* Square edges */
    text-decoration: none;
    font-size: 1.1rem;
    transition: all 0.3s ease;
}

.social-icon:hover {
    background-color: var(--color-accent-red);
    color: var(--color-bg-light);
    border-color: var(--color-accent-red);
    transform: translateY(-3px);
}

.header-divider {
    width: 100%;
    height: 1px;
    background-color: #eaeaea;
}

/* =========================================
   THE SPLIT LAYOUT (Option 4)
========================================= */
.split-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 4rem;
    align-items: start;
}

.article-kicker {
    display: block;
    font-size: 0.8rem;
    text-transform: uppercase;
    font-weight: 700;
    letter-spacing: 1px;
    color: var(--color-accent-red);
    margin-bottom: 0.75rem;
}

/* --- THE HERO SECTION (Left) --- */
.hero-article h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    line-height: 1.15;
    margin-bottom: 1rem;
    color: var(--color-accent-black);
    font-style: normal;
}

.hero-article h2 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.hero-article h2 a:hover {
    color: var(--color-accent-red);
}

.hero-image-wrapper {
    display: block;
    width: 100%;
    height: 450px;
    background-color: var(--color-bg-alt);
    margin-bottom: 2rem;
    overflow: hidden;
    border-radius: 4px;
}

.hero-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.hero-image-wrapper:hover .hero-image {
    transform: scale(1.03);
}

.hero-excerpt {
    font-size: 1.05rem;
    color: var(--color-text-main);
    line-height: 1.7;
}

/* --- THE LIST SECTION (Right) --- */
.article-list {
    display: flex;
    flex-direction: column;
}

.list-article {
    padding: 2rem 0;
    border-bottom: 1px solid #eaeaea;
}

.list-article:first-child {
    padding-top: 0;
}

.list-article:last-child {
    border-bottom: none;
}

.list-article h3 {
    font-size: 1.5rem;
    color: var(--color-accent-black);
    margin-bottom: 0.75rem;
    font-style: normal;
}

.list-article h3 a {
    text-decoration: none;
    color: inherit;
    transition: color 0.3s ease;
}

.list-article h3 a:hover {
    color: var(--color-accent-red);
}

.list-excerpt {
    font-size: 0.95rem;
    color: var(--color-text-light);
}

/* Responsive */
@media (max-width: 1024px) {
    .split-layout {
        grid-template-columns: 1fr;
        gap: 3rem;
    }
    .header-bottom-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
}

/* --- HIDE LIST IMAGES ON DESKTOP --- */
.list-image-wrapper.mobile-only-img {
    display: none;
}

/* ============================================================
   MOBILE RESPONSIVE (Blog & Article Pages)
   ============================================================ */
@media (max-width: 768px) {
    /* --- 1. Mobile Nav Layout --- */
    .main-nav .nav-container {
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100%;
        padding: 1rem 1.5rem !important;
        box-sizing: border-box;
    }

    .main-nav .nav-brand {
        display: none !important;
    }

    .main-nav .mobile-toggle {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
        order: 1;
        display: flex !important;
        /* No white background override so the burger stays dark against the light theme */
    }

    .main-nav .nav-actions {
        position: relative !important;
        display: block !important;
        order: 2;
    }

    .main-nav .nav-quote-pill {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
    }

    /* --- 2. Header & Socials Centering --- */
    .blog-header-wrapper {
        text-align: center;
    }

    .page-kicker,
    .page-title,
    .page-subtitle {
        text-align: center;
        margin-left: auto;
        margin-right: auto;
    }

    .header-bottom-row {
        flex-direction: column;
        align-items: center; /* Centers the subtitle and social block */
        gap: 1.5rem;
    }

    .header-socials {
        justify-content: center;
        width: 100%;
    }

    /* --- Show and format the list images ONLY on mobile --- */
    .list-image-wrapper.mobile-only-img {
        display: block;
        width: 100%;
        height: 220px;
        background-color: var(--color-bg-alt);
        margin-bottom: 1.5rem;
        overflow: hidden;
        border-radius: 4px;
    }

    .list-image-wrapper.mobile-only-img .list-image {
        width: 100%;
        height: 100%;
        object-fit: cover;
    }

    /* --- Reorder the Article Content ONLY on mobile --- */
    .hero-article,
    .list-article {
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .hero-image-wrapper,
    .list-image-wrapper {
        order: 1; /* Images go to the top */
    }

    .article-kicker {
        order: 2; /* Tags go second */
    }

    .hero-article h2,
    .list-article h3 {
        order: 3; /* Titles go third */
    }

    .hero-excerpt,
    .list-excerpt {
        order: 4; /* Text goes fourth */
        text-align: center;
    }

    .read-more-link {
        order: 5; /* Pushes the button to the very bottom */
        margin-top: 1.5rem;
        width: 100%;
        justify-content: center;
    }
}

/* --- THE SOCIAL ICONS (Matched to Footer) --- */
.header-socials {
    display: flex;
    gap: 1rem; /* Accommodates larger icons */
}

.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px; /* Matched 44px width */
    height: 44px; /* Matched 44px height */
    background-color: #111111; /* Dark background */
    color: #8B0000; /* Default icon color is deep red*/
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.3s ease; /* Retained color transition */
    border-radius: 4px; /* Matched border radius */
    text-decoration: none;
    font-size: 1.125rem; /* Matched 1.125rem font size */
}

.social-icon:hover {
    background-color: #8B0000; /* Background highlights deep red */
    color: #000000; /* Icon turns solid black */
    transform: translateY(-3px); /* Added slight lift for header interactivity */
}

/* --- READ MORE LINK --- */
.read-more-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #000000; /* Strictly Black */
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-decoration: none;
    margin-bottom: 1rem;
    transition: transform 0.3s ease;
}

.read-more-link i {
    font-size: 1rem;
}

.read-more-link:hover {
    transform: translateX(5px);
    color: #000000; /* Remains black on hover */
}

/* =========================================
   FALLBACK MESSAGE LOGIC
========================================= */
.empty-blog-msg:not(:only-child) {
    display: none;
}