/* 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: #101820; /* Pantone Black 6 C as primary accent */
    --accent-hover: #8A8D8F; /* Pantone Cool Gray 7 C */
    --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: 'Montserrat', sans-serif;
    --font-body: 'Montserrat', 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;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    overflow-x: hidden;
    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(194,155,56,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: 12px 6%;
    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: 135px !important;
    width: 135px !important;
    border-radius: 50%;
    border: 3px solid #ffffff;
    box-shadow: 0 12px 40px rgba(16, 24, 32, 0.16);
    object-fit: cover;
    background-color: #ffffff;
    position: absolute;
    top: -12px;
    left: 0;
    transition: var(--transition);
}

.logo img:hover {
    transform: translateY(4px) scale(1.05);
    box-shadow: 0 16px 50px rgba(16, 24, 32, 0.24);
}

.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: 200px 4% 120px 4%;
    text-align: center;
    position: relative;
    min-height: 90vh;
    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: var(--text-muted);
    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;
}


.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;
}

.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: rgba(255, 255, 255, 0.9);
    border: 1.5px solid var(--border-color);
    color: var(--text-main);
    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.05);
}

.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-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);
}

.login-btn-facebook {
    background-color: #1877F2;
    border: none;
    color: #ffffff;
}

.login-btn-facebook:hover {
    background-color: #166fe5;
    box-shadow: 0 4px 12px rgba(24,119,242,0.3);
}

/* 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);
}

/* ============================================================
   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;
}

.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;
}

/* 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: 700;
    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;
}

.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;
    }
}
