/* =========================================
   WALLSART ARCHITECTS - PROJECTS CSS
   (Font: Cinzel, White Text, Zero-Gap Mobile Fix Applied)
========================================= */

/* --- 1. Global Styles --- */
* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { margin: 0; padding: 0; width: 100%; overflow-x: hidden; font-family: 'Arial', sans-serif; line-height: 1.6; color: #333; background: #f8f8f8; }
a { text-decoration: none; color: inherit; }

/* =========================================
   PAGE TRANSITION PRELOADER
========================================= */
.preloader-overlay { position: fixed; top: 0; left: 0; width: 100vw; height: 100vh; background-color: #11676d; z-index: 99999; display: flex; justify-content: center; align-items: center; transition: opacity 0.8s ease-in-out, visibility 0.8s ease-in-out; }
.preloader-logo { width: 350px; height: auto; animation: pulseLogo 1.2s infinite alternate; filter: contrast(1.15) brightness(1.05) drop-shadow(0px 4px 10px rgba(0, 0, 0, 0.4)); }
.preloader-overlay.hidden { opacity: 0; visibility: hidden; }
@keyframes pulseLogo { 0% { opacity: 0.6; transform: scale(0.95); } 100% { opacity: 1; transform: scale(1.05); } }
@media (max-width: 768px) { .preloader-logo { width: 250px; } }

/* =========================================
   PREMIUM UNIVERSAL NAVBAR 
========================================= */
.navbar { position: absolute !important; top: 0; left: 0; width: 100%; display: flex; justify-content: space-between !important; align-items: center !important; padding: 1.5rem 3rem; background: transparent !important; z-index: 1000; box-sizing: border-box; }
.brand-container { display: flex !important; align-items: center !important; gap: 15px !important; flex-shrink: 0; }
.logo { height: 80px !important; width: auto !important; flex-shrink: 0; background: transparent !important; padding: 0 !important; display: block !important; }

.brand-text { 
    font-family: 'Cinzel', serif !important; 
    text-transform: uppercase !important;
    color: #ffffff !important; /* FORCED PURE WHITE TO MATCH INDEX */
    font-size: 1.5rem !important; 
    font-weight: 700 !important; 
    letter-spacing: 1.5px !important; 
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.7) !important;
    display: inline-block !important;
    transform: translateY(4px) !important; 
}

.nav-links { display: flex; gap: 2rem; list-style: none; margin: 0; padding: 0; }
/* FORCE MENU LINKS TO MATCH HOMEPAGE (ALL CAPS) */
    .nav-links a { 
        font-family: 'Arial', sans-serif !important; /* Matches main page font */
        color: #ffffff !important; 
        font-weight: 600 !important; 
        text-transform: uppercase !important; /* Forces ABOUT US instead of About Us */
        letter-spacing: 1px !important; 
        font-size: 14px !important; 
        text-shadow: 1px 1px 5px rgba(0, 0, 0, 0.7) !important;
        transition: color 0.3s ease !important; 
        text-decoration: none !important;
    }
    
    .nav-links a:hover { 
        color: #fce03b !important; 
    }

.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 5px; z-index: 1001; }
.menu-toggle .bar { width: 25px; height: 3px; background-color: #ffffff !important; transition: all 0.3s ease; border-radius: 3px; }

/* ZERO-GAP MOBILE FIX FOR NAVBAR */
@media (max-width: 992px) {
    .navbar { 
        padding: 15px 10px !important; 
        flex-wrap: nowrap !important; 
        flex-direction: row !important; 
        justify-content: space-between !important;
        width: 100% !important;
    }
    .brand-container { 
        max-width: 85% !important; 
        gap: 8px !important; 
        flex-shrink: 1 !important; 
        justify-content: flex-start !important; 
        margin-left: 0 !important; 
        padding-left: 0 !important; 
    }
    .logo { height: 50px !important; flex-shrink: 0 !important; }
    .brand-text { font-size: 13px !important; letter-spacing: 1px !important; transform: translateY(3px) !important; flex-shrink: 1 !important; }
    
    .menu-toggle { display: flex !important; margin-left: auto !important; flex-shrink: 0 !important; }
    .nav-links { display: flex; flex-direction: column; position: absolute; top: 80px; left: -100%; width: 100%; background-color: rgba(17, 103, 109, 0.98) !important; text-align: center; transition: left 0.4s ease; padding: 2.5rem 0; box-shadow: 0 10px 15px rgba(0,0,0,0.2); z-index: 999; }
    .nav-links.active { left: 0; }
    .nav-links li { margin: 15px 0; }
    .nav-links a { font-size: 1.1rem; text-shadow: none; }
}

/* =========================================
   PROJECTS HERO (VIDEO BACKGROUND STYLES)
========================================= */
.projects-hero {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9; /* THE FIX: Matches the exact shape of your video! */
    min-height: 400px; /* Keeps it from getting too tiny on mobile phones */
    display: flex; 
    flex-direction: column; 
    align-items: center; 
    justify-content: center; 
    text-align: center; 
    overflow: hidden; 
    background: #111111 !important; 
}

/* This stretches the video to perfectly cover the background without squishing */
/* Updated Video Settings */
.hero-video-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Since the box is now 16:9, nothing gets cropped! */
    z-index: 1; 
}
    object-fit: cover;
}

/* This is the dark tint that goes OVER the video, but UNDER the text */
.hero-video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55); /* 55% dark tint. Change 0.55 to make it lighter/darker */
    z-index: 2; /* Sits on top of the video */
}

/* This ensures your text sits on top of everything */
.hero-content {
    position: relative;
    z-index: 3; /* Top layer! */
}

.projects-hero h1 { 
    color: #fce03b; 
    font-size: 3.5rem; 
    text-transform: uppercase; 
    letter-spacing: 2px; 
    text-shadow: 2px 2px 10px rgba(0, 0, 0, 0.5); 
    margin: 0 0 15px 0; 
}

.projects-hero p { 
    color: #ffffff; 
    font-size: 1.2rem; 
    margin: 0; 
}

/* =========================================
   SEAMLESS PORTFOLIO GRID
========================================= */
.portfolio-grid-section { padding-top: 60px !important; padding-bottom: 60px !important; background: #ffffff; }
.portfolio-header { text-align: center; margin-bottom: 50px; padding: 0 20px; }
.portfolio-header h2 { font-size: 2.5rem; color: #1e6262; }
.portfolio-header p { color: #666; font-size: 1.1rem; }

.portfolio-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; }
.portfolio-item { position: relative; overflow: hidden; aspect-ratio: 4 / 3; display: block; }
.portfolio-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.6s ease; }

.portfolio-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(17, 103, 109, 0.85); display: flex; flex-direction: column; align-items: center; justify-content: center; opacity: 0; transition: opacity 0.4s ease; text-align: center; padding: 20px; }
.portfolio-text { transform: translateY(20px); transition: transform 0.4s ease; }
.portfolio-text h3 { color: #fce03b; font-size: 1.4rem; margin-bottom: 5px; text-transform: uppercase; letter-spacing: 1px; }
.portfolio-text p { color: #ffffff; font-size: 0.95rem; margin: 0; font-weight: 300; }

.portfolio-item:hover img { transform: scale(1.08); }
.portfolio-item:hover .portfolio-overlay { opacity: 1; }
.portfolio-item:hover .portfolio-text { transform: translateY(0); }

/* Hide scrollbars for the grid */
.portfolio-grid, .portfolio-grid-section { -ms-overflow-style: none; scrollbar-width: none; }
.portfolio-grid::-webkit-scrollbar, .portfolio-grid-section::-webkit-scrollbar { display: none; }

@media (max-width: 1024px) { .portfolio-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 768px) { .portfolio-grid { grid-template-columns: repeat(2, 1fr); } .portfolio-text h3 { font-size: 1.2rem; } }
@media (max-width: 480px) { .portfolio-grid { grid-template-columns: 1fr; } }

/* =========================================
   POPUP MODAL & LIGHTBOX STYLES
========================================= */
.project-modal { display: none; position: fixed; z-index: 2000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(17, 103, 109, 0.95); overflow-y: auto; backdrop-filter: blur(5px); }
.modal-content { position: relative; background-color: #f9f9f9; margin: 5% auto; padding: 40px 20px; width: 90%; max-width: 1000px; border-radius: 8px; box-shadow: 0 15px 40px rgba(0,0,0,0.5); }
.close-modal { color: #1e6262; position: absolute; top: 10px; right: 20px; font-size: 40px; font-weight: bold; cursor: pointer; transition: color 0.3s; }
.close-modal:hover { color: #fce03b; }

.presentation-container { display: flex; flex-direction: column; gap: 20px; align-items: center; margin-top: 20px; }
.presentation-container img { width: 100%; height: auto; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.1); }

/* Standard Image Gallery */
.portfolio-project { max-width: 1200px; margin: 40px auto; padding: 0 20px; }
.project-title { text-align: center; font-size: 2rem; color: #333; margin-bottom: 30px; text-transform: uppercase; letter-spacing: 1px; }
.image-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 15px; }
.image-gallery img { width: 100%; height: 250px; object-fit: cover; border-radius: 4px; transition: transform 0.3s ease, box-shadow 0.3s ease; box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05); cursor: pointer; }
.image-gallery img:hover { transform: translateY(-5px); box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1); }

#lightbox-modal { position: fixed; z-index: 3000; left: 0; top: 0; width: 100%; height: 100%; background-color: rgba(0, 0, 0, 0.85); display: flex; justify-content: center; align-items: center; opacity: 0; pointer-events: none; transition: opacity 0.3s ease; }
#lightbox-modal.lightbox-visible { opacity: 1; pointer-events: auto; }
.lightbox-content { max-width: 90%; max-height: 90vh; border-radius: 4px; box-shadow: 0 4px 15px rgba(0,0,0,0.5); object-fit: contain; }
.close-lightbox { position: absolute; top: 20px; right: 40px; color: #f1f1f1; font-size: 45px; font-weight: bold; cursor: pointer; transition: color 0.3s ease; }
.close-lightbox:hover { color: #cccccc; }

/* =========================================
   FOOTER STYLES
========================================= */
.site-footer { background-color: #ffffff; text-align: center; padding: 80px 20px 60px; font-family: 'Helvetica Neue', Arial, sans-serif; }
.back-to-top { margin-bottom: 60px; }
.back-to-top a { color: #999999; text-decoration: none; font-size: 14px; transition: color 0.2s ease-in-out; }
.back-to-top a:hover { color: #555555; }
.copyright { color: #b3b3b3; font-size: 13px; letter-spacing: 0.5px; }
/* =========================================
   MOBILE FIX: PROJECTS HERO TEXT
========================================= */
@media (max-width: 768px) {
  .projects-hero {
    min-height: 350px !important; 
    /* Adds top padding so the text clears your transparent navbar */
    padding: 80px 20px 30px 20px !important; 
  }

  .projects-hero h1 { 
    /* Shrinks the massive desktop font to a perfect mobile size */
    font-size: 2.2rem !important; 
    line-height: 1.2 !important; 
    margin-bottom: 15px !important;
  }

  .projects-hero p { 
    font-size: 1rem !important; 
    line-height: 1.5 !important;
    /* Adds a little side padding so the text doesn't touch the screen edges */
    padding: 0 10px !important; 
  }
}