/* =========================================================
   EXPERT RESPONSIVE OPTIMIZATIONS - SHALIMAR LUXURY BLACK & GOLD
   ========================================================= */

/* --- 1. ROOT VARIABLES & GLOBAL RESETS --- */
:root {
    --brand-gold: #c5a059;
    /* Premium Shalimar Gold */
    --brand-gold-light: #e2c275;
    --brand-gold-dark: #8c6e33;
    --brand-black: #000000;
    /* Pure Black */
    --brand-dark-grey: #111111;
    --brand-brown: #382512;
    /* Card Brown Bars */
    --brand-grey-card: #a4a29c;
    /* Hero Overlay Card Grey */

    /* Brown to Dark Gradient for Buttons */
    --btn-gradient: linear-gradient(135deg, #3e2723 0%, #111111 100%);
}

html,
body {
    max-width: 100%;
    overflow-x: hidden;
    position: relative;
    margin: 0;
    padding: 0;
    font-family: 'Inter', sans-serif;
    color: #333333;
    background-color: #ffffff;
}

.row {
    margin-left: 0;
    margin-right: 0;
}

h1,
h2,
h3,
h4,
.serif-font {
    font-family: 'Playfair Display', serif;
}

.section-padding {
    padding: 90px 0;
}

.bg-light-blue {
    background-color: #faf8f5;
}

/* Warm cream/gold tint for sections */
.bg-dark-custom {
    background-color: var(--brand-black);
    color: white;
}

.x-small {
    font-size: 0.75rem;
}

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal-on-scroll.active {
    opacity: 1;
    transform: translateY(0);
}


/* --- 2. FULL-WIDTH FLAT NAVBAR (Luxury Theme) --- */
.navbar-floating {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    max-width: 100%;
    background: #000000;
    border-bottom: 2px solid var(--brand-gold);
    padding: 10px 5%;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    z-index: 1020;
    transition: all 0.3s ease;
}

.navbar-brand {
    position: relative;
    padding: 0;
    margin-right: 20px;
    display: flex;
    align-items: center;
    height: 60px;
}

.navbar-brand img {
    height: 65px;
    width: auto;
    transition: all 0.4s ease-in-out;
}

.navbar-collapse {
    margin-left: auto;
    justify-content: flex-end;
}

.nav-link {
    font-weight: 500;
    color: #ffffff !important;
    margin: 0 10px;
    transition: 0.3s;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--brand-gold) !important;
}

.navbar-toggler {
    border: 1px solid var(--brand-gold);
    padding: 5px 10px;
    background: transparent;
}

.navbar-toggler-icon {
    filter: invert(70%) sepia(40%) saturate(600%) hue-rotate(350deg) brightness(100%) contrast(90%);
}

.navbar-toggler:focus {
    box-shadow: 0 0 0 2px rgba(197, 160, 89, 0.5);
}

.offcanvas {
    z-index: 1050;
    border-radius: 0;
    max-width: 280px;
    background: var(--brand-black);
    border-right: 2px solid var(--brand-gold);
}

.offcanvas-title {
    color: var(--brand-gold);
}

.offcanvas-body .nav-link {
    padding: 15px 0;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
    font-size: 1.1rem;
    color: #fff !important;
}

.btn-close {
    filter: invert(1);
}


/* --- 3. PROFESSIONAL 3D BUTTONS --- */
.btn-gradient,
.custom-btn-dark {
    background: var(--btn-gradient);
    color: var(--brand-gold) !important;
    border: 1px solid var(--brand-gold);
    padding: 12px 30px;
    border-radius: 4px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 0px #000000, 0 8px 15px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
    position: relative;
    top: 0;
}

.btn-gradient:hover,
.custom-btn-dark:hover {
    background: linear-gradient(135deg, #4e342e 0%, #2a2a2a 100%);
    color: #ffffff !important;
    box-shadow: 0 2px 0px #000000, 0 5px 10px rgba(197, 160, 89, 0.4);
    transform: translateY(2px);
}

.btn-gradient:active,
.custom-btn-dark:active {
    box-shadow: none;
    transform: translateY(4px);
}


/* --- 4. HERO SECTION (UPDATED FOR DESKTOP & MOBILE FIXES) --- */

.hero-section {
    position: relative;
    width: 100%;
    padding-top: 90px !important;
    /* Fixed padding for navbar */
    background-color: #ffffff;
    overflow: hidden;
}

/* Carousel */
.hero-carousel-custom {
    position: relative;
    /* Changed from absolute to relative to take up space */
    width: 100%;
    height: auto;
}

.hero-carousel-custom .carousel-inner,
.hero-carousel-custom .carousel-item {
    height: auto;
}

.banner-img-desktop {
    width: 100%;
    height: auto;
    /* Image takes its natural full height */
    object-fit: cover;
    display: block;
}

/* Overlay - Positioned over the image on desktop, aligned left */
.hero-overlay-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    /* Aligns card to the left */
    padding-left: 8%;
    /* Adjusts how far from the left the card sits */
    z-index: 10;
    pointer-events: none;
    /* Allows clicks to pass through to carousel arrows if needed */
}

.hero-info-card {
    background: white;
    padding: 30px 40px;
    border-radius: 6px;
    max-width: 380px;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.6);
    pointer-events: auto;
    /* Re-enables clicking inside the card */
}

/* Text */
.hero-card-title {
    font-size: 2rem;
    font-weight: 800;
}

.hero-card-loc {
    font-weight: 600;
    margin-bottom: 15px;
}

/* Grey box */
.grey-box {
    background: rgba(0, 0, 0, 0.08);
    padding: 10px;
    margin-bottom: 10px;
}

/* Feature bars */
.brown-bars {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.b-bar {
    background: #382512;
    color: #e2c275;
    padding: 8px;
    font-size: 14px;
    font-weight: 600;
}

/* Price */
.price-text {
    font-size: 1.7rem;
    font-weight: 800;
}


/* --- 5. INFINITE 3D GALLERY --- */
.gallery-wrapper {
    position: relative;
    width: 100%;
    height: 550px;
    margin-top: 40px;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    perspective: 1000px;
}

.gallery-card {
    position: absolute;
    width: 65%;
    height: 100%;
    top: 0;
    left: 50%;
    background: #000;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
    transform: translateX(-50%) scale(0.7);
    opacity: 0;
    z-index: 0;
    visibility: hidden;
    border: 1px solid var(--brand-gold-dark);
}

.gallery-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-card.active {
    transform: translateX(-50%) scale(1);
    opacity: 1;
    z-index: 10;
    visibility: visible;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.8), 0 0 20px rgba(197, 160, 89, 0.3);
}

.gallery-card.prev {
    transform: translateX(-120%) scale(0.85);
    opacity: 0.5;
    z-index: 5;
    visibility: visible;
    filter: grayscale(80%) brightness(0.5);
    cursor: pointer;
}

.gallery-card.next {
    transform: translateX(20%) scale(0.85);
    opacity: 0.5;
    z-index: 5;
    visibility: visible;
    filter: grayscale(80%) brightness(0.5);
    cursor: pointer;
}

.gallery-label {
    position: absolute;
    bottom: 30px;
    left: 30px;
    background: rgba(0, 0, 0, 0.9);
    color: var(--brand-gold);
    padding: 10px 25px;
    border-radius: 4px;
    font-family: 'Playfair Display', serif;
    font-weight: 700;
    font-size: 1.2rem;
    border: 1px solid var(--brand-gold-dark);
}

.slider-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 45px;
    height: 45px;
    background: var(--brand-gold);
    color: #000;
    border-radius: 0;
    border: none;
    z-index: 25;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.3s;
    font-size: 1.2rem;
    font-weight: bold;
}

.slider-btn:hover {
    background: #fff;
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 0 15px var(--brand-gold);
}

.prev-btn {
    left: 15px;
}

.next-btn {
    right: 15px;
}


/* --- 6. OVERVIEW, AMENITIES & HIGHLIGHTS --- */
.text-primary {
    color: var(--brand-gold) !important;
}

.border-primary {
    border-color: var(--brand-gold) !important;
}

.amenity-pill {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    font-weight: 600;
    color: #111;
    transition: 0.3s;
    cursor: default;
}

.amenity-pill:hover {
    border-color: var(--brand-gold);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.15);
    color: var(--brand-gold-dark);
}

.amenity-pill i {
    color: var(--brand-gold);
}

.highlight-card {
    background: #ffffff;
    border: 1px solid #f0f0f0;
    padding: 35px 25px;
    border-radius: 8px;
    height: 100%;
    transition: all 0.4s ease;
    text-align: center;
}

.highlight-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
    border-color: var(--brand-gold);
}

.highlight-icon {
    width: 70px;
    height: 70px;
    background: #fff;
    border: 2px solid var(--brand-gold);
    color: var(--brand-gold-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    margin: 0 auto 20px;
    font-size: 1.8rem;
    transition: 0.3s;
}

.highlight-card:hover .highlight-icon {
    background: var(--brand-gold);
    color: #000;
    box-shadow: 0 5px 15px rgba(197, 160, 89, 0.4);
}

.invest-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-top: 40px;
}

.small-invest-card {
    background: #ffffff;
    border: 1px solid #eef2f6;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    transition: all 0.3s ease;
}

.small-invest-card:hover {
    transform: translateY(-5px);
    border-color: var(--brand-gold);
    box-shadow: 0 10px 25px rgba(197, 160, 89, 0.15);
}

.card-icon-sm {
    width: 45px;
    height: 45px;
    background: rgba(197, 160, 89, 0.1);
    color: var(--brand-gold-dark);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 15px;
    font-size: 1.2rem;
}

.text-danger {
    color: var(--brand-gold-dark) !important;
}


/* --- 7. UNIT CONFIG & TABLES --- */
.unit-config-section {
    padding: 80px 0;
    background-color: #ffffff;
}

.table-premium {
    border-collapse: separate;
    border-spacing: 0 12px;
    width: 100%;
}

.table-premium thead th {
    background-color: var(--brand-black);
    color: var(--brand-gold);
    padding: 18px;
    border: none;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
}

.table-premium tbody tr {
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    transition: transform 0.3s ease;
    border: 1px solid transparent;
}

.table-premium tbody tr:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(197, 160, 89, 0.2);
    border-left: 3px solid var(--brand-gold);
}

.table-premium td {
    background: white;
    padding: 20px;
    vertical-align: middle;
    border-top: 1px solid #f0f0f0;
    border-bottom: 1px solid #f0f0f0;
    font-weight: 600;
    color: #111;
}

.payment-plan-card {
    background: var(--brand-black);
    border: 1px solid var(--brand-gold);
    color: white;
    padding: 25px;
    border-radius: 8px;
    display: inline-block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.price-star {
    font-size: 0.8rem;
    vertical-align: top;
    color: var(--brand-gold);
}


/* --- 8. LOCATION & WALKTHROUGH --- */
#walkthrough {
    padding: 60px 0;
    border-top: 1px solid rgba(197, 160, 89, 0.2);
}

.video-container {
    position: relative;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    aspect-ratio: 16 / 9;
    border-radius: 8px;
    overflow: hidden;
    background: #000;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.5);
    border: 2px solid var(--brand-gold-dark);
}

.video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.map-card-wrapper {
    background: #ffffff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(197, 160, 89, 0.5);
    display: flex;
    flex-wrap: wrap;
}

.map-container-side {
    flex: 1;
    min-width: 350px;
}

.map-container-side iframe {
    width: 100%;
    height: 100%;
    filter: grayscale(80%) contrast(120%);
}

.info-container-side {
    flex: 0 0 400px;
    background: var(--brand-black);
    border-left: 2px solid var(--brand-gold);
    color: white;
    padding: 45px;
    display: flex;
    flex-direction: column;
}

.location-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid rgba(197, 160, 89, 0.2);
}

.dist-badge {
    color: #000;
    font-weight: 700;
    font-size: 0.9rem;
    background: var(--brand-gold);
    padding: 4px 12px;
    border-radius: 4px;
}

.address-box {
    background: rgba(255, 255, 255, 0.05);
    padding: 20px;
    border-radius: 4px;
    margin-bottom: 30px;
    border: 1px solid rgba(197, 160, 89, 0.2);
}


/* --- 9. NEW SPLIT MODAL FORM --- */
.custom-modal-size {
    max-width: 680px !important;
}

#enquiryModal .modal-content {
    border-radius: 0;
}

.icon-feature i {
    color: #000;
}

.icon-feature small {
    font-size: 0.85rem;
    line-height: 1.2;
}

#enquiryModal .form-control {
    font-size: 1rem;
    border-radius: 0;
    background: transparent;
    padding-top: 5px;
    padding-bottom: 5px;
}

#enquiryModal .form-control:focus {
    box-shadow: none;
}

#enquiryModal input::placeholder {
    color: #888;
}

.border-secondary-subtle {
    border-color: #e0e0e0 !important;
}


/* --- 10. FOOTER & STICKY MOBILE --- */
footer {
    border-top: 3px solid var(--brand-gold);
    background-color: var(--brand-black) !important;
}

footer a:hover {
    color: var(--brand-gold) !important;
}

.mobile-sticky-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 2000;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
    padding-bottom: env(safe-area-inset-bottom);
    border-top: 1px solid var(--brand-gold);
}

.sticky-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 60px;
    width: 100%;
    border: none;
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 0.5px;
    text-decoration: none;
    transition: 0.3s;
}

.call-btn {
    background-color: transparent;
    color: var(--brand-gold) !important;
}

.brochure-btn {
    background: var(--btn-gradient);
    color: var(--brand-gold);
    border-left: 1px solid rgba(197, 160, 89, 0.3);
}


/* =========================================================
   11. MEDIA QUERIES (Mobile Fixes & Layouts)
   ========================================================= */

@media (min-width: 992px) {
    body {
        padding-bottom: 0 !important;
    }
}

/* TABLET */
@media (max-width: 991px) {
    .info-container-side {
        flex: 1 0 100%;
    }

    .map-container-side {
        height: 350px;
    }

    .hero-overlay-container {
        justify-content: center !important;
        padding-left: 0 !important;
    }

    .hero-info-card {
        margin: 0 auto;
    }
}

/* MOBILE PHONES */
@media (max-width: 768px) {

    .navbar-floating,
    .navbar-floating.scrolled {
        width: 100% !important;
        left: 0 !important;
        top: 0 !important;
        height: auto !important;
        padding: 10px 15px !important;
        border-radius: 0 !important;
        display: flex !important;
        align-items: center !important;
        justify-content: space-between !important;
    }

    .navbar-brand img {
        height: 45px !important;
        margin: 0 !important;
        top: 0 !important;
        position: relative !important;
    }

    /* --- HERO SECTION MOBILE FIX --- */
    .hero-section {
        height: auto !important;
        min-height: auto !important;
        display: flex !important;
        flex-direction: column !important;
        /* Stacks the image on top of the card */
        background-color: #faf8f5 !important;
        padding-top: 65px !important;
        /* Adds space for the flat header */
    }

    .hero-carousel-custom {
        position: relative !important;
        width: 100% !important;
        height: auto !important;
    }

    .banner-img-mobile {
        width: 100%;
        height: auto;
        object-fit: contain;
        display: block;
    }

    /* Overwrite absolute positioning to relative so it flows below the image */
    .hero-overlay-container {
        position: relative !important;
        display: block !important;
        height: auto !important;
        padding: 30px 15px 40px 15px !important;
        background: transparent !important;
        pointer-events: auto !important;
    }

    .hero-info-card {
        margin: 0 auto !important;
        max-width: 96%;
        padding: 25px 20px;
        box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
        /* Slightly softer shadow for mobile */
    }

    /* ==== MOBILE GALLERY & MASTERPLAN RESIZE ==== */
    .gallery-wrapper {
        height: 300px !important;
        margin-top: 20px !important;
    }

    .gallery-card {
        width: 90% !important;
        border-radius: 8px !important;
    }

    .gallery-card.prev,
    .gallery-card.next {
        opacity: 0 !important;
        visibility: hidden !important;
        pointer-events: none;
    }

    .gallery-label {
        font-size: 0.95rem !important;
        padding: 6px 15px !important;
        bottom: 15px !important;
        left: 15px !important;
    }

    .slider-btn {
        width: 35px;
        height: 35px;
        font-size: 1rem;
    }

    .invest-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 12px;
    }

    body {
        padding-bottom: 80px !important;
    }

    #enquiryModal .modal-body {
        padding: 20px !important;
    }
}

/* SMALL MOBILE */
@media (max-width: 576px) {
    .hero-info-card {
        max-width: 95%;
        padding: 20px 15px;
    }

    .hero-card-title {
        font-size: 1.8rem;
    }

    .price-text {
        font-size: 1.5rem;
    }

    #overview .d-flex {
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 10px !important;
        flex-wrap: wrap;
    }

    #overview .p-3 {
        padding: 10px !important;
        flex: 1;
        text-align: center;
    }

    #overview h3 {
        font-size: 1.1rem !important;
    }

    #overview small {
        font-size: 0.65rem !important;
        display: block;
    }
}

/* Accordion Item Styling */
#faqAccordion .accordion-item {
    border: 1px solid #eee;
    margin-bottom: 10px;
    border-radius: 8px;
    overflow: hidden;
}

#faqAccordion .accordion-button:not(.collapsed) {
    background-color: #fcfaf7 !important;
    color: #bfa37e !important;
    box-shadow: none !important;
}

#faqAccordion .accordion-button {
    font-weight: 600;
    color: #333;
    padding: 1.2rem;
}

#faqAccordion .accordion-button:focus {
    box-shadow: none;
    border-color: rgba(191, 163, 126, 0.2);
}

#faqAccordion .accordion-button::after {
    background-size: 1rem;
}