/*
//  Created by Mohammad Rabi on 17/02/2026.
//  Copyright © 2026 Horizon Stay. All rights reserved.
*/

/* =========================================
   1. VARIABLES & BASE SETUP
   ========================================= */
:root {
    --bg-color: #0d1126;
    --card-bg: #151b36; 
    --grad-start: #ed4264; 
    --grad-end: #ffedbc;
    --text-color: #e0e0e0;
    --skeleton-base: #1f294a;
    --skeleton-highlight: #2a365e;
    
    /* Brand Colors */
    --airbnb-color: #FF5A5F;
    --booking-color: #003580;
    --whatsapp-color: #25D366;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    background-color: var(--bg-color);
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
    color: var(--text-color);
    display: flex; flex-direction: column;
    min-height: 100vh;
    padding-top: 80px;
}

/* Helper: Gradient Text */
.gradient-text {
    background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
}

/* =========================================
   2. HEADER & NAVIGATION
   ========================================= */

header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    display: flex; justify-content: space-between; align-items: center;
    padding: 15px max(30px, calc(50% - 600px));
    transition: padding 0.25s ease, transform 0.25s ease;    
    -webkit-transform: translate3d(0, 0, 0);
    transform: translate3d(0, 0, 0);
}

header::before {
    content: "";
    position: absolute;    
    top: -100px; 
    left: 0; 
    width: 100%; 
    height: calc(100% + 100px); 
    background-color: rgba(13, 17, 38, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.3);
    z-index: -1; 
}

.logo-img { width: 180px; height: auto; display: block; }

.main-nav { 
    display: flex; 
    align-items: center; 
    gap: 20px; 
}

.nav-link {
    text-decoration: none; color: #888; font-size: 1.0rem; font-weight: 400;
    padding-bottom: 5px; position: relative; transition: color 0.3s ease;
}
.nav-link:hover { color: white;}

.nav-link.active { color: white; font-weight: 400; }

.nav-link.active::after {
    content: ''; position: absolute; left: 0; bottom: 0; width: 100%; height: 3px;
    background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    border-radius: 2px; box-shadow: 0 2px 10px rgba(237, 66, 100, 0.5);
}

/* Custom Location Dropdown */
.custom-location-dropdown {
    position: relative; margin-right: 5px; padding-right: 20px;
    padding-bottom: 2px; border-right: 1px solid rgba(255, 255, 255, 0.2);
}

.location-trigger {
    background: transparent; border: none; color: #ffffff;
    font-size: 1.0rem; font-weight: 500; cursor: pointer; display: flex;
    align-items: center; gap: 8px; padding: 5px 0; -webkit-tap-highlight-color: transparent;
}

.chevron-icon { transition: transform 0.3s ease; opacity: 0.7; }
.custom-location-dropdown.open .chevron-icon { transform: rotate(180deg); }

.location-menu {
    position: absolute; top: 150%; left: 50%;
    transform: translateX(-50%) translateY(10px);
    background-color: rgba(13, 17, 38, 0.8);
    backdrop-filter: blur(5px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    min-width: 200px; display: flex; flex-direction: column; padding: 10px 0;
    opacity: 0; visibility: hidden; z-index: 1050;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.custom-location-dropdown.open .location-menu,
.custom-hero-dropdown.open .location-menu {
    opacity: 1; visibility: visible; transform: translateX(-50%) translateY(0);
}

.location-item {
    text-decoration: none; color: #ccc; padding: 12px 20px;
    font-size: 1.0rem; transition: background 0.2s, color 0.2s;
}

.location-item:hover { background: rgba(255, 255, 255, 0.05); color: #ffffff; }

.location-item.active {
    color: var(--grad-start); font-weight: 500;
    background: rgba(237, 66, 100, 0.05); border-left: 3px solid var(--grad-start);
}

/* Hamburger Menu & Mobile Navigation */
.hamburger-btn {
    display: none; 
    flex-direction: column; 
    justify-content: center; /* Centers the bars inside the circle */
    align-items: center;
    gap: 5px; /* Exact spacing between bars */
    width: 44px; /* Perfectly round touch target */
    height: 44px; 
    border-radius: 50%; /* Makes the background a circle */
    background: transparent; 
    border: none; 
    cursor: pointer;
    z-index: 1100; 
    -webkit-tap-highlight-color: transparent;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.hamburger-btn .bar {
    height: 1px; /* Slightly thicker lines look better inside circles */
    width: 22px; /* Fixed width so it fits perfectly inside the circle */
    background-color: #ffffff;
    border-radius: 2px; 
    transition: all 0.1s ease;
}

/* Native App Press Effect (Mobile & Desktop) */
.hamburger-btn:active {
    background-color: rgba(255, 255, 255, 0.15) !important; 
    transform: scale(0.85) !important; 
    transition: none !important; /* Kills the delay for an instant mobile response */
}

.hamburger-btn:active {
    background-color: rgba(255, 255, 255, 0.15) !important; 
    transform: scale(0.85) !important; 
    transition: none !important; /* Kills the delay for an instant mobile response */
}

/* Circular Background & Color Change (Hover) */
@media (hover: hover) {
    .hamburger-btn:hover {
        background-color: rgba(255, 255, 255, 0.1); 
    }
    .hamburger-btn:hover .bar {
        background-color: var(--grad-start); /* Bars turn pink on hover */
    }
}

body.no-scroll { overflow: hidden !important; }

/* ========================================= */
/* LANGUAGE BUTTON: DESKTOP VS MOBILE        */
/* ========================================= */

/* DESKTOP DEFAULT: Hide the text and chevron */
.lang-text-mobile, 
.lang-chevron-mobile {
    display: none !important;
}

.lang-icon-desktop {
    display: block;
    transition: transform 0.3s ease, color 0.3s ease;
    color: #f7f7f7;
}

/* Base Wrapper Cleanup */
#lang-dropdown {
    border-right: none; 
    padding-right: 0px;
}

/* DESKTOP STYLING (Icon button hover effects) */
@media (min-width: 941px) {
    #lang-btn {
        justify-content: center;
        width: 40px;
        height: 40px;
        border-radius: 50%;
        padding: 0;
        transition: background-color 0.3s ease;
    }
    
    #lang-btn:hover {
        background-color: rgba(255, 255, 255, 0.1);
    }

    #lang-btn:hover .lang-icon-desktop {
        color: var(--grad-start);
        transform: scale(1.15);
    }
    
    #lang-btn:active .lang-icon-desktop {
        transform: scale(0.9);
    }
}

/* ========================================= */
/* MOBILE OVERRIDE: Hide Icon, Show Text     */
/* ========================================= */
@media (max-width: 940px) {
    /* Hide the globe */
    .lang-icon-desktop {
        display: none !important;
    }
    
    /* Reveal the text and chevron */
    .lang-text-mobile,
    .lang-chevron-mobile {
        display: block !important;
    }
    
    /* Reset button shape to match Location dropdown */
    #lang-btn {
        width: 100%;
        justify-content: space-between;
        border-radius: 0;
        height: auto;
        padding: 0px 20px 20px 17px;
        background-color: transparent;
    }

    #lang-dropdown {
        margin-left: 0 !important; /* Removes the desktop gap */
        padding: 20px 0px 0px 0px !important; /* Matches standard mobile padding */
    }

    #lang-dropdown {
        margin-left: 0 !important;
        margin-right: 0 !important;
        /* Matches the 15px side padding of the location menu & standard links */
        padding: 15px 15px 15px 15px !important; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Keeps the clean separator */
    }
    
    /* Ensure the trigger button behaves exactly like the location button */
    #lang-btn {
        width: 100%;
        justify-content: space-between;
        align-items: center;
        padding: 5px 0;
    }
}

/* Mobile Adjustment */
@media (max-width: 940px) {    
    .main-nav {
        position: fixed; top: 0; right: -100%; width: 75%; max-width: 350px;
        height: 100vh; background-color: rgba(13, 17, 38, 0.8);
        backdrop-filter: blur(5px); flex-direction: column; align-items: flex-start;
        padding: 90px 30px 30px; z-index: 1050; gap: 0;
        transition: right 0.2s cubic-bezier(0.885, 0.885, 0.32, 0.885);
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.8);
    }
    .main-nav.menu-open { right: 0; }

    /* ============================================== */
    /* PURE ALPHA FADE BACKGROUND OVERLAY             */
    /* ============================================== */
    header::after {
        content: "";
        position: fixed;
        top: 0;
        left: 0;
        width: 100vw;
        height: 100vh;
        background-color: rgba(0, 0, 0, 0.5); 
        
        /* MAGIC: Sits exactly between the Logo (0) and Menu/Hamburger (1050+) */
        z-index: 1040; 
        
        opacity: 0;
        visibility: hidden;
        pointer-events: none; 
        transition: opacity 0.3s ease, visibility 0.3s ease;
    }

    body.no-scroll header::after {
        opacity: 1; 
        visibility: visible;
        pointer-events: auto; 
    }

    .nav-link {
        font-size: 1.0rem; padding: 18px 15px; width: 100%;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link.active::after {
        display: block; position: absolute; left: 0; top: 50%; transform: translateY(-50%);
        width: 3px; height: 50%; bottom: auto;
    }
    .nav-link.active { font-weight: 400; color: white; }

    .hamburger-btn { display: flex; }

    .hamburger-btn.toggle .bar:nth-child(1) {
        transform: translateY(7px) rotate(45deg); 
        background-color: white; 
    }
    .hamburger-btn.toggle .bar:nth-child(2) { 
        opacity: 0; 
        transform: scaleX(0); /* Adds a cool shrinking effect as it vanishes */
    }
    .hamburger-btn.toggle .bar:nth-child(3) {
        transform: translateY(-5px) rotate(-45deg); 
        background-color: white; 
    }

    /* ============================================== */
    /* 1. WRAPPER: Force the button and menu to stack */
    /* ============================================== */
    .custom-location-dropdown {
        display: flex;
        flex-direction: column; /* THIS forces the dropdown to go UNDER the text */
        border-right: none; 
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        width: 100%; 
        margin-right: 0; 
        padding: 0 20px 15px 15px;
    }

    .location-trigger { 
        width: 100%; 
        justify-content: space-between; 
    }

    /* ============================================== */
    /* 2. HAMBURGER MENU: Smooth push-down effect     */
    /* ============================================== */
    .custom-location-dropdown .location-menu {
        position: relative; 
        top: 0; 
        left: 0; 
        width: 100%; 
        background: transparent !important; 
        backdrop-filter: none !important;
        box-shadow: none !important; 
        border: none !important; 
        border-radius: 0 !important;
        display: flex; 
        flex-direction: column; /* Stack the cities vertically */
        max-height: 0; 
        overflow: hidden; 
        padding: 0;
        margin: 0;
        opacity: 0;
        visibility: hidden;
        transform: none !important; 
        transition: max-height 0.3s ease, opacity 0.3s ease, padding 0.3s ease;
    }

    /* Open State for Hamburger */
    .custom-location-dropdown.open .location-menu { 
        max-height: 200px; 
        opacity: 1;
        visibility: visible;
        padding-top: 10px; 
        transform: none !important;
    }

    /* ============================================== */
    /* 3. HERO SEARCH: Keep floating behavior         */
    /* ============================================== */
    .custom-hero-dropdown.open .location-menu {
        display: flex;
        opacity: 1 !important; 
        visibility: visible !important; 
        transform: translateY(0) !important;
    }

    .location-item { 
        padding: 15px 10px; 
        width: 100%;
        text-align: left;
    }

    header {
        padding-left: 15px !important;
        padding-right: 10px !important;
    }
}

/* =========================================
   3. MAIN CONTENT (GRID & CARDS) - UNCHANGED
   ========================================= */
.container { max-width: 1200px; margin: 0 auto; padding: 0 20px; width: 100%; flex-grow: 1; }


.section-header {
    text-align: left; margin-bottom: 40px; margin-top: 30px;
    border-left: 3px solid rgba(237, 66, 100, 0.5); padding-left: 25px;
    
}

.section-title {
    font-size: 2rem; text-transform: uppercase; letter-spacing: 2px;
    color: white; margin-bottom: 15px; font-weight: 300; display: block;
}

.section-title span {
    font-weight: 700; background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    background-clip: text;
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}

.section-desc { font-size: 1.2rem; font-weight: 300; color: #C8C8C8; line-height: 1.6; letter-spacing: 1px;}

.apartment-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem; margin-bottom: 80px;
}

.card {
    background-color: var(--card-bg); border-radius: 16px; overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; flex-direction: column;
    height: 100%; /* Ensures the card stretches to fill the grid row */
}

.card:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 35px rgba(237, 66, 100, 0.15);
    border-color: rgba(237, 66, 100, 0.4);
}

.skeleton-anim::after {
    content: ""; position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    transform: translateX(-100%);
    background: linear-gradient(90deg, transparent, var(--skeleton-highlight), transparent);
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer { 100% { transform: translateX(100%); } }

.img-wrapper {
    width: 100%; height: 220px; position: relative;
    background-color: var(--skeleton-base); overflow: hidden;
}

.card-image {
    width: 100%; height: 100%; object-fit: cover; opacity: 0;
    transition: opacity 0.5s ease-in; position: absolute; top: 0; left: 0; z-index: 2;
}
.card-image.loaded { opacity: 1; }

.card-content { 
    padding: 25px; 
    flex-grow: 1; 
    display: flex; 
    flex-direction: column; 
}

.apt-title { font-size: 1.5rem; margin-bottom: 8px; }
.apt-details { font-size: 0.95rem; color: #ccc; margin-bottom: 25px; line-height: 1.6; }

.btn-container { 
    margin-top: auto !important; /* Pushes the button to the absolute bottom and overrides JS */ 
    padding-top: 15px;
}
.btn-explore {
    display: block; width: 100%; padding: 14px; border-radius: 8px;
    font-weight: bold; text-align: center; text-decoration: none;
    text-transform: uppercase; letter-spacing: 1px; font-size: 0.9rem;
    background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    color: var(--bg-color); 
    box-shadow: 0 4px 15px rgba(237, 66, 100, 0.3);
    transition: opacity 0.3s ease, transform 0.2s ease; cursor: pointer;
    border: none; outline: none;
}
.btn-explore:hover { opacity: 0.95; transform: scale(1.02); }

/* =========================================
   4. SHARED MODAL STYLES (IMPROVED)
   ========================================= */
.modal-overlay,
.share-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.8); z-index: 2000;
    display: flex; justify-content: center; align-items: center;
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    backdrop-filter: blur(4px);
    overscroll-behavior: contain;
    touch-action: none;
}

.modal-overlay.active, .share-overlay.active { opacity: 1; visibility: visible; }

/* Close Button (Shared) */
.close-modal, .close-share, .header-icon-btn, .fs-close-btn {
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; border: none;
    transition: background 0.2s ease;
}

/* Specific Style for Modal Close */
.close-modal {
    position: absolute; top: 20px; right: 20px; z-index: 50; 
    width: 44px; height: 44px; background-color: rgba(0, 0, 0, 0.5); 
    border-radius: 50%; box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}
.close-modal svg { width: 22px; height: 22px; fill: white; pointer-events: none; }
.close-modal:hover { background-color: rgba(237, 66, 100, 0.8); }

/* =========================================
   5. CAR DETAILS MODAL (IMPROVED)
   ========================================= */
.modal-content {
    background-color: var(--bg-color); width: 90%; max-width: 1000px;
    height: 90vh; border-radius: 20px; 
    position: relative; display: flex; flex-direction: column;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    transform: scale(0.9); opacity: 0;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.3s ease;
    overflow: hidden;
}
.modal-overlay.active .modal-content { transform: scale(1); opacity: 1; }

/* Desktop Override */
/* --- DESKTOP LAYOUT FIX (Strict Side-by-Side) --- */
@media (min-width: 768px) {
    /* 1. Modal Height */
    .modal-content { 
        height: 750px; 
        max-height: 90vh; 
    }

    /* 2. Layout Direction: Row (Left to Right) */
    .modal-body { 
        display: flex !important; 
        flex-direction: row !important; 
    }
    
    /* 3. Left Side: Gallery (60%) */
    .modal-gallery { 
        width: 60% !important; 
        height: 100% !important;
        
        /* IMPORTANT: This locks the width so it never shrinks or vanishes */
        flex: 0 0 60% !important; 
    }
    
    /* 4. Right Side: Info (40%) */
    .modal-info { 
        width: 40% !important; 
        height: 100% !important;
        
        /* IMPORTANT: Locks width and ensures scrollbar appears if text is long */
        flex: 0 0 40% !important; 
        overflow-y: auto !important; 
    }
}

.modal-body { display: flex; flex-direction: column; height: 100%; overflow: hidden; }

/* Gallery */
.modal-gallery {
    position: relative; background-color: black;
    display: flex; flex-direction: column; justify-content: center;
    flex: 1; min-height: 300px;
}

.main-image-container {
    flex-grow: 1; position: relative; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    height: 350px; background-color: var(--bg-color); min-height: 0;
}

.modal-main-img {
    width: 100%; height: 100%; object-fit: cover; 
    opacity: 0; transition: opacity 0.3s ease;
    position: relative; z-index: 2;
}
.modal-main-img.visible { opacity: 1; }

/* Gallery Nav Arrows */
.gallery-nav {
    position: absolute; background: rgba(0,0,0,0.5); 
    color: white; border: none; padding: 10px 15px; 
    cursor: pointer; font-size: 1.5rem;
    transition: background 0.1s ease;
    z-index: 5; display: none;
    touch-action: manipulation; -webkit-tap-highlight-color: transparent; outline: none; user-select: none;
}
.gallery-nav:hover { background: rgba(0,0,0,0.5); }
.gallery-nav:active { background: rgba(237, 66, 100, 0.8) !important; }
.gallery-nav:focus { background: rgba(0,0,0,0.5); }
.prev-btn { left: 10px; }
.next-btn { right: 10px; }

/* Thumbnails */
.thumbnails-row {
    display: flex; gap: 10px; padding: 10px; overflow-x: auto; overflow-y: hidden;
    background: var(--bg-color); flex-shrink: 0; height: 70px;
    scrollbar-width: none; -ms-overflow-style: none;
}
.thumbnails-row::-webkit-scrollbar { display: none; width: 0; height: 0; }

.thumb {
    width: 70px; height: 50px; object-fit: cover; border-radius: 4px;
    opacity: 0.5; cursor: pointer; border: 2px solid transparent; flex-shrink: 0;
    transition: opacity 0.2s, border-color 0.2s;
}
.thumb.active, .thumb:hover { opacity: 1; border-color: var(--grad-start); }

/* Info Section */
.modal-info { padding: 30px; display: flex; flex-direction: column; position: relative; overflow-y: auto; flex: 1; }
.modal-title { font-size: 1.5rem; margin-bottom: 10px; color: white; margin-top: 0px; padding-right: 30px; }
.modal-desc { margin-bottom: 30px; white-space: pre-line;  font-size: 1rem; font-weight: 300;  color: #ccc; line-height: 1.6; letter-spacing: 1px;}

/* Header Actions (Share/Close in corner) */
.modal-header-actions {
    position: absolute; top: 15px; right: 15px; z-index: 100;
    display: flex; align-items: center; gap: 10px; 
}
.header-icon-btn {
    width: 40px; height: 40px; background-color: rgba(0, 0, 0, 0.6); 
    border-radius: 50%;
    -webkit-tap-highlight-color: transparent;
}
.header-icon-btn svg { width: 24px; height: 24px; fill: white; pointer-events: none; }
.header-icon-btn img { width: 20px; height: 20px; filter: brightness(0) invert(1); display: block; pointer-events: none; }

/* Hide old close button if new header actions exist */
.modal-content > .close-modal { display: none !important; }

/* Action Buttons */
.modal-actions { margin-top: auto; display: flex; flex-direction: column; gap: 12px; padding-bottom: 10px; flex-shrink: 0; }

.action-btn {
    display: flex; align-items: center; justify-content: center; gap: 10px;
    width: 100%; height: 50px; border-radius: 8px;
    text-decoration: none; font-weight: 600; font-size: 0.95rem; cursor: pointer;
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.3); color: white;
    transition: all 0.2s ease;
}
.action-btn:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }
.action-btn img { width: 24px; height: 24px; object-fit: contain; }

/* Modal Mobile Fixes */
@media (max-width: 600px), (max-height: 500px) and (orientation: landscape) {
    .section-header { padding-left: 15px; margin-bottom: 30px; }
    .modal-content {
        height: 100% !important; max-height: 100% !important; width: 100% !important;
        border-radius: 0; display: block !important; overflow-y: auto !important;
    }
    .modal-body { height: auto !important; border-radius: 0; display: block !important; overflow: visible !important; }
    .modal-gallery { flex: none !important; height: auto !important; }
    .main-image-container { height: 300px !important; }
    .modal-info { height: auto !important; overflow: visible !important; flex: none !important; padding-bottom: 60px; }
    .close-modal { position: fixed; top: 15px; right: 15px; z-index: 100; }
    .modal-title { font-size: 1.5rem; margin-top: 0px; }
}

@media (max-width: 940px) {
    .section-title { font-size: 1.8rem; }
    .section-desc { font-size: 1.1rem; }
}

/* =========================================
   6. SHARE POPUP (IMPROVED)
   ========================================= */
.share-box {
    background-color: var(--bg-color); width: 90%; max-width: 400px;
    border-radius: 12px; padding: 20px; overflow-y: auto;
    box-shadow: 0 20px 50px rgba(0,0,0,0.6);
    transform: scale(0.9); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.share-overlay.active .share-box { transform: scale(1); }

.share-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 20px; }

.share-header h3 { 
    font-size: 1.5rem; margin: 0; 
    background: linear-gradient(90deg, var(--grad-start), var(--grad-end));
    -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    background-clip: text; font-weight: 700;
}

.close-share {
    width: 36px; height: 36px; background-color: rgba(0, 0, 0, 0.5); 
    border-radius: 50%; border: none; padding: 0;
    flex-shrink: 0; /* Prevents squishing */
    display: flex; align-items: center; justify-content: center;
}
.close-share:hover { background-color: rgba(237, 66, 100, 0.8); }
.close-share svg { width: 24px; height: 24px; fill: white; pointer-events: none; }

.share-input-group { display: flex; gap: 10px; margin-bottom: 25px; }
#share-url-input {
    flex-grow: 1; min-width: 0; /* Prevent push-off */
    background: rgba(0, 0, 0, 0.3); border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ccc; padding: 12px 15px; border-radius: 6px; outline: none; font-size: 0.9rem;
    text-overflow: ellipsis;
}
#share-url-input:focus { border-color: var(--grad-start); }

#btn-copy-link {
    background: transparent; border: 1px solid rgba(255, 255, 255, 0.1); color: white;
    font-weight: 600; padding: 0 20px; border-radius: 6px; cursor: pointer;
    transition: all 0.2s ease; white-space: nowrap; -webkit-tap-highlight-color: transparent;
}
#btn-copy-link:hover { background: rgba(255, 255, 255, 0.1); transform: translateY(-2px); }

.share-socials { display: flex; justify-content: space-between; gap: 10px; }
.social-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    text-decoration: none; padding: 10px; border-radius: 8px;
    background: rgba(255,255,255,0.05); transition: background 0.2s;
}
.social-btn:hover { background: rgba(255,255,255,0.1); }
.social-btn img { width: 24px; margin-bottom: 5px; }
.social-btn span { color: #ccc; font-size: 0.8rem; }
.social-btn.fb:hover { background: #3b5998; }
.social-btn.email:hover { background: #555; }
.social-btn.wa:hover { background: #25D366; }

@media (max-width: 380px) {
    .share-box { width: 95% !important; padding: 15px !important; }
    .share-input-group { gap: 5px !important; }
    #btn-copy-link { padding: 0 12px !important; font-size: 0.85rem !important; }
}

/* --- Navigation Header (Back Button) --- */
.nav-header {
    display: none;
    align-items: center;
    margin-bottom: 20px;
    /* display: none;  <-- Removed this so it's visible if your JS toggles it */
}

.btn-back {
    background: none;
    border: 1px solid var(--grad-start);
    color: var(--text-color);
    padding: 8px 16px;
    border-radius: 30px;
    cursor: pointer;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-back:hover {
    background: var(--grad-start);
    color: white;
}

/* =========================================
   7. FULLSCREEN MODE (NEW FEATURE)
   ========================================= */
.expand-btn {
    position: absolute; top: 15px; left: 15px; z-index: 10;
    background-color: rgba(0, 0, 0, 0.5);
}

#fullscreen-modal {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 9999;
    display: flex; align-items: center; justify-content: center;
    background-color: var(--bg-color);
    opacity: 0; visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    touch-action: none;
}
#fullscreen-modal.active { opacity: 1; visibility: visible; }

.fs-main-image {
    max-width: 95%; max-height: 95%; object-fit: contain;
    transform: scale(0.95); transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    user-select: none; -webkit-user-select: none;
}
#fullscreen-modal.active .fs-main-image { transform: scale(1); }

.fs-close-btn {
    position: absolute; top: 15px; right: 15px; z-index: 100;
    width: 40px; height: 40px;
}

.fs-nav {
    display: block !important; width: 60px; height: 60px; font-size: 2rem;
    background-color: rgba(0, 0, 0, 0.5);
}
.fs-nav:active {
    background-color: rgba(237, 66, 100, 0.9);
    transition: none !important; transform: scale(0.95);
}
.fs-prev { left: 20px; }
.fs-next { right: 20px; }

/* Mobile Fullscreen Nav */
@media (max-width: 600px) {
    .fs-nav {
        width: 40px !important; height: 40px !important; font-size: 1.2rem !important;
        background-color: rgba(0, 0, 0, 0.6);
        display: flex !important; align-items: center; justify-content: center; padding: 0;
    }
    .fs-prev { left: 15px; }
    .fs-next { right: 15px; }
}

/* =========================================
   8. FOOTER
   ========================================= */
   
footer {
    background-color: #151b36; text-align: center; padding: 30px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05); margin-top: auto;
}

.footer-text { color: rgba(255, 255, 255, 0.35); font-size: 0.8rem; letter-spacing: 1px; }

.footer-links {
    margin-bottom: 10px;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.45);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s ease;
    letter-spacing: 0.2px;
}

.footer-links a:hover {
    color: white;
}

.footer-divider {
    color: rgba(255, 255, 255, 0.2);
    margin: 0 10px;
}

/* =========================================
   9. GLOBAL POPUP BUTTON HIGHLIGHT FIX
   ========================================= */

/* Base: remove ugly mobile tap flash everywhere */
.modal-content button, .share-box button,
.gallery-nav, .header-icon-btn, .fs-nav, .modal-content a, .close-share {
    -webkit-tap-highlight-color: transparent; touch-action: manipulation;
    outline: none; user-select: none; will-change: transform, background-color;
}

/* DESKTOP HOVER (only when mouse exists) */
@media (hover: hover) and (pointer: fine) {
    .modal-content button:hover, .share-box button:hover,
    .gallery-nav:hover, .header-icon-btn:hover, .fs-nav:hover, .close-share:hover {
        background-color: rgba(237, 66, 100, 0.85) !important;
        transform: scale(1.02); opacity: 1;
    }
    .action-btn:hover, #btn-copy-link:hover {
        background-color: rgba(237, 66, 100, 0.85) !important; transform: translateY(-2px);
    }
}

/* MOBILE + DESKTOP PRESS (ACTIVE STATE) */
.modal-content button:active, .share-box button:active,
.gallery-nav:active, .action-btn:active, .header-icon-btn:active, .close-share:active {
    transition: none !important; /* Kill delay */
    background-color: rgba(237, 66, 100, 0.9) !important; /* Strong visible red */
    transform: scale(1.0); opacity: 1;
    box-shadow: 0 0 0 6px rgba(237, 66, 100, 0.25);
}

/* Keyboard focus (accessibility) */
.modal-content button:focus-visible, .share-box button:focus-visible, 
.gallery-nav:focus-visible, .header-icon-btn:focus-visible, .close-share:focus-visible {
    outline: 2px solid rgba(237, 66, 100, 0.8); outline-offset: 2px;
}


/* =========================================
   10. PARTNERSHIP BADGE (Listing Page)
   ========================================= */
.listing-partnership {
    display: inline-flex;
    align-items: center;
    gap: 15px;
    margin-top: 15px;
    padding: 5px 0px;
    border-radius: 10px;
    text-decoration: none;
    transition: all 0.3s ease;
    -webkit-tap-highlight-color: transparent;
}

@media (hover: hover) {
    .listing-partnership:hover {
        border-color: rgba(255, 255, 255, 0.2);
        transform: translateY(-2px);
    }
}

.listing-partnership:active {
    transform: scale(0.98);
}

.partner-text {
    color: #b0b0b0; /* Matches the section description color perfectly */
    font-size: 0.9rem;
    font-weight: 300;
}

.ks-underline {
    color: white;
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.listing-partner-logo {
    height: 50px; /* Kept slightly smaller so it doesn't overpower the page title */
    width: 160px;
    object-fit: contain;
}