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

html {
    margin: 0;
    padding: 0;
    height: 100%;
    overflow: hidden;
}

:root {
    /* Modern Color Palette */
    --primary-color: #111827;
    --primary-dark: #0f172a;
    --secondary-color: #1f2937;
    --accent-color: #dc2626;
    --gold-color: #d97706;

    /* Neutral Colors */
    --gray-50: #f9fafb;
    --gray-100: #f3f4f6;
    --gray-200: #e5e7eb;
    --gray-300: #d1d5db;
    --gray-400: #9ca3af;
    --gray-500: #6b7280;
    --gray-600: #4b5563;
    --gray-700: #374151;
    --gray-800: #1f2937;
    --gray-900: #111827;

    /* Typography with fallbacks */
    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-display: 'Playfair Display', Georgia, 'Times New Roman', serif;

    /* Shadows with fallbacks */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -2px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
    color: #1f2937;
    line-height: 1.6;
    font-weight: 400;
    margin: 0;
    padding: 0;
    height: 100vh;
    max-height: 100vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

header {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: white;
    padding: 1rem 2rem;
    height: 72px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -4px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    position: relative;
}

/* Ensure proper flex layout for header children */
header .logo-section {
    flex: 0 0 auto;
}

header .mobile-menu-btn {
    flex: 0 0 auto;
    order: 3;
}

header .desktop-nav {
    flex: 0 0 auto;
    order: 2;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(17, 24, 39, 0.95) 0%, rgba(31, 41, 55, 0.95) 100%);
    z-index: -1;
}

h1 {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 600;
    margin: 0;
    letter-spacing: -0.025em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo {
    height: 42px;
    width: auto;
    max-width: 200px;
    object-fit: contain;
}

/* Hide logo if image fails to load */
.logo[src=""],
.logo:not([src]) {
    display: none;
}

#userControls {
    display: flex;
    align-items: center;
    gap: 1rem;
}

button {
    background: linear-gradient(135deg, var(--secondary-color) 0%, #047857 100%);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    font-family: var(--font-primary);
    transition: all 0.2s ease;
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s;
}

button:hover {
    background: linear-gradient(135deg, #047857 0%, #065f46 100%);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

button:hover::before {
    left: 100%;
}

button:active {
    transform: translateY(0);
}

#mapContainer {
    position: relative;
    height: calc(100vh - 72px - 130px);
    flex: 1;
}

/* Filter Toggle Button */
.leaflet-control-filter {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    padding: 5px 10px;
    font-size: 18px;
    cursor: pointer;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.15);
}

.leaflet-control-filter:hover {
    background: #f4f4f4;
}

/* Filter Panel */
.filter-panel {
    position: absolute;
    top: 50px;
    right: 10px;
    z-index: 999;
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.15);
    padding: 10px;
    width: 280px;
    transform: translateX(calc(100% + 20px));
    transition: transform 0.3s ease;
    max-height: fit-content;
}

.filter-panel.open {
    transform: translateX(0);
}

/* Mobile styles for filter panel */
@media (max-width: 768px) {
    .filter-panel {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        width: 100%;
        max-width: 100%;
        border-radius: 16px 16px 0 0;
        transform: translateY(100%);
        max-height: 80vh;
        overflow-y: auto;
        display: none;
    }

    .filter-panel.open {
        transform: translateY(0);
        display: block;
    }

    .leaflet-control-filter {
        top: auto;
        bottom: 20px;
        right: 20px;
        z-index: 1001;
    }
}

.filter-panel h3 {
    margin: 0 0 6px 0;
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.filter-panel label {
    display: block;
    font-size: 11px;
    color: #666;
    margin-bottom: 2px;
    font-weight: 500;
}

.filter-panel select,
.filter-panel input {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 12px;
    margin-bottom: 6px;
}

.filter-panel .price-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.filter-panel .price-row>div {
    display: flex;
    flex-direction: column;
}

.filter-panel .bedroom-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 5px;
}

.filter-panel .bedroom-row>div {
    display: flex;
    flex-direction: column;
}

.filter-panel .button-row {
    display: flex;
    gap: 5px;
    margin-top: 6px;
}

.filter-panel button {
    flex: 1;
    padding: 6px;
    border: none;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
}

.filter-panel .apply-btn {
    background: #4CAF50;
    color: white;
}

.filter-panel .apply-btn:hover {
    background: #45a049;
}

.filter-panel .clear-btn {
    background: #666;
    color: white;
}

.filter-panel .clear-btn:hover {
    background: #555;
}

.filter-panel .results-count {
    margin-top: 6px;
    padding-top: 6px;
    border-top: 1px solid #eee;
    font-size: 11px;
    color: #666;
    text-align: center;
}

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

#controls {
    position: absolute;
    top: 10px;
    right: 10px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.modal-content h2 {
    margin-bottom: 1.5rem;
    color: #333;
    border-bottom: 2px solid #eee;
    padding-bottom: 0.5rem;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: black;
}

form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

input,
textarea,
select {
    padding: 0.75rem;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    background-color: white;
}

select {
    cursor: pointer;
}

select:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
}

textarea {
    min-height: 100px;
    resize: vertical;
}

.property-item {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
    background: white;
}

.property-item:first-child {
    margin-top: 1.5rem;
}

.property-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
    gap: 1rem;
}

.property-header h3 {
    margin: 0;
    flex: 1;
}

.property-header .agent-badge,
.property-header .owner-badge {
    flex-shrink: 0;
}

.property-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
}

.property-actions button {
    padding: 0.25rem 0.5rem;
    font-size: 0.8rem;
}

.edit-btn {
    background: #2196F3;
}

.delete-btn {
    background: #f44336;
}

.leaflet-popup-content {
    max-width: 340px;
}

.popup-content h3 {
    margin-bottom: 0.5rem;
    color: #333;
}

.popup-content p {
    margin-bottom: 0.25rem;
    font-size: 0.9rem;
}

.popup-content .price {
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.1rem;
}

/* Developer Access Gate */
.dev-gate {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.dev-gate-content {
    background: white;
    padding: 3rem;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 400px;
    width: 90%;
}

.dev-gate-content h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.8rem;
}

.dev-gate-content p {
    color: #666;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.dev-gate-content form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dev-gate-content input {
    padding: 1rem;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    text-align: center;
}

.dev-gate-content input:focus {
    outline: none;
    border-color: #667eea;
}

.dev-gate-content button {
    padding: 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    transition: transform 0.2s;
}

.dev-gate-content button:hover {
    transform: translateY(-2px);
}

#drawingSection {
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 1rem;
    margin: 1rem 0;
    background: #f9f9f9;
}

#drawingSection h4 {
    margin-bottom: 0.5rem;
    color: #333;
}

#drawingSection p {
    margin-bottom: 1rem;
    color: #666;
    font-size: 0.9rem;
}

#drawingSection button {
    margin-right: 0.5rem;
    margin-bottom: 0.5rem;
}

#startDrawingBtn {
    background: #2196F3;
}

#clearDrawingBtn {
    background: #f44336;
}

#drawingStatus {
    margin-top: 0.5rem;
    color: #4CAF50;
    font-weight: bold;
}

.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* Property Markers */
.property-marker {
    background: none !important;
    border: none !important;
    z-index: 1000 !important;
}

.marker-content {
    background: white;
    border: none;
    border-radius: 8px;
    padding: 4px 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    text-align: center;
    font-size: 9px;
    font-weight: bold;
    min-width: 120px;
    max-width: 160px;
}

.marker-type {
    color: #666;
    font-size: 8px;
    font-weight: 500;
    line-height: 1.1;
    text-transform: uppercase;
    margin-bottom: 2px;
    word-wrap: break-word;
    hyphens: auto;
}

.marker-price {
    color: #1f2937;
    font-size: 11px;
    font-weight: bold;
    line-height: 1.2;
}

.marker-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2px;
    gap: 6px;
}

.marker-feature {
    color: #666;
    font-size: 8px;
    font-weight: bold;
    line-height: 1.2;
}

.property-features {
    display: flex;
    gap: 1rem;
    margin: 0.5rem 0;
}

.feature {
    background: #f0f0f0;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.8rem;
    font-weight: bold;
    color: #666;
}

.agent-badge {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 0.5rem;
}

.owner-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: bold;
    display: inline-block;
    margin-bottom: 0.5rem;
}

/* Property Polygon Interactive Effects */
.polygon-glow {
    filter: drop-shadow(0 0 12px #800000) drop-shadow(0 0 20px #800000);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        filter: drop-shadow(0 0 12px #800000) drop-shadow(0 0 20px #800000);
    }

    50% {
        filter: drop-shadow(0 0 16px #A00000) drop-shadow(0 0 28px #A00000);
    }

    100% {
        filter: drop-shadow(0 0 12px #800000) drop-shadow(0 0 20px #800000);
    }
}

/* Hover glow effect (subtle) */
.polygon-hover-glow {
    filter: drop-shadow(0 0 6px #800000);
    transition: filter 0.3s ease;
}

/* Address Marker */
.address-marker {
    background: none !important;
    border: none !important;
}

.address-marker-content {
    font-size: 24px;
    text-align: center;
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.3));
}

/* Custom Leaflet Draw Icons - Polygon Only */
.leaflet-draw-draw-polygon {
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="%23333"><path d="M3 17.25V21h3.75L17.81 9.94l-3.75-3.75L3 17.25zM20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34c-.39-.39-1.02-.39-1.41 0l-1.83 1.83 3.75 3.75 1.83-1.83z"/></svg>') !important;
    background-size: 16px 16px !important;
    background-position: center !important;
    background-repeat: no-repeat !important;
}

/* Popup
 Image Preview */
.popup-image-preview {
    position: relative;
    margin-bottom: 1rem;
}

.popup-featured-image {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 8px;
}

.popup-image-count {
    position: absolute;
    bottom: 5px;
    right: 5px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
}

.popup-description {
    max-height: 40px;
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    margin-bottom: 0.5rem !important;
    font-size: 0.8rem !important;
    line-height: 1.25 !important;
    color: #666;
}

/* Removed popup-actions-top - no longer needed */

.popup-actions {
    margin-top: 0.75rem;
    text-align: center;
}

.details-btn {
    background: #4CAF50;
    color: white;
    text-decoration: none;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-block;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.details-btn:hover {
    background: #45a049;
    transform: translateY(-1px);
}

/* Enhanced popup content */
.popup-content {
    max-width: 320px;
    min-width: 280px;
}

@media (max-width: 480px) {
    .leaflet-popup-content-wrapper {
        max-width: calc(100vw - 20px) !important;
        left: 10px !important;
        right: 10px !important;
    }

    .leaflet-popup-content {
        max-width: calc(100vw - 60px) !important;
        margin: 6px 10px !important;
    }

    .popup-content {
        max-width: calc(100vw - 80px) !important;
        min-width: auto !important;
    }

    .popup-content h3 {
        font-size: 0.85rem !important;
    }

    .popup-featured-image {
        height: 80px !important;
    }
}

.popup-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.5rem;
    gap: 0.5rem;
}

.popup-content h3 {
    margin: 0;
    color: #333;
    font-size: 1.1rem;
    line-height: 1.3;
    flex: 1;
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.popup-title-link {
    color: #333;
    text-decoration: none;
    transition: color 0.2s ease;
    cursor: pointer;
}

.popup-title-link:hover {
    color: #1f2937;
    text-decoration: underline;
}

.popup-info {
    margin-bottom: 0.5rem;
}

.info-row {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 0.25rem;
    gap: 0.5rem;
}

.info-label {
    font-size: 0.85rem;
    color: #666;
    font-weight: 500;
}

.info-separator {
    font-size: 0.8rem;
    color: #999;
    font-weight: bold;
}

.info-value {
    font-size: 0.85rem;
    color: #333;
    font-weight: 600;
}

.popup-content p {
    margin-bottom: 0.4rem;
    font-size: 0.85rem;
    line-height: 1.3;
}

.popup-content .price {
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.1rem;
    margin: 0.5rem 0;
    text-align: center;
}

.agent-badge,
.owner-badge {
    font-size: 0.7rem;
    padding: 0.2rem 0.4rem;
    white-space: nowrap;
    flex-shrink: 0;
}

.property-features {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin: 0.25rem 0;
}

.feature {
    font-size: 0.75rem;
    padding: 0.2rem 0.4rem;
}

/* Leaflet Popup - Clean Simple Styles */
.leaflet-popup-pane {
    z-index: 1500;
}

/* Mobile popup - Full screen experience */
@media (max-width: 768px) {
    .leaflet-popup {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        margin: 0 !important;
        transform: none !important;
    }
    
    .leaflet-popup-content-wrapper {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        max-width: 100vw;
        max-height: 100vh;
        width: 100vw;
        height: 100vh;
        margin: 0;
        border-radius: 0;
        box-shadow: none;
    }
    
    .leaflet-popup-content {
        width: 100%;
        height: 100%;
        max-width: 100%;
        max-height: 100%;
        margin: 0;
        padding: 16px;
        overflow-y: auto;
    }
    
    .leaflet-popup-tip-container {
        display: none;
    }
    
    .leaflet-popup-close-button {
        position: fixed;
        top: 16px;
        right: 16px;
        z-index: 10;
        font-size: 32px;
        width: 40px;
        height: 40px;
        background: rgba(0, 0, 0, 0.7);
        color: white;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
    }
}

/* 
Dummy Ad Styles */
.ad-banner-top {
    position: fixed;
    top: 64px;
    left: 0;
    right: 0;
    z-index: 999;
    background: white;
    border-bottom: 1px solid #ddd;
    padding: 0.5rem;
}

.ad-banner-bottom {
    position: absolute;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

.ad-sidebar {
    margin: 1.5rem 0;
}

.dummy-ad {
    background: linear-gradient(135deg, var(--gray-50) 0%, white 100%);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.25rem;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.dummy-ad::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--gold-color));
}

.dummy-ad:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dummy-ad-small {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    padding: 0.75rem;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    width: 200px;
}

.ad-label {
    font-size: 0.7rem;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.ad-content h4 {
    margin: 0 0 0.25rem 0;
    color: #495057;
    font-size: 1rem;
    font-weight: 600;
}

.ad-content p {
    margin: 0 0 0.25rem 0;
    color: #6c757d;
    font-size: 0.85rem;
    line-height: 1.3;
}

.ad-content small {
    color: #28a745;
    font-size: 0.75rem;
    font-weight: 500;
}

.ad-content-small strong {
    display: block;
    color: #495057;
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.ad-content-small p {
    margin: 0;
    color: #6c757d;
    font-size: 0.75rem;
    line-height: 1.2;
}

/* Left Vertical Ad */
.ad-banner-left {
    position: fixed;
    top: 50%;
    left: 10px;
    transform: translateY(-50%);
    z-index: 999;
    width: 160px;
}

.dummy-ad-vertical {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s;
    width: 100%;
}

.dummy-ad-vertical:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.dummy-ad-vertical .ad-content h4 {
    margin: 0 0 0.5rem 0;
    color: #495057;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.3;
}

.dummy-ad-vertical .ad-content p {
    margin: 0 0 0.5rem 0;
    color: #6c757d;
    font-size: 0.75rem;
    line-height: 1.3;
}

.dummy-ad-vertical .ad-content small {
    color: #28a745;
    font-size: 0.7rem;
    font-weight: 500;
}

/* Adjust map container - no top margin needed now */
#mapContainer {
    margin-top: 0;
}

/* Mobile responsive ads */
@media (max-width: 768px) {
    .ad-banner-left {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        margin: 1rem;
        order: -1;
    }

    .dummy-ad-vertical {
        width: 100%;
        max-width: 300px;
        margin: 0 auto;
    }

    #mapContainer {
        margin-top: 0;
    }

    .ad-banner-bottom {
        position: relative;
        bottom: auto;
        right: auto;
        margin: 1rem;
    }

    .dummy-ad-small {
        width: 100%;
    }
}

/* Enhanc
ed Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-display);
    font-weight: 600;
    line-height: 1.2;
    color: var(--gray-900);
    margin-bottom: 0.5em;
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 1em;
}

/* Enhanced Links */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.2s ease;
}

a:hover {
    color: var(--primary-dark);
}

/* Enhanced Form Elements */
input,
textarea,
select {
    font-family: var(--font-primary);
    padding: 0.875rem;
    border: 2px solid var(--gray-200);
    border-radius: 8px;
    font-size: 1rem;
    background-color: white;
    transition: all 0.2s ease;
    color: var(--gray-800);
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(17, 24, 39, 0.1);
    transform: translateY(-1px);
}

/* Enhanced Cards */
.property-item {
    background: white;
    border: 1px solid var(--gray-200);
    border-radius: 16px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.property-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.property-item:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.property-item:hover::before {
    transform: scaleX(1);
}

/* Enhanced Badges */
.agent-badge,
.owner-badge {
    font-family: var(--font-primary);
    font-weight: 600;
    font-size: 0.75rem;
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--shadow-sm);
}

/* Verified Badge */
.verified-badge {
    background: #10b981;
    color: white;
    font-size: 0.8rem;
    font-weight: bold;
    padding: 0.2rem 0.4rem;
    border-radius: 50%;
    margin-left: 0.5rem;
    display: inline-block;
    cursor: help;
    position: relative;
}

/* Marker Verified Badge */
.marker-verified {
    background: #3b82f6;
    color: white;
    font-size: 0.5rem;
    font-weight: bold;
    padding: 0.05rem 0.2rem;
    border-radius: 50%;
    margin-left: 0.2rem;
    display: inline-block;
    cursor: help;
    position: relative;
    vertical-align: middle;
    line-height: 1;
}

/* Tooltip Styles */
.tooltip {
    position: relative;
    cursor: help;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 125%;
    left: 50%;
    transform: translateX(-50%);
    background: #1f2937;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 500;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.tooltip::after {
    content: '';
    position: absolute;
    bottom: 115%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: #1f2937;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
}

.tooltip:hover::before,
.tooltip:hover::after {
    opacity: 1;
    visibility: visible;
}

.agent-badge {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

.owner-badge {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Enhanced Features */
.feature {
    background: linear-gradient(135deg, var(--gray-100), var(--gray-50));
    border: 1px solid var(--gray-200);
    padding: 0.375rem 0.75rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--gray-700);
    box-shadow: var(--shadow-sm);
    transition: all 0.2s ease;
}

.feature:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Enhanced Price Display */
.price {
    font-family: var(--font-primary);
    font-weight: 700;
    color: var(--secondary-color);
    font-size: 1.5rem;
}

/* Smooth Animations */
* {
    scroll-behavior: smooth;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

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

.property-item {
    animation: fadeInUp 0.6s ease forwards;
}

/* Enhanced Modal */
.modal {
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    /* Allow modal to scroll */
}

.modal-content {
    background: white;
    margin: 5% auto;
    padding: 2.5rem;
    border-radius: 20px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    /* Limit height */
    overflow-y: auto;
    /* Make content scrollable */
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--gray-200);
    position: relative;
}

.modal-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--gold-color));
}

/*
 Footer Styles */
.main-footer {
    background: linear-gradient(135deg, var(--gray-900) 0%, var(--gray-800) 100%);
    color: white;
    height: 75px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--gold-color));
}

.main-footer .footer-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 1400px;
    padding: 0 2rem;
    gap: 2rem;
}

.main-footer .footer-section {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.main-footer .footer-section h4 {
    font-size: 1.2rem;
    margin: 0;
    font-weight: 600;
    color: white;
}

.main-footer .footer-section p {
    font-size: 0.95rem;
    margin: 0;
    color: var(--gray-300);
}

.main-footer .social-links {
    display: flex;
    gap: 1rem;
    margin: 0;
}

.main-footer .social-links a {
    color: var(--gray-300);
    transition: color 0.2s ease;
}

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

.main-footer .footer-section ul {
    display: flex;
    gap: 1.5rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

.main-footer .footer-section ul li {
    margin: 0;
}

.main-footer .footer-section ul li a {
    color: var(--gray-300);
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.2s ease;
}

.main-footer .footer-section ul li a:hover {
    color: white;
}

.main-footer .contact-info {
    display: flex;
    gap: 1.5rem;
}

.main-footer .contact-info p {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.8rem;
    margin: 0;
}

.main-footer .footer-bottom {
    display: none;
}

.main-footer h5 {
    display: none;
}

.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-color), var(--secondary-color), var(--gold-color));
}

.footer-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 1.5rem 2rem 1rem;
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 3rem;
}

.footer-section h4 {
    font-family: var(--font-display);
    color: white;
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.footer-section h5 {
    color: var(--gray-200);
    font-size: 1rem;
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.footer-section p {
    color: var(--gray-300);
    line-height: 1.5;
    margin-bottom: 0.4rem;
}

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

.footer-section ul li {
    margin-bottom: 0.4rem;
}

.footer-section ul li a {
    color: var(--gray-300);
    text-decoration: none;
    transition: color 0.2s ease;
    font-weight: 400;
}

.footer-section ul li a:hover {
    color: var(--primary-color);
}

.social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-block;
    font-size: 1.5rem;
    transition: transform 0.2s ease;
}

.social-links a:hover {
    transform: translateY(-2px);
}

.contact-info p {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    color: var(--gray-300);
}

.footer-bottom {
    background: var(--gray-900);
    border-top: 1px solid var(--gray-700);
}

.footer-bottom-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-bottom p {
    color: var(--gray-400);
    margin: 0;
    font-size: 0.9rem;
}

/* Modal Enhancements for Footer Modals */
.contact-form {
    margin-bottom: 2rem;
}

.contact-form form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.contact-details h4 {
    color: var(--gray-800);
    margin-bottom: 1rem;
    padding-top: 1rem;
    border-top: 1px solid var(--gray-200);
}

.contact-details p {
    margin-bottom: 0.5rem;
    color: var(--gray-600);
}

/* Modal List Styling */
.modal-content ul {
    list-style: none;
    padding-left: 0;
}

.modal-content ul li {
    padding: 0.5rem 0;
    border-bottom: 1px solid var(--gray-100);
    color: var(--gray-700);
}

.modal-content ul li:last-child {
    border-bottom: none;
}

/* Responsive Footer */
@media (max-width: 768px) {
    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
        padding: 2rem 1rem 1rem;
    }

    .footer-bottom-content {
        flex-direction: column;
        text-align: center;
        padding: 1rem;
    }

    .social-links {
        justify-content: center;
    }

    /* Ensure proper flex order on mobile */
    body {
        display: flex;
        flex-direction: column;
    }

    #app {
        display: flex;
        flex-direction: column;
        order: 1;
    }

    .ad-banner-left {
        order: 2;
    }

    .main-footer {
        order: 3;
    }
}

/* This section is now handled by the new map container fixes above */
/* Fix Map
 Container Heights */
#mapContainer {
    height: calc(100vh - 147px);
    /* viewport height - header (72px) - footer (75px) */
    min-height: 500px;
    /* Minimum height to show Malta properly */
    max-height: calc(100vh - 147px);
    overflow: hidden;
    position: relative;
}

#map {
    height: 100% !important;
    width: 100% !important;
    max-height: 100%;
}

/* Property Details Map Fix */
.property-map {
    height: 400px !important;
    max-height: 400px !important;
    width: 100% !important;
    border-radius: 10px;
    overflow: hidden;
    margin-top: 1rem;
    position: relative;
    z-index: 1;
    background: #e5e7eb !important;
    /* Visible fallback background */
    touch-action: pan-x pan-y;
    display: block !important;
    visibility: visible !important;
}

/* Ensure Leaflet map fills container exactly */
.property-map .leaflet-container {
    height: 400px !important;
    width: 100% !important;
    border-radius: 10px;
    position: relative !important;
    touch-action: pan-x pan-y;
}

/* Ensure Leaflet containers respect height constraints */
.leaflet-container {
    height: 100% !important;
    max-height: inherit !important;
    touch-action: pan-x pan-y;
}

/* Fix body layout - footer always accessible */
body {
    min-height: 100vh;
    max-height: 100vh;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

#app {
    flex: 1;
    display: flex;
    flex-direction: column;
    max-height: calc(100vh - 72px);
}

.property-details-container {
    flex: 1;
    overflow-y: auto;
}

/* Footer always visible at bottom - handled above */

/* Mobile responsive map heights */
@media (max-width: 768px) {
    #mapContainer {
        height: calc(100vh - 147px);
        /* viewport height - header (72px) - footer (75px) */
        min-height: 400px;
        /* Smaller minimum for mobile */
        max-height: calc(100vh - 147px);
    }

    .property-map {
        height: 300px !important;
        max-height: 300px !important;
    }

    .property-map .leaflet-container {
        height: 300px !important;
    }

    .property-map-container {
        height: 300px;
    }

    /* Move ad between map and footer on mobile */
    .ad-banner-left {
        position: relative;
        top: auto;
        left: auto;
        transform: none;
        width: 100%;
        margin: 2rem 1rem;
        order: 2;
        /* Position after map */
    }

    .dummy-ad-vertical {
        width: 100%;
        max-width: 400px;
        margin: 0 auto;
        padding: 1.5rem;
    }
}

/* F
ix My Listings Modal Scrolling */
#listingsContainer {
    max-height: 60vh;
    overflow-y: auto;
    padding-right: 0.5rem;
    /* Space for scrollbar */
}

/* Custom scrollbar for listings */
#listingsContainer::-webkit-scrollbar {
    width: 6px;
}

#listingsContainer::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

#listingsContainer::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

#listingsContainer::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* Mobile Hamburger Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 30px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.hamburger-line {
    width: 25px;
    height: 3px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s ease;
    transform-origin: center;
}

/* Hamburger animation when active */
.mobile-menu-btn.active .hamburger-line:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active .hamburger-line:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active .hamburger-line:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    padding: 1rem;
    transform: translateY(-100%);
    transition: transform 0.3s ease;
}

.mobile-nav.active {
    transform: translateY(0);
}

.mobile-nav button {
    display: block;
    width: 100%;
    margin-bottom: 0.75rem;
    padding: 0.75rem;
    text-align: left;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: white;
    border-radius: 8px;
    font-size: 1rem;
}

.mobile-nav button:hover {
    background: rgba(255, 255, 255, 0.2);
}

.mobile-nav span {
    display: block;
    color: white;
    font-weight: 500;
    margin-bottom: 1rem;
    padding: 0.5rem;
}

/* Desktop/Mobile Navigation Toggle */
@media (max-width: 768px) {
    .mobile-menu-btn {
        display: flex !important;
    }

    .desktop-nav {
        display: none !important;
    }

    .mobile-nav {
        display: block !important;
    }
}

@media (min-width: 769px) {
    .mobile-menu-btn {
        display: none !important;
    }

    .desktop-nav {
        display: flex !important;
    }

    .mobile-nav {
        display: none !important;
    }

    /* Hide mobile ad on desktop */
    .mobile-ad-container {
        display: none !important;
    }
}

/* Comprehensive Mobile Optimizations - Revamped */
@media (max-width: 768px) {

    /* Fixed Header Mobile */
    header {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        padding: 0.75rem 1rem;
        height: 60px;
        background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
        z-index: 1100;
        box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    }

    header h1 {
        font-size: 1.5rem;
    }

    .logo {
        height: 32px;
    }

    /* Mobile Menu Button - Highest z-index */
    .mobile-menu-btn {
        display: flex !important;
        z-index: 1102;
        position: relative;
    }

    /* Hide desktop navigation */
    .desktop-nav {
        display: none !important;
    }

    /* Mobile Navigation - Clean slide down */
    .mobile-nav {
        display: block !important;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
        z-index: 1101;
        padding: 1rem;
        transform: translateY(-100%);
        transition: transform 0.3s ease, opacity 0.3s ease, visibility 0.3s ease;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        visibility: hidden;
        opacity: 0;
    }

    .mobile-nav.active {
        transform: translateY(0);
        visibility: visible;
        opacity: 1;
    }

    .mobile-nav button {
        display: block;
        width: 100%;
        margin-bottom: 0.75rem;
        padding: 0.875rem 1rem;
        text-align: left;
        background: rgba(255, 255, 255, 0.1);
        border: 1px solid rgba(255, 255, 255, 0.2);
        color: white;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 500;
        transition: all 0.2s ease;
    }

    .mobile-nav button:hover,
    .mobile-nav button:active {
        background: rgba(255, 255, 255, 0.2);
        transform: translateY(-1px);
    }

    .mobile-nav span {
        display: block;
        color: white;
        font-weight: 600;
        margin-bottom: 1rem;
        padding: 0.5rem 1rem;
        background: rgba(255, 255, 255, 0.1);
        border-radius: 8px;
        text-align: center;
    }

    /* Hide welcome message when not logged in */
    .mobile-nav span:empty,
    .mobile-nav span[style*="display: none"] {
        display: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    /* Content spacing for fixed header */
    .container {
        padding-top: 60px;
    }

    /* Map adjustments */
    #mapContainer {
        height: calc(100vh - 60px - 180px);
        min-height: 350px;
    }

    /* Filter panel - Proper z-index hierarchy */
    .filter-panel {
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        height: auto;
        max-height: calc(100vh - 120px);
        overflow-y: auto;
        transform: translateY(-100%);
        transition: transform 0.3s ease;
        z-index: 1050;
        background: white;
        box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    }

    .filter-panel.active {
        transform: translateY(0);
    }

    .filter-content {
        padding: 1rem;
        width: 100%;
        max-height: calc(100vh - 140px);
        overflow-y: auto;
    }

    /* Filter toggle button - Below mobile nav */
    .toggle-filters-btn {
        position: fixed;
        top: 70px;
        left: 10px;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.85rem;
        z-index: 1060;
        background: rgba(17, 24, 39, 0.95);
        color: white;
        border: none;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.2);
        font-weight: 500;
        backdrop-filter: blur(10px);
        transition: all 0.2s ease;
    }

    .toggle-filters-btn:hover {
        background: rgba(17, 24, 39, 1);
        transform: translateY(-1px);
    }

    /* Results count - Below mobile nav */
    .results-count {
        position: fixed;
        top: 70px;
        right: 10px;
        background: rgba(255, 255, 255, 0.95);
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.85rem;
        box-shadow: 0 2px 12px rgba(0, 0, 0, 0.1);
        z-index: 1060;
        font-weight: 500;
        backdrop-filter: blur(10px);
    }

    /* Property list spacing */
    .property-list {
        margin-top: 120px;
        padding: 0 1rem;
    }

    .property-card {
        margin-bottom: 1rem;
    }

    /* Mobile ad container - show on mobile */
    .mobile-ad-container {
        display: block !important;
        padding: 1.5rem 1rem;
        background: #f9fafb;
        border-top: 1px solid #e5e7eb;
        order: 2;
        position: relative;
    }

    .mobile-ad-container .dummy-ad {
        max-width: 400px;
        margin: 0 auto;
    }

    /* Popup mobile optimizations */
    .leaflet-popup-content-wrapper {
        max-width: calc(100vw - 40px) !important;
        max-height: 400px !important;
        width: auto !important;
    }

    .leaflet-popup-content {
        margin: 8px 12px !important;
        max-width: calc(100vw - 80px) !important;
    }

    .popup-featured-image {
        height: 100px !important;
    }

    .popup-description {
        max-height: 35px !important;
        -webkit-line-clamp: 2 !important;
        font-size: 0.8rem !important;
    }

    .popup-title-link {
        font-size: 0.95rem !important;
        line-height: 1.3 !important;
    }

    .agent-badge,
    .owner-badge {
        font-size: 0.65rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    .feature {
        font-size: 0.7rem !important;
        padding: 0.25rem 0.5rem !important;
    }

    .price {
        font-size: 1rem !important;
        margin: 0.5rem 0 !important;
    }

    /* Modal mobile */
    .modal-content {
        margin: 2% auto;
        padding: 1.5rem;
        width: 95%;
        max-height: 90vh;
    }

    /* Property details mobile - Optimized for mobile screens */
    .property-details-container {
        padding: 0.75rem;
        padding-top: 70px;
        /* Account for fixed header */
        max-width: 100%;
        margin: 0;
    }

    .property-content {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .property-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
        margin-bottom: 1rem;
        padding-bottom: 0.75rem;
    }

    .property-title {
        font-size: 1.5rem !important;
        line-height: 1.3;
        margin-bottom: 0.5rem;
    }

    .property-price {
        font-size: 1.75rem !important;
        margin-bottom: 0.5rem;
    }

    .property-meta {
        grid-template-columns: repeat(2, 1fr);
        gap: 0.5rem;
        margin-bottom: 1rem;
    }

    .property-meta-item {
        padding: 0.5rem;
        font-size: 0.9rem;
    }

    /* Optimized image section */
    .property-images {
        margin-bottom: 1rem;
    }

    .featured-image-container {
        margin-bottom: 0.75rem;
    }

    .featured-image {
        height: 200px !important;
        border-radius: 8px;
    }

    .image-counter {
        font-size: 0.8rem;
        padding: 0.25rem 0.5rem;
    }

    .image-thumbnails {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
        gap: 0.25rem;
        max-height: 120px;
    }

    .thumbnail {
        height: 50px !important;
        border-radius: 4px;
    }

    /* Property description */
    .property-description {
        font-size: 0.95rem;
        line-height: 1.5;
        margin-bottom: 1rem;
    }

    /* Property map mobile */
    .property-map {
        height: 200px !important;
        margin: 1rem 0;
        border-radius: 8px;
        overflow: hidden;
    }

    /* Contact section mobile - Compact layout */
    .contact-section {
        padding: 0.75rem;
        margin-top: 1rem;
        background: #f8f9fa;
        border-radius: 8px;
    }

    .contact-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    .contact-methods-display {
        gap: 0.5rem;
        flex-direction: column;
    }

    .contact-method {
        padding: 0.75rem;
        min-height: auto;
        border-radius: 6px;
        font-size: 0.9rem;
    }

    .contact-icon svg {
        width: 18px;
        height: 18px;
    }

    /* Admin controls mobile */
    .admin-controls {
        margin-top: 1rem;
        padding: 0.75rem;
        background: #f1f5f9;
        border-radius: 8px;
    }

    .admin-controls h3 {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .verification-controls {
        flex-direction: column;
        gap: 0.5rem;
    }

    .verification-controls button {
        padding: 0.75rem;
        font-size: 0.9rem;
        border-radius: 6px;
    }

    /* Back button mobile */
    .back-btn {
        padding: 0.5rem 0.75rem !important;
        font-size: 0.85rem !important;
        border-radius: 6px !important;
    }

    /* Property sections spacing */
    .property-section {
        margin-bottom: 1rem;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 8px;
    }

    .property-section h3 {
        font-size: 1.1rem;
        margin-bottom: 0.75rem;
    }

    /* Property details price line styling */
    #agentBadge .price-line {
        margin: 1rem 0;
        padding: 0.75rem;
        background: #f8f9fa;
        border-radius: 8px;
        border: 1px solid #e9ecef;
    }

    #agentBadge .price-line .price {
        font-size: 1.5rem;
        color: #1f2937;
        font-weight: 700;
    }

    #agentBadge .price-line .listing-type {
        background: #e2e8f0;
        color: #475569;
        font-weight: 600;
        padding: 0.375rem 0.75rem;
        border-radius: 16px;
        font-size: 0.875rem;
    }

    /* Footer mobile */
    .footer-content {
        padding: 1.5rem 1rem 1rem;
        gap: 1rem;
    }

    .footer-section h4 {
        font-size: 1.2rem;
    }

    .footer-section h5 {
        font-size: 1rem;
    }

    /* Hide desktop ad on mobile */
    .ad-banner-left {
        display: none !important;
    }

    .dummy-ad-vertical {
        width: 100% !important;
        max-width: 350px !important;
        margin: 0 auto !important;
        padding: 1rem !important;
    }

    /* Form mobile optimizations */
    input,
    textarea,
    select {
        font-size: 16px;
        /* Prevents zoom on iOS */
        padding: 0.75rem;
    }

    button {
        padding: 0.75rem 1rem;
        font-size: 1rem;
        min-height: 44px;
        /* Touch target size */
    }

    /* Touch-friendly interactions */
    .property-item {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .property-actions button {
        min-height: 44px;
        padding: 0.75rem 1rem;
        font-size: 0.9rem;
    }

    /* Ensure proper body layout on mobile */
    body {
        display: flex;
        flex-direction: column;
    }

    #app {
        display: flex;
        flex-direction: column;
        order: 1;
    }

    .main-footer {
        order: 3;
    }

    /* Mobile navigation overlay */
    .mobile-nav-overlay {
        display: none;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: rgba(0, 0, 0, 0.3);
        z-index: 1099;
        opacity: 0;
        transition: opacity 0.3s ease;
    }

    .mobile-nav-overlay.active {
        display: block;
        opacity: 1;
    }

    /* Fix Leaflet zoom controls position on mobile */
    .leaflet-control-zoom {
        top: 70px !important;
        /* Below fixed header */
        left: 10px !important;
        z-index: 1000 !important;
    }

    /* Ensure zoom controls are properly styled on mobile */
    .leaflet-control-zoom a {
        width: 36px !important;
        height: 36px !important;
        line-height: 36px !important;
        font-size: 18px !important;
        background: rgba(255, 255, 255, 0.95) !important;
        backdrop-filter: blur(10px) !important;
        border: 1px solid rgba(0, 0, 0, 0.1) !important;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15) !important;
    }

    .leaflet-control-zoom a:hover {
        background: rgba(255, 255, 255, 1) !important;
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    header {
        padding: 0.5rem;
    }

    header h1 {
        font-size: 1.3rem;
    }

    .filter-content {
        padding: 0.75rem;
    }

    /* Property details extra small screens */
    .property-details-container {
        padding: 0.5rem;
        padding-top: 65px;
    }

    .property-title {
        font-size: 1.3rem !important;
    }

    .property-price {
        font-size: 1.5rem !important;
    }

    .featured-image {
        height: 180px !important;
    }

    .property-meta {
        grid-template-columns: 1fr;
    }

    .property-map {
        height: 150px !important;
    }

    /* Property details price line mobile */
    #agentBadge .price-line .price {
        font-size: 1.3rem !important;
    }

    #agentBadge .price-line .listing-type {
        font-size: 0.75rem !important;
    }
}

.modal-content {
    padding: 1rem;
    margin: 1% auto;
}

.property-details-container {
    padding: 0.75rem;
}

.featured-image {
    height: 200px !important;
}
}

/* Google Sign-In Styling */
.google-signin-section {
    margin-bottom: 1.5rem;
    text-align: center;
}

.login-divider {
    position: relative;
    margin: 1.5rem 0;
    text-align: center;
}

.login-divider::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: #e5e7eb;
}

.login-divider span {
    background: white;
    padding: 0 1rem;
    color: #6b7280;
    font-size: 0.9rem;
    position: relative;
    z-index: 1;
}

.login-help {
    margin-top: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    font-size: 0.85rem;
    color: #6b7280;
}

.login-help code {
    background: #f3f4f6;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Courier New', monospace;
    color: #374151;
}

/* Google Sign-In button customization */
.g_id_signin {
    margin: 0 auto;
    width: fit-content;
}

/* Enhanced modal for login */
#loginModal .modal-content {
    max-width: 400px;
    padding: 2rem;
}

#loginModal h2 {
    text-align: center;
    margin-bottom: 1.5rem;
    color: #1f2937;
}

/* Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 12px 20px;
    border-radius: 8px;
    color: white;
    font-weight: 500;
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s ease;
    max-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.notification.show {
    transform: translateX(0);
}

.notification-success {
    background-color: #10b981;
}

.notification-error {
    background-color: #ef4444;
}

.notification-info {
    background-color: #3b82f6;
}

.notification-warning {
    background-color: #f59e0b;
}

/* Draw
ing Error Notification */
.drawing-error {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translateX(-50%);
    background-color: #ef4444;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-weight: 500;
    z-index: 10000;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    max-width: 400px;
    text-align: center;
    display: none;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

/* Preven
t map from interfering with page scroll */
.leaflet-container {
    outline: none;
}

.leaflet-container:focus {
    outline: none;
}

/* Prevent map drag from affecting page scroll on mobile */
.leaflet-touch .leaflet-bar {
    border: 2px solid rgba(0, 0, 0, 0.2);
    background-clip: padding-box;
}

/* Better map containment */
.property-map-container {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    height: 400px;
    width: 100%;
    margin-top: 1rem;
}

/* Reduce grey area around map tiles */
.leaflet-container {
    background-color: #f8f9fa !important;
}

.leaflet-tile-pane {
    background-color: transparent !important;
}

/* E
rror Display Styling */
.error-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
    padding: 2rem;
}

.error-message {
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 12px;
    padding: 2rem;
    max-width: 500px;
    text-align: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.error-message h2 {
    color: #dc2626;
    margin-bottom: 1rem;
    font-size: 1.5rem;
}

.error-message p {
    color: #374151;
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.error-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.error-actions .btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.error-actions .btn-primary {
    background: #3b82f6;
    color: white;
}

.error-actions .btn-primary:hover {
    background: #1f2937;
}

.error-actions .btn-secondary {
    background: #6b7280;
    color: white;
}

.error-actions .btn-secondary:hover {
    background: #4b5563;
}

.error-debug {
    text-align: left;
    margin-top: 1rem;
    padding: 1rem;
    background: #f9fafb;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.error-debug summary {
    cursor: pointer;
    font-weight: 500;
    color: #6b7280;
    margin-bottom: 0.5rem;
}

.error-debug p {
    margin: 0.25rem 0;
    font-size: 0.875rem;
    color: #4b5563;
    font-family: monospace;
}

@media (max-width: 768px) {
    .error-actions {
        flex-direction: column;
    }

    .error-container {
        padding: 1rem;
    }

    .error-message {
        padding: 1.5rem;
    }
}

/* Listing Duration Styling */
.duration-help {
    color: #6b7280;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: block;
}

#listingDuration {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    border: 2px solid #e2e8f0;
    border-radius: 8px;
    padding: 0.75rem;
    font-size: 1rem;
    transition: all 0.2s;
}

#listingDuration:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    outline: none;
}

#listingDuration option {
    padding: 0.5rem;
}

/* Expiration warning styles */
.meta-value:has-text("Expired") {
    color: #dc2626;
    font-weight: 600;
}

.meta-value:has-text("days left") {
    color: #059669;
}

/* Property expiration indicators */
.property-expires-soon {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border-left: 4px solid #f59e0b;
    padding: 0.5rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    font-size: 0.875rem;
}

.property-expired {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-left: 4px solid #dc2626;
    padding: 0.5rem;
    margin: 0.5rem 0;
    border-radius: 4px;
    font-size: 0.875rem;
    color: #7f1d1d;
}

/* Unl
imited listing badge */
.unlimited-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Package selection styling */
#listingDuration option[value="unlimited"] {
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    font-weight: 600;
}

#listingDuration option[value="7"] {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
}

#listingDuration option[value="30"] {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
}

/* Unlimited property indicator in details */
#propertyExpires:has-text("Unlimited") {
    color: #059669;
    font-weight: 600;
}

.meta-value:contains("♾️") {
    color: #059669;
    font-weight: 600;
}

/* Clean I
con Styling */
.icon {
    display: inline-block;
    font-size: 1.1em;
    margin-right: 0.5rem;
    opacity: 0.8;
    transition: opacity 0.2s;
}

label:hover .icon {
    opacity: 1;
}

/* Form label improvements */
label {
    display: flex;
    align-items: center;
    font-weight: 500;
    color: #374151;
    margin-bottom: 0.5rem;
}

/* Property feature icons in popups and cards */
.feature {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
}

.marker-feature {
    font-size: 0.75rem;
    opacity: 0.9;
}

/* Agent/Owner badges - minimal circular design */
.badges .agent-badge,
.badges .owner-badge {
    margin-left: 0.5rem;
}

/* Property details page - keep text for clarity */
#agentBadge .agent-badge,
#agentBadge .owner-badge {
    width: auto;
    height: auto;
    border-radius: 12px;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    gap: 0.25rem;
}

.agent-badge {
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

.owner-badge {
    background: linear-gradient(135deg, #1f2937 0%, #111827 100%);
    color: white;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.75rem;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

/* Upload icon styling */
.upload-icon {
    font-size: 2rem;
    opacity: 0.6;
    margin-bottom: 0.5rem;
}

/* Unlimited badge improvements */
.unlimited-badge {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    padding: 0.25rem 0.5rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
}

/* Addr
ess Autocomplete Styling */
.address-input-container {
    position: relative;
    width: 100%;
}

.address-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    max-height: 200px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
}

.address-suggestion {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.2s;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.address-suggestion:hover,
.address-suggestion.highlighted {
    background-color: #f8fafc;
}

.address-suggestion:last-child {
    border-bottom: none;
}

.suggestion-main {
    font-weight: 500;
    color: #1f2937;
    font-size: 0.9rem;
}

.suggestion-main strong {
    background-color: #fef3c7;
    color: #92400e;
    padding: 0.125rem 0.25rem;
    border-radius: 3px;
    font-weight: 600;
}

.suggestion-details {
    font-size: 0.8rem;
    color: #6b7280;
}

.suggestion-type {
    display: inline-block;
    background: #e5e7eb;
    color: #374151;
    padding: 0.125rem 0.375rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

/* Loading state */
.address-suggestions.loading {
    display: block;
    padding: 1rem;
    text-align: center;
    color: #6b7280;
    font-size: 0.875rem;
}

.address-suggestions.loading::before {
    content: "🔍 Searching...";
}

/* No results state */
.address-suggestions.no-results {
    display: block;
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.875rem;
}

.address-suggestions.no-results::before {
    content: "No addresses found";
}

/* Input focus state when suggestions are open */
#propertyAddress:focus+.address-suggestions {
    border-color: #3b82f6;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .address-suggestions {
        max-height: 150px;
    }

    .address-suggestion {
        padding: 0.625rem 0.875rem;
    }
}

/* Veri
fied Badge Styling */
.verified-badge {
    background: #1877f2;
    color: white;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    font-size: 12px;
    font-weight: bold;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-left: 6px;
    vertical-align: middle;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(24, 119, 242, 0.3);
}

/* Badge container */
.badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: center;
}

/* Admin Controls Styling */
.admin-controls {
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-top: 2rem;
}

.admin-controls h3 {
    color: #1e40af;
    margin-bottom: 1rem;
    font-size: 1.1rem;
}

.verification-controls {
    display: flex;
    gap: 1rem;
}

.verify-btn,
.unverify-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.verify-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.verify-btn:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-1px);
}

.unverify-btn {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
}

.unverify-btn:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    transform: translateY(-1px);
}

/* Verified badge in popups */
.popup-header .verified-badge {
    width: 16px;
    height: 16px;
    font-size: 10px;
    margin-left: 4px;
}

/* Verified badge in property cards */
.property-header .verified-badge {
    width: 16px;
    height: 16px;
    font-size: 10px;
    margin-left: 4px;
}

/* Verified badge in property details title */
#propertyTitle .verified-badge {
    width: 20px;
    height: 20px;
    font-size: 13px;
    margin-left: 8px;
}

/* Mobile responsive */
@media (max-width: 768px) {
    .verification-controls {
        flex-direction: column;
    }

    .verify-btn,
    .unverify-btn {
        width: 100%;
        justify-content: center;
    }

    .badges {
        flex-direction: column;
        align-items: flex-start;
    }
}

/*
 Price line with listing type */
.price-line {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.4rem;
}

.price-line .price {
    font-weight: bold;
    color: #4CAF50;
    font-size: 1.1rem;
}

.listing-type {
    font-size: 0.8rem;
    color: #666;
    background: #f0f0f0;
    padding: 0.2rem 0.5rem;
    border-radius: 12px;
    font-weight: 500;
}

/* Property cards price line */
.property-card .price-line {
    margin-bottom: 0.5rem;
}

.property-card .price-line span:first-child {
    color: #333;
}

.property-card .price-line .listing-type {
    background: #e8f4fd;
    color: #1976d2;
}

/* 
Required field indicator */
.required {
    color: #ef4444;
    font-weight: bold;
    margin-left: 0.25rem;
}

/* Image upload validation styling */
.image-upload-area.error {
    border-color: #ef4444;
    background-color: #fef2f2;
}

.image-upload-area.error .upload-prompt {
    color: #dc2626;
}

/* Form validation message */
.validation-message {
    color: #ef4444;
    font-size: 0.875rem;
    margin-top: 0.5rem;
    display: none;
}

.validation-message.show {
    display: block;
}

/* Proof Document Section in Property Details */
.proof-document-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 1.5rem;
    margin: 1rem 0;
}

.proof-document-section h3 {
    margin: 0 0 1rem 0;
    color: #1e293b;
    font-size: 1.1rem;
}

.proof-document {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: white;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.proof-document .document-icon {
    font-size: 2rem;
}

.proof-document .document-info {
    flex: 1;
}

.proof-document .document-name {
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.25rem;
}

.proof-document .document-size {
    color: #64748b;
    font-size: 0.875rem;
}

.proof-document .btn-view {
    background: #3b82f6;
    color: white;
    border: none;
    padding: 0.5rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    display: inline-block;
    transition: background 0.2s;
}

.proof-document .btn-view:hover {
    background: #1f2937;
}

@media (max-width: 768px) {
    .proof-document {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }

    .proof-document .btn-view {
        align-self: stretch;
        text-align: center;
    }
}

/* To
ast Notification System */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    min-width: 300px;
    max-width: 500px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 10000;
    transform: translateX(100%);
    transition: transform 0.3s ease, opacity 0.3s ease;
    opacity: 0;
    border-left: 4px solid #3b82f6;
}

.notification.show {
    transform: translateX(0);
    opacity: 1;
}

.notification-success {
    border-left-color: #10b981;
}

.notification-error {
    border-left-color: #ef4444;
}

.notification-info {
    border-left-color: #3b82f6;
}

.notification-content {
    display: flex;
    align-items: center;
    padding: 1rem;
    gap: 0.75rem;
}

.notification-icon {
    font-size: 1.2rem;
    flex-shrink: 0;
}

.notification-message {
    flex: 1;
    color: #374151;
    font-size: 0.9rem;
    line-height: 1.4;
}

.notification-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #6b7280;
    cursor: pointer;
    padding: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: background 0.2s;
}

.notification-close:hover {
    background: #f3f4f6;
    color: #374151;
}

/* Mobile responsive notifications */
@media (max-width: 768px) {
    .notification {
        top: 80px;
        /* Below fixed header */
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
    }
}

/* Filter Panel Styles */
.filter-panel {
    position: fixed;
    top: 72px;
    /* Below header */
    right: -400px;
    /* Hidden off-screen to the right */
    width: 380px;
    height: calc(100vh - 72px);
    background: white;
    border-left: 1px solid #e5e7eb;
    box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.filter-panel.open {
    right: 0;
    /* Slide in from the right */
}

.filter-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.filter-content h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.filter-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.apply-btn {
    background: #3b82f6;
    color: white;
}

.apply-btn:hover {
    background: #1d4ed8;
}

.clear-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.clear-btn:hover {
    background: #e5e7eb;
}

.results-count {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Filter Panel Styles */
.filter-panel {
    position: fixed;
    top: 72px;
    /* Below header */
    right: -400px;
    /* Hidden off-screen to the right */
    width: 380px;
    height: calc(100vh - 72px);
    background: white;
    border-left: 1px solid #e5e7eb;
    box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    transition: right 0.3s ease;
    overflow-y: auto;
}

.filter-panel.open {
    right: 0;
    /* Slide in from the right */
}

.filter-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 1rem 2rem;
}

.filter-content h3 {
    margin: 0 0 1rem 0;
    color: #1f2937;
    font-size: 1.1rem;
    font-weight: 600;
}

.filter-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    align-items: end;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.filter-group label {
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
}

.filter-group select,
.filter-group input {
    padding: 0.5rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 0.875rem;
    background: white;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.5rem;
    align-items: end;
}

.filter-actions button {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.apply-btn {
    background: #3b82f6;
    color: white;
}

.apply-btn:hover {
    background: #1d4ed8;
}

.clear-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.clear-btn:hover {
    background: #e5e7eb;
}

.results-count {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

.toggle-filters-btn {
    position: fixed;
    top: 130px;
    /* Below header and map controls */
    right: 10px;
    background: #3b82f6;
    color: white;
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    cursor: pointer;
    z-index: 2000;
    /* Higher than Leaflet controls */
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    font-weight: 500;
    transition: all 0.2s;
}

.toggle-filters-btn:hover {
    background: #1d4ed8;
    box-shadow: 0 6px 8px -1px rgba(0, 0, 0, 0.15);
}

.toggle-filters-btn.active {
    background: #1f2937;
}

.filter-icon {
    font-size: 1rem;
}

/* Mobile responsive styles for filters */
@media (max-width: 768px) {
    .filter-panel {
        right: -100vw;
        /* Full width slide on mobile */
        width: 100vw;
    }

    .filter-content {
        padding: 1rem;
    }

    .filter-row {
        grid-template-columns: 1fr;
        gap: 0.75rem;
    }

    .filter-actions {
        grid-column: 1 / -1;
        justify-content: stretch;
    }

    .filter-actions button {
        flex: 1;
    }

    .toggle-filters-btn {
        right: 10px;
        top: 130px;
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .filter-text {
        display: none;
    }
}

@media (max-width: 480px) {
    .filter-content h3 {
        font-size: 1rem;
    }

    .filter-group label {
        font-size: 0.8rem;
    }

    .filter-group select,
    .filter-group input {
        font-size: 0.8rem;
        padding: 0.4rem 0.6rem;
    }
}

/* Togg
le Button - Simple and Direct */
.toggle-filters-btn {
    position: fixed !important;
    top: 130px !important;
    right: 10px !important;
    background: #3b82f6 !important;
    color: white !important;
    border: none !important;
    border-radius: 8px !important;
    padding: 12px 16px !important;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1) !important;
    cursor: pointer !important;
    z-index: 9999 !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    font-size: 14px !important;
    font-weight: 500 !important;
    font-family: inherit !important;
}

.toggle-filters-btn:hover {
    background: #1d4ed8 !important;
}

/* Override Toggle Button - Small Leaflet-style button */
#toggleFiltersBtn {
    position: fixed !important;
    top: 152px !important;
    right: 10px !important;
    background: white !important;
    color: #333 !important;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px !important;
    padding: 5px !important;
    width: 30px !important;
    height: 30px !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4) !important;
    cursor: pointer !important;
    z-index: 1000 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    font-size: 16px !important;
}

#toggleFiltersBtn:hover {
    background: #f4f4f4 !important;
}

#toggleFiltersBtn .filter-text {
    display: none !important;
}

#toggleFiltersBtn .filter-icon {
    font-size: 16px !important;
}


/* FINAL FIX - Toggle Button */
button#toggleFiltersBtn {
    position: fixed !important;
    top: 152px !important;
    right: 10px !important;
    width: 30px !important;
    height: 30px !important;
    background: white !important;
    border: 2px solid rgba(0, 0, 0, 0.2) !important;
    border-radius: 4px !important;
    padding: 0 !important;
    margin: 0 !important;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4) !important;
    cursor: pointer !important;
    z-index: 10000 !important;
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

button#toggleFiltersBtn:hover {
    background: #f4f4f4 !important;
}

button#toggleFiltersBtn span.filter-text {
    display: none !important;
}

button#toggleFiltersBtn span.filter-icon {
    display: block !important;
    font-size: 16px !important;
    line-height: 1 !important;
}


/* Filter Toggle Button - Leaflet Style Control */
.leaflet-control-filter {
    position: absolute;
    top: 90px;
    right: 10px;
    width: 30px;
    height: 30px;
    background: white;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    padding: 0;
    box-shadow: 0 1px 5px rgba(0, 0, 0, 0.4);
}

.leaflet-control-filter:hover {
    background: #f4f4f4;
}


/* Override button size to match Leaflet controls */
.leaflet-control-filter {
    width: 34px !important;
    height: 34px !important;
    font-size: 18px !important;
    line-height: 1 !important;
}


/* Filter Panel - Slides in from right */
#filterPanel {
    position: fixed;
    top: 400px;
    right: -400px;
    width: 380px;
    height: calc(100vh - 400px);
    background: white;
    border-left: 1px solid #e5e7eb;
    box-shadow: -4px 0 6px -1px rgba(0, 0, 0, 0.1);
    z-index: 1500;
    transition: right 0.3s ease;
    overflow-y: auto;
}

#filterPanel.open {
    right: 0;
}

.filter-content {
    padding: 0.5rem;
}

.filter-content h3 {
    margin: 0 0 0.4rem 0;
    color: #1f2937;
    font-size: 0.85rem;
    font-weight: 600;
}

.filter-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem;
}

.filter-group {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
}

.filter-group label {
    font-size: 0.7rem;
    font-weight: 500;
    color: #374151;
}

.filter-group select,
.filter-group input {
    padding: 0.25rem 0.4rem;
    border: 1px solid #d1d5db;
    border-radius: 3px;
    font-size: 0.75rem;
    background: white;
}

.filter-group select:focus,
.filter-group input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.filter-actions {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.4rem;
}

.filter-actions button {
    flex: 1;
    padding: 0.3rem 0.6rem;
    border: none;
    border-radius: 3px;
    font-size: 0.7rem;
    font-weight: 500;
    cursor: pointer;
}

.apply-btn {
    background: #3b82f6;
    color: white;
}

.apply-btn:hover {
    background: #1d4ed8;
}

.clear-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.clear-btn:hover {
    background: #e5e7eb;
}

.results-count {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #e5e7eb;
    color: #6b7280;
    font-size: 0.875rem;
}

/* Mobile responsive */
@media (max-width: 768px) {
    #filterPanel {
        right: -100vw !important;
        width: 100vw !important;
    }

    #filterPanel.open {
        right: 0 !important;
    }
}


/* Extra compact filter panel */
.filter-content {
    padding: 0.5rem !important;
}

.filter-content h3 {
    margin: 0 0 0.4rem 0 !important;
    font-size: 0.85rem !important;
}

.filter-row {
    gap: 0.35rem !important;
}

.filter-group {
    gap: 0.15rem !important;
}

.filter-group label {
    font-size: 0.7rem !important;
}

.filter-group select,
.filter-group input {
    padding: 0.25rem 0.4rem !important;
    font-size: 0.75rem !important;
}

.filter-actions {
    gap: 0.4rem !important;
    margin-top: 0.4rem !important;
}

.filter-actions button {
    padding: 0.3rem 0.6rem !important;
    font-size: 0.7rem !important;
}

.results-count {
    margin-top: 0.4rem !important;
    padding-top: 0.4rem !important;
    font-size: 0.7rem !important;
}

/ * Social Links SVG Icons */ .social-links {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    transition: color 0.2s ease;
}

.social-links a:hover {
    color: #3b82f6;
}

.social-links svg {
    width: 20px;
    height: 20px;
    fill: currentColor;
}


/* Cookie Consent Banner - Bottom Banner with Overlay */
.cookie-banner {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(5px);
    z-index: 99999;
    display: none;
}

.cookie-banner.show {
    display: block;
}

.cookie-content {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(135deg, #111827 0%, #1f2937 100%);
    color: white;
    padding: 1.5rem 2rem;
    box-shadow: 0 -4px 6px -1px rgba(0, 0, 0, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
}

.cookie-content p {
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #ffffff;
    flex: 1;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.cookie-btn {
    padding: 0.65rem 1.75rem;
    border: none;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    white-space: nowrap;
}

.cookie-btn.accept {
    background: #3b82f6;
    color: white;
}

.cookie-btn.accept:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.cookie-btn.decline {
    background: transparent;
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.cookie-btn.decline:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
}

/* Mobile responsive */
@media (max-width: 768px) {
    .cookie-content {
        flex-direction: column;
        padding: 1.25rem;
        text-align: center;
        gap: 1rem;
    }

    .cookie-content p {
        font-size: 0.85rem;
    }

    .cookie-actions {
        width: 100%;
    }

    .cookie-btn {
        flex: 1;
    }
}


/* Listing Type Styling */
.listing-type {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
}

/* Agent - Red Color */
.listing-type.agent {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    color: white;
}

/* Owner - Blue Color */
.listing-type.owner {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
}

/* Filt
er group row - two items side by side */
.filter-group-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
}