/* ==========================================================================
   SPA LAYOUT SYSTEM - APPLE HUMAN INTERFACE DESIGN SYSTEM (PC HORIZONTAL NAV)
   ========================================================================== */

/* Variables de Color de Apple */
:root {
    --apple-bg: #F5F5F7;
    --apple-canvas: #FFFFFF;
    --apple-accent: #0071E3; /* Azul San Francisco */
    --apple-text: #1D1D1F;
    --apple-text-secondary: #86868B;
    --apple-border: rgba(0, 0, 0, 0.08);
    --apple-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    --apple-radius-lg: 18px;
    --apple-radius-md: 12px;
}

/* Tipografía Global y Fondo */
body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif !important;
    background-color: var(--apple-bg) !important;
    color: var(--apple-text) !important;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
}

/* Contenedores con estilo Apple */
.card, .search-apple, .contact .izq, .map-filters-bar, .property-list-panel, .offcanvas {
    background-color: var(--apple-canvas) !important;
    border: 1px solid var(--apple-border) !important;
    border-radius: var(--apple-radius-lg) !important;
    box-shadow: var(--apple-shadow) !important;
}

input, select, textarea, .toggle-btns button, .tab-btn {
    border-radius: var(--apple-radius-md) !important;
    border: 1px solid var(--apple-border) !important;
}

button, .btn, .btn-search-main, .btn-contact, .btn-search, .btn-search-cta-new {
    border-radius: var(--apple-radius-md) !important;
}

.btn-primary, .btn-search-main, .btn-contact, .btn-search, .btn-search-cta-new {
    background-color: var(--apple-accent) !important;
    color: #FFFFFF !important;
    border: none !important;
    transition: all 0.2s ease-in-out !important;
}

.btn-primary:hover, .btn-search-main:hover, .btn-contact:hover, .btn-search:hover, .btn-search-cta-new:hover {
    opacity: 0.9 !important;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 113, 227, 0.3) !important;
}

/* ==========================================================================
   DISEÑO DUAL-STREAM (TOP NAV VS BOTTOM NAV)
   ========================================================================== */

/* Contenedor Principal */
.main-wrapper {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-top 0.3s ease;
}

/* Desktop: Cabecera Horizontal Superior Fija */
@media (min-width: 768px) {
    .main-wrapper {
        margin-left: 0 !important;
        margin-top: 80px; /* Espacio para que el contenido no quede debajo del navbar fijo */
        min-height: calc(100vh - 80px);
    }

    .navbar-desktop-premium {
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        height: 80px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-bottom: 1px solid var(--apple-border);
        z-index: 1030;
        box-shadow: 0 4px 12px rgba(0,0,0,0.03);
    }

    .navbar-brand-premium {
        display: flex;
        align-items: center;
        height: 100%;
        text-decoration: none;
    }

    .navbar-brand-premium img {
        max-height: 55px;
        width: auto;
        transition: transform 0.25s ease;
    }

    .navbar-brand-premium img:hover {
        transform: scale(1.02);
    }

    .nav-links-premium {
        display: flex;
        align-items: center;
        gap: 32px;
        height: 100%;
    }

    .nav-item-link {
        color: var(--apple-text);
        text-decoration: none;
        font-size: 15px;
        font-weight: 500;
        padding: 8px 4px;
        position: relative;
        transition: color 0.2s ease;
    }

    .nav-item-link:hover {
        color: var(--apple-accent);
    }

    .nav-item-link.active {
        color: var(--apple-accent);
        font-weight: 600;
    }

    /* Línea indicadora activa estilo Apple */
    .nav-item-link.active::after {
        content: "";
        position: absolute;
        bottom: -2px;
        left: 4px;
        right: 4px;
        height: 2px;
        background-color: var(--apple-accent);
        border-radius: 1px;
    }

    .nav-right-premium {
        display: flex;
        align-items: center;
    }

    .social-links-premium {
        display: flex;
        gap: 10px;
    }

    .nav-social-btn {
        width: 36px;
        height: 36px;
        border-radius: 10px;
        background-color: rgba(0, 0, 0, 0.04);
        display: flex;
        align-items: center;
        justify-content: center;
        color: var(--apple-text);
        text-decoration: none;
        transition: all 0.2s ease;
    }

    .nav-social-btn:hover {
        background-color: var(--apple-accent);
        color: #FFFFFF;
        transform: translateY(-1.5px);
    }
}

/* Mobile: Bottom Navigation Bar fija e iOS-style */
@media (max-width: 767.98px) {
    .main-wrapper {
        margin-left: 0;
        margin-top: 65px; /* Espacio para el header móvil superior de 65px */
        padding-bottom: 75px; /* Espacio para no tapar el bottom nav */
    }

    .bottom-nav {
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 65px;
        background: rgba(255, 255, 255, 0.85);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
        border-top: 1px solid var(--apple-border);
        display: flex;
        justify-content: space-around;
        align-items: center;
        z-index: 1040;
        padding-bottom: safe-area-inset-bottom;
        box-shadow: 0 -4px 12px rgba(0, 0, 0, 0.03);
    }

    .bottom-nav-link {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        color: var(--apple-text-secondary);
        text-decoration: none;
        font-size: 10px;
        font-weight: 500;
        flex: 1;
        height: 100%;
        transition: all 0.2s ease;
        border: none;
        background: transparent;
        padding: 0;
    }

    .bottom-nav-link i {
        font-size: 20px;
        margin-bottom: 3px;
    }

    .bottom-nav-link.active {
        color: var(--apple-accent);
        font-weight: 600;
    }

    .bottom-nav-link.wpp-btn {
        color: #25D366;
    }
}

/* Header Móvil Superior */
.mobile-top-bar {
    background-color: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--apple-border);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 65px;
    z-index: 1030;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* ==========================================================================
   EFECTOS DE TRANSICIÓN HTMX (Premium)
   ========================================================================== */

.fade-in-htmx {
    opacity: 1;
    transition: opacity 0.2s ease-in-out;
}

.htmx-request .fade-in-htmx {
    opacity: 0.1;
}

.htmx-swapping .fade-in-htmx {
    opacity: 0;
}

/* ==========================================================================
   NOTIFICACIONES APPLE-STYLE
   ========================================================================== */
.swal2-popup {
    border-radius: var(--apple-radius-lg) !important;
    background: rgba(255, 255, 255, 0.9) !important;
    backdrop-filter: blur(15px) !important;
    -webkit-backdrop-filter: blur(15px) !important;
    border: 1px solid var(--apple-border) !important;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08) !important;
}

.swal2-title {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif !important;
    font-size: 20px !important;
    color: var(--apple-text) !important;
}

.swal2-confirm {
    background-color: var(--apple-accent) !important;
    border-radius: var(--apple-radius-md) !important;
}

/* ==========================================================================
   PAGE-SPECIFIC CONSOLIDATED STYLES (PRE-LOADED FOR SPA SWAPS)
   ========================================================================== */

/* --- HOME PAGE PARTIAL --- */
.hero-section {
    position: relative;
    width: 100%;
    min-height: 480px;
    padding: 80px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: 24px;
    margin-bottom: 40px;
    box-shadow: var(--apple-shadow);
    background-color: #000;
}

.hero-bg-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 1;
}

.carrusel-home {
    width: 100%;
    height: 100%;
}

.carrusel-home,
.carrusel-home .slick-list,
.carrusel-home .slick-track,
.carrusel-home .slick-slide,
.carrusel-home .slick-slide > div {
    height: 100% !important;
}

.img-carrusel {
    width: 100%;
    height: 100%;
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to bottom, rgba(0,0,0,0.15) 0%, rgba(0,0,0,0.45) 100%);
    z-index: 2;
    pointer-events: none;
}

.hero-content-container {
    position: relative;
    z-index: 3;
    width: 100%;
    max-width: 960px;
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.hero-text-block {
    color: #FFFFFF;
    text-align: center;
}
.hero-text-block h1 {
    font-weight: 800;
    font-size: 3rem;
    line-height: 1.15;
    text-shadow: 0 4px 12px rgba(0,0,0,0.4);
    margin-bottom: 15px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}
.hero-text-block p {
    font-size: 1.25rem;
    font-weight: 500;
    text-shadow: 0 2px 6px rgba(0,0,0,0.4);
    margin: 0;
    opacity: 0.95;
}

/* BUSCADOR HORIZONTAL PREMIUM (GLASSMORPHISM) */
.search-bar-premium {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.45);
    border-radius: 24px;
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.12);
    padding: 12px 20px;
}

.search-form-flex {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
}

.search-col {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 4px 12px;
    min-width: 0;
}

.search-col label {
    font-size: 10px;
    font-weight: 700;
    color: var(--apple-text-secondary);
    text-transform: uppercase;
    margin-bottom: 3px;
    letter-spacing: 0.5px;
}

.search-col select {
    border: none !important;
    background: transparent !important;
    padding: 0 !important;
    font-size: 15px;
    font-weight: 600;
    color: var(--apple-text);
    outline: none !important;
    cursor: pointer;
    width: 100%;
    text-overflow: ellipsis;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2386868B' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 0px center !important;
    padding-right: 20px !important;
}

.search-divider {
    width: 1px;
    height: 35px;
    background-color: rgba(0, 0, 0, 0.08);
    flex-shrink: 0;
}

.toggle-col {
    flex: 1.1;
}

.toggle-btns-premium {
    display: flex;
    background: rgba(0, 0, 0, 0.05);
    border-radius: 10px;
    padding: 2px;
    width: fit-content;
}

.btn-toggle {
    border: none;
    background: transparent;
    padding: 4px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 8px;
    color: #555;
    transition: all 0.2s ease;
}

.btn-toggle.active {
    background: #FFFFFF;
    color: #000;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.btn-search-premium {
    background: var(--apple-accent);
    color: #FFFFFF;
    border: none;
    padding: 12px 28px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease-in-out;
    flex-shrink: 0;
}

.btn-search-premium:hover {
    opacity: 0.95;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 113, 227, 0.3);
}

@media (max-width: 991.98px) {
    .hero-section {
        padding: 40px 20px;
        min-height: auto;
        border-radius: 20px;
        margin-bottom: 30px;
    }
    
    .hero-text-block h1 {
        font-size: 2.2rem;
    }
    
    .hero-text-block p {
        font-size: 1rem;
    }
    
    .search-bar-premium {
        padding: 20px;
        border-radius: 20px;
    }
    
    .search-form-flex {
        flex-direction: column;
        gap: 15px;
        align-items: stretch;
    }
    
    .search-divider {
        display: none;
    }
    
    .search-col {
        padding: 0;
        width: 100%;
    }
    
    .search-col select {
        background-color: rgba(0, 0, 0, 0.04) !important;
        padding: 12px 16px !important;
        border-radius: 12px !important;
        border: 1px solid rgba(0, 0, 0, 0.05) !important;
    }
    
    .toggle-btns-premium {
        width: 100%;
    }
    
    .btn-toggle {
        flex: 1;
        padding: 8px;
    }
    
    .btn-search-premium {
        width: 100%;
        justify-content: center;
        padding: 14px;
        margin-top: 10px;
    }
}

/* --- MAP PAGE PARTIAL --- */
.map-hero-banner {
    position: relative;
    padding: 60px 20px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background-image: url('../index_files/images/search.jpg');
    background-size: cover;
    background-position: center;
    box-sizing: border-box;
    border-radius: var(--apple-radius-lg);
    overflow: hidden;
    margin-top: 15px;
}
.map-hero-banner::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: rgba(0, 0, 0, 0.45);
    z-index: 1;
}
.hero-content-map {
    position: relative;
    z-index: 2;
}
.hero-content-map h1 {
    font-size: 32px;
    font-weight: 700;
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
}

.map-page-wrapper {
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 1600px;
    margin: 20px auto;
    padding: 0;
    box-sizing: border-box;
}

.map-filters-bar {
    margin-bottom: 20px;
    background-color: #fff;
    padding: 20px;
    border-radius: var(--apple-radius-lg);
    box-shadow: var(--apple-shadow);
    border: 1px solid var(--apple-border);
}
.search-tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}
.tab-btn {
    padding: 8px 20px;
    font-size: 0.9rem;
    font-weight: 600;
    border: 1px solid var(--apple-border);
    background-color: #fff;
    color: var(--apple-text-secondary);
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.tab-btn.active {
    background-color: var(--apple-accent) !important;
    color: #fff;
    border-color: var(--apple-accent) !important;
}

.search-inputs {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}
.search-inputs select, .search-inputs input {
    flex: 1;
    min-width: 150px;
    padding: 10px;
    border: 1px solid var(--apple-border);
    border-radius: var(--apple-radius-md);
    font-size: 0.9rem;
    background-color: #fff;
}
.search-inputs .btn-search {
    padding: 10px 25px;
    background-color: var(--apple-accent);
    color: white;
    border: none;
    border-radius: var(--apple-radius-md);
    cursor: pointer;
    font-weight: bold;
}

.map-content-area {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    width: 100%;
    height: 75vh;
}

.property-list-panel {
    flex: 0 0 350px;
    display: flex;
    flex-direction: column;
    height: 100%;
    background: #fff;
    border-radius: var(--apple-radius-lg);
    border: 1px solid var(--apple-border);
    overflow: hidden;
    box-shadow: var(--apple-shadow);
}
#property-count {
    padding: 15px;
    border-bottom: 1px solid var(--apple-border);
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    background: #f9f9f9;
}
#property-list {
    overflow-y: auto;
    flex: 1;
    padding: 10px;
    scroll-behavior: smooth;
}

.map-panel {
    flex: 1;
    height: 100%;
    position: relative;
}
#map {
    height: 100%;
    width: 100%;
    border-radius: var(--apple-radius-lg);
    z-index: 1;
    border: 1px solid var(--apple-border);
}

.map-locker-btn {
    position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
    z-index: 1000; background: rgba(0,0,0,0.8); color: white;
    padding: 10px 20px; border-radius: 30px; cursor: pointer;
    font-weight: bold; pointer-events: auto; display: none;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3); border: 2px solid white;
}

.property-card {
    border: 1px solid var(--apple-border);
    border-radius: var(--apple-radius-md);
    overflow: hidden;
    margin-bottom: 10px;
    background-color: #fff;
    display: flex;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    color: inherit;
    height: 100px;
}
.property-card:hover {
    transform: translateX(4px);
    box-shadow: var(--apple-shadow);
    border-color: var(--apple-accent);
}
.property-card .card-image {
    width: 100px;
    height: 100%;
    flex-shrink: 0;
}
.property-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.property-card .card-details {
    padding: 8px 12px;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}
.property-card .card-title {
    font-size: 11px;
    font-weight: 700;
    color: var(--apple-text-secondary);
    text-transform: uppercase;
    margin-bottom: 4px;
    overflow: hidden;
    white-space: nowrap;
    text-overflow: ellipsis;
}
.property-card .card-price {
    font-size: 15px;
    font-weight: 800;
    color: var(--apple-text);
    margin-bottom: 4px;
}
.property-card .card-features {
    display: flex;
    gap: 10px;
    font-size: 11px;
    color: var(--apple-text-secondary);
    list-style: none;
    padding: 0;
    margin: 0;
}

.price-marker {
    background-color: var(--apple-accent);
    color: white;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: bold;
    border: 2px solid white;
    box-shadow: 0 2px 8px rgba(0,0,0,0.25);
    white-space: nowrap;
}
.price-marker.alquiler {
    background-color: #34C759;
}

.pagination-container {
    display: flex;
    justify-content: center;
    gap: 8px;
    padding: 15px 0;
    border-top: 1px solid var(--apple-border);
}
.page-btn {
    padding: 6px 14px;
    border: 1px solid var(--apple-border);
    border-radius: 8px;
    background: white;
    color: var(--apple-text);
    text-decoration: none;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.2s;
}
.page-btn.active {
    background: var(--apple-accent);
    color: white;
    border-color: var(--apple-accent);
    font-weight: bold;
}
.page-btn:hover:not(.active) {
    background: #f5f5f7;
}

@media (max-width: 768px) {
    .map-hero-banner { display: none; }
    .map-page-wrapper { margin: 0; padding: 0; max-width: 100%; height: auto; }
    .map-filters-bar { padding: 10px; margin: 0; border-radius: 0; border-bottom: 1px solid var(--apple-border); }
    .search-inputs { gap: 5px; }
    .search-inputs select, .search-inputs input { font-size: 13px; padding: 8px; width: 48%; }
    .search-inputs .btn-search { width: 100%; padding: 8px; }
    
    .map-content-area { flex-direction: column; height: auto; gap: 0; }
    
    .map-panel { height: 40vh; width: 100%; flex: none; order: 1; }
    #map { border-radius: 0; }
    .map-locker-btn { display: block; }
    
    .property-list-panel { height: auto; flex: none; order: 2; width: 100%; border: none; border-radius: 0; }
    #property-list { max-height: none; padding-bottom: 80px; }
}

/* --- CONTACT PAGE PARTIAL --- */
.contact {
    margin-top: 40px;
    margin-bottom: 80px;
}
.contact h3 {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 32px;
    font-weight: 700;
    color: var(--apple-text);
    margin-bottom: 20px;
}
.contact p {
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 400;
    line-height: 1.6;
    color: var(--apple-text-secondary);
}
.contact .izq {
    background: #FFFFFF;
    border-radius: var(--apple-radius-lg);
    padding: 40px !important;
}
.contact input, .contact textarea {
    border-radius: var(--apple-radius-md);
    border: 1px solid var(--apple-border);
    padding: 12px;
    background-color: #F5F5F7;
    color: var(--apple-text);
}
.contact input { height: 48px; }
.contact textarea { height: 120px; }
.contact label {
    color: var(--apple-text-secondary);
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    font-weight: 600;
    margin-top: 15px;
    margin-bottom: 5px;
    display: block;
}
.btn-contact {
    width: 100%;
    max-width: 200px;
    height: 48px;
    border-radius: var(--apple-radius-md);
    background: var(--apple-accent);
    color: white;
    font-family: -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 16px;
    font-weight: 700;
    border: none;
    margin-top: 20px;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-contact:hover { opacity: 0.9; transform: translateY(-1px); }

@media (max-width: 768px) {
    .contact { margin-top: 10px; margin-bottom: 40px; }
    .contact h3 { font-size: 26px; }
    .izq { padding: 25px !important; }
}

/* --- PROPERTY DETAILS PAGE PARTIAL --- */
.cont-propiedad { margin-bottom: 18px; margin-top: 40px; }
.cont-propiedad a img { width: 100%; border-radius: var(--apple-radius-lg); }
.cont-propiedad h2 { color: var(--apple-text); font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 28px; font-weight: 700; margin-top: 30px; margin-bottom: 16px; }
.cont-propiedad .icons { display: flex; align-items: center; align-self: stretch; padding: 16px 0; }
.cont-propiedad .icons .icon { display: flex; flex-direction: column; align-items: center; gap: 8px; margin: 0 20px; }
.cont-propiedad .icons .icon:first-child { margin-left: 0; }
.cont-propiedad .icons .icon p { color: var(--apple-text-secondary); font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 11px; font-weight: 400; line-height: 12px; }
.cont-propiedad .price { color: var(--apple-text); font-size: 28px; font-weight: 700; display: flex; align-items: center; margin-bottom: 0; font-family: -apple-system, BlinkMacSystemFont, sans-serif; }
.cont-propiedad .price span { font-size: 16px; margin-right: 8px; }
.cont-propiedad .description { color: var(--apple-text); font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; font-weight: 400; line-height: 1.6; }
.cont-propiedad .ubicacion { display: flex; align-items: center; margin-bottom: 16px; }
.cont-propiedad .ubicacion p { color: var(--apple-text-secondary); font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; font-weight: 400; margin: 0; margin-left: 10px; }
.cont-propiedad .grid-images { width: 100%; display: grid; grid-template-columns: 1fr 1fr; column-gap: 24px; row-gap: 24px; }
@media (max-width: 768px) { 
    .cont-propiedad .grid-images { grid-template-columns: 1fr; column-gap: 0; } 
    .cont-propiedad { margin-top: 10px; } 
}
.cont-propiedad .grid-images img { width: 100%; border-radius: var(--apple-radius-lg); border: 1px solid var(--apple-border); transition: transform 0.2s; }
.cont-propiedad .grid-images img:hover { transform: scale(1.02); }
.cont-propiedad .map { margin-top: 40px; width: 100%; display: flex; justify-content: center; }
#map-container { height: 400px; width: 100%; border-radius: var(--apple-radius-lg); box-shadow: var(--apple-shadow); z-index: 1; border: 1px solid var(--apple-border); }
.leaflet-popup-content-wrapper { border-radius: var(--apple-radius-md); }
.leaflet-popup-content b { color: #333; }

/* Modales y Botones */
.cont-modal { background-color: rgba(0,0,0,0.85); position: fixed; top: 0; left: 0; width: 100%; height: 100vh; display: none; align-items: center; justify-content: center; z-index: 9999; flex-direction: column; }
.cont-modal .modal-property { width: fit-content; max-width: 800px; position: relative; }
@media (max-width: 768px) { .cont-modal .modal-property { max-width: 300px; } }
.cont-modal .modal-property img { width: auto; max-width: 800px; object-fit: contain !important; height: auto; border-radius: var(--apple-radius-lg); }
@media (max-width: 768px) { .cont-modal .modal-property img { max-width: 300px; } }
.btn-close-modal { position: absolute; top: 1rem; right: 1rem; background-color: transparent; border: none; cursor:pointer; }

/* Botones Acción Ficha */
.buttons-action { display: flex; align-items: center; gap: 10px; margin-top: 20px; }
.buttons-action a { padding: 12px 25px; border-radius: var(--apple-radius-md); color: #fff; font-weight: bold; text-decoration: none !important; transition: all 0.2s; display: inline-flex; align-items: center; justify-content: center; }
.buttons-action a:nth-child(1) { background-color: #25D366; }
.buttons-action a:nth-child(2) { background-color: var(--apple-accent); }
.buttons-action a:nth-child(3) { background-color: #8E8E93; }
.buttons-action a:hover { opacity: 0.9; transform: translateY(-1px); }
@media (max-width: 768px) { .buttons-action { flex-direction: column; } .buttons-action a { width: 100%; } }

.info-modal { display: flex; align-items: center; justify-content: center; padding-bottom: 30px; }
@media (max-width: 768px) { .info-modal { display: none; } }
.info-modal p { font-weight: bold; color: #fff; margin: 0 20px; }

.title-container { display: flex; align-items: baseline; flex-wrap: wrap; gap: 20px; }
.video-button { display: inline-block; padding: 8px 16px; background-color: rgba(0, 0, 0, 0.05); border-radius: 20px; color: var(--apple-text); font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-weight: bold; text-decoration: none; position: relative; cursor: pointer; transition: background-color 0.2s; }
.video-button:hover { background-color: rgba(0, 0, 0, 0.1); }
.video-button::after { content: ''; display: block; width: 30%; height: 3px; background-color: var(--apple-accent); margin: 4px auto 0; border-radius: 2px; }

/* Modal Video */
.modal { display: none; position: fixed; z-index: 10000; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(0,0,0,0.85); }
.modal-content { background-color: #fff; margin: 5% auto; padding: 20px; border-radius: var(--apple-radius-lg); width: 90%; max-width: 960px; position: relative; box-shadow: 0 5px 15px rgba(0,0,0,0.3); border: 1px solid var(--apple-border); }
.modal-video-container { position: relative; padding-bottom: 56.25%; height: 0; overflow: hidden; background-color: #000; border-radius: var(--apple-radius-md); }
.modal-video-container iframe { position: absolute; top: 0; left: 0; width: 100%; height: 100%; border: none; }
.close-button { color: #aaa; position: absolute; top: 0px; right: 15px; font-size: 35px; font-weight: bold; line-height: 1; transition: color 0.2s; }
.close-button:hover, .close-button:focus { color: #d32f2f; text-decoration: none; cursor: pointer; }

.video-mobile-container { text-align: center; margin-top: 20px; margin-bottom: 20px; }
.video-button-mobile { display: inline-block; width: 100%; max-width: 300px; padding: 12px 20px; border-radius: var(--apple-radius-md); background-color: #f0f0f0; color: #333; border: 2px solid var(--apple-accent); font-family: -apple-system, BlinkMacSystemFont, sans-serif; font-size: 16px; font-weight: bold; text-align: center; text-decoration: none; cursor: pointer; transition: all 0.2s ease; }
.video-button-mobile:hover { background-color: var(--apple-accent); color: #fff; }

