/* --- CSS VARIABLES (Modern, Elegant Colors) --- */
:root {
    --primary-color: #0A2B45;    /* Darker, richer Navy */
    --secondary-color: #1B75BC;  
    --accent-color: #CBA052;     /* Refined Gold */
    --text-dark: #2A2A2A;
    --text-light: #FFFFFF;
    --bg-light: #F4F6F9;         /* Very soft, modern gray/blue background */
    --white: #FFFFFF;
    
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
    
    --transition: all 0.3s ease;
}

/* --- RESET & GLOBAL --- */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* Force mobile browsers to strictly obey the screen width (iPhone SE Fix) */
html, body {
    overflow-x: hidden !important;
    width: 100%;
    position: relative;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    background-color: var(--bg-light);
    line-height: 1.7;
}

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-weight: 800;
}

a { text-decoration: none; color: inherit; transition: var(--transition); }

/* --- WIDER LAYOUT CONTAINER --- */
.page-container {
    max-width: 1440px; 
    width: 92%;
    margin: 0 auto;
    padding: 5rem 0;
}

.accent-line {
    width: 60px; height: 4px;
    background-color: var(--accent-color);
    margin-bottom: 2rem; border-radius: 2px;
}
.accent-line.center { margin: 0 auto 2rem auto; }

/* --- HEADER & NAVIGATION --- */
#SITE_HEADER {
    position: fixed; top: 0; width: 100%;
    background-color: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 20px rgba(0,0,0,0.04);
    z-index: 1000; transition: var(--transition);
}

#SITE_HEADER.scrolled { box-shadow: 0 4px 25px rgba(0,0,0,0.08); }

.header-container {
    max-width: 1440px; width: 92%;
    margin: 0 auto; display: flex;
    justify-content: space-between; align-items: center;
    padding: 1rem 0;
}

.logo-image { max-height: 65px; width: auto; }

.desktop-navigation { display: flex; align-items: center; gap: 2.5rem; }

.nav-link {
    background: none; border: none;
    font-family: var(--font-heading);
    font-weight: 600; font-size: 1.05rem;
    color: var(--primary-color);
    cursor: pointer; transition: var(--transition);
}
.nav-link:hover { color: var(--accent-color); }

.btn-primary {
    background-color: var(--accent-color);
    color: var(--white);
    padding: 0.8rem 1.8rem;
    border: none; border-radius: 8px;
    font-family: var(--font-heading);
    font-weight: 700; font-size: 1.05rem;
    cursor: pointer; transition: var(--transition);
    display: inline-block;
    box-shadow: 0 4px 15px rgba(203, 160, 82, 0.3);
}
.btn-primary:hover {
    background-color: #b38b44;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(203, 160, 82, 0.4);
}

/* Projects Dropdown */
.projects-dropdown { position: relative; }
.projects-dropdown-content {
    display: none; position: absolute;
    top: 100%; left: -10px;
    background-color: var(--white);
    min-width: 180px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    border-radius: 8px; overflow: hidden;
    z-index: 10; margin-top: 15px;
}
.projects-dropdown.active .projects-dropdown-content { display: block; }
.projects-dropdown-content a {
    display: block; padding: 15px 20px;
    color: var(--primary-color); font-weight: 600;
}
.projects-dropdown-content a:hover {
    background-color: var(--bg-light); color: var(--accent-color);
}

/* --- HERO SECTION WITH VIDEO --- */
.hero-section {
    margin-top: 90px;
    position: relative;
    height: 65vh; min-height: 550px;
    display: flex; align-items: center; justify-content: center;
    text-align: center; padding: 0 2rem;
    overflow: hidden; /* Keeps video from spilling out */
    background-color: var(--primary-color); /* Fallback color if video loads slowly */
}

/* Stretches video perfectly across the background */
.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; 
    z-index: 0;
}

/* Dark blue tint so the white text is easy to read */
.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 43, 69, 0.70); 
    z-index: 1;
}

/* Pops the text up above the video */
.hero-content {
    position: relative;
    z-index: 2; 
}

.hero-content h1 {
    color: var(--white); font-size: 4rem; margin-bottom: 1.5rem; line-height: 1.2; letter-spacing: 1px;
}
.hero-content p {
    color: #E2E8F0; font-size: 1.6rem; margin-bottom: 2.5rem; font-weight: 300; letter-spacing: 0.5px;
}

/* --- ELEGANT CARDS --- */
.elegant-card {
    background: var(--white);
    padding: 3.5rem;
    border-radius: 12px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.04);
    border-top: 4px solid var(--accent-color);
}

/* --- IMPACT SECTION (Modern Stacked Layout) --- */
.impact-section { margin-top: -60px; position: relative; z-index: 10; padding-top: 0; }

.impact-stacked {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 5rem 3rem;
}

.impact-text-centered {
    text-align: center;
    max-width: 900px;
    margin: 0 auto 4rem auto;
}

.impact-text-centered h2 { font-size: 2.8rem; }

.impact-paragraphs p {
    margin-bottom: 1.5rem; 
    font-size: 1.15rem; 
    color: #4A5568; 
    line-height: 1.8; 
    font-weight: 300;
}
.impact-paragraphs strong { color: var(--primary-color); font-weight: 700; }

.impact-visual-wide { width: 100%; max-width: 1100px; }

/* Wide Carousel Styles */
.carousel-container {
    position: relative; width: 100%; height: 100%; min-height: 500px;
    display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.project-carousel { position: relative; width: 100%; height: 420px; perspective: 1200px; margin-top: 20px;}
.carousel-track {
    position: relative; width: 100%; height: 100%;
    display: flex; justify-content: center; align-items: center;
}
.carousel-card {
    position: absolute; width: 55%; height: 100%;
    border-radius: 12px; overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
    transition: transform 0.6s cubic-bezier(0.25, 0.8, 0.25, 1), opacity 0.6s ease, z-index 0.6s;
    cursor: pointer;
}
.carousel-card img { width: 100%; height: 100%; object-fit: cover; }

.position-center { transform: translateX(0) scale(1); opacity: 1; z-index: 3; }
.position-left { transform: translateX(-45%) scale(0.85); opacity: 0.5; z-index: 2; }
.position-right { transform: translateX(45%) scale(0.85); opacity: 0.5; z-index: 2; }
.position-hidden-left { transform: translateX(-80%) scale(0.6); opacity: 0; z-index: 1; }
.position-hidden-right { transform: translateX(80%) scale(0.6); opacity: 0; z-index: 1; }

.globe-label { margin-top: 2.5rem; font-family: var(--font-heading); font-size: 1.5rem; font-weight: 800; color: var(--primary-color); }

/* --- PROJECTS SECTION --- */
.projects-section { background-color: var(--bg-light); }
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 3rem; }

.project-card {
    background: var(--white); border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.04);
    transition: all 0.4s ease; display: flex; flex-direction: column;
    position: relative; z-index: 1; 
}
.project-card:hover { transform: translateY(-8px); box-shadow: 0 20px 40px rgba(0,0,0,0.1); z-index: 100; }

.card-image-wrapper { position: relative; width: 100%; height: 250px; z-index: 1; }
.card-image-wrapper img {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    object-fit: cover; border-radius: 16px 16px 0 0; display: block;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); transform-origin: center;
}
.badge {
    position: absolute; top: 20px; right: 20px;
    background-color: var(--accent-color); color: var(--white);
    padding: 0.4rem 1rem; border-radius: 30px; font-weight: 800; font-family: var(--font-heading);
    box-shadow: 0 4px 10px rgba(0,0,0,0.2); z-index: 2; transition: opacity 0.3s;
}

.card-image-wrapper:hover { z-index: 50; }
.card-image-wrapper:hover img {
    transform: scale(1.6); object-fit: contain; background: rgba(10, 43, 69, 0.98);
    border-radius: 8px; box-shadow: 0 30px 60px rgba(0,0,0,0.6);
}
.card-image-wrapper:hover .badge { opacity: 0; }

.card-content { padding: 2rem; border-radius: 0 0 16px 16px; background: var(--white); position: relative; z-index: 2; }
.card-content h3 { margin-bottom: 0.5rem; font-size: 1.4rem; }
.card-content p { color: #64748B; font-size: 1rem; font-weight: 600; }
.card-content i { color: var(--accent-color); margin-right: 8px; }

/* --- PROJECT DETAIL PAGE STYLES --- */
.detail-header { margin-top: 120px; text-align: center; padding: 3rem 0 2rem 0; }
.detail-header h1 { font-size: 3rem; font-weight: 800; letter-spacing: 1px; margin-bottom: 0.5rem; color: var(--primary-color); }
.detail-header .location-text { font-family: var(--font-body); font-size: 1.1rem; text-transform: uppercase; letter-spacing: 2px; color: #64748B; margin-top: 1rem; }

.detail-hero-wrapper { width: 100%; aspect-ratio: 21 / 9; min-height: 400px; border-radius: 16px; overflow: hidden; margin-bottom: 5rem; box-shadow: 0 20px 50px rgba(10, 43, 69, 0.1); }
.detail-hero-wrapper img { width: 100%; height: 100%; object-fit: cover; transition: transform 10s ease; }
.detail-hero-wrapper:hover img { transform: scale(1.05); }

.detail-info-grid { display: grid; grid-template-columns: 2fr 1.2fr; gap: 5rem; margin-bottom: 6rem; align-items: start; }
.project-description h2 { font-size: 2rem; margin-bottom: 1.5rem; }
.project-description p { line-height: 1.9; font-size: 1.15rem; color: #4A5568; font-weight: 300; }

.info-card { background: var(--white); padding: 3rem 2.5rem; border-radius: 12px; box-shadow: 0 15px 35px rgba(0,0,0,0.04); border-top: 4px solid var(--accent-color); }
.info-card h3 { font-size: 1.5rem; margin-bottom: 1.5rem; border-bottom: 1px solid #E2E8F0; padding-bottom: 1rem; }
.info-item { display: flex; align-items: flex-start; margin-bottom: 1.5rem; font-size: 1.05rem; color: #4A5568; }
.info-item i { color: var(--accent-color); margin-top: 5px; margin-right: 15px; font-size: 1.2rem; width: 20px; text-align: center; }

.project-gallery-section h2 { text-align: center; font-size: 2.2rem; margin-bottom: 0.5rem; }
.gallery-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 2rem; margin-top: 3rem; }

/* Forces gallery images to be perfectly sized and uniform */
.gallery-image { width: 100%; height: 250px; object-fit: cover; border-radius: 12px; box-shadow: 0 10px 25px rgba(0,0,0,0.06); transition: all 0.4s ease; cursor: pointer; }
.gallery-image:hover { transform: translateY(-5px); box-shadow: 0 20px 40px rgba(0,0,0,0.12); }

/* --- LIGHTBOX MODAL --- */
.lightbox-modal {
    display: none; position: fixed; z-index: 3000; left: 0; top: 0;
    width: 100%; height: 100%; overflow: hidden;
    background-color: rgba(10, 43, 69, 0.95); backdrop-filter: blur(5px);
}
.lightbox-content {
    margin: auto; display: block; position: absolute;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    max-width: 90%; max-height: 90vh;
    border-radius: 8px; box-shadow: 0 15px 40px rgba(0,0,0,0.5);
    animation: zoomIn 0.3s ease;
}
@keyframes zoomIn {
    from {transform: translate(-50%, -50%) scale(0.9); opacity: 0;}
    to {transform: translate(-50%, -50%) scale(1); opacity: 1;}
}
.lightbox-close {
    position: absolute; top: 20px; right: 40px;
    color: #f1f1f1; font-size: 50px; font-weight: 300;
    cursor: pointer; transition: 0.3s; z-index: 3001;
}
.lightbox-close:hover { color: var(--accent-color); }


/* --- ELEGANT MULTI-COLUMN FOOTER --- */
.elegant-footer {
    background-color: var(--primary-color);
    color: #E2E8F0; padding: 5rem 0 2rem 0; margin-top: 5rem;
    border-top: 4px solid var(--accent-color);
}
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 4rem; margin-bottom: 4rem; }
.footer-brand h3 { color: var(--white); font-size: 1.8rem; margin-bottom: 1rem; }
.footer-brand p { font-size: 1.1rem; line-height: 1.8; font-weight: 300; max-width: 400px; }
.footer-links h4 { color: var(--white); font-size: 1.2rem; margin-bottom: 1.5rem; text-transform: uppercase; letter-spacing: 1px; }
.footer-links ul { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.8rem; }
.footer-links a { color: #CBD5E1; font-size: 1.05rem; transition: color 0.3s ease; }
.footer-links a:hover { color: var(--accent-color); }
.footer-bottom { text-align: center; padding-top: 2rem; border-top: 1px solid rgba(255, 255, 255, 0.1); font-size: 0.9rem; color: #94A3B8; }


/* --- GUARANTEED MOBILE MENU FIX & RESPONSIVE DESIGN --- */
.mobile-nav { display: flex; flex-direction: column; align-items: center; gap: 2.5rem; width: 100%; }
.mobile-menu-close { position: absolute; top: 20px; right: 30px; background: none; border: none; font-size: 3.5rem; color: var(--white); cursor: pointer; }
.mobile-nav-link, .mobile-nav-header { color: var(--white); font-family: var(--font-heading); font-size: 1.8rem; font-weight: 700; background: none; border: none; cursor: pointer; }
.mobile-nav-dropdown { display: none; flex-direction: column; align-items: center; gap: 1.5rem; margin-top: 1.5rem; }
.mobile-nav-dropdown.active { display: flex; }
.mobile-nav-sublink { font-size: 1.4rem; color: var(--accent-color); font-weight: 500; }

.mobile-menu-overlay {
    position: fixed; top: 0; right: -100%;
    width: 100%; height: 100vh;
    background-color: rgba(10, 43, 69, 0.98);
    transition: 0.4s cubic-bezier(0.77, 0, 0.175, 1);
    display: flex; justify-content: center; align-items: center;
    z-index: 9999 !important; /* Forces it over everything */
}
.mobile-menu-overlay.is-open { right: 0; }
.mobile-menu-close { z-index: 10000 !important; }

/* Force Hamburger to show on smaller screens */
@media (max-width: 1024px) {
    .desktop-navigation { display: none !important; }
    
    .hamburger-btn { 
        display: flex !important; 
        flex-direction: column;
        justify-content: center;
        gap: 6px;
        background: transparent;
        border: none;
        cursor: pointer;
        z-index: 1001; 
    }
    
    .hamburger-line {
        width: 32px !important; 
        height: 4px !important;
        background-color: var(--primary-color) !important;
        border-radius: 4px;
        display: block;
    }
    
    .impact-text-centered h2 { font-size: 2.4rem; }
    .hero-content h1 { font-size: 3rem; }
    .impact-section { margin-top: 0; padding-top: 3rem; }
}

@media (max-width: 900px) {
    .detail-info-grid { grid-template-columns: 1fr; gap: 3rem; }
    .detail-hero-wrapper { aspect-ratio: 16 / 9; }
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; text-align: center; }
    .footer-brand p { margin: 0 auto; }
}

@media (max-width: 768px) {
    body.menu-open { overflow: hidden; }
    .elegant-card { padding: 2rem 1.5rem; }
    .projects-grid { grid-template-columns: 1fr; }
    
    /* Trap the slider images so they can't push the screen wider */
    .carousel-container { overflow: hidden !important; width: 100%; max-width: 100vw; }
    .project-carousel { overflow: hidden !important; }
    
    .impact-stacked { padding: 3rem 1rem !important; }
    .carousel-card { width: 75%; }
    
    /* Disable dramatic pop-out effect on touch screens */
    .card-image-wrapper:hover img {
        transform: none; object-fit: cover; background: none; border-radius: 16px 16px 0 0; box-shadow: none;
    }

    /* 🛑 MOBILE HERO SECTION FIXES (Ongoing/Completed/Home) 🛑 */
    .hero-section {
        min-height: 380px !important;
        height: 50vh !important;
        margin-top: 75px; /* Reduced space below fixed header */
        padding: 2rem 1rem;
    }
    .hero-content h1 {
        font-size: 2.2rem;
        line-height: 1.15; /* Tighter line height so it doesn't push down */
        margin-bottom: 0.8rem;
        margin-top: 2rem;
    }
    .hero-content p {
        font-size: 1.1rem;
    }

    /* 🛑 MOBILE PROJECT DETAIL PAGE FIXES 🛑 */
    .detail-header {
        margin-top: 85px; /* Drastically reduced the big blank space */
        padding: 1.5rem 1rem 0 1rem; /* Removed heavy padding so the image comes up */
    }
    .detail-header h1 {
        font-size: 2.2rem; /* Adjusted H1 size */
        line-height: 1.15; /* Adjusted H1 line height so multi-line titles stay compact */
        margin-bottom: 0.5rem;
    }
    .detail-header .location-text {
        font-size: 0.95rem; 
        margin-top: 0.5rem;
        margin-bottom: 1rem;
    }
    .detail-hero-wrapper {
        min-height: 220px; /* Keeps the hero image fully visible above the fold */
        margin-bottom: 2rem;
        aspect-ratio: 16 / 9;
    }
}