/* =========================================
   INDUSTRIES PAGE STYLES
   ========================================= */
.industries-page {
    background-color: var(--bg-base);
    color: var(--text-primary);
    padding-top: 200px; /* Account for fixed nav */
}

/* --- UTILITY CLASSES --- */
.cursive-text {
    font-family: 'Playfair Display', serif;
    font-style: italic;
    font-weight: 600;
}

.gold-dot {
    color: #C89B3C;
}

/* Gold text highlighter for editorial copy */
.gold-highlight {
    color: #C89B3C;
    font-weight: 500;
}

/* --- FULL WIDTH HEADER --- */
.industries-hero {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 5%;
    margin-bottom: 4rem;
}

.bleed-heading {
    font-size: clamp(3rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 2rem;
    font-weight: 500;
}

.hero-intro {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 900px;
    margin-bottom: 1.5rem;
}

/* --- THE 3-COLUMN INTERACTIVE ENGINE (DESKTOP) --- */
.interactive-industry-engine {
    display: flex;
    max-width: 1600px;
    margin: 0 auto;
    position: relative;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

/* Left Column: Sticky Nav (20%) */
.engine-nav {
    width: 20%;
    padding: 4rem 2rem 4rem 5%;
    position: sticky;
    top: 100px; /* Sticks just below navbar */
    height: calc(100vh - 100px);
    overflow-y: auto;
    
    /* FIX 2: Hides the ugly scrollbar but keeps the scroll functionality */
    scrollbar-width: none; /* Firefox */
    -ms-overflow-style: none; /* IE and Edge */
}

/* FIX 2: Hides the scrollbar for Chrome, Safari and Opera */
.engine-nav::-webkit-scrollbar {
    display: none; 
}

.engine-nav ul {
    list-style: none;
}

.engine-nav li {
    padding: 0.8rem 0;
    font-size: 0.95rem;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-smooth);
    
    /* FIX 1: Forces the text to stay grouped on the left, killing the weird gap */
    text-align: left !important; 
    display: block !important;
}

.engine-nav li:hover {
    color: var(--text-primary);
}

.engine-nav li.active {
    color: #C89B3C;
    /* Gold */
    font-weight: 600;
    padding-left: 10px;
    border-left: 3px solid #C89B3C;
    border-bottom-color: transparent;
}

/* Center Column: Scrolling Text (45%) */
.engine-content {
    width: 45%;
    padding: 4rem 5% 10rem 3rem;
}

.industry-card {
    min-height: 60vh;
    /* Gives breathing room between blocks */
    display: flex;
    flex-direction: column;
    justify-content: center;
    margin-bottom: 4rem;
    opacity: 0.3;
    /* Faded when out of focus */
    transition: opacity 0.5s ease;
}

.industry-card.in-view {
    opacity: 1;
}

.industry-card h2 {
    font-size: 2.5rem;
    margin-bottom: 0.5rem;
    font-family: var(--font-main);
}

.industry-card h3 {
    font-size: 1.25rem;
    color: #C89B3C;
    font-style: italic;
    font-family: serif;
    margin-bottom: 1.5rem;
    font-weight: 400;
}

.industry-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    font-size: 1.05rem;
}

/* Right Column: Sticky Image (35%) */
.engine-visual {
    width: 35%;
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.crossfade-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity 0.8s cubic-bezier(0.25, 0.8, 0.25, 1);
    z-index: 1;
}

.crossfade-img.active {
    opacity: 1;
    z-index: 2;
}

.engine-visual .image-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, var(--bg-base) 0%, transparent 40%);
    z-index: 3;
    pointer-events: none;
}

/* --- CLOSING CONTENT --- */
.industries-closing {
    max-width: 1000px;
    margin: 6rem auto;
    padding: 0 5%;
}

.closing-block {
    margin-bottom: 5rem;
}

.closing-block h2 {
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.closing-block h3 {
    font-size: 1.25rem;
    color: #C89B3C;
    margin-bottom: 1.5rem;
    font-style: italic;
    font-family: serif;
}

.closing-block p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

/* --- CLOSING CTA (MINIMALIST LEFT-ALIGNED) --- */
.industries-cta {
    background-color: transparent;
    /* Removes the block container */
    padding: 2rem 0;
    text-align: left;
    margin-top: 6rem;
    position: relative;
}

/* Gold Accent Line */
.industries-cta::before {
    content: '';
    display: block;
    width: 60px;
    height: 2px;
    background-color: #C89B3C;
    margin-bottom: 2.5rem;
}

.industries-cta h2 {
    font-size: 2.8rem;
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.industries-cta p {
    color: var(--text-secondary);
    max-width: 800px;
    /* Keeps line length readable */
    font-size: 1.1rem;
    line-height: 1.6;
}

/* Solid White Pill Button (With Invert Hover) */
.cta-pill-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    background-color: #ffffff;
    color: #050505;
    border: 1px solid #ffffff; /* Added white border */
    border-radius: 50px;
    font-weight: 600;
    text-decoration: none;
    margin-top: 1rem;
    transition: all 0.3s ease; /* Ensures smooth color transition */
}

.cta-pill-btn:hover {
    background-color: transparent; /* Makes background clear */
    color: #ffffff; /* Turns text white */
    transform: translateY(-3px); /* Keeps your upward lift */
}

/* =========================================
   MOBILE OPTIMIZATION: EXPANDABLE ACCORDION
   ========================================= */
@media (max-width: 768px) {
    .interactive-industry-engine {
        display: block;
        border-top: none;
    }

    /* 1. Hide the Desktop Content & Images Entirely */
    .engine-content,
    .engine-visual {
        display: none !important;
    }

    /* 2. Repurpose the Nav into the Mobile Container */
    .engine-nav {
        width: 100%;
        padding: 0 5%;
        position: relative;
        top: 0;
        height: auto;
        overflow: visible;
        display: block;
    }

    /* 3. Style the List Items into Clickable Buttons */
    #industry-index li {
        position: relative;
        background-color: var(--bg-surface);
        border: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 8px;
        margin-bottom: 1rem;
        padding: 1.25rem 1.5rem;
        color: var(--text-primary);
        font-weight: 500;
        font-size: 1.1rem;
        transition: var(--transition-smooth);
        cursor: pointer;
    }

    /* Removes the desktop gold line on mobile */
    #industry-index li.active {
        border-left: 1px solid rgba(255, 255, 255, 0.05);
        padding-left: 1.5rem;
    }

    /* Position the Chevron Icon */
    .accordion-icon {
        position: absolute;
        right: 1.5rem;
        top: 1.5rem;
        font-size: 1rem;
        color: #C89B3C;
        transition: transform 0.3s ease;
    }

    /* 4. The Hidden Dropdown Container */
    .accordion-dropdown {
        display: none;
        margin-top: 1.5rem;
        border-top: 1px solid rgba(255, 255, 255, 0.1);
        padding-top: 1.5rem;
    }

    /* 5. The Open State */
    #industry-index li.accordion-open {
        border-color: #C89B3C;
        /* Highlights the active card in gold */
    }

    #industry-index li.accordion-open .accordion-icon {
        transform: rotate(180deg);
        /* Flips the chevron */
    }

    #industry-index li.accordion-open .accordion-dropdown {
        display: block;
        animation: fadeIn 0.4s ease forwards;
    }

    @keyframes fadeIn {
        from {
            opacity: 0;
            transform: translateY(-10px);
        }
        to {
            opacity: 1;
            transform: translateY(0);
        }
    }

    /* 6. Style the Dynamically Injected Content */
    .mobile-accordion-img {
        width: 100%;
        height: 220px;
        object-fit: cover;
        border-radius: 8px;
        margin-bottom: 1.5rem;
    }

    .mobile-accordion-text h3 {
        font-size: 1.15rem;
        color: #C89B3C;
        font-style: italic;
        font-family: serif;
        margin-bottom: 1rem;
        font-weight: 400;
    }

    .mobile-accordion-text p {
        color: var(--text-secondary);
        font-size: 0.95rem;
        margin-bottom: 1rem;
        line-height: 1.6;
    }

    /* Mobile CTA padding */
    .industries-cta {
        padding: 3rem 0;
    }
}

/* =========================================
   HIDE MOBILE ACCORDION ON DESKTOP
   ========================================= */
@media (min-width: 993px) {
    .accordion-icon,
    .accordion-dropdown {
        display: none !important;
    }
}