/* ==========================================
   OUR MISSION PAGE (Four Pillars Grid Layout)
   ========================================== */

.opt2-grid-layout { 
    background-color: #E6E4E0; /* Ren-Flex Alabaster/Grey background */
    padding-bottom: 8rem; 
}

/* --- HERO SECTION WITH HTML IMAGE --- */
.pillar-hero { 
    position: relative;
    color: #ffffff; 
    padding: 12rem 5% 10rem 5%; 
    text-align: center; 
    overflow: hidden; 
    background-color: #050505; /* Fallback color */
}

/* Positions the image wrapper absolutely behind the text */
.hero-image-wrapper {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

/* Forces the HTML image to cover the entire header space */
.hero-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Dark gradient overlay for text readability */
.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(rgba(5, 5, 5, 0.7), rgba(5, 5, 5, 0.8));
}

/* Brings the text content to the front */
.hero-text-content {
    position: relative;
    z-index: 1; 
}

.pillar-kicker { 
    font-size: 1.35rem; 
    text-transform: uppercase; 
    letter-spacing: 0.2em; 
    color: #8B0000; 
    display: block; 
    margin-bottom: 2rem; 
    font-weight: 700;
}

.hero-text-content h1 { 
    max-width: 1000px; 
    margin: 0 auto; 
    font-size: clamp(2rem, 4vw, 3.5rem); 
    line-height: 1.3; 
    font-weight: 500; 
    font-family: 'Playfair Display', serif; 
}

/* --- CARD GRID --- */
.pillar-cards-container { 
    position: relative; /* Added to unlock z-index */
    z-index: 10; /* Forces the cards to sit IN FRONT of the hero */
    max-width: 1200px; 
    margin: -4rem auto 0; 
    padding: 0 5%; 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr)); 
    gap: 2rem; 
}

.pillar-card { 
    background: #ffffff; 
    padding: 3rem; 
    border-radius: 8px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.05); 
    border-bottom: 4px solid transparent; 
    transition: transform 0.3s ease, border-bottom 0.3s ease; 
    display: flex;
    flex-direction: column;
}

.pillar-card:hover { 
    border-bottom: 4px solid #8B0000; 
    transform: translateY(-5px);
}

.pillar-card h3 { 
    font-size: 1.2rem; 
    color: #8B0000; 
    text-transform: uppercase; 
    letter-spacing: 0.1em; 
    margin-bottom: 1.5rem; 
    font-weight: 700;
}

.pillar-card p { 
    font-size: 1.1rem; 
    line-height: 1.6; 
    color: #444444; 
    margin: 0; 
}

/* --- HIGHLIGHTED PURPOSE CARD --- */
.purpose-card { 
    background-color: #8B0000; 
    color: #ffffff; 
}

.purpose-card h3 { 
    color: #ffffff; 
    opacity: 0.8; 
}

.purpose-card p { 
    color: #ffffff; 
    font-weight: 500; 
    font-size: 1.2rem; 
}

.purpose-card:hover { 
    border-bottom: 4px solid #050505; 
}

/* Change only the top-level main nav links to white ON DESKTOP ONLY */
@media (min-width: 901px) {
    .main-nav .nav-links > li > a {
        color: #ffffff !important;
    }
}

/* --- MOBILE RESPONSIVENESS --- */
@media (max-width: 900px) {
    /* Mission Page Specific Layout */
    .pillar-hero {
        padding: 8rem 5% 6rem 5%;
    }
    
    .pillar-cards-container {
        margin: -2rem auto 0;
        grid-template-columns: 1fr;
    }
    
    .pillar-card {
        padding: 2rem;
    }

    /* EXACT MIRROR OF OUR-COMPANY.CSS 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; 
    }

    /* Hide the Logo (Mirroring our-company.css behavior) */
    .main-nav .nav-brand {
        display: none !important;
    }

    /* Burger Menu Left */
    .main-nav .mobile-toggle {
        position: relative !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
        margin: 0 !important;
        order: 1;
        display: flex !important;
    }

    /* FORCED WHITE HAMBURGER: Ensures visibility against the dark hero */
    .main-nav .mobile-toggle span {
        background-color: #ffffff !important;
    }

    /* Force Quote Button to Show on Right */
    .main-nav .nav-actions {
        position: relative !important;
        display: block !important;
        order: 2;
    }

    /* Scale the button slightly for small screens */
    .main-nav .nav-quote-pill {
        padding: 0.6rem 1.2rem !important;
        font-size: 0.85rem !important;
    }

    /* MOBILE NAV TEXT COLOR: Updated to match the Ren-Flex Deep Red */
    .main-nav .nav-links > li > a {
        color: #8B0000 !important; 
    }
}