/* ==========================================================================
   CSS VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
    --primary-blue: #215F9A;
    --pure-black: #000000;
    --neutral-light: #F2F2F2;
    --white: #ffffff;
    --text-dark: #333333;
    --font-main: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--neutral-light);
}

a {
    text-decoration: none;
    color: var(--primary-blue);
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ==========================================================================
   3-PART HEADER STYLES
   ========================================================================== */
.site-header {
    width: 100%;
}

/* 1. Navigation Header (White) */
.header-nav {
    background-color: var(--white);
    padding: 15px 0;
    border-bottom: 4px solid var(--primary-blue); /* Distinct boundary */
}

.nav-container {
    display: flex;
    justify-content: center; 
    align-items: center;
    gap: 30px;
}

.main-nav ul {
    list-style: none;
    display: flex;
    gap: 30px;
}

.main-nav a {
    color: var(--primary-blue);
    font-weight: 500;
    font-size: 1.1rem;
}

/* Add this to styles.css to ensure the hero content stays balanced */
.hero-container {
    display: flex;
    justify-content: center; /* This centers the image/text block horizontally */
    align-items: center;
    gap: 60px; /* Increased gap for better visual balance */
}

/* Add this utility class for any component that needs perfect centering */
.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 40px;
}

.btn-primary {
    background-color: var(--primary-blue);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 4px;
    font-weight: bold;
    display: inline-block;
}

.btn-primary:hover {
    background-color: #1a4a7a; /* Slightly darker on hover */
    color: var(--white);
    opacity: 1;
}

.mobile-menu-toggle {
    display: none; /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-blue);
    cursor: pointer;
}

/* 2. Main Header (Blue) */
.header-main {
    background-color: var(--primary-blue);
    padding: 40px 0 0 0; /* Image touches bottom edge */
    overflow: hidden;
}

.hero-container {
    display: flex;
    align-items: flex-end;
    gap: 40px;
}

.hero-image img {
    display: block;
    max-height: 250px;
    width: auto;
}

.hero-text {
    padding-bottom: 40px;
    color: var(--white);
}

.hero-text h1 {
    font-size: 3rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: 0.5px;
}

.hero-text p {
    font-size: 1.25rem;
    font-weight: 300;
}

/* 3. Social Media Header (White) */
.header-social {
    background-color: var(--white);
    padding: 15px 0;
    border-top: 4px solid var(--pure-black); /* Lower boundary */
}

.social-container {
    display: flex;
    justify-content: center;
    align-items: center; /* Enforces strict vertical centering */
    gap: 20px; /* Slightly increased gap so the larger icons have breathing room */
}

/* New class to strip out invisible text-baseline spacing */
.social-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

/* LinkedIn Newsletter Button */
.libutton {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 7px;
    text-align: center;
    outline: none;
    text-decoration: none !important;
    color: #ffffff !important;
    width: 200px;
    height: 32px;
    border-radius: 16px;
    background-color: #0A66C2;
    font-family: "SF Pro Text", Helvetica, sans-serif;
}

/* ==========================================================================
   MAIN CONTENT
   ========================================================================== */
.site-content {
    min-height: 50vh;
    background-color: var(--neutral-light);
}

/* ==========================================================================
   3-PART FOOTER STYLES
   ========================================================================== */
.site-footer {
    width: 100%;
}

/* 1. FooterNav (White) */
.footer-nav {
    background-color: var(--white);
    padding: 20px 0;
    border-top: 4px solid var(--primary-blue);
}

.footer-nav-container {
    display: flex;
    justify-content: center;
    gap: 40px;
}

.footer-nav a {
    color: var(--text-dark);
    font-weight: 500;
}

/* 2. Footer Legal (Blue) */
.footer-legal {
    background-color: var(--primary-blue);
    padding: 20px 0;
}

.footer-legal-container {
    display: flex;
    justify-content: center;
    gap: 100px;
}

.footer-legal a {
    color: var(--white);
    font-weight: 500;
}

/* 3. Footer Copyright (Black) */
.footer-cr {
    background-color: var(--pure-black);
    padding: 15px 0;
    text-align: center;
}

.footer-cr p {
    color: #888888;
    font-size: 0.9rem;
}

/* ==========================================================================
   CONTENT FEED LAYOUT
   ========================================================================== */
.content-container {
    max-width: 800px; /* Keeps line lengths comfortable for reading */
    margin: 60px auto; 
    padding: 0 20px;
}

.content-feed {
    display: flex;
    flex-direction: column;
    gap: 80px; /* Provides generous breathing room between posts */
}

/* Standard Article Layout */
.feed-item {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.feed-item img {
    width: 100%;
    height: auto;
    display: block;
    /* Optional: adds a very subtle border to light images to frame them */
    border: 1px solid #eaeaea; 
}

.feed-item h3 {
    font-size: 1.4rem;
    color: var(--text-dark);
    font-weight: 400;
    line-height: 1.4;
    text-align: left;
}

.read-more {
    color: #888888;
    font-size: 0.95rem;
    text-align: right; /* Aligns the 'read all here' link to the right edge */
}

.read-more:hover {
    color: var(--primary-blue);
    opacity: 1;
}

/* Featured Layout (e.g., Book Promo) */
.feature-item {
    flex-direction: row;
    align-items: center;
    background-color: var(--white);
    padding: 40px;
    gap: 40px;
    border: none;
}

.feature-item h2 {
    font-size: 2.5rem;
    color: #888888;
    font-weight: 300;
    line-height: 1.2;
}

.feature-item img {
    width: 50%;
    border: none;
}

/* Mobile Adjustments for the Layout */
@media screen and (max-width: 600px) {
    .content-feed {
        gap: 50px; /* Tighter spacing on mobile */
    }

    .feature-item {
        flex-direction: column;
        padding: 20px 0;
        text-align: center;
        background-color: transparent;
    }

    .feature-item img {
        width: 80%; /* Makes the book cover larger on mobile screens */
    }
}

/* ==========================================================================
   FULL ARTICLE TYPOGRAPHY & LAYOUT
   ========================================================================== */
.full-article {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px 0;
}

.article-header {
    text-align: center;
    margin-bottom: 40px;
}

.article-header h1 {
    font-size: 2.2rem;
    color: var(--primary-blue);
    margin-bottom: 30px;
    line-height: 1.3;
}

.article-header img {
    width: 100%;
    height: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.article-body p {
    font-size: 1.15rem;
    color: var(--text-dark);
    margin-bottom: 20px;
    text-align: left;
}

.article-body h2 {
    font-size: 1.6rem;
    color: var(--primary-blue);
    margin: 40px 0 20px 0;
    text-align: left;
}

/* Styling for lists to make them readable */
.article-body ul, 
.article-body ol {
    margin: 0 0 30px 40px;
    font-size: 1.15rem;
    color: var(--text-dark);
}

.article-body li {
    margin-bottom: 15px;
}

.hashtags {
    margin-top: 40px;
    font-weight: bold;
    color: var(--primary-blue);
}

/* ==========================================================================
   MOBILE RESPONSIVENESS (MOBILE-FIRST ADAPTATIONS)
   ========================================================================== */
@media screen and (max-width: 768px) {
    /* Collapse Nav into Hamburger Menu */
    .header-nav {
        position: relative; /* Ensures the dropdown anchors to the header */
    }

    .main-nav { 
        display: none; /* Hidden by default */
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background-color: var(--white);
        border-bottom: 4px solid var(--primary-blue);
        padding: 20px 0;
        z-index: 1000;
        box-shadow: 0 10px 15px -3px rgba(0,0,0,0.1);
    }

    /* The class added by JavaScript to show the menu */
    .main-nav.active { 
        display: block; 
    }

    .main-nav ul {
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }

    .mobile-menu-toggle { 
        display: block; 
    }
    
    .nav-container { 
        justify-content: flex-end; 
    }

    /* Stack Hero Section */
    .hero-container {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 20px;
    }
    
    .hero-text {
        padding-bottom: 20px;
    }
    
    .hero-text h1 { font-size: 2.2rem; }
    .hero-text p { font-size: 1.1rem; }
    
    /* Adjust Footer Spacing */
    .footer-legal-container {
        flex-direction: column;
        align-items: center;
        gap: 15px;
    }
}