/* Google Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700&display=swap');

:root {
    /* Premium Brand Colors */
    --primary-color: #0F172A;
    /* Deep Navy - Trust */
    --primary-hover: #1E293B;
    --accent-color: #0063af;
    /* Updated Brand Blue */
    --accent-hover: #004a85;

    /* Neutral/Surface Colors */
    --bg-body: #F8FAFC;
    --bg-surface: #FFFFFF;
    --bg-subtle: #F1F5F9;

    /* Text Colors */
    --text-main: #0F172A;
    --text-muted: #64748B;
    --text-light: #94A3B8;

    /* Borders & Dividers */
    --border-subtle: #E2E8F0;
    --border-focus: #CBD5E1;

    /* Spacing & Radii */
    --radius-sm: 0.5rem;
    /* 8px */
    --radius-md: 0.75rem;
    /* 12px */
    --radius-lg: 1rem;
    /* 16px */
    --radius-xl: 1.5rem;
    /* 24px */
    --radius-pill: 9999px;

    /* Shadows (Soft & Modern) */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-float: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);

    --header-height: 0px;
    /* No header */
}

/* Reset & Base */
body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    margin: 0;
    overscroll-behavior: none;
}

/* App Layout only (Index Page) */
body.app-layout {
    overflow: hidden;
    /* App-like feel */
    height: 100dvh;
}

/* Fix for giant SVG */
svg {
    max-width: 100%;
}

.header_phone svg {
    width: 24px;
    height: 24px;
    fill: var(--primary-color);
    margin-right: 8px;
}

/* Restored Header Styles */
.header_wrapper_inside {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 2rem;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    height: 80px;
}

#access ul {
    display: flex;
    gap: 2rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

#access ul li a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: 500;
    font-size: 0.9rem;
    text-transform: uppercase;
    transition: color 0.2s;
}

#access ul li a:hover {
    color: var(--accent-color);
}

.header_phone {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: var(--primary-color);
}

.header_phone a {
    text-decoration: none;
    color: inherit;
}


a {
    text-decoration: none;
    color: inherit;
    transition: color 0.2s;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Layout: Full Screen App Container */
.app-container {
    display: flex;
    flex-direction: column;
    height: 100dvh;
    width: 100%;
}

/* Split View Wrapper */
.split-view-wrapper {
    display: flex;
    flex: 1;
    overflow: hidden;
    /* Contain scrolls */
    position: relative;
    height: 100%;
}

/* Left Column: Property List */
.list-column {
    width: 100%;
    height: 100%;
    /* overflow-y: auto; <-- REMOVED */
    background: var(--bg-body);
    padding: 0;
    position: relative;
    display: flex;
    flex-direction: column;
    z-index: 10;
}

.scroll-content {
    flex: 1;
    overflow-y: auto;
    position: relative;
}

/* Right Column: Map */
.map-column {
    display: none;
    /* Hidden on mobile by default */
}

/* Desktop Styles (lg+) */
@media (min-width: 992px) {
    .list-column {
        width: 55%;
        /* Slightly wider list for better card grids */
        max-width: 800px;
        border-right: 1px solid var(--border-subtle);
    }

    .map-column {
        display: block;
        flex: 1;
        height: 100%;
        position: relative;
    }

    #propertyMap {
        width: 100%;
        height: 100%;
    }
}

/* --- Components --- */

/* Sticky Filter Bar */
.filter-bar {
    position: relative;
    /* Changed from sticky */
    /* top: 0; */
    z-index: 100;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem;
    box-shadow: var(--shadow-sm);
}

.search-input-group {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-pill);
    padding: 0.25rem 0.5rem;
    display: flex;
    align-items: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.2s;
}

.search-input-group:focus-within {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.15);
}

.search-input-group input {
    border: none;
    outline: none;
    background: transparent;
    padding: 0.5rem;
    flex: 1;
    font-size: 0.95rem;
}

.search-input-group i {
    color: var(--text-muted);
    margin-left: 0.75rem;
}

/* Filters Scroll Row (Mobile) */
.filters-scroll {
    display: flex;
    gap: 0.5rem;
    overflow-x: auto;
    padding-bottom: 0.5rem;
    margin-top: 0.75rem;
    scrollbar-width: none;
    /* Hide scrollbar */
}

.filters-scroll::-webkit-scrollbar {
    display: none;
}

.filter-chip {
    white-space: nowrap;
    padding: 0.4rem 1rem;
    border-radius: var(--radius-pill);
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.filter-chip:hover {
    background: var(--bg-subtle);
    border-color: var(--border-focus);
}

.filter-chip.active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

/* Property Card Redesign */
.property-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
    position: relative;
    box-shadow: var(--shadow-sm);
}

.property-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-focus);
}

.card-img-wrapper {
    position: relative;
    padding-top: 66.67%;
    /* 3:2 Aspect Ratio */
    overflow: hidden;
    background: var(--bg-subtle);
}

.card-img-top {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.property-card:hover .card-img-top {
    transform: scale(1.05);
}

/* Floating Badges */
.card-badges {
    position: absolute;
    top: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.badge-glass {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(4px);
    color: var(--text-main);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.75rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.badge-glass.sale {
    color: var(--accent-color);
}

.badge-glass.rent {
    color: #059669;
}

/* Bottom-left verified badge */
.card-badges-bottom {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    display: flex;
    gap: 0.5rem;
    z-index: 2;
}

.badge-verified {
    background: rgba(0, 184, 148, 0.95);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.badge-available-again {
    background: rgba(156, 163, 175, 0.95);
    backdrop-filter: blur(4px);
    color: white;
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-pill);
    font-size: 0.7rem;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* Verified badge for detail page (overlay in carousel) */
.verified-badge-detail {
    position: absolute;
    bottom: 1rem;
    left: 1rem;
    z-index: 10;
}

.verified-badge-detail .badge-verified {
    font-size: 0.8rem;
    padding: 0.4rem 0.9rem;
}

/* Green */

.favorite-btn {
    position: absolute;
    top: 1rem;
    right: 1rem;
    background: rgba(0, 0, 0, 0.3);
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    backdrop-filter: blur(2px);
    transition: all 0.2s;
    z-index: 5;
}

.favorite-btn:hover {
    background: rgba(0, 0, 0, 0.5);
    transform: scale(1.1);
}

.card-body {
    padding: 1.25rem;
}

.price-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.1;
    margin-bottom: 0.25rem;
    letter-spacing: -0.03em;
}

.price-suffix {
    font-size: 0.875rem;
    color: var(--text-muted);
    font-weight: 500;
    margin-left: 2px;
}

.card-address {
    font-size: 0.95rem;
    color: var(--text-main);
    font-weight: 500;
    margin-bottom: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.card-location {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.specs-row {
    display: flex;
    gap: 1rem;
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.9rem;
}

.spec-item {
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.spec-item i {
    color: var(--text-light);
}

.spec-item strong {
    color: var(--text-main);
    font-weight: 600;
}

/* Mobile Map Toggle (Floating) */
.mobile-map-toggle {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    background: var(--text-main);
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-pill);
    box-shadow: var(--shadow-float);
    z-index: 1000;
    font-weight: 600;
    border: none;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: transform 0.2s, background 0.2s;
}

.mobile-map-toggle:hover {
    transform: translateX(-50%) translateY(-2px);
    background: var(--primary-hover);
}

.mobile-map-active .mobile-map-toggle {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}

/* Dark Mode Support (Implicit via classes if needed later) */

/* Modern Pagination */
.pagination {
    margin: 2rem 0;
    gap: 0.5rem;
    justify-content: center;
}

.page-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-weight: 600;
    transition: all 0.2s;
    background: white;
}

.page-link:hover {
    background: var(--bg-subtle);
    border-color: var(--border-focus);
}

.page-item.active .page-link {
    background: var(--text-main);
    color: white;
    border-color: var(--text-main);
}

/* Map Markers */
.marker-dot {
    background-color: #3b82f6;
    /* Bright Blue */
    border: 2px solid #fff;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s ease, background-color 0.2s;
}

.marker-dot:hover {
    transform: scale(1.2);
    background-color: #2563eb;
    z-index: 1000 !important;
}

.marker-dot-active {
    background-color: #ef4444;
    /* Red for active/highlighted */
    width: 16px !important;
    height: 16px !important;
    margin-left: -8px !important;
    /* Center adjustment */
    margin-top: -8px !important;
    z-index: 1000 !important;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.2);
}

/* Map Popups */
.leaflet-popup-content-wrapper {
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 0;
    overflow: hidden;
}

.leaflet-popup-content {
    margin: 0;
    width: auto !important;
}

.map-popup-card .card {
    border: none;
}

/* Desktop: Allow filters to wrap and overflow (fix dropdown clipping) */
@media (min-width: 992px) {
    .filters-scroll {
        overflow: visible;
        flex-wrap: wrap;
        padding-bottom: 0;
    }
}

/* Detail Page Restored Styles */
.detail-page {
    padding-top: 2rem;
    padding-bottom: 4rem;
}

.price-display {
    font-size: 2.5rem;
    color: var(--primary-color);
    font-weight: 600;
    /* Reduced from 700 */
    margin-bottom: 0.5rem;
    letter-spacing: -0.02em;
}

.property-info {
    font-size: 1.1rem;
    /* Increased from 0.95rem */
    color: var(--text-muted);
    font-weight: 400;
}

.property-stats {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
    padding: 1.5rem;
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding-right: 1.5rem;
    border-right: 1px solid var(--border-subtle);
    color: var(--text-main);
    font-weight: 400;
    /* Reduced from 500 */
    font-size: 1.1rem;
    /* Increased size */
}

.stat-item:last-child {
    border-right: none;
}

.stat-item i {
    color: var(--accent-color);
    font-size: 1.25rem;
    /* Larger icons */
    opacity: 0.8;
}

.features-section h5,
.property-location-section h5,
.card-title {
    font-weight: 500;
    /* Reduced from 600 */
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    font-size: 1.25rem;
}

.features-list {
    background: var(--bg-subtle);
    padding: 1.5rem;
    border-radius: var(--radius-md);
    margin-bottom: 2rem;
}

.features-list i {
    color: var(--accent-color) !important;
    /* Override inline */
    width: 20px;
}

.property-description-section h1 {
    font-size: 2rem;
    /* Increased form 1.5rem */
    font-weight: 600;
    /* Reduced from 700 */
    margin-bottom: 1.5rem;
    letter-spacing: -0.01em;
}

.property-description {
    line-height: 1.8;
    /* Increased line height */
    color: var(--text-main);
    font-size: 1.1rem;
    /* Increased text size */
    font-weight: 300;
    /* Lighter body text */
}

/* Sidebar */
/* Sidebar */
.property-sidebar {
    border: none;
    box-shadow: var(--shadow-md);
    border-radius: var(--radius-lg);
    position: sticky;
    top: 20px;
    z-index: 90;
    /* Ensure it stays above other things if needed */
}

.contact-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.contact-list li {
    margin-bottom: 0.75rem;
}

.contact-link {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: var(--bg-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-main);
    font-weight: 500;
    transition: all 0.2s;
}

.contact-link:hover {
    background: var(--accent-color);
    color: white;
}

.contact-link i {
    width: 25px;
    font-size: 1.1rem;
}

.other-properties-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
}

/* Logo Fix */
.logo img {
    max-height: 60px;
    width: auto;
}

/* Footer Restored Styles */
#colophon {
    background-color: var(--primary-color);
    color: white;
    padding: 3rem 0 0;
    margin-top: 3rem;
}

#footer-widget-area {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

.widget-title-footer {
    color: white;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
}

.widget ul {
    list-style: none;
    padding: 0;
}

.widget ul li {
    margin-bottom: 0.5rem;
}

.widget ul li a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
}

.widget ul li a:hover {
    color: white;
}

.social_sidebar_internal a {
    color: white;
    margin-right: 1rem;
    font-size: 1.2rem;
}

.sub_footer {
    background-color: #020617;
    /* Darker shade */
    padding: 1.5rem 0;
    margin-top: 3rem;
    text-align: center;
    font-size: 0.9rem;
    color: #94a3b8;
}

/* Final Polish: Colors & Slider */
.text-accent {
    color: var(--accent-color) !important;
}

.text-primary {
    color: var(--primary-color) !important;
}

/* Fixed Height Carousel */
.carousel-item {
    height: 500px;
    background-color: #f1f5f9;
}

.carousel-item img {
    height: 100%;
    width: 100%;
    object-fit: cover;
    /* Ensures image fills the area without distortion */
    object-position: center;
}

/* Mobile adjustments for slider */
@media (max-width: 768px) {
    .carousel-item {
        height: 300px;
    }
}

/* Other Properties Card Refinement */
.other-properties-section .property-card {
    border: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    border-radius: var(--radius-lg);
    transition: transform 0.2s;
}

.other-properties-section .property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.08);
}

.other-properties-section .card-img-top {
    /* Height is controlled by .card-img-wrapper (aspect ratio) */
    object-fit: cover;
}

.other-properties-section .card-title {
    font-size: 1.1rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem;
    color: var(--primary-color);
}

.other-properties-section .price-value {
    font-size: 1.1rem;
    font-weight: 600;
    /* Cleaner weight */
    color: var(--accent-color);
    display: block;
}

.other-properties-section .rent-price,
.other-properties-section .sale-price {
    line-height: 1.4;
}

.other-properties-section .location {
    font-size: 0.9rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.other-properties-section .location i {
    color: var(--text-light);
    /* Softer icon */
}

.other-properties-section .features {
    display: flex;
    gap: 1rem;
    font-size: 0.9rem;
    color: var(--text-main);
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid var(--border-subtle);
}

.other-properties-section .features span i {
    color: var(--text-light);
    margin-right: 0.25rem;
}

/* Search Reset Button Fix */
.project-reset {
    border: none;
    background: transparent;
    color: var(--text-muted);
    padding: 0 0.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.project-reset:hover {
    color: var(--accent-color);
}

/* Mobile Map Toggle States */
body.mobile-map-active .map-column {
    display: block !important;
    /* Override d-none */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 1000;
    background: white;
}

body.mobile-map-active .list-column {
    display: none !important;
}

body.mobile-map-active .filter-bar {
    display: none;
    /* Optional: hide filters if map covers them, or keep them? Usually map needs space. */
}

/* Ensure map takes full height */
body.mobile-map-active #propertyMap {
    height: 100%;
    width: 100%;
}

/* Adjust Toggle Button for Map View */
body.mobile-map-active .mobile-map-toggle {
    background: white;
    color: var(--text-main);
    border: 1px solid var(--border-subtle);
}

/* Mobile Search Optimization */
@media (max-width: 576px) {
    .filter-bar {
        padding: 0.75rem !important;
        /* Reduce padding */
    }

    .search-input-group {
        padding: 0.25rem !important;
    }

    .search-input-group input {
        min-width: 0;
        /* Allow shrinking */
        font-size: 0.9rem;
        /* Slightly smaller font */
    }

    .search-input-group i {
        margin-left: 0.5rem !important;
        margin-right: 0.25rem;
    }

    /* Ensure Rent/Buy toggle doesn't take too much space */
    .rent-buy-toggle .btn {
        padding-left: 0.75rem;
        padding-right: 0.75rem;
        font-size: 0.85rem;
    }
}

/* Enhanced Mobile Search Bar Fix */
@media (max-width: 576px) {

    /* Tighten Layout Container but keep breathing room */
    .filter-bar .d-flex.gap-2 {
        gap: 0.5rem !important;
    }

    /* Compact Rent/Buy Toggle - Balanced */
    .rent-buy-toggle .btn {
        padding: 0.35rem 0.8rem !important;
        /* Wider pill */
        font-size: 0.85rem !important;
        white-space: nowrap;
        display: flex;
        align-items: center;
    }

    /* Force Search Group Containment */
    .search-input-group {
        min-width: 0;
        /* Critical for flex shrinking */
        flex-shrink: 1;
        width: auto;
        padding: 0.25rem 0.5rem !important;
        /* Restore some side padding */
    }

    /* Search Input Font & Sizing */
    .search-input-group input {
        min-width: 50px;
        font-size: 0.95rem;
        /* Readable size */
        padding: 0.25rem 0.4rem !important;
    }

    /* Icon Adjustment */
    .search-input-group i {
        font-size: 1rem;
        margin-left: 0.25rem !important;
        color: var(--primary-color);
    }

    /* Hide reset button on very small screens if inactive to save space */
    .project-reset:not(.visible) {
        display: none;
    }
}

/* Joined Segmented Control for Rent/Buy */
.rent-buy-toggle .btn {
    border-radius: 0;
    margin: 0;
    /* Ensure touching */
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Round outer corners (Standard .btn-group usually does this, but enforcing pill shape for toggle) */
.rent-buy-toggle .btn:first-of-type {
    border-top-left-radius: 50rem !important;
    border-bottom-left-radius: 50rem !important;
}

.rent-buy-toggle .btn:last-of-type {
    border-top-right-radius: 50rem !important;
    border-bottom-right-radius: 50rem !important;
}

/* Active State for Toggle */
.rent-buy-toggle .btn-check:checked+.btn {
    background-color: var(--primary-color) !important;
    color: white !important;
    border-color: var(--primary-color) !important;
}

/* Mobile specific refine override */
@media (max-width: 576px) {
    .rent-buy-toggle .btn {
        padding: 0.35rem 0.8rem !important;
        font-size: 0.85rem !important;
    }
}

/* --- Google Maps InfoWindow Customization --- */

/* NUCLEAR: Hide default close button */
/* Target class globally with high specificity */
.gm-ui-hover-effect {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* Target by attributes just in case */
.gm-style button[title="Close"],
.gm-style button[aria-label="Close"] {
    display: none !important;
}

/* Target any button sibling to the content wrapper */
.gm-style-iw+button {
    display: none !important;
}

/* NUCLEAR: Transparent Container */
.gm-style .gm-style-iw-c {
    padding: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    border: none !important;
    border-radius: 0 !important;
}

.gm-style .gm-style-iw-d {
    padding: 0 !important;
    overflow: visible !important;
    background: transparent !important;
    max-height: none !important;
}

/* Hide Arrow */
.gm-style .gm-style-iw-t::after {
    display: none !important;
}

/* Style close button */
.gm-style .gm-ui-hover-effect {
    top: 2px !important;
    right: 2px !important;
    background: rgba(255, 255, 255, 0.7) !important;
    /* Semi-transparent background */
    border-radius: 50% !important;
    z-index: 100 !important;
}

/* Fix specific spacing for the Cluster Wrapper */
.map-popup-cluster-wrapper,
.map-popup-card {
    margin: 0 !important;
}

/* Ensure sticky header sits at the very top */
.popup-header {
    background: #fff;
    padding-right: 30px !important;
    /* Make room for the close button */
}

/* Additional Map Popup Refinements */
.bg-gradient-dark {
    background: linear-gradient(to top, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 100%);
}

/* Cleaner Close Button */
.gm-style-iw button.gm-ui-hover-effect {
    top: 5px !important;
    right: 5px !important;
    background: white !important;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    opacity: 1 !important;
    width: 24px !important;
    height: 24px !important;
    min-width: 24px !important;
    /* Force size */
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

.gm-style-iw button.gm-ui-hover-effect span,
.gm-style-iw button.gm-ui-hover-effect img {
    display: none !important;
}

.gm-style-iw button.gm-ui-hover-effect::before {
    content: "\f00d";
    /* FontAwesome X icon */
    font-family: "Font Awesome 5 Free";
    font-weight: 900;
    font-size: 14px;
    color: #555;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.gm-style-iw button.gm-ui-hover-effect img {
    margin: 0 !important;
    opacity: 0.6;
}

.gm-style-iw button.gm-ui-hover-effect:hover img {
    opacity: 1;
}

/* Custom Scrollbar for Cluster List */
.custom-scrollbar::-webkit-scrollbar {
    width: 4px;
}

.custom-scrollbar::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.custom-scrollbar::-webkit-scrollbar-thumb {
    background: #ccc;
    border-radius: 4px;
}

.custom-scrollbar::-webkit-scrollbar-thumb:hover {
    background: #aaa;
}

/* Popup Item Hover Effect */
.popup-item-hover:hover {
    background-color: #f8fafc;
    /* Very light grey */
}

/* --- Mobile Menu Styles (Added for Fix) --- */
#mobile-menu {
    display: none;
    position: absolute;
    top: 80px;
    /* Match header height */
    left: 0;
    width: 100%;
    background-color: #fff;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 9999;
    padding: 0;
}

#mobile-menu.active {
    display: block;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#mobile-menu ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

#mobile-menu ul li {
    border-bottom: 1px solid var(--border-subtle);
}

#mobile-menu ul li:last-child {
    border-bottom: none;
}

#mobile-menu ul li a {
    display: block;
    padding: 1rem 1.5rem;
    color: var(--primary-color);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background-color 0.2s, color 0.2s;
}

#mobile-menu ul li a:hover {
    background-color: var(--bg-surface);
    color: var(--accent-color);
    padding-left: 2rem;
    /* Slide effect */
}

/* --- Mobile Menu Button (Modern) --- */
.mobile-menu-button {
    background: transparent;
    border: none;
    color: var(--primary-color);
    font-size: 1.5rem;
    padding: 0.5rem;
    cursor: pointer;
    transition: transform 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    width: 48px;
    height: 48px;
}

.mobile-menu-button:hover,
.mobile-menu-button:active {
    background-color: var(--bg-subtle);
    color: var(--accent-color);
    transform: scale(1.05);
}

/* ========================================
   Price Comparison Component
   ======================================== */
.price-comparison {
    background: var(--bg-surface);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    margin-top: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.price-comparison.compact {
    padding: 0.875rem 1rem;
}

.price-comparison-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.price-comparison-title {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.price-comparison-title i {
    color: var(--accent-color);
    font-size: 0.8rem;
}

.price-range {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 500;
}

.price-bar {
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right,
            #22c55e 0%,
            #84cc16 25%,
            #facc15 50%,
            #f97316 75%,
            #ef4444 100%);
    position: relative;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.price-marker {
    position: absolute;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 16px;
    height: 16px;
    background: white;
    border: 2px solid var(--primary-color);
    border-radius: 50%;
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.2);
    z-index: 2;
}

.price-marker::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 6px;
    height: 6px;
    background: var(--primary-color);
    border-radius: 50%;
}

.price-comparison-info {
    font-size: 0.75rem;
    color: var(--text-light);
    margin-top: 0.5rem;
}

/* Responsive adjustments */
@media (max-width: 576px) {
    .price-comparison {
        padding: 0.75rem;
    }

    .price-comparison-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.25rem;
    }
}

/* Add spacing before section headings */
.property-location-section+h5,
.price-comparison+h5 {
    margin-top: 2rem;
}

/* Reduce gap between h5 and first box */
h5+.price-comparison {
    margin-top: 0.75rem;
}

@media (max-width: 991px) {

    /* Add spacing after last comparison box before contact */
    .price-comparison:last-of-type {
        margin-bottom: 2rem;
    }
}

/* ========================================
   Transparency Notice Box
   ======================================== */
.transparency-notice {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, #f0f7ff 0%, #e8f4fd 100%);
    border: 1px solid #cce4f6;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    color: #1e5a8a;
    font-size: 0.9rem;
    font-weight: 500;
}

.transparency-notice:hover {
    background: linear-gradient(135deg, #e3f1fc 0%, #d6ecfa 100%);
    border-color: #a8d4f0;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.transparency-notice i:first-child {
    font-size: 1.1rem;
    color: #0d6efd;
}

.transparency-notice span {
    flex: 1;
}

.transparency-notice i:last-child {
    font-size: 0.75rem;
    opacity: 0.6;
}

/* Mobile adjustments */
@media (max-width: 576px) {
    .transparency-notice {
        padding: 0.75rem;
        font-size: 0.85rem;
        gap: 0.5rem;
    }

    .transparency-notice i:first-child {
        font-size: 1rem;
    }
}

/* SweetAlert Modal Customization */
.transparency-modal-popup {
    border-radius: var(--radius-lg) !important;
}

.transparency-modal-popup .swal2-title {
    font-size: 1.4rem !important;
    color: var(--text-main) !important;
}

.transparency-modal-popup .swal2-close {
    color: #0063af !important;
}

@media (max-width: 576px) {
    .transparency-modal-popup {
        width: 95% !important;
        padding: 1rem !important;
    }

    .transparency-modal-popup .swal2-title {
        font-size: 1.2rem !important;
    }

    .transparency-modal-popup .swal2-html-container {
        font-size: 0.9rem !important;
    }
}