/* ESPACIO GROUPE - Cinematic Glassmorphism Design System */

:root {
    --bg-darkest: #ffffff; /* White page background! */
    --bg-dark: #fafafa;
    --bg-glass: rgba(255, 255, 255, 0.6);
    --bg-header: rgba(255, 255, 255, 0.85); /* Ensure it's white */
    
    --accent-orange: #ff6b00;
    --accent-glow: rgba(255, 107, 0, 0.05);
    --border-glass: rgba(0, 0, 0, 0.05); /* Soft light borders */
    --border-orange: rgba(255, 107, 0, 0.3);
    
    --text-light: #111111; /* Black text */
    --text-grey: #444444; /* Charcoal body text */
    --text-muted: #888888;
    
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    --radius-premium: 28px;
    --transition-cinematic: all 1.2s cubic-bezier(0.25, 1, 0.3, 1);
    --transition-smooth: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-fast: all 0.25s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Reset & Scrollbar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

a, button {
    text-decoration: none !important;
    color: inherit;
}

ul, ol, li {
    list-style: none !important;
    list-style-type: none !important;
}

html {
    scroll-behavior: smooth;
    background-color: var(--bg-darkest);
    color: var(--text-light);
    font-family: var(--font-body);
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
}

body {
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: var(--bg-darkest);
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-darkest);
}
::-webkit-scrollbar-thumb {
    background: #181818;
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-orange);
}

/* Custom Cursor (Desktops) */
@media (pointer: fine) {
    *, *:before, *:after {
        cursor: none !important;
    }
}

/* Glowing Background Orbs */
.glow-orb {
    position: fixed;
    width: 50vw;
    height: 50vw;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.15;
    z-index: 0;
    pointer-events: none;
}

.orb-1 {
    top: -20%;
    left: -10%;
    background: radial-gradient(circle, var(--accent-orange) 0%, transparent 70%);
}

.orb-2 {
    bottom: -15%;
    right: -10%;
    background: radial-gradient(circle, #ff3d00 0%, transparent 70%);
}

.orb-3 {
    top: 35%;
    left: 40%;
    background: radial-gradient(circle, #571e00 0%, transparent 60%);
    opacity: 0.07;
}

/* Typography styling */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -1px;
}

h1 {
    font-size: 3.5rem;
    font-weight: 800;
}

h2 {
    font-size: 2.8rem;
}

@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
}

p {
    color: var(--text-grey);
    line-height: 1.8;
    font-size: 0.98rem;
}

p strong {
    color: var(--text-light);
}

.subtitle {
    display: inline-block;
    font-family: var(--font-body);
    color: var(--accent-orange);
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 5px;
    margin-bottom: 18px;
    position: relative;
    padding-left: 24px;
}

.subtitle::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 14px;
    height: 2px;
    background-color: var(--accent-orange);
}

/* Header & Logo (Dynamic Capsule / iOS Style Dynamic Island) */
.main-header {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    
    /* Default: Compact logo pill */
    width: 200px;
    max-width: 1200px; /* Constrain globally to prevent jumps during transition! */
    height: 56px; /* Fixed: 56px height */
    padding: 0 16px;
    border-radius: 50px;
    
    z-index: 1000;
    background-color: transparent; /* No glass effect at top of the page */
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border: 1px solid transparent;
    box-shadow: none;
    
    /* Elastic iOS style curve transition (slower & cinematic) */
    transition: width 2.4s cubic-bezier(0.25, 1, 0.3, 1),
                height 2.4s cubic-bezier(0.25, 1, 0.3, 1),
                border-radius 2.4s cubic-bezier(0.25, 1, 0.3, 1),
                padding 2.4s cubic-bezier(0.25, 1, 0.3, 1),
                background-color 0.8s ease,
                border-color 0.8s ease,
                box-shadow 0.8s ease;
    overflow: hidden;
}

/* Glassmorphism activation as soon as user scrolls past 15px */
.main-header.scrolled:not(.dark-theme) {
    background-color: rgba(255, 255, 255, 0.05); /* Same premium translucent white as hero card */
    backdrop-filter: blur(20px) saturate(190%);
    -webkit-backdrop-filter: blur(20px) saturate(190%);
    border: 1px solid rgba(255, 255, 255, 0.12); /* Same delicate glowing border */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.25);
}

/* Dynamic Dark Theme styles for main-header (Active past hero section - clear glass with dark text contrast) */
.main-header.dark-theme {
    background-color: rgba(15, 15, 15, 0.06) !important; /* Soft subtle smokey glass */
    border-color: rgba(255, 255, 255, 0.22) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
    backdrop-filter: blur(24px) saturate(220%) !important;
    -webkit-backdrop-filter: blur(24px) saturate(220%) !important;
}

.main-header.dark-theme:hover {
    background-color: rgba(15, 15, 15, 0.12) !important; /* Slightly more contrast when expanded on hover */
}

.main-header.dark-theme .logo-container {
    color: #111111 !important; /* Dark logo for white page contrast */
}

.main-header.dark-theme .nav-link {
    color: rgba(17, 17, 17, 0.85) !important; /* Dark text for readability */
}

.main-header.dark-theme .nav-link:hover, 
.main-header.dark-theme .nav-link.active {
    color: var(--accent-orange) !important;
}

.main-header.dark-theme .header-action-btn {
    color: #111111 !important;
    background-color: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.06) !important;
}

.main-header.dark-theme .header-action-btn:hover {
    background-color: var(--accent-orange) !important;
    color: #ffffff !important;
    border-color: var(--accent-orange) !important;
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.25) !important;
}

.main-header.dark-theme .hamburger-bar {
    background-color: #111111 !important; /* Dark hamburger bar for white page contrast */
}

/* iOS Style Minimizer for computers & tablets */
@media (min-width: 769px) {
    .main-header.minimized {
        width: 350px; /* Wider to avoid overflow-hidden cutoff of action icons */
        height: 56px;
        padding: 0 24px; /* More padding for breathing space */
        border-radius: 50px;
        /* Delay the physical morphing so menu items fade out first! Background & shadow adapt immediately. */
        transition: width 1.6s cubic-bezier(0.25, 1, 0.3, 1) 0.7s,
                    padding 1.6s cubic-bezier(0.25, 1, 0.3, 1) 0.7s,
                    border-radius 1.6s cubic-bezier(0.25, 1, 0.3, 1) 0.7s,
                    background-color 0.8s ease 0s,
                    border-color 0.8s ease 0s,
                    box-shadow 0.8s ease 0s;
    }
    
    .main-header.minimized .header-container {
        justify-content: space-between;
    }

    .main-header.minimized .logo-container {
        margin-left: 8px; /* Extra left margin inside the capsule for the logo */
        transition: margin 0.5s cubic-bezier(0.25, 1, 0.3, 1) 0.7s, color 0.5s ease 0s;
    }

    .main-header.minimized .header-actions {
        opacity: 1 !important;
        visibility: visible !important;
        pointer-events: auto !important;
        transition: opacity 0.5s ease 0s, visibility 0.5s ease 0s;
    }
    
    .main-header.minimized:hover:not(.no-hover) {
        width: 90%;
        max-width: 1200px;
        padding: 0 24px;
        border-radius: 32px;
        /* Instant expansion on hover (no delay!) */
        transition: width 1.2s cubic-bezier(0.25, 1, 0.3, 1) 0s,
                    padding 1.2s cubic-bezier(0.25, 1, 0.3, 1) 0s,
                    border-radius 1.2s cubic-bezier(0.25, 1, 0.3, 1) 0s,
                    background-color 0.8s ease 0s,
                    border-color 0.8s ease 0s,
                    box-shadow 0.8s ease 0s;
    }

    .main-header.minimized:hover:not(.no-hover) .logo-container {
        margin-left: 0; /* Reset margin on hover expand */
        transition: margin 0.5s cubic-bezier(0.25, 1, 0.3, 1) 0s, color 0.5s ease 0s;
    }

    /* Hide navigation element footprint smoothly after staggered exit transitions finish */
    .main-header.minimized:not(:hover),
    .main-header.minimized.no-hover {
        /* Fallback transitions when not hovered or during scroll */
    }

    .main-header.minimized:not(:hover) .desktop-nav,
    .main-header.minimized.no-hover .desktop-nav {
        max-width: 0;
        margin: 0;
        padding: 0;
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        overflow: hidden;
        /* Delay everything to let children fade out staggered (0.75s delay) */
        transition: max-width 0.5s cubic-bezier(0.25, 1, 0.3, 1) 0.75s,
                    opacity 0.4s ease 0.75s,
                    visibility 0.4s ease 0.75s;
    }

    .main-header.minimized:hover:not(.no-hover) .desktop-nav {
        max-width: 800px;
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        overflow: visible;
        transition: max-width 0.8s cubic-bezier(0.25, 1, 0.3, 1) 0s,
                    opacity 0.6s ease 0s,
                    visibility 0.6s ease 0s;
    }
}

/* Expanded State: Morph into full width navigation bar */
.main-header.expanded {
    width: 90%;
    max-width: 1200px;
    height: 56px; /* Fixed: 56px height (no expanding vertically!) */
    padding: 0 24px;
    border-radius: 32px;
}

.header-container {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center; /* Center logo in compact mode */
    transition: justify-content 0.5s;
}

.main-header.expanded .header-container {
    justify-content: space-between; /* Space logo, nav, and hamburger in expanded mode */
}

.logo-container {
    display: flex;
    align-items: center;
    height: 100%;
    color: #ffffff;
    transition: transform 1.8s cubic-bezier(0.25, 1, 0.3, 1), color 0.5s ease;
}

.logo-img {
    height: 32px;
    width: auto;
    max-width: 150px;
}

.main-header:not(.expanded) .logo-container {
    /* Slightly pop the logo when compact */
    transform: scale(1.05);
}

/* Desktop Nav Transition */
.desktop-nav {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    max-width: 0; /* Collapsed footprint by default */
    overflow: hidden;
    transition: max-width 0.8s cubic-bezier(0.25, 1, 0.3, 1),
                opacity 0.6s ease,
                visibility 0.6s;
    display: flex;
    align-items: center;
    white-space: nowrap; /* Prevents word wrapping during morph animation */
}

.main-header.expanded .desktop-nav,
.main-header.minimized:hover:not(.no-hover) .desktop-nav {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    max-width: 800px; /* High value to expand naturally */
}

/* Staggered Fade-in/out Transitions for Navigation Items */
.desktop-nav li {
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.25, 1, 0.3, 1);
}

.main-header.expanded .desktop-nav li,
.main-header.minimized:hover:not(.no-hover) .desktop-nav li {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.6s cubic-bezier(0.25, 1, 0.3, 1),
                transform 0.6s cubic-bezier(0.25, 1, 0.3, 1);
}

/* Initial page load transition delays (slower cinematic elastic entry) */
.main-header.expanded .desktop-nav li:nth-child(1) { transition-delay: 0.7s; }
.main-header.expanded .desktop-nav li:nth-child(2) { transition-delay: 0.85s; }
.main-header.expanded .desktop-nav li:nth-child(3) { transition-delay: 1.0s; }
.main-header.expanded .desktop-nav li:nth-child(4) { transition-delay: 1.15s; }
.main-header.expanded .desktop-nav li:nth-child(5) { transition-delay: 1.3s; }

/* Interactive hover expansion transition delays (snappy, fast response) */
.main-header.minimized:hover:not(.no-hover) .desktop-nav li:nth-child(1) { transition-delay: 0.08s; }
.main-header.minimized:hover:not(.no-hover) .desktop-nav li:nth-child(2) { transition-delay: 0.14s; }
.main-header.minimized:hover:not(.no-hover) .desktop-nav li:nth-child(3) { transition-delay: 0.20s; }
.main-header.minimized:hover:not(.no-hover) .desktop-nav li:nth-child(4) { transition-delay: 0.26s; }
.main-header.minimized:hover:not(.no-hover) .desktop-nav li:nth-child(5) { transition-delay: 0.32s; }

/* Exit transition delays (staggered reverse fade-out) when header collapses to minimized */
.main-header.minimized:not(:hover) .desktop-nav li:nth-child(1),
.main-header.minimized.no-hover .desktop-nav li:nth-child(1) { transition-delay: 0.32s; }
.main-header.minimized:not(:hover) .desktop-nav li:nth-child(2),
.main-header.minimized.no-hover .desktop-nav li:nth-child(2) { transition-delay: 0.24s; }
.main-header.minimized:not(:hover) .desktop-nav li:nth-child(3),
.main-header.minimized.no-hover .desktop-nav li:nth-child(3) { transition-delay: 0.16s; }
.main-header.minimized:not(:hover) .desktop-nav li:nth-child(4),
.main-header.minimized.no-hover .desktop-nav li:nth-child(4) { transition-delay: 0.08s; }
.main-header.minimized:not(:hover) .desktop-nav li:nth-child(5),
.main-header.minimized.no-hover .desktop-nav li:nth-child(5) { transition-delay: 0s; }

@keyframes fadeInNavItem {
    from {
        opacity: 0;
        transform: translateY(8px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Header Actions (Call & LinkedIn) */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.5s ease, visibility 0.5s;
}

.main-header.expanded .header-actions {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition-delay: 1.4s; /* Fade in right after list items */
}

.header-action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.08); /* Frosted translucent white button background */
    border: 1px solid rgba(255, 255, 255, 0.12);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.header-action-btn:hover {
    background-color: var(--accent-orange);
    color: #ffffff;
    border-color: var(--accent-orange);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 107, 0, 0.25);
}

.action-icon {
    width: 18px;
    height: 18px;
    stroke-width: 2;
}

@media (max-width: 768px) {
    .header-actions {
        display: none !important;
    }
}

.sidebar-logo, .footer-logo {
    color: #ffffff;
}

.glow-orb {
    opacity: 0.06;
}

.logo-img {
    height: 100%;
    width: auto;
    max-width: 180px;
}

.desktop-nav ul {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 600;
    font-size: 0.84rem;
    letter-spacing: 0.5px;
    color: rgba(255, 255, 255, 0.85); /* White text on hero! */
    padding: 8px 0;
    position: relative;
    transition: color 0.5s ease, opacity 0.5s ease;
}

.nav-link:hover, .nav-link.active {
    color: var(--accent-orange);
}

.mobile-nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    z-index: 1001;
    opacity: 0;
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.3, 1), visibility 1.2s;
}

.main-header.expanded .mobile-nav-toggle {
    opacity: 1;
    visibility: visible;
    transition-delay: 0.6s;
}

.hamburger-bar {
    width: 24px;
    height: 2px;
    background-color: #ffffff; /* White hamburger bar */
    transition: var(--transition-fast);
}

.mobile-nav-toggle.open .hamburger-bar:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-nav-toggle.open .hamburger-bar:nth-child(2) {
    opacity: 0;
}

.mobile-nav-toggle.open .hamburger-bar:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

@media (max-width: 768px) {
    .desktop-nav { display: none !important; }
    .mobile-nav-toggle { display: flex; }
    .main-header:not(.expanded) .mobile-nav-toggle {
        display: none !important;
    }
}

/* Sidebar & Overlay */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 998;
    opacity: 0;
    pointer-events: none;
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    transition: var(--transition-fast);
}

.overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 320px;
    height: 100vh;
    background-color: #060606;
    border-left: 1px solid var(--border-glass);
    z-index: 999;
    padding: 50px 40px;
    display: flex;
    flex-direction: column;
    gap: 50px;
    transition: var(--transition-smooth);
}

.sidebar.open {
    right: 0;
}

.sidebar-logo {
    max-width: 160px;
}

.sidebar-links {
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.sidebar-links a {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-grey);
    display: block;
    transition: var(--transition-fast);
}

.sidebar-links a span {
    color: var(--accent-orange);
    font-weight: 500;
    margin-right: 12px;
}

.sidebar-links a:hover {
    color: var(--text-light);
    transform: translateX(8px);
}

/* Main Content Router */
.content-wrapper {
    flex-grow: 1;
    margin-top: 0px;
    position: relative;
    z-index: 1;
}

/* SPA Sections Toggle */
.page-section {
    display: none;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.7s cubic-bezier(0.25, 1, 0.5, 1), transform 0.7s cubic-bezier(0.25, 1, 0.5, 1);
}

.page-section.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.section-container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 100px 40px;
    position: relative;
    z-index: 2;
}

@media (max-width: 768px) {
    .section-container {
        padding: 60px 20px;
    }
}

.border-top {
    border-top: 1px solid var(--border-glass);
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

@media (max-width: 900px) {
    .grid-2 {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.lead-text {
    font-size: 1.25rem;
    color: var(--text-light);
    line-height: 1.7;
    margin-bottom: 25px;
    font-weight: 300;
}

/* 1. CINEMATIC FULLSCREEN HERO WITH SCROLL SCALE EFFECT */
.hero-scroll-wrapper {
    position: relative;
    height: 160vh;
    width: 100%;
}

.hero-cinematic-container {
    position: sticky;
    top: 0;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 0 80px;
    width: 100%;
}

.hero-bg-outer-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12); /* Soft shadow */
    will-change: width, height, border-radius, top, left;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 0 80px;
}

@media (max-width: 990px) {
    .hero-bg-outer-container {
        padding: 0 40px;
    }
}

@media (max-width: 768px) {
    .hero-bg-outer-container {
        padding: 0 20px;
    }
}

@media (max-width: 990px) {
    .hero-cinematic-container {
        flex-direction: column;
        justify-content: flex-start;
        padding: 40px 20px;
        height: auto;
        min-height: 700px;
    }
}

/* Background Crossfading Slides */
.hero-bg-slides {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.hero-bg-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    z-index: 0;
    transform: scale(1);
    transition: opacity 1.8s cubic-bezier(0.25, 1, 0.3, 1), z-index 1.8s step-end;
    will-change: transform, opacity;
}

.hero-bg-slide.previous {
    opacity: 0;
    z-index: 1; /* Stay under active but above others while fading out */
    animation: kenBurnsSlow 20s ease-in-out infinite alternate; /* Keep animation running to avoid visual jump */
    transition: opacity 1.8s cubic-bezier(0.25, 1, 0.3, 1);
}

.hero-bg-slide.active {
    opacity: 1;
    z-index: 2; /* Stays on top */
    animation: kenBurnsSlow 20s ease-in-out infinite alternate;
}

@keyframes kenBurnsSlow {
    0% {
        transform: scale(1);
    }
    100% {
        transform: scale(1.15);
    }
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to right, rgba(0, 0, 0, 0.6) 0%, rgba(0, 0, 0, 0.25) 45%, rgba(0, 0, 0, 0) 100%) !important;
    z-index: 1;
    pointer-events: none;
    display: block !important;
}

.hero-top-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 160px; /* Depth of top gradient */
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0) 100%);
    z-index: 2; /* Sits above slides but below header text */
    pointer-events: none;
    opacity: 1;
    transition: opacity 0.8s cubic-bezier(0.25, 1, 0.3, 1);
}

/* Hero Content Panel (Premium Glassmorphism Floating Card) */
.hero-glass-card {
    background: rgba(255, 255, 255, 0.05); /* Frosty translucent white overlay */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12); /* Delicate glowing border */
    border-radius: 28px;
    width: 500px; /* Smaller card size */
    max-width: 90%;
    position: relative;
    z-index: 2;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    overflow: hidden;
    padding: 36px 40px; /* More compact spacing */
    align-self: flex-end; /* Positioned towards bottom */
    margin-bottom: 80px; /* Offset from bottom edge */
    transition: var(--transition-smooth);
}

@media (max-width: 990px) {
    .hero-glass-card {
        width: 100%;
        max-width: 100%;
        margin-top: 40px;
        margin-bottom: 0; /* Reset bottom offset on mobile */
        align-self: auto; /* Reset alignment on mobile */
        padding: 32px; /* Frosty card format kept on mobile viewport */
        border-radius: 20px;
    }
}

/* Dynamic neon glow line inside card */
.card-glow-indicator {
    display: none !important;
}

.card-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.slide-badge {
    background-color: rgba(255, 107, 0, 0.12);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 107, 0, 0.2);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
}

.slide-index-number {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 800;
    color: #ffffff !important; /* Forced white! */
}

.slide-index-number strong {
    color: #ffffff !important; /* Forced white! */
}

.slide-index-number .sep {
    color: rgba(255, 255, 255, 0.4) !important; /* Forced white-translucent! */
    margin: 0 5px;
}

/* Titles and content inside hero card (Staggered Mask Animation) */
.hero-text-mask {
    overflow: hidden;
    position: relative;
    display: block;
}

.hero-caption-wrapper .hero-text-mask > * {
    transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: transform;
    transform: translateY(0);
    margin-bottom: 0;
}

/* Exit state: slide down out of masks with staggered delays (no fade) */
.hero-caption-wrapper.fade .hero-text-mask > * {
    transform: translateY(115%);
    transition: transform 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

/* Stagger delays for exit transition only */
.hero-caption-wrapper.fade .hero-text-mask:nth-child(1) > * {
    transition-delay: 0s;
}
.hero-caption-wrapper.fade .hero-text-mask:nth-child(2) > * {
    transition-delay: 0.1s;
}
.hero-caption-wrapper.fade .hero-text-mask:nth-child(3) > * {
    transition-delay: 0.2s;
}

/* Pre-entry state: shift below masks instantly (so it enters by sliding up) */
.hero-caption-wrapper.enter .hero-text-mask > * {
    transform: translateY(115%);
    transition: none !important;
}

/* Stagger delays for entrance transition only */
.hero-caption-wrapper:not(.fade):not(.enter) .hero-text-mask:nth-child(1) > * {
    transition-delay: 0s;
}
.hero-caption-wrapper:not(.fade):not(.enter) .hero-text-mask:nth-child(2) > * {
    transition-delay: 0.18s;
}
.hero-caption-wrapper:not(.fade):not(.enter) .hero-text-mask:nth-child(3) > * {
    transition-delay: 0.36s;
}

.hero-main-title {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1.2px;
    line-height: 1.15;
    color: #ffffff !important; /* Force white over image! */
    text-transform: uppercase;
    text-shadow: none !important; /* Removed text shadow */
}

.hero-sub-title {
    font-size: 2.8rem;
    font-weight: 800;
    color: var(--accent-orange) !important;
    letter-spacing: -1.2px;
    line-height: 1.15;
    margin-bottom: 20px;
    text-transform: uppercase;
    text-shadow: none !important; /* Removed text shadow */
}

@media (max-width: 576px) {
    .hero-main-title, .hero-sub-title {
        font-size: 2.1rem !important;
        letter-spacing: -0.8px !important;
    }
    .hero-glass-card {
        padding: 24px !important;
    }
}

.hero-desc {
    font-size: 1.05rem;
    line-height: 1.8;
    color: #f0f0f0 !important;
    margin-bottom: 0;
    text-shadow: none !important; /* Removed text shadow */
}

.hero-card-footer {
    margin-top: 40px;
}

/* Premium Glassmorphism Button */
.btn-premium-orange {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    background-color: var(--accent-orange);
    color: var(--bg-darkest);
    padding: 16px 32px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 10px 25px rgba(255, 107, 0, 0.2);
    transition: var(--transition-fast);
}

.btn-premium-orange svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s;
}

.btn-premium-orange:hover {
    background-color: var(--text-light);
    box-shadow: 0 15px 35px rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
}

.btn-premium-orange:hover svg {
    transform: translateX(4px);
}

/* Hero Manual Navigation Controls */
.hero-navigation-controls {
    position: absolute;
    bottom: 8%;
    right: 80px;
    z-index: 10;
    display: flex;
    gap: 16px;
}

.hero-nav-btn {
    width: 52px;
    height: 52px;
    border-radius: 50%;
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    background-color: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.hero-nav-btn:hover {
    border-color: var(--accent-orange);
    background-color: var(--accent-orange);
    color: #ffffff;
    box-shadow: 0 8px 25px rgba(255, 107, 0, 0.35);
    transform: translateY(-2px);
}

.hero-nav-btn svg {
    width: 22px;
    height: 22px;
}

@media (max-width: 990px) {
    .hero-navigation-controls {
        bottom: 40px;
        right: 40px;
    }
}

@media (max-width: 768px) {
    .hero-navigation-controls {
        bottom: 25px;
        right: 20px;
    }
    .hero-nav-btn {
        width: 44px;
        height: 44px;
    }
    .hero-nav-btn svg {
        width: 18px;
        height: 18px;
    }
}

/* 2. ABOUT & PHILOSOPHY GLASMORPHISM CARDS */
.intro-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
}

@media (max-width: 900px) {
    .intro-grid-container {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

.philosophy-glow-card {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-premium); /* Rounded 28px! */
    padding: 50px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0,0,0,0.03); /* Soft shadow */
    transition: var(--transition-smooth);
}

.philosophy-glow-card:hover {
    border-color: var(--border-orange);
    box-shadow: 0 10px 35px rgba(255, 107, 0, 0.03); /* Soft hover shadow */
}

.philosophy-glow-card h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
}

.mini-grid-values {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 35px;
}

.val-pill {
    background-color: rgba(255, 107, 0, 0.08);
    border: 1px solid rgba(255, 107, 0, 0.15);
    color: var(--accent-orange);
    padding: 8px 18px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

/* Remove subtitle line decoration in agency section */
#reseau-territorial .subtitle {
    padding-left: 0;
}

#reseau-territorial .subtitle::before {
    display: none;
}

/* Agencies Accordion Container */
.agencies-accordion-container {
    width: 100%;
    display: flex;
    gap: 16px;
    height: 520px;
    margin-top: 50px;
    overflow: hidden;
    border-radius: var(--radius-premium); /* Rounded 28px! */
}

/* Individual Agency Column */
.agency-col {
    position: relative;
    flex: 1; /* Equal width by default */
    height: 100%;
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid var(--border-glass);
    background-color: #060606;
    cursor: pointer;
    transition: flex 0.8s cubic-bezier(0.25, 1, 0.3, 1), 
                border-color 0.5s ease, 
                box-shadow 0.5s ease;
}

.agency-col:hover {
    flex: 3.5; /* Expands on hover */
    border-color: var(--accent-orange);
    box-shadow: 0 25px 50px rgba(255, 107, 0, 0.08);
}

/* Background Image & Zoom effect */
.agency-col .col-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    filter: grayscale(40%) brightness(55%);
    transition: transform 1.2s cubic-bezier(0.25, 1, 0.3, 1), 
                filter 0.8s ease;
    z-index: 1;
}

.agency-col:hover .col-bg {
    transform: scale(1.08);
    filter: grayscale(0%) brightness(35%);
}

/* Gradient Overlay for Text Readability */
.agency-col .col-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.2) 60%, rgba(0,0,0,0.4) 100%);
    z-index: 2;
}

/* Giant Background Letter */
.agency-col .bg-letter {
    position: absolute;
    top: 20px;
    right: 20px;
    font-size: 8rem;
    font-weight: 900;
    color: rgba(255, 255, 255, 0.025);
    line-height: 1;
    user-select: none;
    z-index: 2;
    transition: color 0.5s ease;
}

.agency-col:hover .bg-letter {
    color: rgba(255, 107, 0, 0.06);
}

/* Vertical Default Label (shown when collapsed) */
.agency-col .vertical-label {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: rotate(-90deg);
    transform-origin: left center;
    white-space: nowrap;
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 700;
    letter-spacing: 2px;
    z-index: 3;
    opacity: 1;
    transition: opacity 0.4s ease 0.4s, transform 0.4s ease 0.4s; /* Slower fade-in on exit, delayed to wait for contraction */
    pointer-events: none;
}

.agency-col:hover .vertical-label {
    opacity: 0;
    transform: rotate(-90deg) translateY(-20px);
    transition: opacity 0.1s ease 0s, transform 0.1s ease 0s; /* Ultra-fast, immediate fade-out on hover to prevent layout overlap */
}

/* Badges */
.agency-col .col-badge {
    position: absolute;
    top: 25px;
    left: 25px;
    padding: 6px 12px;
    background-color: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 20px;
    color: #ffffff;
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    z-index: 3;
    transition: all 0.5s;
}

.agency-col:hover .col-badge {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
}

/* Expanded Details Content (hidden by default, fades in) */
.agency-col .expanded-content {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 40px;
    box-sizing: border-box;
    z-index: 4;
    color: #ffffff;
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.2s ease 0s, transform 0.2s ease 0s; /* Immediate, fast exit on close to avoid squishing text */
    pointer-events: none;
}

.agency-col:hover .expanded-content {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.5s ease 0.25s, transform 0.5s ease 0.25s; /* Smooth fade-in, delayed until column is mostly expanded */
    pointer-events: auto;
}

.agency-col .expanded-content h3 {
    font-size: 1.8rem;
    font-weight: 800;
    margin: 0 0 4px 0;
    font-family: var(--font-heading);
}

.agency-col .expanded-content h4 {
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--accent-orange);
    letter-spacing: 2px;
    margin: 0 0 16px 0;
}

.agency-col .expanded-content p {
    font-size: 0.88rem;
    line-height: 1.55;
    color: #dddddd;
    margin: 0 0 20px 0;
    max-width: 90%;
}

.agency-col .address-block {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.8rem;
    color: #bbbbbb;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 15px;
}

.agency-col .address-block svg {
    width: 14px;
    height: 14px;
    stroke: var(--accent-orange);
    fill: none;
}

.location-badge {
    background-color: rgba(255,255,255,0.05);
    color: var(--text-light);
    border: 1px solid var(--border-glass);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

/* RESPONSIVE MOBILE OVERRIDES: Fallback to vertical list cards on smaller viewports */
@media (max-width: 990px) {
    .agencies-accordion-container {
        flex-direction: column;
        height: auto;
        gap: 20px;
        overflow: visible;
        background: transparent;
    }

    .agency-col {
        flex: none !important;
        width: 100%;
        height: 280px;
        border-radius: 20px;
    }

    .agency-col:hover {
        box-shadow: none;
    }

    .agency-col .col-bg {
        filter: grayscale(0%) brightness(40%) !important;
    }

    /* Hide vertical label on mobile since columns are horizontal strips */
    .agency-col .vertical-label {
        display: none !important;
    }

    /* Show details by default on mobile since hover is not reliable */
    .agency-col .expanded-content {
        opacity: 1 !important;
        transform: none !important;
        pointer-events: auto !important;
        padding: 30px;
    }

    .agency-col .expanded-content h3 {
        font-size: 1.4rem;
    }

    .agency-col .expanded-content p {
        max-width: 100%;
        font-size: 0.82rem;
        margin-bottom: 12px;
    }

    .agency-col .address-block {
        padding-top: 10px;
    }
}

/* 3. PORTFOLIO MODERN GALLERY */
.filter-controls {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 50px;
    flex-wrap: wrap;
}

.filter-btn {
    background-color: transparent;
    border: 1px solid var(--border-glass);
    color: var(--text-grey);
    padding: 10px 25px;
    border-radius: 30px;
    font-family: var(--font-body);
    font-weight: 700;
    font-size: 0.85rem;
    transition: var(--transition-fast);
}

.filter-btn.active, .filter-btn:hover {
    background-color: var(--accent-orange);
    border-color: var(--accent-orange);
    color: var(--bg-darkest);
    box-shadow: 0 8px 20px rgba(255, 107, 0, 0.2);
}

/* Homepage Projects Section (Split Layout) */
.projects-home-section {
    padding: 0 !important;
    background-color: var(--bg-darkest);
    overflow: hidden;
    /* Custom entry transitions */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.3, 1), transform 1.2s cubic-bezier(0.25, 1, 0.3, 1);
}

.projects-home-section.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.projects-home-wrapper {
    display: flex;
    min-height: 620px;
    width: 100%;
}

@media (max-width: 990px) {
    .projects-home-wrapper {
        flex-direction: column;
        min-height: auto;
    }
}

/* Left side: Slideshow viewport (Takes 65% width) */
.projects-home-left {
    flex: 6.5;
    position: relative;
    overflow: hidden;
    min-height: 480px;
    display: flex;
    align-items: center;
    background-color: transparent; /* Inherits main background */
    /* Custom scale-in intro transition */
    opacity: 0;
    transform: scale(0.96) translateX(-20px);
    transition: opacity 1.4s cubic-bezier(0.25, 1, 0.3, 1), transform 1.4s cubic-bezier(0.25, 1, 0.3, 1);
    transition-delay: 0.25s;
}

.projects-home-section.animate-in .projects-home-left {
    opacity: 1;
    transform: scale(1) translateX(0);
}

@media (max-width: 990px) {
    .projects-home-left {
        width: 100%;
        height: 380px;
        min-height: auto;
        flex: none;
    }
}

/* Scroll-Driven Horizontal Projects Section */
.projects-scroll-wrapper {
    position: relative;
    height: 240vh; /* Set total scroll height for horizontal scroll mapping */
    background-color: var(--bg-darkest);
    width: 100%;
    /* Custom entry transitions */
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 1.2s cubic-bezier(0.25, 1, 0.3, 1), transform 1.2s cubic-bezier(0.25, 1, 0.3, 1);
}

.projects-scroll-wrapper.animate-in {
    opacity: 1;
    transform: translateY(0);
}

.projects-sticky-container {
    position: sticky;
    top: 0;
    height: 100vh;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 110px 80px 70px 80px;
    background-color: var(--bg-darkest);
}

@media (max-width: 990px) {
    .projects-sticky-container {
        padding: 90px 40px 40px 40px;
    }
}

@media (max-width: 768px) {
    .projects-sticky-container {
        padding: 85px 20px 30px 20px;
        height: auto;
        min-height: 100vh;
        position: relative;
    }
    
    .projects-scroll-wrapper {
        height: auto; /* Disable horizontal lock on mobile */
    }
}

/* Centered header text styling */
.projects-sticky-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    gap: 16px;
}

/* Luxury Reveal Text Animations */
.reveal-text-container {
    overflow: hidden;
    position: relative;
    display: block;
}

.reveal-text {
    display: block;
    transform: translateY(105%);
    opacity: 0;
    transition: transform 1.2s cubic-bezier(0.16, 1, 0.3, 1), opacity 1.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.projects-scroll-wrapper.animate-in .projects-home-subtitle {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.05s;
}

.projects-scroll-wrapper.animate-in .projects-home-title {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.2s;
}

.projects-scroll-wrapper.animate-in .projects-home-desc {
    transform: translateY(0);
    opacity: 1;
    transition-delay: 0.35s;
}

.projects-home-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--accent-orange);
}

.projects-home-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: #111111;
    line-height: 1.1;
}

@media (max-width: 768px) {
    .projects-home-title {
        font-size: 2.5rem;
    }
}

.projects-home-desc {
    font-family: var(--font-body);
    font-size: 1.05rem;
    line-height: 1.6;
    color: #555555;
    max-width: 680px;
}

/* Bottom Gallery Viewport */
.projects-sticky-gallery {
    width: 100%;
    height: 480px; /* Extra height to accommodate translateY offsets */
    position: relative;
    margin-top: 20px;
    display: flex;
    align-items: center;
}

@media (max-width: 768px) {
    .projects-sticky-gallery {
        height: auto;
        overflow-x: auto;
        padding: 40px 0;
        -webkit-overflow-scrolling: touch;
    }
}

.projects-horizontal-track {
    display: flex;
    align-items: center;
    gap: 32px;
    height: 100%;
    will-change: transform;
    /* Soft ease-out transitions for scroll mapping */
    transition: transform 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    padding: 0 40px;
}

@media (max-width: 768px) {
    .projects-horizontal-track {
        transform: none !important;
        transition: none !important;
        padding: 0 20px;
    }
}

/* Mixed Landscape / Portrait Gallery Cards */
.projects-gallery-card {
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border: 3px solid #ffffff; /* Thinned down for a much cleaner, premium layout */
    background-size: cover;
    background-position: center;
    flex-shrink: 0;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.4s, box-shadow 0.4s;
    height: 340px;
}

/* Stagger heights/offsets: odd cards float up, even cards sink down */
.projects-gallery-card:not(.card-cta):nth-child(odd) {
    transform: translateY(-25px);
}

.projects-gallery-card:not(.card-cta):nth-child(even) {
    transform: translateY(25px);
}

.projects-gallery-card:not(.card-cta):nth-child(odd):hover {
    transform: translateY(-25px) scale(1.03);
    border-color: var(--accent-orange);
    box-shadow: 0 20px 45px rgba(255, 107, 0, 0.12);
}

.projects-gallery-card:not(.card-cta):nth-child(even):hover {
    transform: translateY(25px) scale(1.03);
    border-color: var(--accent-orange);
    box-shadow: 0 20px 45px rgba(255, 107, 0, 0.12);
}

/* Alternating Card Formats */
.projects-gallery-card.card-portrait {
    width: 250px;
}

.projects-gallery-card.card-landscape {
    width: 460px;
}

/* End Action Card (CTA) */
.projects-gallery-card.card-cta {
    width: 340px;
    background-color: rgba(255, 255, 255, 0.45); /* Ice-frost white glass */
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    border: 1px solid rgba(0, 0, 0, 0.08); /* Solid fine border matching modern glass guidelines */
    border-radius: 24px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.02) !important;
    cursor: default;
    transform: translateY(0); /* Override staggered vertical offsets to stay centered */
    transition: all 0.5s cubic-bezier(0.25, 1, 0.3, 1);
}

.projects-gallery-card.card-cta:hover {
    background-color: rgba(255, 255, 255, 0.65);
    border-color: rgba(0, 0, 0, 0.15); /* Soft grey/dark border, no orange */
    transform: translateY(-5px); /* Smooth floating hover effect */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.05) !important;
}

.cta-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    padding: 20px;
}

.cta-subtitle {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #999999;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #111111;
    margin-bottom: 5px;
}

@media (max-width: 768px) {
    .projects-gallery-card {
        height: 260px;
        border-width: 2px;
    }
    
    .projects-gallery-card:nth-child(odd),
    .projects-gallery-card:nth-child(even) {
        transform: none !important; /* Disable stagger on mobile overflow-x */
    }
    
    .projects-gallery-card:hover {
        transform: scale(1.02) !important;
    }
    
    .projects-gallery-card.card-portrait {
        width: 190px;
    }
    
    .projects-gallery-card.card-landscape {
        width: 340px;
    }
    
    .projects-gallery-card.card-cta {
        width: 260px;
    }
}

/* Premium Dark Action Button */
.btn-premium-dark {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    background-color: #111111;
    color: #ffffff;
    padding: 15px 32px;
    border-radius: 30px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.08);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    align-self: flex-start;
}

.btn-premium-dark:hover {
    background-color: var(--accent-orange);
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 12px 25px rgba(255, 107, 0, 0.25);
}

.btn-premium-dark svg {
    width: 16px;
    height: 16px;
    stroke-width: 2.5;
    transition: transform 0.3s;
}

.btn-premium-dark:hover svg {
    transform: translateX(4px);
}

/* History Section Grid Layout */
.history-grid-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px 80px;
    align-items: center;
    width: 100%;
    margin-top: 40px;
}

/* Remove subtitle line decoration in history container */
.history-grid-container .subtitle {
    padding-left: 0;
}

.history-grid-container .subtitle::before {
    display: none;
}

@media (max-width: 990px) {
    .history-grid-container {
        grid-template-columns: 1fr;
        gap: 50px;
    }
}

.history-text-col {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.history-block {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.history-block h3 {
    font-family: var(--font-heading);
    font-size: 1.8rem;
    font-weight: 800;
    color: #111111;
    margin: 0;
    line-height: 1.2;
}

.history-block p {
    font-family: var(--font-body);
    font-size: 1.02rem;
    line-height: 1.6;
    color: #555555;
    margin: 0;
}

.history-block .lead-text {
    font-size: 1.12rem;
    font-weight: 600;
    color: #222222;
}

.history-block strong {
    color: #111111;
    font-weight: 700;
}

/* Quadrant Photo Cards CSS */
.history-visual-col {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}

/* Float animations with phase offsets to prevent synchronous floating */
.history-visual-col:nth-child(2) {
    animation: floatGentle 6s ease-in-out infinite;
}

.history-visual-col:nth-child(3) {
    animation: floatGentle 6s ease-in-out infinite;
    animation-delay: 3s;
}

@keyframes floatGentle {
    0% {
        transform: translateY(0);
    }
    50% {
        transform: translateY(-8px); /* Soft upward float */
    }
    100% {
        transform: translateY(0);
    }
}

.history-pic-card {
    position: relative;
    width: 100%;
    max-width: 480px;
    height: 380px; /* Refined uniform size for grid quadrants */
    border-radius: 24px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.05);
    border: 3px solid #ffffff;
    overflow: hidden;
    background-color: #ffffff;
    transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.45s, box-shadow 0.45s;
}

.history-pic-card img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

@media (max-width: 990px) {
    .history-pic-card {
        height: 320px;
        max-width: 100%;
    }
}

/* Elegant float-in labels inside pictures */
.pic-label {
    position: absolute;
    bottom: 20px;
    left: 20px;
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 6px 16px;
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    color: #111111;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.05);
    transition: background-color 0.3s, color 0.3s;
}

/* Hover effects: focus and bring clicked/hovered card to front */
.history-pic-card:hover {
    z-index: 10;
    transform: scale(1.03) translateY(-4px);
    box-shadow: 0 20px 45px rgba(255, 107, 0, 0.1);
    border-color: var(--accent-orange);
}

.history-pic-card:hover .pic-label {
    background-color: var(--accent-orange);
    color: #ffffff;
}

/* 4. EXPERTISE ACCORDIONS (Équipes & Métiers) */
.expertise-accordions {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 40px;
}

.exp-acc-item {
    background-color: rgba(255,255,255,0.015);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid var(--border-glass);
    border-radius: 20px; /* Rounded corners */
    overflow: hidden;
    transition: var(--transition-fast);
}

.exp-acc-item:hover {
    border-color: rgba(255,107,0,0.25);
}

.exp-acc-item.active {
    border-color: var(--accent-orange);
    box-shadow: 0 10px 30px rgba(255,107,0,0.03);
}

.exp-acc-header {
    padding: 30px;
    display: flex;
    align-items: center;
    cursor: pointer;
    user-select: none;
}

.acc-num {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 800;
    color: var(--accent-orange);
    margin-right: 25px;
}

.exp-acc-header h3 {
    font-size: 1.35rem;
    font-weight: 700;
    flex-grow: 1;
}

.acc-arrow {
    font-size: 1.2rem;
    transition: transform 0.4s ease;
    color: var(--text-grey);
}

.exp-acc-item.active .acc-arrow {
    transform: rotate(180deg);
    color: var(--accent-orange);
}

.exp-acc-body {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.25, 1, 0.5, 1);
}

.exp-acc-item.active .exp-acc-body {
    max-height: 300px;
}

.exp-acc-body p {
    padding: 0 30px 30px 80px;
    margin-bottom: 0;
    font-size: 0.98rem;
}

@media (max-width: 768px) {
    .exp-acc-body p {
        padding: 0 20px 20px 20px;
    }
    .exp-acc-header {
        padding: 20px;
    }
}

/* Team Showcase */
.team-modern-showcase {
    margin-top: 80px;
    padding-top: 80px;
}

.team-right-graphics {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 500px) {
    .team-right-graphics {
        grid-template-columns: 1fr;
    }
}

.glass-stat-panel {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-premium); /* Rounded 28px! */
    padding: 35px 30px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.glow-value {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--accent-orange);
    line-height: 1;
    text-shadow: 0 0 15px rgba(255,107,0,0.3);
    margin-bottom: 12px;
}

.glass-stat-panel .label {
    font-size: 0.85rem;
    color: var(--text-grey);
}

/* 5. ACTUALITES VIEW */
.news-modern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(360px, 1fr));
    gap: 30px;
    margin-top: 40px;
}

@media (max-width: 480px) {
    .news-modern-grid {
        grid-template-columns: 1fr;
    }
}

.modern-news-card {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-premium); /* Rounded 28px! */
    position: relative;
    padding: 45px 35px 35px;
    transition: var(--transition-smooth);
    overflow: hidden;
}

.modern-news-card:hover {
    border-color: var(--border-orange);
    transform: translateY(-6px);
    box-shadow: 0 20px 45px rgba(0,0,0,0.4);
}

.date-badge {
    position: absolute;
    top: -15px;
    left: 40px;
    background-color: #0c0c0c;
    border: 1px solid var(--border-glass);
    padding: 6px 18px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-family: var(--font-body);
    font-weight: 700;
    color: var(--accent-orange);
}

.card-header-meta {
    font-size: 0.72rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    margin-bottom: 18px;
}

.modern-news-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
}

.modern-news-card p {
    font-size: 0.95rem;
    margin-bottom: 30px;
}

.news-link {
    color: var(--accent-orange);
    font-weight: 600;
    font-size: 0.9rem;
}

.news-link:hover {
    color: var(--text-light);
}

.badge-disabled {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 6. CONTACT VIEW */
.contact-grid-modern {
    display: grid;
    grid-template-columns: 0.8fr 1.2fr;
    gap: 40px;
    margin-top: 40px;
}

@media (max-width: 990px) {
    .contact-grid-modern {
        grid-template-columns: 1fr;
    }
}

/* Headquarters Premium Card */
.hq-contact-card {
    background: linear-gradient(135deg, #0f0a07 0%, #050505 100%);
    border: 1px solid var(--border-orange);
    border-radius: var(--radius-premium); /* Rounded 28px! */
    position: relative;
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(255, 107, 0, 0.05);
}

.hq-contact-card::before {
    content: '';
    position: absolute;
    width: 160px;
    height: 160px;
    background-color: var(--accent-orange);
    border-radius: 50%;
    top: -60px;
    right: -60px;
    filter: blur(70px);
    opacity: 0.18;
}

.hq-content {
    position: relative;
    z-index: 2;
}

.hq-contact-card .badge {
    background-color: rgba(255, 107, 0, 0.1);
    color: var(--accent-orange);
    border: 1px solid rgba(255, 107, 0, 0.2);
    padding: 6px 14px;
    border-radius: 30px;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: inline-block;
    margin-bottom: 20px;
}

.hq-contact-card h3 {
    font-size: 2.2rem;
    margin-bottom: 15px;
}

.hq-address {
    font-size: 1.15rem;
    color: var(--text-light);
    margin-bottom: 35px;
}

.hq-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.hq-link-item {
    font-size: 1.2rem;
    color: var(--text-light);
    font-weight: 700;
}

.hq-link-item span {
    color: var(--text-grey);
    font-weight: 400;
    font-size: 0.95rem;
    margin-right: 5px;
}

.hq-link-item:hover {
    color: var(--accent-orange);
}

/* Branches list */
.branches-grid-contact {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 20px;
}

.branch-card {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    padding: 30px;
    border-radius: 20px; /* Rounded 20px */
    transition: var(--transition-fast);
}

.branch-card:hover {
    border-color: var(--border-orange);
    transform: translateY(-3px);
}

.branch-card h4 {
    font-size: 1.25rem;
    margin-bottom: 5px;
    color: var(--text-light);
}

.branch-location {
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: 700;
    color: var(--accent-orange);
    letter-spacing: 1px;
    display: block;
    margin-bottom: 15px;
}

.branch-card p {
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.branch-phone, .branch-email {
    display: block;
    font-size: 0.85rem;
    color: var(--text-light);
    font-weight: 600;
    margin-bottom: 8px;
}

.branch-phone:hover, .branch-email:hover {
    color: var(--accent-orange);
}

/* 7. MENTIONS LEGALES */
.legal-glass-card {
    background: rgba(255, 255, 255, 0.015);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-glass);
    border-radius: var(--radius-premium); /* Rounded 28px! */
    padding: 50px;
}

@media (max-width: 768px) {
    .legal-glass-card {
        padding: 30px 20px;
    }
}

.legal-glass-card h3 {
    font-size: 1.5rem;
    margin: 35px 0 15px;
    color: var(--accent-orange);
}

.legal-glass-card h3:first-of-type {
    margin-top: 0;
}

.legal-glass-card p {
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.legal-glass-card a {
    color: var(--accent-orange);
}

.legal-glass-card a:hover {
    color: var(--text-light);
}

/* Footer Section */
.main-footer {
    background-color: #030303;
    border-top: 1px solid var(--border-glass);
    padding: 40px;
    margin-top: 80px;
    position: relative;
    z-index: 2;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

@media (max-width: 600px) {
    .footer-container {
        flex-direction: column;
        gap: 20px;
        text-align: center;
    }
}

.footer-logo {
    height: 25px;
    width: auto;
    margin-bottom: 12px;
    color: #ffffff; /* Ensures the SVG text parts (fill="currentColor") render in white */
}

.footer-left p {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.footer-links {
    font-family: var(--font-body);
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--text-grey);
}

.footer-links a {
    margin: 0 8px;
}

.footer-links a:hover {
    color: var(--accent-orange);
}

.footer-links .separator {
    color: var(--border-glass);
}

/* Custom Cursor (Minimal Ring Concept 2) */
.custom-cursor {
    display: none; /* Hidden by default on mobile/touch */
}

@media (pointer: fine) {
    /* Hide system cursor on absolutely everything to prevent ghost double cursors */
    *, *::before, *::after {
        cursor: none !important;
    }

    .custom-cursor {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 24px;
        height: 24px;
        border: 1.5px solid #111111; /* Default dark ring */
        border-radius: 50%;
        pointer-events: none;
        z-index: 10000; /* Force above all layers */
        transform: translate(-50%, -50%);
        will-change: transform, width, height, border-color, background-color;
        transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                    height 0.3s cubic-bezier(0.16, 1, 0.3, 1),
                    border-color 0.3s ease,
                    background-color 0.3s ease;
    }
    
    /* Dynamic Contrast adaptations */
    .custom-cursor.cursor-on-dark {
        border-color: #ffffff; /* White ring on dark backgrounds */
    }
    
    .custom-cursor.cursor-on-light {
        border-color: #111111; /* Black ring on light backgrounds */
    }
    
    /* Hovered state: expand, orange stroke and subtle background */
    .custom-cursor.hovered {
        width: 44px;
        height: 44px;
        border-color: var(--accent-orange) !important;
        background-color: rgba(255, 107, 0, 0.05);
    }
    
    /* Click state: contract instantly */
    .custom-cursor.clicked {
        width: 14px;
        height: 14px;
        border-color: var(--accent-orange) !important;
        background-color: rgba(255, 107, 0, 0.2);
        transition: none; /* Instant feedback */
    }
}
