/* ============================================================
   house-2.css — Capa moderna BS5 para HOUSE Negocios Inmobiliarios
   Color institucional derivado del logo (edificio azul + slate).
   ============================================================ */
:root {
    --brand-primary: #24486a;
    --brand-primary-dark: #1a3450;
    --brand-primary-light: #3f6fb5;
    --brand-accent: #2f5fae;
}

/* ---- Globales ---- */
body { font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; color: #2a2a2a; }
[hidden] { display: none !important; }   /* B34: que [hidden] gane a display:flex/grid */

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

/* ---- Mapeo de utilidades BS5 al color de marca ---- */
.btn-primary {
    --bs-btn-bg: var(--brand-primary); --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: var(--brand-primary-dark); --bs-btn-hover-border-color: var(--brand-primary-dark);
    --bs-btn-active-bg: var(--brand-primary-dark); --bs-btn-active-border-color: var(--brand-primary-dark);
}
.btn-outline-primary {
    --bs-btn-color: var(--brand-primary); --bs-btn-border-color: var(--brand-primary);
    --bs-btn-hover-bg: var(--brand-primary); --bs-btn-hover-border-color: var(--brand-primary);
    --bs-btn-active-bg: var(--brand-primary); --bs-btn-active-border-color: var(--brand-primary);
}
.text-primary { color: var(--brand-primary) !important; }
.bg-primary, .badge.bg-primary { background-color: var(--brand-primary) !important; }

/* ---- Navbar ---- */
.house-navbar { z-index: 1030; }
.house-navbar .nav-link { color: #2a2a2a; font-weight: 500; padding-inline: .9rem; }
.house-navbar .nav-link:hover,
.house-navbar .nav-link.active { color: var(--brand-primary); }
.house-navbar .nav-link.active { border-bottom: 2px solid var(--brand-primary); }

/* ---- Encabezados de sección ---- */
.section-title { font-weight: 700; color: #1f1f1f; position: relative; display: inline-block; padding-bottom: .5rem; }
.section-title::after {
    content: ""; position: absolute; left: 50%; transform: translateX(-50%); bottom: 0;
    width: 56px; height: 3px; background: var(--brand-primary); border-radius: 2px;
}

/* ---- Hero ---- */
.house-hero {
    position: relative; isolation: isolate; min-height: 460px; display: flex; align-items: center;
    background: var(--brand-primary-dark) center/cover no-repeat; overflow: hidden;
}
.house-hero::before { content: ""; position: absolute; inset: 0; z-index: -1;
    background: linear-gradient(180deg, rgba(26,52,80,.55), rgba(26,52,80,.75)); }
.house-hero__bg { position: absolute; inset: -2%; z-index: -2; background: center/cover no-repeat;
    animation: houseKenBurns 24s ease-in-out infinite alternate; will-change: transform; }
@keyframes houseKenBurns { 0% { transform: scale(1); } 100% { transform: scale(1.1); } }
.house-hero h1 { color: #fff; font-weight: 700; }
.house-hero p { color: rgba(255,255,255,.9); }

/* ---- Buscador ---- */
.buscador-card { background: #fff; border-radius: 12px; box-shadow: 0 8px 30px rgba(0,0,0,.12); padding: 1.5rem; }
select.custom-select, select.custom-select-movil {
    display: block; width: 100%; height: 46px; padding: .375rem .75rem;
    border: 1px solid #ced4da; border-radius: 8px; background-color: #fff;
    font-size: 1rem; color: #2a2a2a; appearance: auto;
}
select.custom-select:focus { border-color: var(--brand-primary); outline: 0; box-shadow: 0 0 0 .2rem rgba(36,72,106,.15); }

/* ---- Property cards ---- */
.property-card { border: 0; border-radius: 10px; transition: transform .2s ease, box-shadow .2s ease; }
.property-card:hover { transform: translateY(-4px); box-shadow: 0 .75rem 1.5rem rgba(0,0,0,.15) !important; }
.property-card__img { width: 100%; height: 100%; object-fit: cover; }
.property-card__badge {
    position: absolute; top: .6rem; left: .6rem; z-index: 2;
    background: var(--brand-primary); color: #fff; font-size: .8rem; font-weight: 600;
}
.property-card__price { color: var(--brand-primary); font-size: 1.15rem; font-weight: 700; }
/* Zoom suave de la foto al pasar el cursor */
.property-card__img { transition: transform .7s cubic-bezier(.2,.7,.2,1); }
.property-card:hover .property-card__img { transform: scale(1.08); }
/* Capas de la mini-galería en hover (crossfade) */
.property-card__img--layer { opacity: 0; transition: opacity .6s ease, transform .7s cubic-bezier(.2,.7,.2,1); z-index: 1; }
.property-card__img--layer.is-active { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
    .property-card__img, .property-card:hover .property-card__img { transition: none; transform: none; }
}
/* B11: stacking context propio para que badges nunca escapen sobre la navbar */
.property-card { isolation: isolate; }
/* B20: anular franja roja legacy de .property-features vacía */
.property-features:empty { display: none !important; }

/* ---- WhatsApp FAB ---- */
.wa-fab {
    position: fixed; right: 22px; bottom: 26px; z-index: 1040;
    width: 58px; height: 58px; border-radius: 50%; background: #25d366; color: #fff;
    display: flex; align-items: center; justify-content: center; font-size: 30px;
    box-shadow: 0 6px 18px rgba(0,0,0,.25); text-decoration: none;
    animation: waBob 2.4s ease-in-out infinite;
}
.wa-fab:hover { color: #fff; background: #1ebe5b; }
.wa-fab::after {
    content: ""; position: absolute; inset: 0; border-radius: 50%;
    box-shadow: 0 0 0 0 rgba(37,211,102,.6); animation: waPulse 2.4s ease-out infinite;
}
.wa-fab .wa-tooltip {
    position: absolute; right: 70px; background: #1f2937; color: #fff; font-size: .85rem;
    white-space: nowrap; padding: .35rem .6rem; border-radius: 6px; opacity: 0; pointer-events: none;
    transition: opacity .2s ease;
}
.wa-fab:hover .wa-tooltip { opacity: 1; }
@keyframes waBob { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-5px); } }
@keyframes waPulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,.5); } 70% { box-shadow: 0 0 0 16px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }
@media (prefers-reduced-motion: reduce) { .wa-fab, .wa-fab::after, .house-hero__bg { animation: none; } }

/* ---- Animaciones scroll (reemplaza wow.js) ---- */
[data-animate] { opacity: 0; transform: translateY(24px); transition: opacity .6s ease, transform .6s ease; }
[data-animate].in-view { opacity: 1; transform: none; }

/* ---- Estado de formularios ---- */
.form-estado[hidden], .form-msg[hidden] { display: none !important; }   /* B34 reforzado */

/* ---- Form de contacto propio (reemplaza iframe B7/B26) ---- */
.rf-honeypot { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.rf-contact-form .required { color: #d33; }
.rf-contact-submit {
    border: 0; border-radius: 8px; padding: .65rem 1.4rem; font-weight: 600; color: #fff;
    background: var(--brand-primary); transition: background .2s ease;
}
.rf-contact-submit:hover:not(:disabled) { background: var(--brand-primary-dark); }
.rf-contact-submit:disabled { opacity: .7; cursor: progress; }
.rf-contact-submit .spinner {
    display: inline-block; width: 1em; height: 1em; vertical-align: -.15em;
    border: 2px solid rgba(255,255,255,.5); border-top-color: #fff; border-radius: 50%;
    animation: rfSpin .7s linear infinite;
}
@keyframes rfSpin { to { transform: rotate(360deg); } }
.rf-contact-feedback { margin-top: .75rem; padding: .65rem .85rem; border-radius: 8px; font-size: .95rem; }
.rf-contact-feedback.is-ok    { background: #e7f6ec; color: #1c6b35; border: 1px solid #b6e0c2; }
.rf-contact-feedback.is-error { background: #fdeaea; color: #a02525; border: 1px solid #f3c2c2; }

/* ============================================================
   Mobile — padding lateral 10px real (B14b: BS5 acumula en 3 capas)
   ============================================================ */
@media (max-width: 768px) {
    .container, .container-fluid { padding-left: 10px !important; padding-right: 10px !important; max-width: 100% !important; }
    .row { --bs-gutter-x: .75rem; }
    .house-hero { min-height: 360px; }
    .house-hero h1 { font-size: 1.6rem; }
    .section-title { font-size: 1.4rem; }
    .wa-fab { width: 52px; height: 52px; font-size: 27px; right: 16px; bottom: 18px; }
}
