/* ===================================================
   1. RESET & BASE STYLES
   =================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: "Poppins", sans-serif;
}

html, body {
    position: relative;
    overflow-x: hidden; /* Prevents horizontal wiggle */
    scroll-behavior: smooth;
}

body {
    color: #2a2a2a;
    background: #f4f2ee; /* Warm Stone */
}

/* SCROLL REVEAL */
.reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.9s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ===================================================
   2. HEADER & NAVIGATION
   =================================================== */
.header {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 18px 60px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.75);
    backdrop-filter: blur(12px);
    z-index: 1000;
}

.logo {
    color: #d4af37;
    letter-spacing: 2px;
    font-size: 16px;
    font-weight: 600;
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 28px;
}

.nav-links a {
    color: #eee;
    text-decoration: none;
    font-size: 14px;
    transition: 0.3s;
}

.nav-links a:hover {
    color: #d4af37;
}

/* --- Hamburger Toggle --- */
.menu-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1002;
}

.menu-toggle span {
    width: 25px;
    height: 2px;
    background-color: #d4af37;
    transition: 0.3s;
}

/* ===================================================
   3. HERO SECTION
   =================================================== */
.hero {
    height: 100vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding-top: 90px;
    background-size: cover;
    background-position: center; /* Keeps hero centered */
    transition: background-image 1.6s ease-in-out;
}

.hero::after {
    content: "";
    position: absolute;
    inset: 0;
    background: inherit;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transform: scale(1);
    transition: opacity 1.8s ease-in-out, transform 6s ease;
    z-index: 0;
}

.hero.fade::after {
    opacity: 1;
    transform: scale(1.08);
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.35);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: #fff;
    max-width: 800px;
    padding: 0 20px;
}

.gold-tag {
    color: #d4af37;
    letter-spacing: 4px;
    font-size: 12px;
    display: block;
}

.hero h1 {
    font-family: "Playfair Display", serif;
    font-size: clamp(2.6rem, 5vw, 4rem);
    margin: 18px 0;
}

/* ===================================================
   4. SECTION DIVIDER
   =================================================== */
.section-divider {
    padding: 100px 20px 40px;
    background: #f4f2ee;
    text-align: center;
    position: relative;
    z-index: 5;
}

.divider-content {
    max-width: 900px;
    margin: 0 auto;
}

.section-divider .sub-heading {
    color: #d4af37;
    font-size: 13px;
    letter-spacing: 5px;
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
    text-transform: uppercase;
}

.section-divider .main-heading {
    font-family: "Playfair Display", serif;
    font-size: clamp(2rem, 4vw, 3.2rem);
    color: #1a1a1a;
    margin-bottom: 25px;
    line-height: 1.2;
}

.section-divider .gold-line {
    width: 60px;
    height: 2px;
    background: #d4af37;
    margin: 0 auto 25px;
}

.section-divider .tagline {
    color: #666;
    font-style: italic;
    font-size: 18px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===================================================
   5. PROJECT SHOWCASE (SLIDER)
   =================================================== */
.project-showcase {
    position: relative;
    width: 100%;
    height: 85vh;
    background: #f4f2ee;
    overflow: hidden;
    margin-top: 20px; 
    border-top: 1px solid rgba(212, 175, 55, 0.1);
}

.showcase-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
}

.mist-layer {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(212, 175, 55, 0.12) 0%, rgba(244, 242, 238, 0) 70%);
    animation: backgroundSlowMove 25s infinite alternate ease-in-out;
}

@keyframes backgroundSlowMove {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(8%, -8%) rotate(3deg); }
}

.bg-particle {
    position: absolute;
    background: radial-gradient(circle, rgba(212, 175, 55, 0.25) 0%, rgba(212, 175, 55, 0) 75%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
}

.showcase-slide {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.8s cubic-bezier(0.7, 0, 0.3, 1);
    z-index: 2;
}

.showcase-slide.active {
    opacity: 1;
    visibility: visible;
}

.slide-image {
    width: 70%;
    height: 100%;
    overflow: hidden;
}

.slide-image img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Prevents squashing */
    object-position: center; /* Fixes "cutting" by centering the subject */
    transform: scale(1.1);
    transition: transform 1.5s ease;
}

.showcase-slide.active .slide-image img {
    transform: scale(1);
}

.slide-content {
    position: absolute;
    right: 8%;
    width: 42%;
    background: linear-gradient(135deg, #fbf5e6 0%, #d4af37 100%);
    padding: 60px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.25);
    z-index: 10;
    border: 1px solid rgba(255, 255, 255, 0.4);
}

.slide-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 42px;
    margin-bottom: 20px;
}

.slider-nav {
    position: absolute;
    bottom: 40px;
    left: 8%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    z-index: 20;
}

.nav-btn-wrapper {
    display: flex;
    gap: 12px;
}

.slider-nav button {
    background: transparent;
    border: 1px solid rgba(212, 175, 55, 0.4);
    color: #d4af37;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.4s;
}

.slider-nav button:hover {
    background: #d4af37;
    color: white;
    transform: translateY(-3px);
}

.slide-indicator {
    display: flex;
    align-items: center;
    gap: 15px;
    font-family: 'Oswald', sans-serif;
    color: #d4af37;
    font-size: 14px;
    letter-spacing: 2px;
}

.progress-bar {
    width: 100px;
    height: 1px;
    background: rgba(212, 175, 55, 0.2);
    position: relative;
}

.progress-fill {
    position: absolute;
    height: 100%;
    background: #d4af37;
    transition: width 0.8s ease;
}

/* ===================================================
   6. LOCATION & NATURE SECTION
   =================================================== */
.location-nature {
    position: relative;
    padding: 90px 10% 80px;
    background: radial-gradient(circle at 20% 20%, rgba(212,175,55,0.06), transparent 40%),
                radial-gradient(circle at 80% 80%, rgba(212,175,55,0.05), transparent 40%),
                #f4f2ee;
    overflow: hidden;
}

.rainbow-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background: rgba(0, 0, 0, 0.02);
}

.rainbow {
    height: 150%;
    width: 8px;
    top: 0;
    position: absolute;
    transform: rotate(20deg);
    transform-origin: top right;
    animation: slide 15s linear infinite;
}

.rainbow:nth-child(1) { left: 5%;  box-shadow: 0 0 120px 60px white, 0 0 90px 45px #d4af37; }
.rainbow:nth-child(2) { left: 25%; animation-delay: -3s; box-shadow: 0 0 120px 60px white, 0 0 90px 45px #c9a24d; }
.rainbow:nth-child(3) { left: 45%; animation-delay: -6s; box-shadow: 0 0 120px 60px white, 0 0 90px 45px #d4af37; }
.rainbow:nth-child(4) { left: 65%; animation-delay: -9s; box-shadow: 0 0 120px 60px white, 0 0 90px 45px #fbf5e6; }

@keyframes slide {
    from { transform: translateX(-30vw) rotate(20deg); opacity: 0; }
    20% { opacity: 0.8; }
    80% { opacity: 0.8; }
    to { transform: translateX(130vw) rotate(20deg); opacity: 0; }
}

.location-box, .nature-box {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 80px;
    align-items: center;
    margin-bottom: 90px;
    position: relative;
    z-index: 2;
}

.nature-box {
    grid-template-columns: 0.8fr 1.2fr;
}

/* --- COLLAGE SYSTEM --- */
.collage-container {
    position: relative;
    width: 100%;
    height: 600px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.collage-item {
    position: absolute;
    background-size: cover;
    background-position: center;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.15), 0 0 0 1px rgba(212,175,55,0.15);
    transition: all 0.6s cubic-bezier(0.2, 1, 0.3, 1);
    border: 4px solid #fff;
}

.main-img { width: 350px; height: 500px; z-index: 3; }
.sub-img-1 { width: 200px; height: 250px; top: 0; left: 0; z-index: 4; transform: rotate(-8deg); }
.sub-img-2 { width: 220px; height: 180px; bottom: 20px; right: 0; z-index: 2; transform: rotate(5deg); }

.collage-container:hover .sub-img-1 { transform: rotate(0deg) translate(-15px, -15px); }
.collage-container:hover .sub-img-2 { transform: rotate(0deg) translate(15px, 15px); }
.collage-item:hover { transform: translateY(-6px) scale(1.015); z-index: 10; }

.circleLight {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.05), transparent);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

.collage-item:hover .circleLight { opacity: 1; }

.card-text {
    position: absolute;
    z-index: 5;
    text-align: center;
    width: 100%;
}

.card-text h2 {
    font-family: 'Oswald', sans-serif;
    font-size: 60px;
    color: #fff;
    text-shadow: 0px 4px 10px rgba(0,0,0,0.3);
}

/* --- TEXT BOXES --- */
.text-box {
    position: relative;
    padding-left: 30px;
}

.text-box::before {
    content: "";
    position: absolute;
    left: 0;
    top: 5px;
    width: 3px;
    height: 70%;
    background: linear-gradient(to bottom, #d4af37, rgba(212,175,55,0.2));
}

.gold-label {
    font-size: 11px;
    letter-spacing: 4px;
    color: #d4af37;
    font-weight: 700;
    text-transform: uppercase;
    display: block;
    margin-bottom: 10px;
}

.text-box h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.6rem;
    margin-bottom: 15px;
}

.text-box p {
    font-size: 1.05rem;
    line-height: 1.85;
    color: #555;
}

.luxury-features {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid rgba(212, 175, 55, 0.3);
}

.feature-item {
    font-family: 'Oswald', sans-serif;
    font-size: 11px;
    letter-spacing: 2px;
    color: #d4af37;
    text-transform: uppercase;
}

/* ===================================================
   7. VIDEO PHILOSOPHY
   =================================================== */
.video-philosophy {
    position: relative;
    padding: 110px 10%;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 70px;
    align-items: center;
    color: #e6e6e6;
    background: url("images/images11.jpg") center / cover no-repeat;
}

.video-philosophy::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, rgba(20, 20, 18, 0.94), rgba(20, 20, 18, 0.75));
}

.video-box {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 35px 70px rgba(0,0,0,0.5);
    position: relative;
    z-index: 1;
}

.video-box video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.philosophy {
    position: relative;
    z-index: 2;
}

.philosophy span {
    color: #d4af37;
    letter-spacing: 4px;
    font-size: 12px;
}

.philosophy h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem;
    margin: 15px 0;
}

/* ===================================================
   8. RESPONSIVE DESIGN (MOBILE & TABLET)
   =================================================== */

/* --- TABLETS & SMALL LAPTOPS --- */
@media (max-width: 1024px) {
    .header { padding: 15px 30px; }

    .location-box, .nature-box, .video-philosophy {
        grid-template-columns: 1fr;
        gap: 50px;
        text-align: center;
    }

    .nature-box { display: flex; flex-direction: column-reverse; }

    .text-box {
        padding-left: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .text-box::before {
        left: 50%;
        transform: translateX(-50%);
        height: 50px;
        top: -60px;
    }

    .slide-content { width: 80%; right: 10%; padding: 40px; }
    .slide-image { width: 100%; }
}

/* --- MOBILE MENU OVERRIDES --- */
@media (max-width: 992px) {
    .header { padding: 15px 25px; }

    .menu-toggle { display: flex; }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 100%; 
        height: 100vh;
        background: rgba(10, 10, 10, 0.98);
        backdrop-filter: blur(15px);
        display: flex;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 30px;
        transition: right 0.5s cubic-bezier(0.77, 0.2, 0.05, 1.0);
        z-index: 1001;
        margin: 0;
        padding: 0;
    }

    .nav-links.active { right: 0; }

    .nav-links li { width: 100%; text-align: center; }

    .nav-links a {
        font-size: 24px;
        font-family: 'Playfair Display', serif;
        letter-spacing: 3px;
        color: #fff;
    }

    /* Toggle X Animation */
    .menu-toggle.active span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
    .menu-toggle.active span:nth-child(2) { opacity: 0; }
    .menu-toggle.active span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }
}

/* --- MOBILE PHONES --- */
@media (max-width: 768px) {
    /* FIX: Prevents large slider images from "cutting" */
    .slide-image {
        width: 100%;
        height: 100%;
    }
    
    .slide-image img {
        object-position: center; /* Ensures subject stays centered on small screens */
    }

    /* FIX: Prevents text box from occupying all background on phones */
    .slide-content {
        position: relative;
        right: auto;
        width: 90%;
        margin: -120px auto 0; /* Pulls content up slightly but leaves background visible */
        padding: 30px 20px;
        text-align: center;
        box-shadow: 0 15px 30px rgba(0,0,0,0.2);
    }

    .slide-content h2 {
        font-size: 24px;
        margin-bottom: 10px;
    }

    .slide-content p {
        font-size: 14px;
        line-height: 1.5;
    }
/* --- MOBILE PHONES (Under 768px) --- */
@media (max-width: 768px) {
    .project-showcase {
        height: auto;
        min-height: 100vh;
        display: block; /* Change from flex to block to allow natural scrolling */
        overflow: hidden;
    }

    .showcase-slide {
        position: relative; /* Change from absolute to relative */
        display: none; /* Hide all by default */
        flex-direction: column;
        width: 100%;
        height: auto;
    }

    .showcase-slide.active {
        display: flex; /* Only show the active one */
        opacity: 1;
        visibility: visible;
    }

    .slide-image {
        width: 100%;
        height: 50vh; /* Background photo takes half screen */
    }

    .slide-content {
        position: relative;
        right: auto;
        width: 90%;
        margin: -60px auto 20px; /* Pull content up slightly over the photo */
        padding: 30px 20px;
        text-align: center;
        background: linear-gradient(135deg, #fbf5e6 0%, #d4af37 100%);
        box-shadow: 0 15px 30px rgba(0,0,0,0.2);
        z-index: 10;
    }

    .slider-nav {
        position: relative;
        left: 0;
        bottom: 0;
        margin: 20px 0;
        flex-direction: row;
        width: 100%;
        justify-content: center;
        gap: 30px;
    }
}

    .section-divider { padding: 60px 20px; }

    .collage-container { height: 450px; }
    .main-img { width: 260px; height: 380px; }
    .sub-img-1 { width: 140px; height: 180px; }
    .sub-img-2 { width: 150px; height: 130px; }
    .card-text h2 { font-size: 40px; }

    .slider-nav {
        position: relative;
        left: auto;
        bottom: auto;
        margin-top: 30px;
        flex-direction: row;
        width: 100%;
        justify-content: center;
        gap: 30px;
    }

    .luxury-features { flex-direction: column; gap: 10px; }
}

@media (max-width: 480px) {
    .hero h1 { font-size: 2rem; }
    .section-divider .main-heading { font-size: 1.8rem; }
    .text-box h2 { font-size: 1.8rem; }
    .collage-container { height: 350px; }
    .main-img { width: 200px; height: 300px; }
    
    .slide-content h2 { font-size: 20px; }
}

body.menu-open { overflow: hidden; }


/* --- LUXURY POPUP STYLES (UPDATED & FULLY RESPONSIVE) --- */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9); /* Darker backdrop for better focus */
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; /* Higher priority than navigation */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    padding: 15px; /* Margin for mobile edges */
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #fff;
    width: 100%;
    max-width: 850px;
    max-height: 90vh; /* Prevents overflow off-screen */
    position: relative;
    border-radius: 8px;
    overflow-y: auto; /* Enables scrolling on short phones */
    transform: translateY(20px);
    transition: transform 0.5s ease;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.popup-overlay.show .popup-content {
    transform: translateY(0);
}

.popup-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.popup-image {
    min-height: 350px;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popup-text {
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

/* --- THE FIXED CLOSE BUTTON --- */
/* --- LUXURY POPUP STYLES (CLEAN & RESPONSIVE) --- */
.popup-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9); 
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999; 
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease;
    padding: 15px; 
}

.popup-overlay.show {
    opacity: 1;
    visibility: visible;
}

.popup-content {
    background: #fff;
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    position: relative; /* Base for the absolute close button */
    border-radius: 8px;
    overflow: hidden;
    transform: translateY(20px);
    transition: transform 0.5s ease;
    box-shadow: 0 25px 50px rgba(0,0,0,0.3);
}

.popup-overlay.show .popup-content {
    transform: translateY(0);
}

.popup-flex {
    display: grid;
    grid-template-columns: 1fr 1fr;
}

.popup-image {
    min-height: 350px;
}

.popup-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.popup-text {
    padding: 50px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: #fff;
}

/* --- THE FIXED CLOSE BUTTON (NO TEXT OVERLAP) --- */
.close-popup {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 40px;
    height: 40px;
    background: #ffffff !important;
    color: #333 !important;
    border: none !important;
    border-radius: 50% !important;
    font-size: 28px !important;
    cursor: pointer;
    z-index: 10005; /* Higher than everything */
    display: flex; /* Centers the X */
    align-items: center; /* Centers the X */
    justify-content: center; /* Centers the X */
    box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    transition: 0.3s;
    padding: 0;
    line-height: 0; /* Prevents text alignment issues */
}

.close-popup:hover {
    transform: scale(1.1);
    background-color: #f4f2ee !important;
}
/* --- MOBILE RESPONSIVE OVERRIDES --- */
@media (max-width: 768px) {
    .popup-flex {
        grid-template-columns: 1fr; 
    }

    .popup-image {
        height: 250px;
        min-height: 200px;
    }

    .popup-text {
        padding: 30px 20px;
        text-align: center;
    }

    .popup-text h2 {
        font-size: 22px;
        margin-bottom: 10px;
    }

    .popup-text p {
        font-size: 14px;
        line-height: 1.5;
    }

    /* Keep "X" visible on top of the image in mobile */
    .close-popup {
        top: 10px;
        right: 10px;
        width: 40px; 
        height: 40px;
        font-size: 28px;
        background: rgba(255, 255, 255, 0.95) !important;
    }
}

/* Scroll Lock */
body.popup-active {
    overflow: hidden;
}
/* ===================================================
   9. FOOTER
   =================================================== */
.footer {
    background: #111;
    color: #666;
    text-align: center;
    padding: 60px 20px;
}