* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Stack Sans Text";
}

a {
    text-decoration: none;
}

button {
    box-shadow: none !important;
    color: rgb(0, 0, 0) !important;
    border-color: black !important;
    border-radius: 100px !important;
}

body {
    background-color: white;
}

html {
    scroll-behavior: smooth;
}

body::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}
  
body::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.589); 
    cursor: pointer;
    transition: 0.2s;
}
  
body::-webkit-scrollbar-thumb:hover {
    background: #ffffffc7; 
}

/* =========================================
   PRELOADER
   ========================================= */
#preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background-color: #ffffff; 
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999; 
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

#preloader img {
    width: 150px; 
    height: auto;
}

.preloader-hidden {
    opacity: 0;
    visibility: hidden;
}

/* =========================================
   NAVBAR
   ========================================= */
.navBar {
    height: 12vh;
    width: 100%;
    display: flex;
    align-items: center;
    position: fixed;
    left: 0;
    top: 0;
    padding: 0% 9%;
    z-index: 100;
    transition: 0.5s;
    background-color: white !important;
    border-bottom: 1px solid #e0e0e0;
    box-shadow: 0 0 10px #00000029;
}

.navBar nav {
    display: flex;
    height: 100%;
    width: 100%;
    justify-content: space-between;
}

.navSec1 {
    width: 50%;
    display: flex;
    align-items: center;
}

.navSec1 img {
    width: 9%;
    backdrop-filter: blur(6px);
    border-radius: 50px;
}

.navBarLogoScrolled {
    backdrop-filter: none !important;
    box-shadow: none !important;
    filter: invert(100%);
    transition: filter 0.5s;
}

.navSec2 {
    width: 50%;
    display: flex;
    align-items: center;
    justify-content: end;
}

.navSec2 button {
    outline: none;
    padding: 14px 24px; 
    margin-left: 15px;
    background-color: transparent;
    color: black; 
    width: auto; 
    height: auto; 
    font-size: 1rem;
    border: 1px solid black; 
    transition: 0.5s;
    cursor: pointer;
}
    
.navSec2 button:hover {
    background-color: black;
    color: white;
}

.navBarButtonScrolled {
    border-color: black !important;
    box-shadow: none !important;
    color: rgb(0, 0, 0) !important;
}

.navBarButtonScrolled:hover {
    background-color: #002766 !important;
    color: white !important;
}

/* =========================================
   GALLERY SECTION & GRID
   ========================================= */
#fourthSec {
    width: 100%;
    height: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background-color: white;
    color: black;
    padding: 12vh 9% 5% 9%;
    position: relative;
    overflow: hidden;
}

.fourthSecHeader {
    width: 100%;
    margin-bottom: 40px;
}

.fourthSecHeader h1 {
    font-size: 75px;
}

/* Text Reveal Classes */
.reveal-mask {
    display: inline-block;
    overflow: hidden;
    vertical-align: top;
}

.reveal-line {
    display: inline-block;
}

.fourthSecImages {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.gallery-row {
    width: 100%;
    height: 35vh !important;
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    gap: 20px;
}

.gallery-row img {
    flex: 1 1 0 !important;
    min-width: 0 !important;
    min-height: 0 !important;
    width: 100% !important;
    height: 100% !important;
    border-radius: 12px !important;
    object-fit: cover !important;
    object-position: center !important;
    display: block !important;
    margin: 0 !important;
    
    /* THE FIX: Isolate the hover transition so it stops fighting GSAP */
    cursor: pointer;
    transition: scale 0.6s cubic-bezier(0.25, 1, 0.5, 1), filter 0.4s ease;
    will-change: transform, filter, scale;
}

/* Premium Cinematic Hover Effect */
.gallery-row:hover img:not(:hover) {
    filter: brightness(0.4) grayscale(50%);
}

.gallery-row img:hover {
    /* THE FIX: Use the independent scale property, NOT transform: scale() */
    scale: 1.03; 
    z-index: 10;
}

.shapes {
    width: 10%;
    position: absolute;
    display: none;
}

/* =========================================
   FOOTER SECTION
   ========================================= */
#sixthSec {
    width: 100%;
    height: 40vh;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2% 9%;
    border-top: 1px solid black;
    background-color: white;
    position: relative;
}

.sixthSecLogo {
    width: 20%;
    display: flex;
    justify-content: start;
    align-items: center;
}

.sixthSecLogo img {
    width: 250px;
    height: 250px;
}

.sixthSecLinks, .sixthSecLinks1, .sixthSecLinks2 {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
    gap: 20px; 
    font-size: 1.25rem; 
    height: auto; 
}
    
.sixthSecLinks1 span, .sixthSecLinks2 span {
    display: flex;
    align-items: center;
    justify-content: flex-start !important; 
    gap: 15px; 
    width: 100% !important;
}

.sixthSecLinks1 span img, .sixthSecLinks2 span img {
    width: 24px; 
    height: 24px;
    filter: invert(1);
    flex-shrink: 0; 
    order: -1; /* Flips icons to the left */
    }

.sixthSecLinks a, .sixthSecLinks1 a, .sixthSecLinks2 a {
    color: rgb(0, 0, 0);
    transition: 0.2s;
}

.sixthSecLinks a:hover, .sixthSecLinks1 a:hover, .sixthSecLinks2 a:hover {
    color: #002766;
}

#backToTopBtn2 {
    width: 55px;
    height: 55px;
    position: fixed; 
    bottom: 30px; 
    right: 30px; 
    display: flex;
    justify-content: center;
    align-items: center;
    background: #ffffff;
    border-radius: 50px;
    border: 3px solid #002766;
    cursor: pointer;
    z-index: 999; 
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15); 
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px); 
    transition: all 0.3s ease;
}
    
#backToTopBtn2.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

#backToTopBtn2:hover {
    background-color: #f0f0f0;
    transform: translateY(-3px); 
}

#backToTopBtn2 img {
    width: 28px;
    height: 30px;
    /* filter: invert(1); */
}

#copyright {
    font-size: 0.8rem;
    position: absolute;
    bottom: 20px; 
    left: 50%;
    transform: translateX(-50%);
    color: #000000b0;
}

/* =========================================
   RESPONSIVE MEDIA QUERIES
   ========================================= */
/* =========================================
   SCALING DOWN (Tablets & Phones)
   ========================================= */

/* 1. SMALL LAPTOPS & LANDSCAPE TABLETS */
@media (max-width: 1024px) {
    .navBar { height: 11vh; }
    .navSec2 button { padding: 5px 12px; font-size: 0.75rem; }
    
    .fourthSecHeader h1 { font-size: 60px; }
    .gallery-row { height: 25vh !important; } /* Slightly shorter rows */
    
    #sixthSec { flex-wrap: nowrap !important; padding: 4% 5%; gap: 15px; min-height: auto; }
    .sixthSecLogo { width: 15%; margin-bottom: 0; }
    .sixthSecLogo img { width: 140px; height: 140px; } 
    .sixthSecLinks { width: 15%; font-size: 1.05rem; gap: 12px; margin-left: 5%; }
    .sixthSecLinks1 { width: 25%; font-size: 1.05rem; gap: 12px; max-width: none; margin-left: 5%; }
    .sixthSecLinks2 { width: 35%; font-size: 1.05rem; gap: 12px; max-width: none; }
    .sixthSecLinks1 span, .sixthSecLinks2 span { gap: 10px; }
    .sixthSecLinks1 span img, .sixthSecLinks2 span img { width: 20px; height: 20px; }
    #copyright { font-size: 0.85rem; bottom: 10px; }
    
    #backToTopBtn2 { width: 45px; height: 45px; }
    #backToTopBtn2 img { width: 22px; height: 24px; }
}

/* 2. PORTRAIT TABLETS (Switch Gallery to a 2-Column Grid) */
@media (max-width: 768px) {
    /* NAVBAR & HAMBURGER */
    .navBar { position: fixed !important; top: 0; left: 0; right: 0; width: auto !important; max-width: 100vw !important; padding: 15px 5% !important; box-sizing: border-box !important; z-index: 105; background: white !important; }
    .navBar nav { width: 100% !important; max-width: 100% !important; display: flex; flex-direction: row; justify-content: space-between; align-items: center; box-sizing: border-box !important; }
    .navSec1 { width: auto; }
    .navSec1 img { width: 50px; }
    .hamburger { display: flex; flex-direction: column; gap: 6px; cursor: pointer; z-index: 110; }
    .hamburger .bar { width: 30px; height: 3px; background-color: black; border-radius: 3px; transition: all 0.3s ease-in-out; }
    .hamburger.active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .hamburger.active .bar:nth-child(2) { opacity: 0; }
    .hamburger.active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }
    .navSec2 { position: fixed; top: 0; right: -100%; width: 100%; height: 100vh; background-color: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px); flex-direction: column; justify-content: center; align-items: center; transition: right 0.5s cubic-bezier(0.77, 0, 0.175, 1); z-index: 100; margin: 0; }
    .navSec2.active { right: 0; }
    .navSec2 button { width: 70%; padding: 18px; margin: 10px 0; font-size: 1.3rem; background-color: rgba(0, 0, 0, 0.05); border: 1px solid rgba(0, 0, 0, 0.1); border-radius: 8px; color: black; font-weight: 600; letter-spacing: 1px; }

    /* GALLERY LAYOUT (2 Columns with Smart Full-Width Spanning for 3-Image Rows) */
    #fourthSec { padding: 15vh 7% 5% 7%; }
    .fourthSecHeader h1 { font-size: 50px; text-align: center; }
    
    .gallery-row { 
        flex-wrap: wrap !important; /* Allows images to wrap */
        height: auto !important; 
        gap: 15px !important;
        margin-bottom: 15px;
    }
    
    .gallery-row img {
        flex: 0 0 calc(50% - 7.5px) !important; /* Forces a neat 2-column grid */
        height: 250px !important;
    }

    /* SMART FIX: If a row has 3 items, the 3rd item automatically spans 100% width, killing the empty space! */
    .gallery-row img:nth-last-child(1):nth-child(odd) {
        flex: 0 0 100% !important;
        height: 300px !important; /* Makes the full-width banner slightly taller and more cinematic */
    }

    /* FOOTER */
    #sixthSec { display: flex !important; flex-direction: row !important; flex-wrap: nowrap !important; padding: 5% 7% !important; gap: 10px; align-items: center !important; min-height: auto !important; height: 30vh;}
    .sixthSecLogo { width: 15% !important; justify-content: center; margin: 0; padding: 0; }
    .sixthSecLogo img { width: 80px; height: 80px; }
    .sixthSecLinks { width: 15% !important; font-size: 0.8rem; gap: 8px; margin: 0; display: flex; flex-direction: column; margin-left: 5% !important;}
    .sixthSecLinks1 { width: 30% !important; font-size: 0.8rem; gap: 8px; margin: 0; max-width: none; display: flex; flex-direction: column; margin-left: 8% !important;}
    .sixthSecLinks2 { width: 40% !important; font-size: 0.8rem; gap: 8px; margin: 0; max-width: none; display: flex; flex-direction: column; }
    .sixthSecLinks1 span, .sixthSecLinks2 span { gap: 6px; justify-content: flex-start; align-items: center; width: 100%; }
    .sixthSecLinks1 span img, .sixthSecLinks2 span img { width: 16px; height: 16px; flex-shrink: 0; }
    #copyright { font-size: 0.55rem !important; position: absolute !important; bottom: 8px !important; left: 50% !important; transform: translateX(-50%) !important; margin: 0 !important; display: block; }
    
    #backToTopBtn2 { bottom: 6px; right: 6px; }
    #backToTopBtn2 img { width: 18px !important; height: 20px !important; }
}

/* 3. MOBILE PHONES (Switch Gallery to Single Column) */
@media (max-width: 480px) {
    html, body { overflow-x: hidden !important; width: 100vw !important; max-width: 100% !important; }
    .navBar { padding: 15px 5% !important; }
    .navSec1 img { width: 45px; }

    /* GALLERY LAYOUT (1 Column Stack) */
    #fourthSec { padding: 15vh 5% 5% 5%; }
    .fourthSecHeader h1 { font-size: 40px; }
    .gallery-row {
        flex-direction: column !important;
        flex-wrap: nowrap !important;
    }
    .gallery-row img {
        flex: 0 0 100% !important; 
        height: 300px !important; /* Taller cinematic crop for phones */
    }

    /* FOOTER */
    #sixthSec { display: flex !important; flex-direction: column !important; align-items: center !important; text-align: center !important; padding: 15% 5% 8% 5% !important; gap: 35px; }
    .sixthSecLogo, .sixthSecLinks, .sixthSecLinks1, .sixthSecLinks2 { width: 100% !important; max-width: 100% !important; display: flex; flex-direction: column; align-items: center !important; gap: 15px; margin: 0 !important; }
    .sixthSecLogo img { width: 110px; height: 110px; }
    .sixthSecLinks1 span, .sixthSecLinks2 span { justify-content: center !important; width: auto !important; }
    .sixthSecLinks a, .sixthSecLinks1 a, .sixthSecLinks2 a { font-size: 1rem !important; padding: 5px 0; }
    #copyright { position: static !important; transform: none !important; margin-top: 20px !important; font-size: 0.8rem; }
    
    #backToTopBtn2 { width: 45px; height: 45px; bottom: 20px; right: 20px; }
    #backToTopBtn2 img { width: 20px; height: 22px; }
}

@media (max-width: 320px) {
    .gallery-row img { height: 220px !important; }
}

/* =========================================
   SCALING UP (Massive Monitors)
   ========================================= */
@media (min-width: 1440px) {
    .navSec1 img { width: 10%; }
    .fourthSecHeader h1 { font-size: 90px; margin-top: 2%;}
    .sixthSecLinks, .sixthSecLinks1, .sixthSecLinks2 { font-size: 1.2rem; }
}

@media (min-width: 2560px) {
    .navBar { height: 12vh; }
    .navSec2 button { font-size: 1.6rem; padding: 18px 45px; margin-left: 25px; }
    
    .fourthSecHeader h1 { font-size: 130px; margin-bottom: 80px; }
    .gallery-row { height: 30vh !important; gap: 40px; }
    
    .sixthSecLogo img { width: 300px; height: 300px; }
    .sixthSecLinks, .sixthSecLinks1, .sixthSecLinks2 { font-size: 2rem; }
    .sixthSecLinks1 span img, .sixthSecLinks2 span img { width: 40px; height: 40px; }
    #copyright { font-size: 1.2rem; }
    .sixthSecLinks1 { max-width: 25%; }
    .sixthSecLinks2 { max-width: 30%; }
    
    #backToTopBtn2 { width: 90px; height: 90px; bottom: 50px; right: 50px; border-width: 3px; }
    #backToTopBtn2 img { width: 45px; height: 48px; }
}