/* style.css - Unified Design System & Light Mode Premium Aesthetics for EC Home Realty */

:root {
    --primary: #101820; /* Pantone Black 6 C */
    --primary-light: #f1f5f9; /* Light Slate Gray */
    --accent: #BB8C3D; /* Dorado corporativo */
    --accent-hover: #E6C67A; /* Dorado suave */
    --accent-gold-corp: #BB8C3D; /* Dorado corporativo */
    --accent-gold-soft: #E6C67A; /* Dorado suave */
    --accent-gold-light: #F5DD9D; /* Dorado claro */
    --text-main: #101820; /* Pantone Black 6 C text */
    --text-muted: #8A8D8F; /* Pantone Cool Gray 7 C text */
    --bg-dark: #ffffff; /* Pantone White */
    --card-bg: #ffffff; /* Pantone White */
    --border-color: rgba(138, 141, 143, 0.3); /* Translucent Cool Gray 7 C */
    --success: #10b981;
    --font-display: 'Playfair Display', Georgia, serif;
    --font-body: 'Raleway', sans-serif;
    --transition: all 0.35s cubic-bezier(0.25, 0.8, 0.25, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    scrollbar-width: thin;
    scrollbar-color: var(--accent) #f1f5f9;
}

html {
    overflow-x: hidden;
    max-width: 100vw;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    position: relative;
    overflow-x: hidden;
    max-width: 100vw;
    line-height: 1.6;
}

/* Ambient Glow Background elements adjusted for light mode */
.ambient-glow-1 {
    position: absolute;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(187,140,61,0.06) 0%, rgba(0,0,0,0) 70%);
    top: -100px;
    right: -100px;
    z-index: -1;
    pointer-events: none;
}

.ambient-glow-2 {
    position: absolute;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(15,23,42,0.03) 0%, rgba(0,0,0,0) 75%);
    top: 400px;
    left: -200px;
    z-index: -1;
    pointer-events: none;
}

/* Premium Light Header / Navigation */
header {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 18px 6%;
    min-height: 80px;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    transition: var(--transition);
}

.logo {
    font-family: var(--font-display);
    font-weight: 800;
    font-size: 24px;
    letter-spacing: 1.5px;
    color: var(--text-main);
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    grid-column: 1;
    justify-self: start;
    position: relative;
    width: 135px;
    height: 32px;
}

.logo img {
    height: 58px !important;
    width: auto !important;
    border-radius: 0;
    border: none;
    box-shadow: none;
    object-fit: contain;
    background-color: transparent;
    position: static;
    transition: var(--transition);
}

.logo img:hover {
    opacity: 0.85;
}

/* Brand gradient utility */
.bg-gold-gradient {
    background: linear-gradient(135deg, var(--accent-gold-light) 0%, var(--accent-gold-soft) 50%, var(--accent-gold-corp) 100%);
}

.logo span {
    color: var(--accent);
}

.nav-links {
    grid-column: 2;
    display: flex;
    gap: 32px;
    align-items: center;
    list-style: none;
    justify-content: center;
}

.nav-links a {
    color: var(--text-main);
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.5px;
    transition: var(--transition);
    position: relative;
    padding: 6px 0;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a:hover::after {
    width: 100%;
}

/* Premium Language Switcher Pill Design */
.lang-switcher {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    background-color: #f1f5f9; /* Soft cool background */
    border: 1px solid rgba(16, 24, 32, 0.08);
    padding: 3px;
    border-radius: 30px;
    gap: 2px;
}

.lang-selector-btn {
    background: transparent;
    border: none;
    color: #8A8D8F; /* Pantone Cool Gray 7 C */
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    padding: 6px 14px;
    border-radius: 20px;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.lang-selector-btn:hover {
    color: #101820; /* Pantone Black 6 C */
}

.lang-selector-btn.active {
    background-color: #101820; /* Pantone Black 6 C active state */
    color: #ffffff; /* Contrast white text */
    box-shadow: 0 2px 8px rgba(16, 24, 32, 0.15);
}

.btn-portal {
    background-color: transparent;
    color: var(--accent);
    border: 1.5px solid var(--accent);
    padding: 8px 18px;
    border-radius: 6px;
    font-weight: 600;
    font-family: var(--font-display);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
}

.btn-portal:hover {
    background-color: var(--accent);
    color: #ffffff;
    box-shadow: 0 0 15px rgba(194, 155, 56, 0.4);
}

/* Page Layouts & Typography */
h1, h2, h3, h4 {
    font-family: var(--font-display);
    color: var(--text-main);
}

section {
    position: relative;
}

.section-padding {
    padding: 120px 4% 80px 4%;
}

/* Hero Section with Light Masking Over the High-Impact Background Image */
.hero {
    padding: 100px 4% 70px 4%;
    text-align: center;
    position: relative;
    min-height: 450px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    box-shadow: inset 0 0 100px rgba(0,0,0,0.1);
}

.badge-live {
    background: rgba(194, 155, 56, 0.15);
    border: 1.5px solid var(--accent);
    color: var(--accent);
    padding: 8px 18px;
    border-radius: 30px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.badge-live i {
    font-size: 8px;
    animation: blink 1.5s infinite;
    color: #ef4444;
}

.hero h1 {
    font-size: 64px;
    font-weight: 800;
    line-height: 1.15;
    max-width: 950px;
    margin-bottom: 20px;
    letter-spacing: -1.5px;
    color: #0E192D;
    text-shadow: 0 2px 10px rgba(255, 255, 255, 0.5);
}

.hero h1 span {
    color: #0E192D;
    background: none;
    -webkit-background-clip: initial;
    -webkit-text-fill-color: initial;
}

.hero p {
    color: #000000;
    font-size: 19px;
    max-width: 700px;
    margin-bottom: 48px;
    text-shadow: 0 1px 5px rgba(255, 255, 255, 0.5);
}

/* Action Tabs Container for User Intent */
.action-tabs-container {
    display: flex;
    gap: 8px;
    margin-bottom: -1px; /* Overlap with search container border */
    z-index: 2;
    position: relative;
    max-width: 1000px;
    width: 100%;
    padding: 0 32px;
}

.action-tab {
    background: rgba(16, 24, 32, 0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(16, 24, 32, 0.1);
    border-bottom: none;
    padding: 12px 24px;
    border-top-left-radius: 12px;
    border-top-right-radius: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13.5px;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 -4px 10px rgba(0, 0, 0, 0.02);
}

.action-tab:hover {
    background: rgba(16, 24, 32, 0.1);
    color: var(--text-main);
    transform: translateY(-2px);
}

.action-tab.active {
    background: #101820; /* Pantone Black 6 C */
    color: #ffffff;
    border: 1px solid #101820;
    border-top: 3px solid #c29b38; /* Gold Accent */
    border-bottom: none;
    padding-top: 10px; /* Offset top border thickness */
    padding-bottom: 15px; /* Overlap border */
    box-shadow: 0 -4px 15px rgba(16, 24, 32, 0.15);
}

.action-tab i {
    font-size: 14px;
    color: var(--text-muted);
}

.action-tab.active i {
    color: #c29b38; /* Gold Accent Icon */
}


/* Unified Luxury Search Bar */
.search-container {
    width: 100%;
    max-width: 1000px;
    background: #ffffff;
    border: 1px solid rgba(138, 141, 143, 0.3);
    border-radius: 60px; /* Fully pill-shaped on desktop */
    padding: 8px 8px 8px 32px;
    box-shadow: 0 15px 35px rgba(16, 24, 32, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0;
    text-align: left;
    margin-bottom: 40px;
    transition: var(--transition);
}

.search-container.tab-panel {
    border-top-left-radius: 0;
}

.hero-search-pill {
    max-width: 700px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    border-radius: 50px;
    background: white;
    padding: 6px 16px 6px 28px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    border: 1px solid rgba(138, 141, 143, 0.3);
    display: flex;
    align-items: center;
    justify-content: space-between;
}


.search-field {
    display: flex;
    flex-direction: column;
    flex: 1;
    position: relative;
    padding-right: 20px;
    padding-left: 20px;
}

.search-field:first-of-type {
    padding-left: 0;
}

/* Vertical dividers */
.search-field:not(:last-of-type) {
    border-right: 1px solid rgba(16, 24, 32, 0.08);
}

.search-field label {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: #8A8D8F; /* Pantone Cool Gray 7 C */
    margin-bottom: 2px;
}

.search-field select, .search-field input {
    background-color: transparent;
    border: none;
    color: #101820; /* Pantone Black 6 C */
    padding: 0;
    outline: none;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    width: 100%;
    height: 32px;
    cursor: pointer;
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Add custom down arrow caret to select elements */
.search-field select {
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238A8D8F' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 0 center;
    background-size: 14px;
    padding-right: 20px;
}

.search-field select:focus, .search-field input:focus {
    color: #101820;
}

.btn-search {
    background-color: #101820; /* Pantone Black 6 C */
    color: #ffffff;
    border: none;
    height: 54px;
    padding: 0 36px;
    border-radius: 40px; /* Pill button */
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-left: 10px;
}

.btn-search:hover {
    background-color: #8A8D8F; /* Pantone Cool Gray 7 C hover */
    box-shadow: 0 4px 15px rgba(16, 24, 32, 0.15);
}



/* Responsive adjust for mobile */
@media (max-width: 900px) {
    .action-tabs-container {
        padding: 0 16px;
        gap: 4px;
    }

    .action-tab {
        padding: 8px 12px;
        font-size: 11.5px;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
    }

    .action-tab i {
        font-size: 12px;
    }

    .search-container {
        flex-direction: column;
        border-radius: 20px;
        padding: 20px;
        gap: 15px;
        align-items: stretch;
    }
    
    .search-container.tab-panel {
        border-top-left-radius: 20px !important;
    }
    
    .search-field {
        padding: 0;
        border-right: none !important;
        border-bottom: 1px solid rgba(16, 24, 32, 0.08);
        padding-bottom: 10px;
    }
    
    .btn-search {
        margin-left: 0;
        border-radius: 30px;
        width: 100%;
        height: 48px;
        justify-content: center;
    }
}

/* Properties Showcase */
.properties-section {
    padding: 80px 4% 100px 4%;
    max-width: 1400px;
    margin: 0 auto;
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 40px;
    border-left: 4px solid var(--accent);
    padding-left: 16px;
}

.section-header h2 {
    font-size: 36px;
    font-weight: 800;
}

.section-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.properties-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 32px;
}

/* Property Card in Light Mode */
.property-card {
    background-color: var(--card-bg);
    border: 1px solid rgba(0, 0, 0, 0.06);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
    display: flex;
    flex-direction: column;
    position: relative;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(10, 25, 47, 0.03);
}

.property-card:hover {
    transform: translateY(-8px);
    border-color: var(--accent);
    box-shadow: 0 20px 40px rgba(194, 155, 56, 0.12);
}

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

.card-img {
    height: 240px;
    overflow: hidden;
    position: relative;
    background-color: #f1f5f9;
}

.card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: var(--transition);
}

.card-tag {
    position: absolute;
    top: 16px;
    left: 16px;
    background-color: var(--accent);
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11px;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 4px;
    letter-spacing: 0.5px;
    z-index: 10;
}

.card-tag.closed {
    background-color: #6b7280;
}

.card-tag.pending {
    background-color: #f59e0b;
}

.btn-favorite {
    position: absolute;
    top: 16px;
    right: 16px;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(0, 0, 0, 0.08);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
    z-index: 100;
}

.btn-favorite:hover {
    transform: scale(1.1);
    background: #ffffff;
    border-color: #e63946;
    color: #e63946;
}

.btn-favorite.active {
    background: #ffffff;
    border-color: #e63946;
}

.card-price-tag {
    position: absolute;
    bottom: 16px;
    right: 16px;
    background-color: var(--primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 16px;
    padding: 6px 14px;
    border-radius: 6px;
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
}

.card-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.card-title {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--text-main);
}

.card-location {
    color: var(--text-muted);
    font-size: 13px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.card-location i {
    color: var(--accent);
}

.card-features {
    display: flex;
    justify-content: space-between;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding-top: 16px;
    margin-top: auto;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13.5px;
    color: var(--text-muted);
}

.feature-item i {
    color: var(--accent);
}

/* Modals */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(10, 25, 47, 0.7);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 20px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.modal-content {
    background-color: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 16px;
    max-width: 1000px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    animation: modal-open 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 25px 50px rgba(10, 25, 47, 0.2);
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0,0,0,0.06);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
    z-index: 100;
}

.modal-close:hover {
    background-color: var(--accent);
    color: #ffffff;
    border-color: var(--accent);
}

#modal-btn-favorite {
    position: static;
    background-color: #f1f5f9;
    border: 1.5px solid rgba(16, 24, 32, 0.08);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 30px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

#modal-btn-share {
    position: static;
    background-color: #f1f5f9;
    border: 1.5px solid rgba(16, 24, 32, 0.08);
    color: var(--text-main);
    padding: 10px 20px;
    border-radius: 30px;
    font-family: var(--font-display);
    font-size: 14px;
    font-weight: 600;
    width: auto;
    height: auto;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
    cursor: pointer;
}

#modal-btn-share:hover {
    transform: translateY(-2px);
    background-color: #ffffff;
    border-color: var(--primary);
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(16, 24, 32, 0.12);
}

#modal-btn-favorite:hover {
    transform: translateY(-2px);
    background-color: #ffffff;
    border-color: #e63946;
    color: #e63946;
    box-shadow: 0 4px 12px rgba(230, 57, 70, 0.15);
}

#modal-btn-favorite.active {
    background-color: #ffffff;
    border-color: #e63946;
    color: #e63946;
}

/* El modal premium usa la clase .premium-body (grid de 2 columnas). Se eliminó .modal-body para evitar peso muerto. */
.modal-info h2 {
    font-size: 28px;
    font-weight: 800;
    margin-bottom: 8px;
}

.modal-price {
    font-size: 32px;
    font-weight: 800;
    color: var(--accent);
    margin-bottom: 24px;
}

.modal-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    background-color: #f1f5f9;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 30px;
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.modal-desc-title {
    font-weight: 700;
    font-size: 16px;
    margin-bottom: 12px;
    color: var(--accent);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.modal-desc {
    color: var(--text-muted);
    font-size: 14.5px;
    line-height: 1.7;
}

/* Forms & Capture Box */
.lead-form-box {
    background: #ffffff;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    padding: 30px;
    height: fit-content;
    box-shadow: 0 15px 30px rgba(10, 25, 47, 0.06);
}

.lead-form-box h3 {
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 8px;
}

.lead-form-box p {
    color: var(--text-muted);
    font-size: 13.5px;
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 16px;
    text-align: left;
}

.form-group label {
    display: block;
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--accent);
    margin-bottom: 6px;
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    background-color: #ffffff;
    border: 1.5px solid rgba(0, 0, 0, 0.1);
    color: var(--text-main);
    padding: 12px;
    border-radius: 6px;
    outline: none;
    font-family: var(--font-body);
    font-size: 14px;
    transition: var(--transition);
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 10px rgba(194, 155, 56, 0.2);
}

.btn-submit {
    width: 100%;
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    padding: 14px;
    border-radius: 6px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
}

.btn-submit:hover {
    background-color: var(--accent-hover);
    box-shadow: 0 0 15px rgba(194, 155, 56, 0.4);
}

.btn-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 20px 0;
    animation: fade-in 0.5s ease;
}

.form-success i {
    color: var(--success);
    font-size: 48px;
    margin-bottom: 16px;
}

/* Pagination Controls */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-top: 48px;
    padding-top: 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    flex-wrap: wrap;
}

.pagination-btn {
    background: transparent;
    border: 1.5px solid var(--text-main);
    color: var(--text-main);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--text-main);
    color: #fff;
}

.pagination-btn:disabled {
    opacity: 0.3;
    cursor: not-allowed;
    border-color: rgba(0,0,0,0.15);
    color: var(--text-muted);
}

.pagination-pages {
    display: flex;
    align-items: center;
    gap: 4px;
}

.page-num {
    min-width: 38px;
    height: 38px;
    border: 1.5px solid transparent;
    background: transparent;
    color: var(--text-main);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 13px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
}

.page-num:hover {
    border-color: var(--text-muted);
    background: #f1f5f9;
}

.page-num.active {
    background: var(--text-main);
    color: #fff;
    border-color: var(--text-main);
}

.page-ellipsis {
    padding: 0 6px;
    color: var(--text-muted);
    font-size: 13px;
}

/* Skeletons */
.skeleton {
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

/* Footer */
footer {
    background-color: #ffffff;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    padding: 60px 4% 30px 4%;
    text-align: center;
    color: var(--text-muted);
    font-size: 13.5px;
    margin-top: 80px;
}

.footer-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    color: var(--text-main);
    margin-bottom: 16px;
}

.footer-logo span {
    color: var(--accent);
}

/* Animations */
@keyframes pulse-border {
    0% { box-shadow: 0 0 0 0 rgba(194, 155, 56, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(194, 155, 56, 0); }
    100% { box-shadow: 0 0 0 0 rgba(194, 155, 56, 0); }
}

@keyframes blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

@keyframes loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes modal-open {
    from { transform: scale(0.95); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

@keyframes fade-in {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsive */
@media (max-width: 900px) {
    header {
        padding: 8px 16px;
        grid-template-columns: auto 1fr;
    }
    header .logo img {
        height: 36px !important;
    }
    .header-right {
        grid-column: 2;
        gap: 8px !important;
    }
    .user-name {
        display: none !important; /* Hide user name to prevent horizontal overflow */
    }
    .btn-profile-toggle {
        padding: 4px 8px !important;
        gap: 2px !important;
    }
    .lang-switcher {
        padding: 2px;
    }
    .lang-selector-btn {
        padding: 4px 10px;
        font-size: 11px;
    }
    .hero h1 { font-size: 38px; }
    .search-container {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    .nav-links {
        display: none; /* simple mobile fallback, or hidden for simplicity */
    }
}

/* Premium Login Modal Overlay with Glassmorphism */
.login-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(16, 24, 32, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 3000;
    animation: fade-in 0.3s ease;
}

.login-card {
    background: #ffffff;
    border: 1px solid rgba(138, 141, 143, 0.2);
    border-radius: 16px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    text-align: center;
    box-shadow: 0 20px 40px rgba(16, 24, 32, 0.15);
    animation: modal-open 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
}

.login-card-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: none;
    border: none;
    font-size: 20px;
    cursor: pointer;
    color: var(--text-muted);
    transition: var(--transition);
}

.login-card-close:hover {
    color: var(--text-main);
}

.login-card h3 {
    font-size: 22px;
    font-weight: 800;
    margin-bottom: 8px;
    color: #101820;
}

.login-card p {
    font-size: 13.5px;
    color: var(--text-muted);
    margin-bottom: 28px;
    line-height: 1.5;
}

.login-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    width: 100%;
    padding: 12px 20px;
    border-radius: 8px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: 14px;
}

.login-btn-google {
    background-color: #ffffff;
    border: 1.5px solid rgba(16, 24, 32, 0.15);
    color: #101820;
}

.login-btn-google:hover {
    background-color: #f8fafc;
    border-color: #101820;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}

/* User Profile Nav dropdown and generic styling */
.user-profile-dropdown {
    position: relative;
    display: inline-block;
}

.user-profile-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: #ffffff;
    border: 1px solid rgba(16, 24, 32, 0.08);
    border-radius: 8px;
    min-width: 140px;
    box-shadow: 0 10px 25px rgba(16, 24, 32, 0.08);
    display: none;
    z-index: 1001;
    overflow: hidden;
}

.user-profile-menu.show {
    display: block;
    animation: fade-in 0.2s ease;
}

.user-profile-menu-item {
    padding: 10px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: var(--transition);
    width: 100%;
    text-align: left;
    background: none;
    border: none;
}

.user-profile-menu-item:hover {
    background-color: #f1f5f9;
    color: var(--accent);
}

.nav-signin-link {
    background-color: var(--text-main);
    color: #ffffff !important;
    border: none;
    padding: 8px 22px;
    border-radius: 20px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13.5px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.nav-signin-link:hover {
    background-color: var(--accent);
    color: #ffffff !important;
    box-shadow: 0 4px 15px rgba(194, 155, 56, 0.35);
}

.header-right {
    grid-column: 3;
    justify-self: end;
    display: flex;
    align-items: center;
    gap: 20px;
}

/* ============================================================
   PREMIUM MODAL ZILLOW-STYLE DESIGN SYSTEM (LUCKY REDESIGN)
   ============================================================ */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(15, 23, 42, 0.4);
    z-index: 2000;
    display: none;
    justify-content: center;
    align-items: center;
    padding: 24px;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    transition: var(--transition);
}

.modal-content {
    background-color: #ffffff;
    border: 1px solid rgba(16, 24, 32, 0.08);
    border-radius: 24px;
    max-width: 1160px;
    width: 100%;
    max-height: 92vh;
    overflow-y: auto;
    position: relative;
    animation: modal-open 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 30px 60px -15px rgba(15, 23, 42, 0.22);
}

.modal-close {
    position: absolute;
    top: 24px;
    right: 24px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(16, 24, 32, 0.08);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: var(--transition);
    color: var(--text-main);
    z-index: 100;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.06);
}

.modal-close:hover {
    background-color: #101820;
    color: #ffffff;
    transform: scale(1.05);
}

.modal-premium-showcase {
    position: relative;
    background-color: #f8fafc;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    overflow: hidden;
}

/* When in lightbox mode, the showcase shows lb-container which needs a fixed height */
.modal-premium-showcase:has(.lb-container) {
    height: 520px;
}

#modal-showcase-viewport {
    width: 100%;
    height: 100%;
}

.premium-photo-grid {
    display: grid;
    grid-template-columns: 1.3fr 0.7fr;
    height: 520px;
    gap: 12px;
    padding: 12px;
}

.premium-photo-grid.single-photo {
    display: block;
    height: 440px;
}

.premium-photo-grid.single-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.grid-main-photo {
    height: 100%;
    overflow: hidden;
    border-radius: 16px 0 0 16px;
    box-shadow: inset 0 0 40px rgba(0,0,0,0.05);
}

.grid-main-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.grid-sub-photos {
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 12px;
    height: 100%;
    position: relative;
}

.sub-photo-wrapper {
    height: 100%;
    overflow: hidden;
}

.sub-photo-wrapper:nth-child(1) {
    border-top-left-radius: 0px;
}
.sub-photo-wrapper:nth-child(2) {
    border-top-right-radius: 16px;
}
.sub-photo-wrapper:nth-child(3) {
    border-bottom-left-radius: 0px;
}
.sub-photo-wrapper:nth-child(4) {
    border-bottom-right-radius: 16px;
}

.grid-gallery-photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    cursor: pointer;
    transition: all 0.6s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.grid-gallery-photo:hover, .grid-main-photo img:hover {
    transform: scale(1.04);
    filter: brightness(0.92);
}

.photo-grid-overlay-btn {
    position: absolute;
    bottom: 20px;
    right: 20px;
    background-color: rgba(16, 24, 32, 0.9);
    color: #ffffff;
    padding: 12px 22px;
    border-radius: 30px;
    font-size: 13px;
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    backdrop-filter: blur(8px);
    z-index: 30;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
    transition: var(--transition);
    border: none;
    letter-spacing: 0.5px;
    text-decoration: none;
}

.photo-grid-overlay-btn:hover {
    background-color: #c29b38;
    transform: translateY(-2px);
}

/* Media tabs inside showcase */
.modal-media-tabs {
    position: absolute;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(16, 24, 32, 0.06);
    padding: 6px;
    border-radius: 40px;
    box-shadow: 0 12px 30px rgba(15, 23, 42, 0.12);
    backdrop-filter: blur(12px);
    z-index: 20;
}

.media-tab {
    background: transparent;
    border: none;
    padding: 10px 22px;
    border-radius: 30px;
    font-family: var(--font-display);
    font-size: 12.5px;
    font-weight: 700;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    gap: 8px;
    letter-spacing: 0.2px;
}

.media-tab.active {
    background-color: #101820;
    color: #ffffff;
    box-shadow: 0 4px 10px rgba(16, 24, 32, 0.15);
}

.media-tab:hover:not(.active) {
    color: #101820;
    background-color: rgba(16, 24, 32, 0.04);
}

/* Premium Body Layout */
.premium-body {
    display: grid;
    grid-template-columns: 1.62fr 1.38fr;
    align-items: start;
    padding: 48px;
    gap: 48px;
}

/* Left Info Column */
.modal-info-column {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.modal-title-row h2 {
    font-size: 34px;
    font-weight: 800;
    line-height: 1.22;
    letter-spacing: -0.5px;
    margin-bottom: 8px;
    color: #101820;
}

.card-location {
    font-size: 14.5px;
    color: var(--text-muted);
    margin-bottom: 24px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-price-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 36px;
    padding-bottom: 24px;
    border-bottom: 1.5px solid rgba(16, 24, 32, 0.06);
}

.modal-price-row .modal-price {
    font-size: 40px;
    font-weight: 800;
    color: #101820;
    letter-spacing: -1px;
}

#modal-btn-favorite {
    position: static;
    background-color: #f8fafc;
    border: 1px solid rgba(16, 24, 32, 0.08);
    color: var(--text-main);
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

#modal-btn-favorite:hover {
    transform: translateY(-2px);
    background-color: #ffffff;
    border-color: #e63946;
    color: #e63946;
    box-shadow: 0 6px 15px rgba(230, 57, 70, 0.12);
}

#modal-btn-favorite.active {
    background-color: #ffffff;
    border-color: #e63946;
    color: #e63946;
}

/* Premium Specs Grid */
/* Premium Top Tags */
.modal-top-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 20px;
}

.property-tag {
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    padding: 6px 14px;
    border-radius: 20px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.tag-status {
    background-color: rgba(16, 185, 129, 0.08); /* Translucent Emerald Green */
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.tag-status i {
    font-size: 6px;
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0% { transform: scale(0.9); opacity: 0.6; }
    50% { transform: scale(1.25); opacity: 1; }
    100% { transform: scale(0.9); opacity: 0.6; }
}

.tag-type {
    background-color: #f1f5f9;
    color: #475569;
    border: 1px solid rgba(138, 141, 143, 0.15);
}

.tag-mls {
    background-color: #f1f5f9;
    color: #8a8d8f;
    border: 1px solid rgba(138, 141, 143, 0.15);
}

/* Premium Specs Grid */
.modal-details-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f8fafc 100%);
    padding: 28px;
    border-radius: 24px;
    margin-bottom: 40px;
    border: 1px solid rgba(16, 24, 32, 0.05);
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.02);
}

.modal-details-grid .feature-item {
    display: flex;
    align-items: center;
    gap: 16px;
    font-size: 14px;
    color: var(--text-main);
    transition: var(--transition);
}

.modal-details-grid .feature-item:hover {
    transform: translateY(-2px);
}

.feature-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background-color: rgba(194, 155, 56, 0.08); /* Soft gold tint */
    border: 1px solid rgba(194, 155, 56, 0.15);
    display: flex;
    justify-content: center;
    align-items: center;
    transition: var(--transition);
    flex-shrink: 0;
}

.modal-details-grid .feature-item:hover .feature-icon-wrapper {
    background-color: #c29b38;
    color: #ffffff;
    box-shadow: 0 6px 15px rgba(194, 155, 56, 0.25);
}

.modal-details-grid .feature-item i {
    font-size: 18px;
    color: #c29b38;
    transition: var(--transition);
}

.modal-details-grid .feature-item:hover .feature-icon-wrapper i {
    color: #ffffff;
}

.modal-details-grid .feature-item strong {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--text-muted);
    display: block;
    margin-bottom: 2px;
}

.modal-details-grid .feature-item span {
    font-size: 16px;
    font-weight: 700;
}

.modal-details-grid .feature-item > div:last-child {
    min-width: 0;
    word-break: break-word;
    overflow-wrap: break-word;
}

/* Description & Translation */
.description-section {
    margin-bottom: 40px;
    max-width: 680px; /* Line length optimization for maximum readability */
}

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

.description-header h3 {
    font-size: 16px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1.5px;
    color: #101820;
}

.btn-translate-premium {
    background: none;
    border: 1px solid rgba(16, 24, 32, 0.08);
    color: #101820;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 11.5px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 16px;
    border-radius: 20px;
    transition: var(--transition);
}

.btn-translate-premium:hover {
    background-color: #f1f5f9;
    border-color: #101820;
    transform: translateY(-1px);
}

.modal-desc-para {
    color: #475569;
    font-size: 15px;
    line-height: 1.85; /* Comfortable reading line-height */
    font-weight: 500;
    letter-spacing: 0.15px;
    margin-bottom: 24px;
}

.lead-sentence {
    font-size: 16px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.8;
}

/* Premium Accordions */
.premium-accordion-section {
    margin-top: 40px;
    border-top: 1.5px solid rgba(16, 24, 32, 0.06);
}

.premium-accordion {
    border-bottom: 1.5px solid rgba(16, 24, 32, 0.06);
}

.accordion-trigger {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    padding: 24px 0;
    font-family: var(--font-display);
    font-size: 15px;
    font-weight: 700;
    color: #101820;
    cursor: pointer;
    text-align: left;
    transition: var(--transition);
}

.accordion-trigger:hover {
    color: #c29b38;
}

.accordion-trigger i {
    transition: transform 0.3s ease;
    color: var(--text-muted);
}

.accordion-trigger.active i {
    transform: rotate(180deg);
    color: #101820;
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

/* Compliance Box */
.broker-compliance-box {
    margin-top: 48px;
    background-color: #f8fafc;
    border-radius: 12px;
    padding: 24px;
    border: 1px solid rgba(16, 24, 32, 0.04);
}

.broker-attribution {
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 400;
    color: #101820;
    display: block;
    margin-bottom: 8px;
}

.broker-attribution-mls {
    margin-top: 8px;
    font-size: 13px;
    color: #555;
    line-height: 1.5;
}

.broker-attribution-mls .broker-attribution {
    font-weight: 400;
    font-size: 13px;
    color: #555;
    margin-bottom: 0;
}

.mls-disclaimer {
    font-size: 11px;
    color: var(--text-muted);
    line-height: 1.6;
}

/* Right Sticky Contact Sidebar */
.modal-contact-column {
    position: sticky;
    top: 36px;
}

.sticky-contact-card {
    background-color: #ffffff;
    border: 1px solid rgba(16, 24, 32, 0.08);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(15, 23, 42, 0.05);
    overflow: hidden;
}

.agent-profile-box {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 28px;
    background-color: #f8fafc;
    border-bottom: 1px solid rgba(16, 24, 32, 0.06);
}

.agent-avatar {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.agent-meta h4 {
    font-size: 17px;
    font-weight: 700;
    color: #101820;
    margin-bottom: 3px;
}

.agent-company {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 10px;
}

.agent-contact-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.contact-pill {
    background-color: #ffffff;
    border: 1px solid rgba(16, 24, 32, 0.08);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-decoration: none;
    color: #101820;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    transition: var(--transition);
}

.contact-pill:hover {
    background-color: #101820;
    color: #ffffff;
    border-color: #101820;
}

.lead-form-box.borderless {
    border: none;
    box-shadow: none;
    padding: 28px;
}

.lead-form-box.borderless h3 {
    font-size: 19px;
    font-weight: 700;
    margin-bottom: 16px;
    color: #101820;
}

/* Modal iframe container for Tours & Maps */
.modal-iframe-container {
    width: 100%;
    height: 520px;
    background-color: #e2e8f0;
}

.modal-iframe-container iframe {
    width: 100%;
    height: 100%;
    border: none;
}

/* Responsive improvements for modal details */
@media (max-width: 900px) {
    .premium-body {
        grid-template-columns: 1fr;
        padding: 24px;
        gap: 32px;
    }
    
    .premium-photo-grid {
        grid-template-columns: 1fr;
        height: 320px;
        padding: 6px;
    }
    
    .grid-sub-photos {
        display: none;
    }
    
    .grid-main-photo {
        border-radius: 12px;
    }
    
    .modal-media-tabs {
        bottom: 16px;
        width: 92%;
        justify-content: center;
    }
    
    .media-tab {
        padding: 8px 14px;
        font-size: 11.5px;
    }

    .modal-contact-column {
        position: static;
    }
}

/* Premium Lead Capture Form Styles */
.lead-form-generic {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.lead-form-generic .form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.lead-form-generic label {
    font-family: var(--font-display);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: #475569;
}

.lead-form-generic input,
.lead-form-generic textarea {
    width: 100%;
    padding: 14px 18px;
    border: 1.5px solid rgba(16, 24, 32, 0.08);
    background-color: #f8fafc;
    border-radius: 12px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: #101820;
    transition: var(--transition);
}

.lead-form-generic input::placeholder,
.lead-form-generic textarea::placeholder {
    color: #94a3b8;
}

.lead-form-generic input:focus,
.lead-form-generic textarea:focus {
    outline: none;
    border-color: #c29b38; /* Gold Accent */
    background-color: #ffffff;
    box-shadow: 0 0 0 4px rgba(194, 155, 56, 0.12);
}

.lead-form-generic .btn-submit {
    background-color: #101820;
    color: #ffffff;
    font-family: var(--font-display);
    font-size: 13.5px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    padding: 16px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    transition: var(--transition);
    margin-top: 10px;
    box-shadow: 0 4px 12px rgba(16, 24, 32, 0.15);
}

.lead-form-generic .btn-submit:hover:not(:disabled) {
    background-color: #c29b38; /* Gold Hover */
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(194, 155, 56, 0.3);
}

.lead-form-generic .btn-submit:active {
    transform: translateY(0);
}

.lead-form-generic .btn-submit:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Form Success State Screen */
.form-success {
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 40px 20px;
}

.form-success i {
    font-size: 48px;
    color: #10b981;
    margin-bottom: 20px;
    animation: scale-up 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes scale-up {
    0% { transform: scale(0.5); opacity: 0; }
    100% { transform: scale(1); opacity: 1; }
}

.form-success h4 {
    font-size: 18px;
    font-weight: 700;
    color: #101820;
    margin-bottom: 8px;
}

.form-success p {
    font-size: 13.5px;
    color: #64748b;
    line-height: 1.6;
}

/* Custom Text Selection for Luxury Feeling */
.modal-content ::selection {
    background-color: rgba(194, 155, 56, 0.2);
    color: #101820;
}

/* Modal Open Animation Refined */
@keyframes modal-open {
    0% {
        opacity: 0;
        transform: translateY(24px) scale(0.98);
    }
    100% {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* Gallery of all photos (horizontal scroll) */
.modal-all-photos-gallery {
    display: flex;
    flex-direction: row;
    gap: 12px;
    width: 100%;
    height: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
    padding: 10px;
    background-color: #101820; /* Dark premium background */
}

/* Hide scrollbar for Chrome, Safari and Opera */
.modal-all-photos-gallery::-webkit-scrollbar {
    height: 8px;
}
.modal-all-photos-gallery::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
}
.modal-all-photos-gallery::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}
.modal-all-photos-gallery::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.4);
}

.gallery-photo-item {
    flex: 0 0 auto;
    width: auto;
    height: 100%;
    scroll-snap-align: center;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

/* ─── Premium Lightbox Gallery ─────────────────────────────────────────────── */

.lb-container {
    display: flex;
    flex-direction: column;
    width: 100%;
    height: 100%;
    background-color: #0d141c;
    overflow: hidden;
}

/* Header: back btn + counter */
.lb-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 20px;
    background: rgba(0, 0, 0, 0.35);
    backdrop-filter: blur(10px);
    flex-shrink: 0;
    z-index: 10;
}

.lb-back-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 12px;
    font-family: var(--font-display);
    font-weight: 700;
    cursor: pointer;
    letter-spacing: 0.5px;
    transition: var(--transition);
    white-space: nowrap;
}

.lb-back-btn:hover {
    background: #c29b38;
    border-color: #c29b38;
}

.lb-counter {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
}

/* Main photo area */
.lb-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    min-height: 0;
}

.lb-img-wrap {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 12px 72px;
}

.lb-main-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 8px;
    display: block;
    transition: opacity 0.15s ease;
}

.lb-main-img.lb-fade {
    opacity: 0;
}

/* Arrow buttons */
.lb-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    border: 1.5px solid rgba(255, 255, 255, 0.25);
    color: #ffffff;
    font-size: 16px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    backdrop-filter: blur(8px);
    z-index: 5;
}

.lb-arrow:hover {
    background: #c29b38;
    border-color: #c29b38;
    transform: translateY(-50%) scale(1.08);
}

.lb-prev { left: 16px; }
.lb-next { right: 16px; }

/* Thumbnails strip */
.lb-thumbs {
    display: flex;
    flex-direction: row;
    gap: 6px;
    padding: 10px 16px;
    overflow-x: auto;
    overflow-y: hidden;
    background: rgba(0, 0, 0, 0.4);
    flex-shrink: 0;
    scroll-snap-type: x mandatory;
    scroll-behavior: smooth;
}

.lb-thumbs::-webkit-scrollbar { height: 4px; }
.lb-thumbs::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }
.lb-thumbs::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 2px; }

.lb-thumb {
    flex: 0 0 auto;
    width: 72px;
    height: 52px;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    opacity: 0.55;
    border: 2px solid transparent;
    transition: opacity 0.2s, border-color 0.2s, transform 0.2s;
    scroll-snap-align: start;
}

.lb-thumb:hover {
    opacity: 0.85;
    transform: scale(1.05);
}

.lb-thumb.active {
    opacity: 1;
    border-color: #c29b38;
    transform: scale(1.05);
}

.lb-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mobile adjustments */
@media (max-width: 900px) {
    .lb-img-wrap {
        padding: 8px 56px;
    }
    .lb-arrow {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
    .lb-prev { left: 8px; }
    .lb-next { right: 8px; }
    .lb-thumb {
        width: 56px;
        height: 40px;
    }
}

/* ══════════════════════════════════════════════════════════════
   MOBILE-FIRST REDESIGN — Hamburger, Drawer, Bottom Tab Bar,
   Infinite Scroll, Touch Targets, Responsive Overrides
   ══════════════════════════════════════════════════════════════ */

/* ─── Hamburger Button ─── */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 8px;
    z-index: 1100;
    position: relative;
}

.hamburger span {
    display: block;
    width: 24px;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 2px;
    transition: var(--transition);
    transform-origin: center;
}

.hamburger.active span:nth-child(1) {
    transform: translateY(7.5px) rotate(45deg);
}
.hamburger.active span:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}
.hamburger.active span:nth-child(3) {
    transform: translateY(-7.5px) rotate(-45deg);
}

/* ─── Drawer Overlay ─── */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 25, 47, 0.5);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 2000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.35s ease, visibility 0.35s ease;
}

.drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}

/* ─── Drawer Panel ─── */
.drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: 300px;
    max-width: 80vw;
    height: 100%;
    background: #ffffff;
    z-index: 2100;
    transform: translateX(-100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 0 40px rgba(10, 25, 47, 0.15);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
}

.drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 20px 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.drawer-logo {
    font-family: var(--font-display);
    font-size: 20px;
    font-weight: 800;
    letter-spacing: 1px;
    color: var(--text-main);
}

.drawer-logo span {
    color: var(--accent);
}

.drawer-close {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #f1f5f9;
    border: none;
    font-size: 22px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-main);
    transition: var(--transition);
}

.drawer-close:hover {
    background: var(--accent);
    color: #ffffff;
}

.drawer-links {
    list-style: none;
    padding: 12px 0;
    flex: 1;
}

.drawer-links li a {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 16px 24px;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-main);
    text-decoration: none;
    transition: var(--transition);
    min-height: 52px;
}

.drawer-links li a i {
    width: 22px;
    text-align: center;
    font-size: 17px;
    color: var(--text-muted);
    transition: var(--transition);
}

.drawer-links li a:hover {
    background: #f1f5f9;
    color: var(--accent);
}

.drawer-links li a:hover i {
    color: var(--accent);
}

.drawer-auth {
    padding: 20px 24px 32px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.btn-drawer-signin {
    width: 100%;
    padding: 14px;
    background: var(--text-main);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    min-height: 48px;
}

.btn-drawer-signin:hover {
    background: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(16, 24, 32, 0.15);
}

/* ─── Bottom Tab Bar ─── */
.bottom-tab-bar {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.96);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-top: 1px solid rgba(0, 0, 0, 0.06);
    z-index: 1500;
    padding: 4px 0;
    padding-bottom: max(4px, env(safe-area-inset-bottom));
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
}

.bottom-tab-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    padding: 6px 12px;
    min-width: 56px;
    min-height: 48px;
    background: transparent;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    font-family: var(--font-display);
    font-size: 10px;
    font-weight: 600;
    transition: var(--transition);
    text-decoration: none;
    letter-spacing: 0.3px;
    position: relative;
}

.bottom-tab-item i {
    font-size: 20px;
    transition: var(--transition);
}

.bottom-tab-item span {
    font-size: 9.5px;
    line-height: 1;
}

.bottom-tab-item:hover {
    color: var(--text-main);
}

.bottom-tab-item:active {
    transform: scale(0.92);
}

.bottom-tab-item.active {
    color: var(--text-main);
}

.bottom-tab-item.active::after {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 24px;
    height: 2.5px;
    background: var(--text-main);
    border-radius: 0 0 3px 3px;
}

/* ─── Infinite Scroll ─── */
.infinite-scroll-sentinel {
    width: 100%;
    height: 1px;
    visibility: hidden;
    pointer-events: none;
}

.mobile-loader {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    padding: 32px 16px;
}

.mobile-loader.show {
    display: flex;
}

.mobile-loader-dots {
    display: flex;
    gap: 8px;
}

.mobile-loader-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--text-muted);
    animation: loader-bounce 1.2s ease-in-out infinite;
}

.mobile-loader-dot:nth-child(2) {
    animation-delay: 0.2s;
}
.mobile-loader-dot:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loader-bounce {
    0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
    40% { transform: scale(1); opacity: 1; }
}

.mobile-loader-text {
    font-size: 12px;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 0.5px;
}

/* ─── Skeleton Loader for Infinite Scroll ─── */
.mobile-skeleton-item {
    display: none;
    flex-direction: column;
    gap: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.mobile-skeleton-item.show {
    display: flex;
}

.mobile-skeleton-img {
    width: 100%;
    height: 200px;
    border-radius: 12px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.mobile-skeleton-line {
    height: 14px;
    border-radius: 4px;
    background: linear-gradient(90deg, #f1f5f9 25%, #e2e8f0 50%, #f1f5f9 75%);
    background-size: 200% 100%;
    animation: loading 1.5s infinite;
}

.mobile-skeleton-line:nth-child(2) { width: 75%; }
.mobile-skeleton-line:nth-child(3) { width: 50%; }
.mobile-skeleton-line:nth-child(4) { width: 60%; }

/* ══════════════════════════════════════════════════════════════
   MOBILE RESPONSIVE OVERRIDES (≤ 900px)
   ══════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {

    /* ─── Show hamburger, bottom tab bar ─── */
    .hamburger {
        display: flex;
    }

    .bottom-tab-bar {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        position: fixed !important;
        bottom: 0 !important;
        left: 0 !important;
        width: 100% !important;
        max-width: 100vw !important;
        box-sizing: border-box !important;
        height: 60px !important;
        z-index: 9000 !important;
        background: rgba(255,255,255,0.97) !important;
        border-top: 1px solid rgba(0,0,0,0.08) !important;
        padding-bottom: max(8px, env(safe-area-inset-bottom)) !important;
        justify-content: space-around !important;
        align-items: center !important;
        overflow: hidden !important;
    }

    /* Hide Buy & Profile from the mobile bottom navigation */
    .bottom-tab-bar .bottom-tab-item[data-tab="buy"],
    .bottom-tab-bar .bottom-tab-item[data-tab="profile"] {
        display: none !important;
    }

    /* ─── Header mobile ─── */
    header {
        grid-template-columns: 44px 1fr auto;
        padding: 8px 12px;
        height: 56px;
    }

    .sticky-filters-bar {
        top: 56px !important;
    }

    .split-search-container {
        margin-top: 120px !important;
        height: calc(100vh - 120px) !important;
    }

    header .logo {
        position: absolute !important;
        left: 50% !important;
        top: 50% !important;
        transform: translate(-50%, -50%) !important;
        width: auto !important;
        height: 40px !important;
        margin: 0 !important;
        z-index: 1001 !important;
        pointer-events: none !important;
        justify-self: center;
    }

    header .logo img {
        width: auto !important;
        height: 44px !important;
        position: static;
        border-radius: 0;
        border: none;
        box-shadow: none;
        object-fit: contain;
        pointer-events: auto !important;
    }

    header .logo img:hover {
        transform: none;
    }

    .header-right {
        gap: 4px !important;
    }

    .lang-switcher {
        padding: 2px;
    }

    .lang-selector-btn {
        padding: 4px 8px;
        font-size: 10px;
    }

    .nav-signin-link {
        padding: 6px 14px;
        font-size: 11px;
        min-height: 36px;
    }

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

    /* ─── Add bottom padding to body for tab bar ─── */
    body {
        padding-bottom: 68px;
    }

    /* ─── Hero adjustments ─── */
    .hero {
        padding: 72px 16px 40px;
        min-height: 400px;
        background-attachment: scroll;
        background-image: linear-gradient(rgba(0,0,0,0.40), rgba(0,0,0,0.25)), url('https://images.unsplash.com/photo-1600596542815-ffad4c1539a9?auto=format&fit=crop&w=1200&q=80') !important;
        background-size: cover !important;
        background-position: center !important;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
    }

    .hero h1 {
        font-size: 28px;
        line-height: 1.18;
        letter-spacing: -0.5px;
        color: #ffffff;
        text-align: center;
        text-shadow: 0 2px 8px rgba(0,0,0,0.32);
    }

    .hero h1 span {
        color: #ffffff;
    }

    .hero p {
        display: none;
    }

    /* ─── Hero search pill — mantener fila en móvil ─── */
    .hero-search-pill {
        flex-direction: row !important;
        align-items: center !important;
        padding: 4px 4px 4px 18px !important;
        border-radius: 50px !important;
        gap: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        margin-top: 20px !important;
        box-shadow: 0 4px 20px rgba(0,0,0,0.18) !important;
    }

    .hero-search-pill input {
        font-size: 14px !important;
        padding: 10px 0 !important;
        min-width: 0 !important;
    }

    .hero-search-pill #btn-filter-search {
        min-width: 44px !important;
        width: 44px !important;
        height: 44px !important;
        border-radius: 50% !important;
        background: #101820 !important;
        color: #ffffff !important;
        font-size: 18px !important;
        flex-shrink: 0 !important;
    }

    /* ─── Action tabs ─── */
    .action-tabs-container {
        padding: 0 4px;
        gap: 4px;
    }

    .action-tab {
        padding: 10px 8px;
        font-size: 10.5px;
        border-top-left-radius: 8px;
        border-top-right-radius: 8px;
        flex: 1;
        justify-content: center;
    }

    .action-tab i {
        font-size: 11px;
    }

    .action-tab.active {
        padding-top: 8px;
        padding-bottom: 13px;
    }

    /* ─── Search container mobile ─── */
    .search-container {
        flex-direction: column;
        border-radius: 16px;
        padding: 16px;
        gap: 12px;
        align-items: stretch;
        margin-bottom: 24px;
    }

    .search-container.tab-panel {
        border-top-left-radius: 16px !important;
    }

    .search-field {
        padding: 0 0 8px 0;
        border-right: none !important;
        border-bottom: 1px solid rgba(16, 24, 32, 0.06);
    }

    .search-field label {
        font-size: 9px;
    }

    .search-field select, .search-field input {
        font-size: 13px;
        height: 40px;
    }

    .btn-search {
        margin-left: 0;
        border-radius: 30px;
        width: 100%;
        height: 48px;
        justify-content: center;
        font-size: 13px;
    }

    /* ─── Properties section ─── */
    .properties-section {
        padding: 40px 16px 80px;
    }

    .section-header {
        flex-direction: column;
        gap: 12px;
        margin-bottom: 24px;
    }

    .section-header h2 {
        font-size: 24px;
    }

    .section-header p {
        font-size: 13px;
    }

    .properties-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    /* ─── Property cards mobile ─── */
    .property-card {
        border-radius: 12px;
    }

    .property-card:hover {
        transform: none;
    }

    .card-img {
        height: 200px;
    }

    .card-price-tag {
        font-size: 15px;
    }

    .card-body {
        padding: 16px;
    }

    .card-title {
        font-size: 16px;
    }

    .card-location {
        font-size: 12px;
        margin-bottom: 14px;
    }

    .card-features {
        font-size: 12px;
    }

    .feature-item {
        font-size: 12px;
    }

    /* ─── Hide pagination on mobile (infinite scroll) ─── */
    .pagination {
        display: none !important;
    }

    /* ─── Footer adjustments ─── */
    footer {
        padding: 40px 16px 20px;
        margin-top: 40px;
    }

    /* ─── Modal mobile (Zillow-style full page) ─── */
    .modal {
        padding: 0;
        align-items: flex-end;
    }

    .modal-content {
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        animation: none;
    }

    /* Mobile modal header with back button */
    .modal-mobile-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        background: #ffffff;
        border-bottom: 1px solid rgba(0, 0, 0, 0.06);
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 2100;
        min-height: 52px;
        box-sizing: border-box;
    }

    .modal-mobile-header .modal-back-btn {
        display: flex;
        align-items: center;
        gap: 8px;
        background: none;
        border: none;
        font-family: var(--font-display);
        font-weight: 600;
        font-size: 15px;
        color: var(--text-main);
        cursor: pointer;
        padding: 8px 4px;
        min-height: 44px;
    }

    .modal-mobile-header .modal-back-btn i {
        font-size: 18px;
    }

    .modal-mobile-header .modal-header-actions {
        display: flex;
        gap: 4px;
    }

    .modal-mobile-header .modal-header-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: #f1f5f9;
        border: none;
        font-size: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-main);
        transition: var(--transition);
    }

    .modal-mobile-header .modal-header-btn:active {
        transform: scale(0.92);
    }

    /* Hide close X on mobile header */
    .modal .modal-close {
        display: none;
    }

    /* Mobile body scroll */
    .modal-body.premium-body {
        -webkit-overflow-scrolling: touch;
        overflow-y: auto;
        flex: 1;
    }

    .modal-info h2 {
        font-size: 22px;
    }

    .modal-price {
        font-size: 28px;
    }

    .modal-details-grid {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
        padding: 16px;
        width: 100%;
        box-sizing: border-box;
    }

    .modal-priority-features {
        grid-template-columns: 1fr 1fr;
    }

    .modal-content {
        display: flex;
        flex-direction: column;
    }

    .modal-premium-showcase {
        flex-shrink: 0;
    }

    .premium-body {
        grid-template-columns: 1fr;
        padding: 20px;
        gap: 24px;
        flex: 1;
    }

    .premium-photo-grid {
        grid-template-columns: 1fr;
        height: 320px;
    }

    .grid-sub-photos {
        display: none;
    }

    .grid-main-photo {
        border-radius: 0;
        cursor: pointer;
    }

    .grid-main-photo:active {
        filter: brightness(0.9);
    }

    .modal-media-tabs {
        bottom: 12px;
        width: 94%;
        justify-content: center;
        padding: 4px;
    }

    .media-tab {
        padding: 8px 12px;
        font-size: 10px;
        flex: 1;
        justify-content: center;
    }

    .modal-contact-column {
        position: static;
    }

    /* ─── Mobile Vertical Photo Gallery (Zillow-style) ─── */
    .mobile-photo-gallery {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #0d141c;
        z-index: 3000;
        display: flex;
        flex-direction: column;
        overflow: hidden;
        animation: gallery-fade-in 0.25s ease;
    }

    @keyframes gallery-fade-in {
        from { opacity: 0; }
        to { opacity: 1; }
    }

    .mobile-gallery-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        padding-top: max(8px, env(safe-area-inset-top));
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        z-index: 10;
        min-height: 56px;
    }

    .mobile-gallery-header .gallery-back-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        border: none;
        color: #ffffff;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }

    .mobile-gallery-header .gallery-back-btn:active {
        background: rgba(255, 255, 255, 0.25);
    }

    .mobile-gallery-header .gallery-title {
        font-family: var(--font-display);
        font-size: 13px;
        font-weight: 600;
        color: #ffffff;
        text-align: center;
        flex: 1;
        padding: 0 8px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-gallery-header .gallery-actions {
        display: flex;
        gap: 6px;
    }

    .mobile-gallery-header .gallery-action-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.12);
        border: none;
        color: #ffffff;
        font-size: 18px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: background 0.2s;
    }

    .mobile-gallery-header .gallery-action-btn:active {
        background: rgba(255, 255, 255, 0.25);
    }

    .mobile-gallery-header .gallery-action-btn.active {
        color: #e63946;
    }

    .mobile-gallery-scroll {
        flex: 1;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .mobile-gallery-scroll .gallery-photo-item {
        width: 100%;
        height: auto;
        position: relative;
        background: #0d141c;
        margin-bottom: 8px;
        display: block;
    }

    .mobile-gallery-scroll .gallery-photo-item img {
        width: 100%;
        height: auto;
        display: block;
    }

    /* Overlay de acciones por foto */
    .gallery-photo-actions {
        position: absolute;
        bottom: 12px;
        right: 12px;
        display: flex;
        gap: 8px;
        z-index: 5;
    }

    .gallery-photo-actions .photo-action-btn {
        width: 40px;
        height: 40px;
        border-radius: 50%;
        background: rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(6px);
        -webkit-backdrop-filter: blur(6px);
        border: 1px solid rgba(255, 255, 255, 0.15);
        color: #ffffff;
        font-size: 16px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        transition: all 0.2s ease;
        -webkit-tap-highlight-color: transparent;
    }

    .gallery-photo-actions .photo-action-btn:active {
        transform: scale(0.9);
    }

    .gallery-photo-actions .photo-action-btn.active {
        color: #e63946;
        border-color: #e63946;
    }

    @keyframes heart-dopamine {
        0% { transform: scale(1); }
        30% { transform: scale(1.35); }
        60% { transform: scale(0.9); }
        100% { transform: scale(1); }
    }

    .gallery-photo-actions .photo-action-btn.heart-pulse {
        animation: heart-dopamine 0.45s ease;
    }

    .mobile-gallery-counter {
        position: absolute;
        bottom: 72px;
        left: 50%;
        transform: translateX(-50%);
        background: rgba(0, 0, 0, 0.6);
        backdrop-filter: blur(8px);
        -webkit-backdrop-filter: blur(8px);
        color: #ffffff;
        font-family: var(--font-display);
        font-size: 13px;
        font-weight: 600;
        padding: 8px 18px;
        border-radius: 20px;
        z-index: 10;
        pointer-events: none;
    }

    /* ─── Mobile Sticky Bottom CTA Bar (Zillow-style) ─── */
    .modal-bottom-cta {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        padding-bottom: max(12px, env(safe-area-inset-bottom));
        background: rgba(255, 255, 255, 0.97);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid rgba(0, 0, 0, 0.06);
        position: sticky;
        bottom: 0;
        z-index: 50;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.04);
    }

    .modal-bottom-cta .cta-contact {
        flex: 1;
        background: var(--text-main);
        color: #ffffff;
        border: none;
        padding: 14px 20px;
        border-radius: 12px;
        font-family: var(--font-display);
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;
        transition: var(--transition);
        min-height: 48px;
    }

    .modal-bottom-cta .cta-contact:active {
        transform: scale(0.97);
        background: #8A8D8F;
    }

    .modal-bottom-cta .cta-save {
        width: 52px;
        height: 48px;
        border-radius: 12px;
        border: 1.5px solid rgba(0, 0, 0, 0.1);
        background: #ffffff;
        font-size: 20px;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--text-muted);
        transition: var(--transition);
        flex-shrink: 0;
    }

    .modal-bottom-cta .cta-save:active {
        transform: scale(0.92);
        border-color: #e63946;
        color: #e63946;
    }

    .modal-bottom-cta .cta-save.saved {
        color: #e63946;
        border-color: #e63946;
    }

    /* ─── Launcher: hide bottom tab bar when modal is open on mobile ─── */
    body.modal-open .bottom-tab-bar {
        display: none !important;
    }

    /* ─── Mobile scroll fix ─── */
    body.modal-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }

    @keyframes modal-slide-up {
        from { transform: translateY(100%); opacity: 0; }
        to { transform: translateY(0); opacity: 1; }
    }

    /* ─── Lightbox mobile ─── */
    .lb-img-wrap {
        padding: 8px 12px;
    }

    .lb-arrow {
        width: 36px;
        height: 36px;
        font-size: 12px;
    }

    .lb-prev { left: 6px; }
    .lb-next { right: 6px; }

    .lb-thumb {
        width: 48px;
        height: 36px;
    }

    .lb-header {
        padding: 8px 12px;
    }

    .lb-back-btn {
        font-size: 11px;
        padding: 5px 12px;
    }

    /* ─── Touch target fixes ─── */
    .btn-favorite {
        width: 44px;
        height: 44px;
    }

    .modal-close {
        width: 44px;
        height: 44px;
    }

    .pagination-btn {
        min-height: 44px;
        min-width: 44px;
    }

    .page-num {
        min-width: 44px;
        min-height: 44px;
    }

    .btn-submit {
        min-height: 48px;
    }

    .accordion-trigger {
        min-height: 52px;
        padding: 16px 0;
    }
}

/* ─── Extra small devices (≤ 480px) ─── */
@media (max-width: 480px) {
    .hero h1 {
        font-size: 26px;
    }

    .hero {
        padding: 90px 12px 40px;
    }

    .action-tab {
        font-size: 9.5px;
        padding: 8px 6px;
    }

    .search-container {
        padding: 12px;
        border-radius: 12px;
    }

    .properties-section {
        padding: 32px 12px 72px;
    }

    .card-img {
        height: 180px;
    }

    .section-header h2 {
        font-size: 20px;
    }

    .bottom-tab-item {
        padding: 4px 8px;
        min-width: 48px;
    }

    .bottom-tab-item i {
        font-size: 18px;
    }

    .bottom-tab-item span {
        font-size: 8.5px;
    }
}

/* ─── Prevent scroll when drawer is open ─── */
body.drawer-open {
    overflow: hidden;
}

/* ─── Interactive Map & Split View Styles (R01) ─── */

.split-search-container {
    display: flex;
    margin-top: 144px; /* Desktop Header (80px) + Filters Bar (64px) = 144px */
    height: calc(100vh - 144px);
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Map Pane */
.map-pane {
    width: 55%;
    height: 100%;
    position: relative;
    z-index: 1;
}

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

/* List Pane */
.list-pane {
    width: 45%;
    height: 100%;
    overflow-y: auto;
    background-color: var(--primary-light);
    border-left: 1px solid var(--border-color);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Custom Price Pin Styles for Leaflet */
.price-pin {
    background-color: var(--primary);
    color: #ffffff;
    border: 1.5px solid #ffffff;
    border-radius: 20px;
    padding: 6px 12px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    white-space: nowrap;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.price-pin:hover, .price-pin.active {
    background-color: #c29b38; /* Gold tint on hover/active state */
    border-color: #ffffff;
    transform: scale(1.08);
}

/* Pin triangle pointer */
.price-pin::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    border-width: 6px 6px 0;
    border-style: solid;
    border-color: var(--primary) transparent transparent;
    display: block;
    width: 0;
    z-index: 1;
    transition: var(--transition);
}

.price-pin:hover::after, .price-pin.active::after {
    border-color: #c29b38 transparent transparent;
}

/* Card highlight effect */
.property-card.card-highlight {
    border: 2px solid #c29b38 !important;
    box-shadow: 0 0 20px rgba(194, 155, 56, 0.5) !important;
    transform: translateY(-5px);
    transition: all 0.3s ease;
}

/* Floating Toggle Button for Mobile */
.mobile-toggle-btn {
    display: none;
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1001;
    background-color: var(--primary);
    color: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 30px;
    padding: 12px 24px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 14px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: var(--transition);
}

.mobile-toggle-btn:hover {
    background-color: #c29b38;
}

/* Empty State Card */
.empty-state-card {
    text-align: center;
    padding: 48px 24px;
    background: #ffffff;
    border: 1.5px dashed var(--border-color);
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
    grid-column: 1 / -1;
}

.empty-state-card i {
    font-size: 48px;
    color: var(--text-muted);
}

.empty-state-card h3 {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
}

.empty-state-card p {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 320px;
}

.empty-state-card .btn-reset {
    background-color: var(--accent);
    color: #ffffff;
    border: none;
    border-radius: 6px;
    padding: 8px 16px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 13px;
    cursor: pointer;
    transition: var(--transition);
}

.empty-state-card .btn-reset:hover {
    background-color: var(--accent-hover);
}

/* Responsive styles */
@media (max-width: 768px) {

    /* ─── Sticky filter bar: Zillow-style 2 rows ─── */
    .sticky-filters-bar {
        flex-direction: column !important;
        align-items: stretch !important;
        height: auto !important;
        padding: 8px 12px !important;
        gap: 6px !important;
        width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        box-sizing: border-box !important;
    }

    .sticky-filters-bar .search-universal-wrapper {
        min-width: 0 !important;
        width: 100% !important;
        max-width: 100% !important;
        box-sizing: border-box !important;
        border-radius: 24px;
        height: 42px;
    }

    .sticky-filters-bar #search-universal {
        min-width: 0 !important;
        width: 100% !important;
    }

    .mobile-filters-row-wrapper {
        display: block !important;
        position: relative;
        overflow: visible;
        width: 100%;
        min-width: 0;
        box-sizing: border-box;
    }

    .mobile-filters-row-wrapper::after {
        content: '';
        position: absolute;
        top: 0;
        right: 0;
        width: 40px;
        height: 100%;
        background: linear-gradient(to right, transparent, #fff);
        pointer-events: none;
        z-index: 2;
    }

    .mobile-filters-row {
        display: flex !important;
        gap: 6px;
        overflow-x: auto;
        overflow-y: visible;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
        padding-bottom: 2px;
        padding-right: 40px;
        overscroll-behavior-x: contain;
        touch-action: pan-x;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
    }

    .mobile-filters-row::-webkit-scrollbar {
        display: none;
    }

    .mobile-filters-row select {
        flex-shrink: 0;
        border-radius: 20px !important;
        border: 1.5px solid var(--border-color) !important;
        padding: 5px 10px !important;
        font-size: 12px !important;
        font-weight: 600 !important;
        height: 34px !important;
        background: white;
        color: var(--text-main);
        font-family: var(--font-body);
        cursor: pointer;
        white-space: nowrap;
    }

    /* Ambient decorative glows overflow narrow screens — remove on mobile */
    .ambient-glow-1,
    .ambient-glow-2 {
        display: none !important;
    }

    /* Split container: adjust for 2-row filter bar (~56px header + ~100px filters) */
    .split-search-container {
        margin-top: 158px !important;
        height: calc(100vh - 158px) !important;
        width: 100% !important;
        max-width: 100vw !important;
        overflow-x: hidden !important;
    }

    .list-pane {
        width: 100% !important;
        max-width: 100vw !important;
        left: 0 !important;
        box-sizing: border-box !important;
        overflow-x: hidden !important;
    }

    .map-pane {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        display: none;
    }

    .list-pane {
        width: 100%;
        height: 100%;
        position: absolute;
        top: 0;
        left: 0;
        display: block;
    }

    .split-search-container.show-map .map-pane {
        display: block;
        z-index: 10;
    }

    .split-search-container.show-map .list-pane {
        display: none;
    }

    .mobile-toggle-btn {
        display: none;
    }

    /* ─── Cards: 1 columna full-width estilo Zillow ─── */
    .list-pane .properties-grid {
        grid-template-columns: 1fr !important;
        gap: 12px !important;
        padding: 0 0 80px;
    }

    .list-pane .card-img {
        height: 220px;
    }

    .list-pane {
        padding: 12px !important;
    }

    .list-pane .property-card {
        border-radius: 12px;
        box-shadow: 0 2px 8px rgba(0,0,0,0.08);
    }

    .list-pane .card-body {
        padding: 12px 14px 14px;
    }

    .list-pane .card-title {
        font-size: 15px;
        margin-bottom: 4px;
    }

    .list-pane .card-price-tag {
        display: none;
    }

    .list-pane .card-price-mobile {
        display: block !important;
        font-size: 20px;
        font-weight: 800;
        color: var(--text-main);
        font-family: var(--font-display);
        margin-bottom: 4px;
    }
}

/* card-price-mobile hidden on desktop */
.card-price-mobile {
    display: none;
}

/* Listing office attribution — visible on both mobile and desktop */
.card-office-name {
    font-size: 10px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.4px;
    margin-top: 8px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-top: 1px solid var(--border-color);
    padding-top: 6px;
}

/* List Pane card list 2-column layout override on desktop */
.list-pane .properties-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}

/* Custom interactive price pins for Leaflet map */
.custom-pin-wrapper {
    background: none !important;
    border: none !important;
    box-shadow: none !important;
}

.price-pin {
    background-color: #101820; /* Dark Background */
    color: #c29b38; /* Gold text */
    border: 1.5px solid #c29b38; /* Gold border */
    border-radius: 20px;
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 12px;
    padding: 4px 8px;
    text-align: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.35);
    white-space: nowrap;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    display: inline-block;
}

.price-pin:hover,
.price-pin.hovered {
    transform: scale(1.1);
    background-color: #c29b38;
    color: #101820;
    box-shadow: 0 6px 15px rgba(194, 155, 56, 0.4);
}

.price-pin.active {
    background-color: #c29b38 !important; /* Gold background */
    color: #101820 !important; /* Dark text */
    border-color: #101820 !important;
    transform: scale(1.15);
    box-shadow: 0 6px 18px rgba(194, 155, 56, 0.6);
    z-index: 1000 !important;
}

.card-highlight {
    border: 2px solid #c29b38 !important;
    box-shadow: 0 0 15px rgba(194, 155, 56, 0.3);
    transform: scale(1.02);
    transition: all 0.35s ease;
}

/* Autocomplete search suggestions dropdown style (Zillow Clean Style) */
.autocomplete-suggestions {
    position: absolute;
    top: 64px;
    left: 0;
    width: 100%;
    max-height: 380px;
    background: #ffffff;
    border: 1px solid #dcdcdc;
    border-top: none;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    z-index: 99999;
    overflow-y: auto;
    display: none;
    box-sizing: border-box;
    padding: 6px 0;
}

.autocomplete-suggestion-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 10px 16px;
    font-family: 'Montserrat', sans-serif;
    font-size: 14px;
    color: #2a2a2a;
    cursor: pointer;
    transition: background 0.15s ease;
    border-bottom: 1px solid #f5f5f5;
    text-align: left;
}

.autocomplete-cta {
    border-top: 1px solid #e8e8e8;
    border-bottom: none;
    color: #1277c8;
    font-size: 13px;
    padding: 10px 16px;
}

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

.autocomplete-suggestion-item:hover,
.autocomplete-suggestion-item.active {
    background-color: #f0f4f8;
    color: #000000;
}

.autocomplete-suggestion-item strong {
    font-weight: 700;
    color: #000000;
}

/* Sticky Search & Filters Bar styling (Clean layout from buy.html) */
.sticky-filters-bar {
    position: fixed;
    top: 80px;
    left: 0;
    width: 100%;
    z-index: 999;
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 12px 6% 12px calc(6% + 140px);
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    height: 64px;
    box-sizing: border-box;
}

.sticky-filters-bar .search-universal-wrapper {
    flex: 1;
    min-width: 200px;
    display: flex;
    align-items: center;
    border: 1.5px solid var(--border-color);
    border-radius: 8px;
    padding: 4px 12px;
    background: white;
    height: 40px;
    box-sizing: border-box;
}

.sticky-filters-bar #search-universal {
    width: 100%;
    border: none;
    outline: none;
    font-family: var(--font-body);
    font-size: 14px;
    padding: 6px 0;
    background: transparent;
}

.sticky-filters-bar #btn-filter-search {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--accent);
    padding: 0 4px;
}

.sticky-filters-bar .autocomplete-suggestions {
    top: 52px;
    width: calc(100% - 12% - 200px);
    max-width: 450px;
    left: calc(6% + 140px);
}

.sticky-filters-bar select,
.mobile-filters-row select {
    padding: 8px 12px;
    border-radius: 8px;
    border: 1.5px solid var(--border-color);
    font-family: var(--font-body);
    font-size: 13px;
    color: var(--text-main);
    background: white;
    cursor: pointer;
    font-weight: 500;
    height: 40px;
    box-sizing: border-box;
}

/* Desktop: both wrappers act as transparent passthrough */
.mobile-filters-row {
    display: contents;
}

.mobile-filters-row-wrapper {
    display: contents;
}

/* WhatsApp contact pill */
.contact-pill.whatsapp-pill {
    background-color: #25D366;
    color: #ffffff;
    border-color: #25D366;
    cursor: pointer;
}
.contact-pill.whatsapp-pill:hover {
    background-color: #128C7E;
    color: #ffffff;
    border-color: #128C7E;
}

/* Custom WhatsApp capture modal styling */
.custom-wa-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 99999;
    backdrop-filter: blur(4px);
    font-family: var(--font-body);
}

.custom-wa-modal-content {
    background: #ffffff;
    padding: 30px;
    border-radius: 12px;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.25);
    position: relative;
    color: #101820;
}

.custom-wa-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #666;
}

.custom-wa-modal-content h3 {
    margin-top: 0;
    font-size: 18px;
    font-weight: 700;
    color: #101820;
    display: flex;
    align-items: center;
    gap: 8px;
}

.custom-wa-modal-content p {
    font-size: 14px;
    color: #555;
    margin-bottom: 20px;
    line-height: 1.5;
}

.custom-wa-modal-content .form-group {
    margin-bottom: 16px;
}

.custom-wa-modal-content label {
    display: block;
    font-size: 12px;
    font-weight: 600;
    margin-bottom: 6px;
    color: #333;
}

.custom-wa-modal-content input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid rgba(16, 24, 32, 0.15);
    border-radius: 6px;
    font-size: 14px;
    box-sizing: border-box;
}

.custom-wa-modal-content .btn-wa-submit {
    width: 100%;
    padding: 12px;
    background-color: #25D366;
    color: #ffffff;
    border: none;
    border-radius: 6px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.25s;
    margin-top: 10px;
}

.custom-wa-modal-content .btn-wa-submit:hover {
    background-color: #128C7E;
}




