/* ============================================================================
   Zocco Inmobiliaria — CSS 2.0
   Variables se setean inline desde _head_open.php (--brand-primary, etc.)
   ============================================================================ */

* { box-sizing: border-box; }

html, body {
    overflow-x: hidden;
}

body {
    font-family: 'Montserrat', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: #1f2024;
    background: #ffffff;
    line-height: 1.55;
}

h1, h2, h3, h4, h5, h6 { font-weight: 700; letter-spacing: -0.01em; }

a { color: var(--brand-primary, #646569); text-decoration: none; transition: color .2s ease; }
a:hover { color: var(--brand-primary-dark, #4a4b4f); }

/* ============================================================================
   NAVBAR
   ============================================================================ */
.zocco-navbar {
    background: var(--brand-primary, #646569) !important;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    padding: 0.5rem 0;
    min-height: 70px;
}
.zocco-navbar .navbar-brand img { max-height: 50px; }
.zocco-navbar .nav-link {
    color: #fff !important;
    font-weight: 600;
    font-size: 0.92rem;
    letter-spacing: 0.04em;
    padding: 0.55rem 1rem;
    border-radius: 4px;
    transition: background .2s ease;
}
.zocco-navbar .nav-link:hover,
.zocco-navbar .nav-link.active {
    background: rgba(255, 255, 255, 0.12);
}
.zocco-navbar .btn-light {
    color: var(--brand-primary, #646569);
    border-radius: 30px;
    letter-spacing: 0.05em;
}
.zocco-navbar .navbar-toggler {
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 0.3rem 0.6rem;
}

/* Espaciado bajo navbar fija */
main, .page-wrapper { padding-top: 70px; }

/* ============================================================================
   HERO con Ken Burns CSS-puro (sin backstretch.js — B24)
   ============================================================================ */
.zocco-hero {
    position: relative;
    overflow: hidden;
    isolation: isolate;
    min-height: 540px;
    background-color: #1f1f1f;
    color: #fff;
    display: flex;
    align-items: center;
    margin-top: 0;
}
.zocco-hero::before {
    content: '';
    position: absolute;
    inset: -2%;
    z-index: 0;
    background: var(--hero-bg) center/cover no-repeat;
    animation: zoccoKenBurns 24s ease-in-out infinite alternate;
    will-change: transform;
}
.zocco-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 1;
    background: linear-gradient(135deg, rgba(0,0,0,0.55), rgba(0,0,0,0.35) 60%, rgba(0,0,0,0.6));
}
.zocco-hero > .container { position: relative; z-index: 2; }

@keyframes zoccoKenBurns {
    0%   { transform: scale(1)    translate(0, 0); }
    50%  { transform: scale(1.08) translate(-0.5%, -0.3%); }
    100% { transform: scale(1.12) translate(0.3%, 0.2%); }
}

.zocco-hero h1 {
    font-size: clamp(1.8rem, 4vw, 3rem);
    margin-bottom: 1rem;
    text-shadow: 0 2px 12px rgba(0,0,0,0.5);
}
.zocco-hero p { font-size: clamp(1rem, 1.5vw, 1.2rem); opacity: 0.95; }

/* Botones operación grandes */
.boton-operacion {
    display: inline-block;
    min-width: 220px;
    padding: 0.85rem 1.5rem;
    margin: 0.5rem;
    border-radius: 30px;
    background-color: rgba(255,255,255,0.96);
    color: var(--brand-primary, #646569) !important;
    font-weight: 700;
    font-size: 1.2rem;
    letter-spacing: 0.06em;
    text-decoration: none;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.25);
    transition: transform .25s ease, box-shadow .25s ease, background .2s ease;
}
.boton-operacion:hover {
    background-color: #fff;
    color: var(--brand-primary-dark, #4a4b4f) !important;
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.3);
}

/* ============================================================================
   SECCIONES estándar
   ============================================================================ */
.zocco-section { padding: 4rem 0; }
.zocco-section h2 {
    text-align: center;
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin-bottom: 0.5rem;
}
.zocco-section .section-sub {
    color: var(--brand-primary, #646569);
    font-weight: 600;
}
.zocco-section .section-underline {
    width: 80px;
    height: 3px;
    background: var(--brand-primary, #646569);
    margin: 1rem auto 2.5rem;
    border-radius: 2px;
}

/* ============================================================================
   PROPERTY CARDS
   ============================================================================ */
.property-card {
    display: flex;
    flex-direction: column;
    background: #fff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
    transition: transform .25s ease, box-shadow .25s ease;
    isolation: isolate;
}
.property-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.12);
}
.property-card__media {
    display: block;
    position: relative;
    aspect-ratio: 4 / 3;
    overflow: hidden;
    background: #f3f3f3;
}
.property-card__media img {
    width: 100%; height: 100%;
    object-fit: cover;
    transition: transform .6s ease;
}
.property-card:hover .property-card__media img { transform: scale(1.05); }

.property-card .badge-destacada,
.property-card .badge-oportunidad,
.property-card .badge-operacion {
    position: absolute;
    z-index: 2;     /* B11 — sin pelear con la navbar (z-index 1030) */
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #fff;
    padding: 0.35rem 0.7rem;
    border-radius: 4px;
}
.property-card .badge-destacada {
    top: 12px; left: 12px;
    background: var(--brand-accent, #f47c0e);
}
.property-card .badge-oportunidad {
    top: 12px; right: 12px;
    background: #c0392b;
}
.property-card .badge-operacion {
    bottom: 12px; left: 12px;
    background: rgba(0,0,0,0.7);
    backdrop-filter: blur(4px);
}

.property-card__body {
    padding: 1rem 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}
.property-card__meta {
    font-size: 0.85rem;
    color: var(--brand-primary, #646569);
    margin-bottom: 0.4rem;
}
.property-card__title {
    font-size: 1.05rem;
    margin-bottom: 0.6rem;
    min-height: 2.4em;
    line-height: 1.3;
}
.property-card__title a { color: #1f2024; }
.property-card__title a:hover { color: var(--brand-primary, #646569); }

.property-card__features {
    list-style: none;
    padding: 0;
    margin: 0 0 0.8rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem 0.9rem;
    font-size: 0.82rem;
    color: #555;
}
.property-card__features li i { color: var(--brand-primary, #646569); margin-right: 0.25rem; }

.property-card__footer {
    margin-top: auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding-top: 0.8rem;
    border-top: 1px solid #eee;
}
.property-card__price {
    font-size: 1.1rem;
    font-weight: 700;
    color: #1f2024;
}

/* ============================================================================
   BUSCADOR (hero + páginas internas)
   ============================================================================ */
.zocco-buscador {
    background: rgba(255, 255, 255, 0.97);
    padding: 1.2rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.18);
    backdrop-filter: blur(6px);
}
.zocco-buscador .form-select { border-radius: 8px; border: 1px solid #ddd; }
.zocco-buscador .btn { border-radius: 8px; }

.buscador-interno {
    background: #f8f8f8;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}

/* ============================================================================
   FOOTER
   ============================================================================ */
.zocco-footer {
    background: var(--brand-primary, #646569);
    color: #fff;
    margin-top: 4rem;
}
.zocco-footer a { color: #fff; }
.zocco-footer a:hover { color: rgba(255,255,255,0.85); text-decoration: underline; }
.zocco-footer .footer-logo { filter: brightness(0) invert(1); opacity: 0.95; }
.zocco-footer .footer-links li,
.zocco-footer .footer-contact li { margin-bottom: 0.5rem; font-size: 0.92rem; }
.zocco-footer .footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px; height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    margin-right: 0.5rem;
    font-size: 1.05rem;
    transition: background .2s ease, transform .2s ease;
}
.zocco-footer .footer-social a:hover {
    background: rgba(255,255,255,0.28);
    transform: translateY(-2px);
}
.zocco-footer .footer-credit { opacity: 0.7; transition: opacity .2s ease; }
.zocco-footer .footer-credit:hover { opacity: 1; }

/* ============================================================================
   WHATSAPP FAB (reemplaza .div-flotante / .wa-float legacy)
   ============================================================================ */
.wa-fab {
    position: fixed;
    bottom: 22px;
    right: 22px;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #25d366;
    color: #fff !important;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.7rem;
    box-shadow: 0 4px 18px rgba(37, 211, 102, 0.55);
    z-index: 1040;
    text-decoration: none;
    transition: transform .25s ease, box-shadow .25s ease;
}
.wa-fab:hover { color: #fff !important; transform: scale(1.08); box-shadow: 0 6px 22px rgba(37, 211, 102, 0.7); }
.wa-fab::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 50%;
    background: #25d366;
    z-index: -1;
    animation: waPulse 2.5s ease-out infinite;
}
@keyframes waPulse {
    0%   { transform: scale(1);   opacity: 0.6; }
    100% { transform: scale(1.6); opacity: 0;   }
}
.wa-fab-tooltip {
    position: absolute;
    right: 70px;
    top: 50%;
    transform: translateY(-50%);
    background: #1f2024;
    color: #fff;
    font-size: 0.82rem;
    padding: 0.45rem 0.8rem;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s ease;
}
.wa-fab:hover .wa-fab-tooltip { opacity: 1; }

/* ============================================================================
   CONTACT FORM (propio — reemplaza iframe — B7/B26)
   ============================================================================ */
.zocco-contact-form {
    background: #fff;
    padding: 1.8rem;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}
.zocco-contact-form .form-control,
.zocco-contact-form .form-select { border-radius: 8px; }
.zocco-contact-form .form-label { color: #444; }
.zocco-contact-form .btn-dark {
    background: var(--brand-primary, #646569);
    border-color: var(--brand-primary, #646569);
    border-radius: 8px;
}
.zocco-contact-form .btn-dark:hover {
    background: var(--brand-primary-dark, #4a4b4f);
    border-color: var(--brand-primary-dark, #4a4b4f);
}
.zocco-hp {
    position: absolute;
    left: -9999px;
    width: 1px; height: 1px;
    overflow: hidden;
}
.cf-feedback.success { color: #198754; font-weight: 600; }
.cf-feedback.error   { color: #dc3545; font-weight: 600; }

/* ============================================================================
   PROPERTY DETAIL
   ============================================================================ */
.detalle-hero {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    padding: 2rem 0 1.5rem;
    margin-bottom: 1.5rem;
}
.detalle-hero h1 {
    font-size: clamp(1.4rem, 2.6vw, 2rem);
    margin-bottom: 0.5rem;
    color: #1f2024;
}
.detalle-hero .price-tag {
    display: inline-block;
    background: var(--brand-primary, #646569);
    color: #fff;
    padding: 0.5rem 1.2rem;
    border-radius: 24px;
    font-weight: 700;
    font-size: 1.1rem;
}
.detalle-hero .breadcrumb-mini {
    color: var(--brand-primary, #646569);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.property-features { margin: 0 -.25rem; }
.property-features .feature-item {
    background: #fff;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 1rem 0.8rem;
    text-align: center;
    margin: 0.25rem;
}
.property-features .feature-item i {
    font-size: 1.3rem;
    color: var(--brand-primary, #646569);
    display: block;
    margin-bottom: 0.4rem;
}
.property-features .feature-item .feature-value {
    font-weight: 700;
    color: #1f2024;
    font-size: 1.05rem;
}
.property-features .feature-item .feature-label {
    font-size: 0.78rem;
    color: #777;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.contact-sidebar { position: sticky; top: 90px; }

/* Carousel BS5 wrapper */
.detalle-carousel { border-radius: 12px; overflow: hidden; box-shadow: 0 4px 16px rgba(0,0,0,0.1); }
.detalle-carousel .carousel-item img,
.detalle-carousel .carousel-item iframe { width: 100%; height: 520px; object-fit: cover; display: block; }

/* Mapa */
.detalle-map iframe { width: 100%; height: 380px; border-radius: 10px; border: 0; }

/* ============================================================================
   MOBILE — padding 10px en 3 capas (B14b) + sticky off + cards compactas
   ============================================================================ */
@media (max-width: 768px) {
    .container, .container-fluid {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100% !important;
    }
    .row {
        --bs-gutter-x: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
    .row > [class*="col-"], .row > .col, .row > .col-12 {
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .property-features.row {
        --bs-gutter-x: 0.5rem !important;
        margin-left: -0.25rem !important;
        margin-right: -0.25rem !important;
    }
    .property-features.row > [class*="col-"] {
        padding-left: 0.25rem !important;
        padding-right: 0.25rem !important;
    }

    .contact-sidebar { position: static !important; top: auto !important; }
    .detalle-carousel .carousel-item img,
    .detalle-carousel .carousel-item iframe { height: 280px; }
    .detalle-hero { padding: 1.5rem 10px 1rem; }
    .detalle-hero h1 { font-size: 1.3rem; }
    .detalle-hero .price-tag { font-size: 1rem; padding: 0.4rem 1rem; }
    .property-features .feature-item { padding: 0.75rem 0.5rem; }
    .property-features .feature-item i { font-size: 1.2rem; }
    .mb-4 { margin-bottom: 1rem !important; }

    .zocco-hero { min-height: 380px; }
    .boton-operacion { min-width: 180px; font-size: 1rem; padding: 0.7rem 1.2rem; }

    .property-card__title { font-size: 1rem; min-height: auto; }

    .wa-fab { width: 50px; height: 50px; font-size: 1.5rem; bottom: 16px; right: 16px; }
    .wa-fab-tooltip { display: none; }
}

/* ============================================================================
   UTILITARIOS y misc
   ============================================================================ */
.text-brand { color: var(--brand-primary, #646569) !important; }
.bg-brand   { background: var(--brand-primary, #646569) !important; color: #fff; }
.btn-brand  {
    background: var(--brand-primary, #646569);
    border-color: var(--brand-primary, #646569);
    color: #fff;
}
.btn-brand:hover {
    background: var(--brand-primary-dark, #4a4b4f);
    border-color: var(--brand-primary-dark, #4a4b4f);
    color: #fff;
}

.fade-in { animation: fadeIn .6s ease forwards; opacity: 0; }
@keyframes fadeIn { to { opacity: 1; } }
