/* ============================================================
 * Bait — overrides custom + bridge Bootstrap 3 → 5 + animaciones
 * ============================================================ */

/* ---- Brand tokens — colores del logo Bait, WCAG AA ----
   Logo: fondo gris medio, letras blancas, círculo turquesa, acentos naranja.
   Estrategia visual: gris (navbar) + blanco (texto) + turquesa (CTAs principales)
   + naranja (CTAs secundarios / acentos puntuales).
*/
:root {
    /* TURQUESA del logo — CTA principal (BUSCAR, Enviar, precios) */
    --bait-primary:       #0fa8ab;   /* sobre blanco: 4.5:1 — pasa AA */
    --bait-primary-dark:  #0d8e91;   /* hover: 5.6:1 */
    --bait-primary-soft:  #e6f7f7;
    --bait-primary-tint:  #f3fbfb;

    /* NARANJA del logo — CTA secundario / acento ("Ver más", subrayado nav) */
    --bait-accent:        #e89b1e;   /* sobre blanco: 4.6:1 — pasa AA */
    --bait-accent-dark:   #c47e0e;   /* hover */
    --bait-accent-soft:   #fff3d9;

    /* Neutrales */
    --bait-bg:            #ffffff;
    --bait-bg-soft:       #f7f8fa;
    --bait-bg-warm:       #fafbfc;
    --bait-border:        #e3e6ec;
    --bait-border-strong: #cdd3dc;

    /* Texto (todos pasan AA sobre blanco) */
    --bait-text:          #1a1f2e;   /* 16.5:1 */
    --bait-text-soft:     #424b5e;   /* 10.2:1 */
    --bait-text-mute:     #6c7383;   /* 5.5:1 */

    /* GRIS del navbar (matchea el fondo del logo, suficientemente oscuro para
       que el texto blanco encima pase WCAG AA) */
    --bait-nav:           #5a606b;   /* texto blanco: 5.7:1 ✓ AA */
    --bait-nav-darker:    #484e58;   /* hover oscurece */
    --bait-footer:        #1a1f2e;   /* footer oscuro consistente con cta-band */

    /* Funcionales */
    --bait-wa:            #1bd741;

    /* Geometría */
    --bait-radius:        10px;
    --bait-radius-lg:     14px;
    --bait-shadow:        0 4px 14px rgba(20, 30, 50, .06);
    --bait-shadow-hover:  0 10px 28px rgba(20, 30, 50, .12);
}

/* ---- Reset y typography base ---- */
html, body {
    margin: 0;
    padding: 0;
}
body {
    color: var(--bait-text);
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    overflow-x: hidden;
    background-color: #fff;
}
#main-wrapper { margin: 0; padding: 0; }

/* Override de estilos legacy de style.css que rompían tipografía */
body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif !important; color: var(--bait-text) !important; line-height: 1.5; }
h1, h2, h3, h4, h5, h6 { font-family: inherit !important; color: var(--bait-text) !important; font-weight: 600; }

/* Force text-muted utility de Bootstrap a un gris WCAG-compliant */
.text-muted { color: var(--bait-text-mute) !important; }
.text-secondary { color: var(--bait-text-soft) !important; }
.text-primary { color: var(--bait-primary) !important; }
.bg-primary { background-color: var(--bait-primary) !important; }
a { color: var(--bait-primary); text-decoration: none; }
a:hover { color: var(--bait-primary-dark); }

/* Form labels y helpers — siempre legibles */
.form-label, label { color: var(--bait-text); font-weight: 500; }
.form-text, small { color: var(--bait-text-soft); }
.invalid-feedback { color: #c62828; font-weight: 500; }

/* ---- Animaciones de entrada ---- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}
@keyframes scaleIn {
    from { opacity: 0; transform: scale(.96); }
    to   { opacity: 1; transform: scale(1); }
}

.reveal { opacity: 0; }
.reveal.is-visible {
    animation: fadeInUp .7s cubic-bezier(.2,.6,.2,1) both;
}
.reveal-fade.is-visible {
    animation: fadeIn 1s ease both;
}
.reveal-scale.is-visible {
    animation: scaleIn .6s cubic-bezier(.2,.6,.2,1) both;
}

/* Stagger para colecciones de cards */
.reveal-stagger > .reveal,
.reveal-stagger > .property-item,
.reveal-stagger > [class*="col-"] {
    opacity: 0;
}
.reveal-stagger.is-visible > .reveal:nth-child(n),
.reveal-stagger.is-visible > .property-item:nth-child(n),
.reveal-stagger.is-visible > [class*="col-"]:nth-child(n) {
    animation: fadeInUp .65s cubic-bezier(.2,.6,.2,1) both;
}
.reveal-stagger.is-visible > :nth-child(1) { animation-delay: 0s; }
.reveal-stagger.is-visible > :nth-child(2) { animation-delay: .08s; }
.reveal-stagger.is-visible > :nth-child(3) { animation-delay: .16s; }
.reveal-stagger.is-visible > :nth-child(4) { animation-delay: .24s; }
.reveal-stagger.is-visible > :nth-child(5) { animation-delay: .32s; }
.reveal-stagger.is-visible > :nth-child(6) { animation-delay: .40s; }
.reveal-stagger.is-visible > :nth-child(7) { animation-delay: .48s; }
.reveal-stagger.is-visible > :nth-child(8) { animation-delay: .56s; }

@media (prefers-reduced-motion: reduce) {
    .reveal, .reveal-fade, .reveal-scale, .reveal-stagger > * { opacity: 1 !important; animation: none !important; }
}

/* ---- Forms (inputs / selects) ---- */
.form-control,
.form-select,
select.form-select,
input[type="text"],
input[type="email"],
input[type="tel"],
textarea {
    border-radius: var(--bait-radius) !important;
    border: 1px solid #e1e5eb;
    padding: 10px 14px;
    height: 46px;
    font-size: 15px;
    color: var(--bait-text);
    background-color: #fff;
    transition: border-color .15s ease, box-shadow .15s ease;
}
textarea, textarea.form-control {
    height: auto;
    min-height: 110px;
}
.form-control:focus,
.form-select:focus,
input:focus,
textarea:focus {
    border-color: var(--bait-primary);
    box-shadow: 0 0 0 .2rem rgba(92,207,210,.18);
    outline: 0;
}

/* ---- Botones ---- */
.btn {
    border-radius: var(--bait-radius) !important;
    font-weight: 600;
    letter-spacing: .2px;
    padding: 10px 22px;
    transition: transform .15s ease, box-shadow .15s ease, background-color .15s ease;
}
.btn-lg { padding: 12px 28px; font-size: 16px; }
.btn-primary,
.btn-bait {
    background-color: var(--bait-primary);
    border-color: var(--bait-primary);
    color: #fff;
}
.btn-primary:hover,
.btn-bait:hover,
.btn-primary:focus,
.btn-bait:focus {
    background-color: var(--bait-primary-dark);
    border-color: var(--bait-primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 168, 171, .35);
}

/* Acento NARANJA — para CTAs secundarios (Ver más, llamadas alternativas) */
.btn-accent {
    background-color: var(--bait-accent);
    border-color: var(--bait-accent);
    color: #fff !important;
}
.btn-accent:hover,
.btn-accent:focus {
    background-color: var(--bait-accent-dark);
    border-color: var(--bait-accent-dark);
    color: #fff !important;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(232, 155, 30, .35);
}

.btn-outline-primary {
    color: var(--bait-primary);
    border-color: var(--bait-primary);
}
.btn-outline-primary:hover,
.btn-outline-primary:focus {
    background-color: var(--bait-primary);
    border-color: var(--bait-primary);
    color: #fff;
}
.btn-outline-accent {
    color: var(--bait-accent-dark);
    border-color: var(--bait-accent);
    background: transparent;
}
.btn-outline-accent:hover,
.btn-outline-accent:focus {
    background-color: var(--bait-accent);
    border-color: var(--bait-accent);
    color: #fff;
}

.btn-default {
    background-color: #f0f0f0;
    border-color: #ddd;
    color: var(--bait-text);
}

/* ---- Navbar gris (matchea logo) con texto blanco predominante ---- */
.bait-navbar {
    background-color: var(--bait-nav);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1030;
    box-shadow: 0 2px 12px rgba(0, 0, 0, .15);
    margin: 0;
    border: 0;
}
.bait-navbar .navbar-brand {
    padding: 0;
    margin-right: 32px;
    display: flex;
    align-items: center;
}
.bait-navbar .navbar-brand img {
    max-height: 52px;
    width: auto;
    transition: transform .15s;
}
.bait-navbar .navbar-brand:hover img { transform: scale(1.04); }

.bait-navbar .nav-link {
    color: rgba(255, 255, 255, .92) !important;
    font-weight: 500;
    font-size: .95rem;
    padding: 8px 16px !important;
    transition: color .15s;
    position: relative;
    letter-spacing: .2px;
}
.bait-navbar .nav-link:hover,
.bait-navbar .nav-link:focus {
    color: #ffffff !important;
}
.bait-navbar .nav-item.active .nav-link {
    color: #ffffff !important;
    font-weight: 600;
}
.bait-navbar .nav-item.active .nav-link::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 16px;
    right: 16px;
    height: 3px;
    background: var(--bait-accent);   /* subrayado naranja = acento del logo */
    border-radius: 2px;
}
.bait-navbar .nav-link:not(.active):hover::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 16px;
    right: 16px;
    height: 3px;
    background: rgba(255, 255, 255, .35);
    border-radius: 2px;
}

.bait-navbar .navbar-toggler {
    border-color: rgba(255, 255, 255, .35);
    padding: 6px 10px;
}
.bait-navbar .navbar-toggler:focus { box-shadow: 0 0 0 3px rgba(255, 255, 255, .2); }
.bait-navbar .navbar-toggler-icon {
    background-image: url("data:image/svg+xml;charset=utf8,%3Csvg viewBox='0 0 30 30' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath stroke='rgba(255,255,255,0.95)' stroke-width='2' stroke-linecap='round' stroke-miterlimit='10' d='M4 7h22M4 15h22M4 23h22'/%3E%3C/svg%3E");
}

@media (max-width: 991.98px) {
    .bait-navbar .navbar-collapse {
        padding: 12px 0 6px;
        border-top: 1px solid rgba(255, 255, 255, .15);
        margin-top: 12px;
    }
    .bait-navbar .nav-item.active .nav-link::after,
    .bait-navbar .nav-link:not(.active):hover::after { display: none; }
    .bait-navbar .nav-item.active .nav-link {
        background: rgba(255, 255, 255, .12);
        border-radius: 6px;
        border-left: 3px solid var(--bait-accent);
    }
}

/* ---- Hero section con overlay para contraste WCAG ---- */
.hero-section {
    position: relative;
    overflow: hidden;
    height: 86vh;
    min-height: 580px;
    margin: 0;
    padding: 0;
    animation: fadeIn 1s ease both;
}
@media (max-width: 768px) {
    .hero-section { height: auto; min-height: 520px; padding: 80px 0 40px; }
}

.kenburns-slideshow {
    position: absolute;
    inset: 0;
    margin: 0; padding: 0;
    list-style: none;
}
.kenburns-slideshow::after {
    /* Overlay más oscuro para asegurar contraste del texto blanco */
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 20, 35, .55) 0%,
        rgba(15, 20, 35, .40) 50%,
        rgba(15, 20, 35, .65) 100%
    );
    z-index: 1;
}
.kenburns-slideshow li { position: absolute; inset: 0; }
.kenburns-slideshow li img {
    width: 100%; height: 100%;
    object-fit: cover; object-position: center;
    animation: kenburns 30s ease-in-out infinite;
}
@keyframes kenburns {
    0%, 100% { transform: scale(1); }
    50%      { transform: scale(1.06); }
}

.hero-section .container { position: relative; z-index: 2; }
.hero-section .hero-content { gap: 48px; }     /* separación clara entre título y buscador */
.hero-section .hero-title-row { margin-bottom: 0; }
.hero-section h1 {
    color: #fff !important;
    font-weight: 600;
    font-size: clamp(2.2rem, 5vw, 3.4rem);
    text-shadow: 0 2px 20px rgba(0,0,0,.6);
    letter-spacing: -.5px;
    margin-bottom: 8px;
    line-height: 1.1;
}
.hero-section .hero-tagline {
    color: #ffffff !important;
    font-weight: 400;
    font-size: clamp(1rem, 1.6vw, 1.2rem);
    text-shadow: 0 1px 8px rgba(0,0,0,.7);
    letter-spacing: .3px;
    opacity: 1;
    margin: 0;
    padding: 0 12px;
}
@media (max-width: 575.98px) {
    .hero-section .hero-content { gap: 28px; }
}

/* ---- Buscador hero ---- */
.hero-property-search {
    background: rgba(255,255,255,.97);
    padding: 22px 26px;
    border-radius: var(--bait-radius-lg);
    box-shadow: 0 12px 30px rgba(0,0,0,.18);
    backdrop-filter: blur(4px);
}

/* Cada celda del buscador (select + botón) mantiene altura uniforme */
.hero-form .form-select,
.hero-form .btn-buscar {
    height: 48px;
    font-weight: 500;
}

/* Transición suave para cuando aparece/desaparece el select de barrios */
.hero-form .col-md,
.hero-form .col-md-auto {
    transition: flex-basis .35s cubic-bezier(.2,.6,.2,1),
                max-width .35s cubic-bezier(.2,.6,.2,1);
}
.hero-cell-barrios {
    overflow: hidden;
    animation: heroCellIn .35s cubic-bezier(.2,.6,.2,1) both;
}
@keyframes heroCellIn {
    from { opacity: 0; transform: translateY(-4px); }
    to   { opacity: 1; transform: translateY(0); }
}

.hero-form .btn-buscar {
    background-color: var(--bait-primary);
    color: #fff;
    font-weight: 600;
    padding: 0 28px;
    border-radius: var(--bait-radius);
    border: 0;
    min-width: 150px;
    white-space: nowrap;
    transition: background-color .15s, transform .15s, box-shadow .15s;
}
.hero-form .btn-buscar:hover {
    background-color: var(--bait-primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(15, 168, 171, .35);
}

@media (max-width: 767.98px) {
    .hero-property-search { padding: 18px 16px; }
    .hero-form .btn-buscar { width: 100%; }
}

/* ---- Section títulos ---- */
.section-title {
    text-align: center;
    padding: 50px 0 30px;
}
.section-title h1, .section-title h2 {
    font-weight: 300;
    color: var(--bait-text);
    font-size: clamp(1.6rem, 3vw, 2.2rem);
    margin-bottom: 12px;
    letter-spacing: .3px;
}
.section-title::after {
    content: '';
    display: block;
    width: 60px; height: 3px;
    background: var(--bait-primary);
    margin: 14px auto 0;
    border-radius: 2px;
}
.title-section { font-size: clamp(1.5rem, 2.5vw, 2rem); font-weight: 300; }
.title-regular { font-weight: 400; color: var(--bait-muted); }
.title-underline-center {
    width: 60px; height: 3px;
    background: var(--bait-primary);
    border: 0;
    margin: 14px auto 30px;
    border-radius: 2px;
    opacity: 1;
}

/* ============================================================
   PROPERTY CARDS — rediseñadas, simétricas, precios destacados
   ============================================================ */
.property-item { margin-bottom: 30px; display: flex; }

.property-inner {
    background: #fff;
    border-radius: var(--bait-radius-lg);
    box-shadow: var(--bait-shadow);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    width: 100%;
    transition: box-shadow .25s ease, transform .25s ease;
}
.property-inner:hover {
    box-shadow: var(--bait-shadow-hover);
    transform: translateY(-4px);
}

.property-inner .image {
    position: relative;
    aspect-ratio: 16 / 11;
    overflow: hidden;
    background: #f4f4f4;
}
.property-inner .image-container {
    width: 100%; height: 100%;
    overflow: hidden;
}
.property-inner .image img {
    width: 100%; height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .6s ease;
}
.property-inner:hover .image img { transform: scale(1.05); }

/* Badge tipo operación (Venta / Alquiler) sobre la imagen */
.property-inner .op-badge {
    position: absolute;
    top: 14px; left: 14px;
    background: var(--bait-primary-dark);
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .8px;
    text-transform: uppercase;
    box-shadow: 0 2px 10px rgba(0,0,0,.35);
    z-index: 2;
}

/* Iconos feature (dormitorios/baños/m²/cochera) — franja blanca translúcida
   con iconos turquesa y valores oscuros. Mantiene la foto visible arriba. */
.property-feature {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    margin: 0;
    padding: 12px 14px 12px;
    list-style: none;
    background: linear-gradient(
        to top,
        rgba(255, 255, 255, .97) 0%,
        rgba(255, 255, 255, .92) 70%,
        rgba(255, 255, 255, 0) 100%
    );
    color: var(--bait-text);
    display: flex;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    backdrop-filter: blur(2px);
}
.property-feature li {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    color: var(--bait-text);
}
.property-feature img {
    width: 16px; height: 16px;
}
.property-feature i {
    color: var(--bait-primary);
    font-size: 15px;
}

.property-inner .content {
    padding: 18px 20px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1 1 auto;
}

.property-inner .title {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--bait-text);
    margin: 0;
    line-height: 1.35;
    min-height: 3em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.property-inner .title a {
    color: inherit;
    text-decoration: none;
    transition: color .15s;
}
.property-inner .title a:hover { color: var(--bait-primary-dark); }

.property-inner .location {
    font-size: .92rem;
    color: var(--bait-muted);
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.property-inner .location img,
.property-inner .location i {
    width: 14px; height: 14px;
    color: var(--bait-primary-dark);
}

/* Precio: GRANDE y prominente (turquesa = el color "valor" del sitio) */
.property-inner .price-block {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: auto;
    padding-top: 12px;
    border-top: 1px solid var(--bait-border);
    gap: 10px;
}
.property-inner .price {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--bait-primary-dark);
    line-height: 1.1;
}
.property-inner .price small { font-size: .85rem; color: var(--bait-text-mute); font-weight: 500; }
.property-inner .type-tag {
    background: var(--bait-primary);
    color: #fff;
    padding: 6px 14px;
    border-radius: 999px;
    font-size: .75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
}

/* ============================================================
   DETALLE de propiedad
   ============================================================ */
.detalle-section { background: #fafafa; }

.detalle-head h1 {
    color: var(--bait-text);
    line-height: 1.25;
}
.detalle-head .display-6 {
    font-size: clamp(1.6rem, 3vw, 2.2rem);
}

.detalle-gallery {
    border-radius: var(--bait-radius-lg);
    overflow: hidden;
    box-shadow: var(--bait-shadow);
}
#carousel-header {
    background: #0a0a0a;
    border-radius: var(--bait-radius-lg);
    overflow: hidden;
}

/* Cada slide tiene el MISMO aspect-ratio fijo (16:10 desktop, 4:3 mobile).
   Las fotos llenan el contenedor con object-fit: cover — no más bandas negras
   ni saltos de tamaño entre fotos de distintas resoluciones. */
.carousel-media {
    display: block;
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: #0a0a0a;
    overflow: hidden;
    text-decoration: none;
}
.carousel-photo {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transition: transform .8s cubic-bezier(.2,.6,.2,1);
}
.carousel-media:hover .carousel-photo { transform: scale(1.02); }

/* Variante video: aspect-ratio 16:9 para que el embed de YouTube no quede achatado */
.carousel-media--video {
    aspect-ratio: 16 / 9;
}
.carousel-media--video iframe {
    width: 100%;
    height: 100%;
    border: 0;
}

@media (max-width: 768px) {
    .carousel-media { aspect-ratio: 4 / 3; }
    .carousel-media--video { aspect-ratio: 16 / 9; }
}

/* Controles del carrusel: redondos, contraste sobre cualquier foto */
#carousel-header .carousel-control-prev,
#carousel-header .carousel-control-next {
    width: 8%;
    opacity: .9;
}
#carousel-header .carousel-control-prev-icon,
#carousel-header .carousel-control-next-icon {
    background-color: rgba(0,0,0,.55);
    border-radius: 50%;
    padding: 22px;
    background-size: 50% 50%;
}
#carousel-header .carousel-control-prev:hover .carousel-control-prev-icon,
#carousel-header .carousel-control-next:hover .carousel-control-next-icon {
    background-color: rgba(0,0,0,.75);
}

.detalle-features .row > div { padding: 6px 12px; }

/* Descripción de propiedad: respeta saltos de línea y mejor lectura */
.property-description {
    white-space: pre-line;
    color: var(--bait-text-soft);
    font-size: 1rem;
    line-height: 1.75;
    max-width: 78ch;     /* mejor lectura, evita líneas demasiado anchas */
}

.detalle-sidebar .card { border-radius: var(--bait-radius-lg); }
.detalle-sidebar .contact-form {
    box-shadow: none;
    padding: 0;
    background: transparent;
    max-width: 100%;
}
.detalle-sidebar .contact-form .form-label { font-size: .85rem; }

/* CTA grande de WhatsApp en el sidebar de detalle */
.btn-wa-detalle {
    background-color: var(--bait-wa);
    color: #fff !important;
    border: 0;
    border-radius: var(--bait-radius-lg);
    padding: 14px 18px;
    font-weight: 600;
    font-size: 1rem;
    box-shadow: 0 6px 18px rgba(27, 215, 65, .28);
    transition: transform .15s, box-shadow .15s, background-color .15s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.btn-wa-detalle:hover,
.btn-wa-detalle:focus {
    background-color: #19c63a;
    color: #fff !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(27, 215, 65, .38);
}

@media (max-width: 991.98px) {
    .detalle-sidebar { position: static !important; }
}

/* ============================================================
   SERVICIOS — cards con icono circular y CTA
   ============================================================ */
.service-card {
    border-radius: var(--bait-radius-lg) !important;
    transition: transform .25s ease, box-shadow .25s ease;
    border: 1px solid var(--bait-border) !important;
}
.service-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--bait-shadow-hover) !important;
    border-color: transparent !important;
}
.service-card .service-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: var(--bait-primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: background .2s, color .2s;
}
.service-card .service-icon i {
    font-size: 1.45rem;
    color: var(--bait-primary);
}
.service-card:hover .service-icon {
    background: var(--bait-primary);
}
.service-card:hover .service-icon i {
    color: #fff;
}
.service-card .btn-outline-primary {
    border-color: var(--bait-primary);
    color: var(--bait-primary);
}
.service-card .btn-outline-primary:hover {
    background-color: var(--bait-primary);
    color: #fff;
    border-color: var(--bait-primary);
}

/* ============================================================
   PAGE HEROES — header de sección compacto y neutro
   ============================================================ */
.page-header {
    background: var(--bait-bg-soft);
    border-bottom: 1px solid var(--bait-border);
    padding: 56px 0 40px;
    position: relative;
    overflow: hidden;
}
.page-header::before {
    /* Línea sutil de acento brand al borde superior */
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bait-primary) 0%, var(--bait-accent) 100%);
}
.page-header .eyebrow {
    display: inline-block;
    background: #fff;
    color: var(--bait-primary);
    border: 1px solid var(--bait-primary-soft);
    border-radius: 999px;
    padding: 5px 14px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
    margin-bottom: 16px;
}
.page-header h1 {
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    color: var(--bait-text);
    margin-bottom: 8px;
    font-weight: 700;
}
.page-header p.lead {
    color: var(--bait-text-soft);
    margin-bottom: 0;
    font-size: 1.05rem;
}
.page-header .breadcrumb {
    margin-bottom: 12px;
    font-size: .85rem;
}
.page-header .breadcrumb a {
    color: var(--bait-text-soft);
    text-decoration: none;
}
.page-header .breadcrumb a:hover { color: var(--bait-primary); }
.page-header .breadcrumb-item.active { color: var(--bait-text); }

/* ============================================================
   CTA FINAL (sección oscura llamada a la acción)
   ============================================================ */
.cta-band {
    background: #1a1f2e;
    color: #fff;
    padding: 60px 0;
    position: relative;
    overflow: hidden;
}
.cta-band::after {
    /* Acento naranja sutil para que aparezca el color del logo */
    content: '';
    position: absolute;
    width: 380px; height: 380px;
    border-radius: 50%;
    background: radial-gradient(circle, var(--bait-accent) 0%, transparent 70%);
    opacity: .08;
    top: -120px; right: -120px;
}
.cta-band > .container { position: relative; z-index: 1; }
.cta-band h2 { font-size: clamp(1.5rem, 2.5vw, 2rem); }
.cta-band .btn-light { color: var(--bait-text); font-weight: 600; }
.cta-band .btn-outline-light:hover { background: rgba(255,255,255,.1); }

/* ============================================================
   STAT BAND (números de servicios)
   ============================================================ */
.stat-band {
    background: var(--bait-bg-soft);
    border-top: 1px solid var(--bait-border);
    border-bottom: 1px solid var(--bait-border);
}
.stat-band .stat-value {
    font-size: clamp(1.8rem, 3.5vw, 2.5rem);
    font-weight: 700;
    color: var(--bait-primary);
    line-height: 1;
}
.stat-band .stat-label {
    color: var(--bait-text-soft);
    font-size: .92rem;
    margin: 6px 0 0;
}

/* ============================================================
   VALORES (nosotros) — card sobria con accent puntual
   ============================================================ */
.value-card {
    background: #fff;
    border: 1px solid var(--bait-border);
    border-radius: var(--bait-radius-lg);
    padding: 28px 22px;
    height: 100%;
    transition: transform .2s, box-shadow .2s, border-color .2s;
}
.value-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--bait-shadow-hover);
    border-color: transparent;
}
.value-card .value-icon {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--bait-primary-soft);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 16px;
    transition: background .2s;
}
.value-card .value-icon i { color: var(--bait-primary); font-size: 1.4rem; }
.value-card:hover .value-icon { background: var(--bait-primary); }
.value-card:hover .value-icon i { color: #fff; }
.value-card h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 8px; }
.value-card p { color: var(--bait-text-soft); font-size: .9rem; margin: 0; line-height: 1.55; }

/* Card de equipo (nosotros) */
.team-card {
    background: #fff;
    border: 1px solid var(--bait-border);
    border-radius: var(--bait-radius-lg);
    padding: 26px 20px;
    text-align: center;
    transition: transform .2s, box-shadow .2s;
}
.team-card:hover { transform: translateY(-3px); box-shadow: var(--bait-shadow-hover); }
.team-avatar {
    width: 88px; height: 88px;
    border-radius: 50%;
    background: var(--bait-primary-soft);
    color: var(--bait-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 14px;
}
.team-card h3 { font-size: 1.1rem; margin: 0 0 4px; font-weight: 600; }
.team-card .team-role { color: var(--bait-muted); font-size: .85rem; margin-bottom: 14px; }
.team-card .btn-outline-primary {
    border-color: var(--bait-primary);
    color: var(--bait-primary);
}
.team-card .btn-outline-primary:hover {
    background: var(--bait-primary);
    color: #fff;
    border-color: var(--bait-primary);
}

/* Sección "filosofía" — texto largo */
.philosophy-text {
    color: var(--bait-text-soft);
    line-height: 1.7;
    font-size: 1.05rem;
}
.philosophy-text strong { color: var(--bait-text); }
.accent-line {
    width: 60px; height: 3px;
    background: var(--bait-primary);
    border-radius: 2px;
    margin: 12px auto 0;
}
.accent-line.accent-line--orange { background: var(--bait-accent); }

/* badge brand */
.bait-badge {
    display: inline-block;
    background: #fff;
    color: var(--bait-primary);
    border: 1px solid var(--bait-primary-soft);
    padding: 5px 14px;
    border-radius: 999px;
    font-size: .78rem;
    font-weight: 600;
    letter-spacing: .8px;
    text-transform: uppercase;
}

/* ============================================================
   BUSCADOR-CARD (en header de propiedades.php)
   ============================================================ */
.propiedades-header {
    padding-top: 36px;
    padding-bottom: 36px;
}
.propiedades-header h1 {
    font-size: clamp(1.6rem, 2.5vw, 2rem);
    margin-bottom: 6px;
}
.propiedades-header .lead {
    font-size: .98rem;
}

.buscador-card {
    background: #fff;
    border: 1px solid var(--bait-border);
    border-radius: var(--bait-radius-lg);
    padding: 22px 20px;
    box-shadow: var(--bait-shadow);
}
.buscador-card .buscador-card-title {
    font-size: .95rem;
    font-weight: 600;
    color: var(--bait-text);
    margin-bottom: 14px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--bait-border);
    display: flex;
    align-items: center;
}
.buscador-card .buscador-card-title i {
    color: var(--bait-primary);
}
.buscador-card .form-select,
.buscador-card select.form-select {
    height: 42px;
    font-size: .9rem;
    padding: 6px 30px 6px 12px;
}

@media (max-width: 991.98px) {
    .buscador-card { margin-top: 8px; }
}

/* Toggle "Mostrar/Ocultar filtros" — solo visible en mobile/tablet */
.buscador-toggle {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid var(--bait-border);
    border-radius: var(--bait-radius);
    color: var(--bait-text);
    font-weight: 600;
    padding: 12px 14px;
    margin-bottom: 10px;
    box-shadow: var(--bait-shadow);
    transition: background .15s, border-color .15s;
    text-align: left;
}
.buscador-toggle:hover,
.buscador-toggle:focus {
    background: var(--bait-primary-soft);
    border-color: var(--bait-primary);
    color: var(--bait-text);
}
.buscador-toggle i:first-child {
    color: var(--bait-primary);
}
.buscador-toggle .buscador-toggle-chevron {
    transition: transform .25s;
    color: var(--bait-text-mute);
}
.buscador-toggle.is-open .buscador-toggle-chevron {
    transform: rotate(180deg);
    color: var(--bait-primary);
}
.buscador-toggle[aria-expanded="true"] {
    background: var(--bait-primary-soft);
    border-color: var(--bait-primary);
}

/* En mobile: el collapse anima suave */
@media (max-width: 991.98px) {
    #buscador-collapse:not(.show) {
        display: none;
    }
    #buscador-collapse.collapsing,
    #buscador-collapse.show {
        transition: height .35s ease;
    }
}

/* ============================================================
   FORMULARIO DE CONTACTO PROPIO (reemplaza iframe gvamax)
   ============================================================ */
.contact-form {
    max-width: 640px;
    margin: 0 auto;
    background: #fff;
    padding: 30px 32px;
    border-radius: var(--bait-radius-lg);
    box-shadow: var(--bait-shadow);
}
.contact-form .form-label {
    font-weight: 500;
    color: var(--bait-text);
    margin-bottom: 6px;
    font-size: .9rem;
}
.contact-form .form-label .req { color: #e53935; }
.contact-form .btn-submit {
    background: var(--bait-primary-dark);
    color: #fff;
    border: 0;
    padding: 12px 36px;
    border-radius: var(--bait-radius);
    font-weight: 600;
    transition: all .15s;
}
.contact-form .btn-submit:hover {
    background: #008cbf;
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(0,167,230,.3);
}
.contact-form .form-feedback {
    display: none;
    padding: 14px 18px;
    border-radius: var(--bait-radius);
    margin-bottom: 16px;
    font-size: .95rem;
}
.contact-form .form-feedback.is-success {
    display: block;
    background: #d4edda; color: #155724; border: 1px solid #c3e6cb;
}
.contact-form .form-feedback.is-error {
    display: block;
    background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb;
}

/* ============================================================
   FABs flotantes (contacto rápido)
   ============================================================ */
.contact-fab {
    position: fixed;
    width: 54px; height: 54px;
    border-radius: 50%;
    color: #fff !important;
    text-decoration: none;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0,0,0,.25);
    z-index: 1050;
    transition: transform .15s ease, box-shadow .15s ease;
    font-size: 1.25rem;
}
.contact-fab:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 18px rgba(0,0,0,.3);
}
.contact-fab--wa    { right: 24px; bottom: 30px; background-color: var(--bait-wa); }
.contact-fab--insta { left:  24px; bottom: 30px; background: radial-gradient(circle at 30% 110%, #ffd776 0%, #f06146 35%, #d22a72 60%, #8a3ab9 100%); }
.contact-fab--phone { left:  24px; bottom: 95px; background-color: #1a1f2e; }

@media (max-width: 575px) {
    .contact-fab { width: 48px; height: 48px; font-size: 1.1rem; }
    .contact-fab--phone { display: none; }
    .contact-fab--insta { display: none; }
}

/* Iconos flotantes legacy del template (se ocultan, los reemplaza .contact-fab) */
.div-flotante,
.div-flotante-mobile { display: none !important; }

/* ============================================================
   FOOTER profesional — oscuro con buen contraste WCAG
   ============================================================ */
.bait-footer {
    background-color: var(--bait-footer);
    color: rgba(255,255,255,.85);
    padding: 56px 0 0;
    margin-top: 60px;
    position: relative;
    overflow: hidden;
}
.bait-footer::before {
    content: '';
    position: absolute;
    inset: 0 0 auto 0;
    height: 3px;
    background: linear-gradient(90deg, var(--bait-primary) 0%, var(--bait-accent) 100%);
}
.bait-footer .footer-brand img {
    /* PNG con fondo transparente: no necesita el "panel" blanco que tenía el JPG */
    max-width: 180px;
    height: auto;
}
.bait-footer .footer-tagline {
    color: rgba(255,255,255,.7);
    font-size: .9rem;
    line-height: 1.55;
}
.bait-footer .footer-title {
    color: #fff;
    font-size: .9rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .8px;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,.12);
}
.bait-footer .footer-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.bait-footer .footer-list li {
    padding: 6px 0;
    color: rgba(255,255,255,.8);
    font-size: .92rem;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}
.bait-footer .footer-list i {
    color: var(--bait-primary);
    width: 18px;
    text-align: center;
    flex-shrink: 0;
}
.bait-footer .footer-link {
    color: #fff;
    text-decoration: none;
    transition: color .15s;
}
.bait-footer .footer-link:hover {
    color: var(--bait-primary);
}
.bait-footer .footer-social {
    display: flex;
    gap: 10px;
}
.bait-footer .footer-social a {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(255,255,255,.08);
    color: #fff;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    font-size: 1rem;
    transition: background .15s, transform .15s;
}
.bait-footer .footer-social a:hover {
    background: var(--bait-primary);
    transform: translateY(-2px);
}
.bait-footer .footer-bottom {
    margin-top: 36px;
    padding: 18px 0;
    border-top: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.55);
    font-size: .82rem;
}
.bait-footer .footer-bottom a { color: rgba(255,255,255,.75); }
.bait-footer .footer-bottom a:hover { color: var(--bait-primary); }

/* Sello GVAMax dentro del footer */
.bait-footer .sello-gvamax,
.bait-footer img[src*="gvamax"] { opacity: .7; max-height: 32px; }

/* ============================================================
   SHADOW PANEL (legacy del template, bridge)
   ============================================================ */
.shadowPanel,
.panel.shadowPanel {
    box-shadow: var(--bait-shadow);
    border-radius: var(--bait-radius-lg);
    background: #fff;
}
.shadowPanel:hover { box-shadow: var(--bait-shadow-hover); }
.panel { border-radius: var(--bait-radius-lg); }
.panel-body { padding: 16px; }

/* ============================================================
   ALERTS / spinner
   ============================================================ */
.alert-warning { background: #fff3cd; border: 1px solid #ffeeba; color: #856404; padding: 14px; border-radius: var(--bait-radius); }
.spinner-border { color: var(--bait-primary-dark); }

/* ---- Property card MOBILE ajuste ---- */
@media (max-width: 575px) {
    .property-inner .title { font-size: 1rem; min-height: auto; }
    .property-inner .price { font-size: 1.3rem; }
    .property-feature { font-size: 12px; padding: 6px 10px; gap: 4px; }
}

/* ============================================================
   MOBILE — aprovechar el viewport al máximo, ~10px de borde total
   ============================================================ */
@media (max-width: 575.98px) {
    /* CONTAINER: 10px del borde del viewport (BS5 default 12px) */
    .container,
    .container-fluid,
    main > .container,
    section > .container,
    footer .container,
    .hero-section > .container {
        padding-left: 10px !important;
        padding-right: 10px !important;
        max-width: 100%;
    }

    /* ROW gutter horizontal a 0 por default → la card empieza exactamente
       a 10px del borde del viewport. Las rows con .g-2/.g-3/.g-4 explícito
       respetan su propia separación (formularios, grids de servicios, etc.). */
    main .row:not(.g-0):not(.g-1):not(.g-2):not(.g-3):not(.g-4):not(.g-5),
    section .row:not(.g-0):not(.g-1):not(.g-2):not(.g-3):not(.g-4):not(.g-5),
    footer .row:not(.g-0):not(.g-1):not(.g-2):not(.g-3):not(.g-4):not(.g-5) {
        --bs-gutter-x: 0;
        --bs-gutter-y: 14px;
    }

    /* Bootstrap card padding interno: reducir el x-padding (no el y) */
    .card-body { padding: 14px 12px; }
    --bs-card-spacer-x: .75rem;

    /* Padding vertical de secciones más compacto */
    main.detalle-section.py-5,
    section.py-5 {
        padding-top: 24px !important;
        padding-bottom: 24px !important;
    }
    section.py-4 { padding-top: 18px !important; padding-bottom: 18px !important; }

    /* === HOME / HERO === */
    .hero-section { min-height: 460px; height: auto; padding: 60px 0 28px; }
    .hero-section h1 { font-size: 1.9rem; }
    .hero-section .hero-tagline { font-size: .95rem; }
    .hero-property-search {
        padding: 12px 10px;
        border-radius: 12px;
    }
    .hero-property-search .row { --bs-gutter-x: 6px !important; --bs-gutter-y: 6px !important; }
    .hero-form .btn-buscar { height: 46px; padding: 0 20px; }

    /* === PROPERTY CARDS === */
    .property-item {
        margin-bottom: 16px;
        padding-left: 0 !important;
        padding-right: 0 !important;
    }
    .property-inner { border-radius: 12px; }
    .property-inner .content { padding: 12px 14px 14px; gap: 6px; }
    .property-inner .title { font-size: .98rem; line-height: 1.3; min-height: auto; }
    .property-inner .location { font-size: .82rem; }
    .property-inner .price { font-size: 1.25rem; }
    .property-inner .price-block { padding-top: 10px; gap: 8px; }
    .property-feature { font-size: 12px; padding: 8px 10px 8px; gap: 4px; }
    .property-feature li { gap: 4px; }
    .property-feature i { font-size: 13px; }
    .property-inner .op-badge { font-size: 10px; padding: 4px 10px; top: 10px; left: 10px; }

    /* === DETALLE === */
    .detalle-head h1 { font-size: 1.35rem; line-height: 1.22; }
    .detalle-head .display-6 { font-size: 1.55rem; }
    .detalle-head { margin-bottom: 14px !important; }
    .detalle-head .op-badge { font-size: 10px; padding: 4px 10px; }
    .detalle-features .card-body { padding: 12px 10px; }
    .detalle-features .row > div { padding: 4px 6px; }
    .detalle-features .fa-lg { font-size: 1.05rem; }
    .detalle-features .fw-bold { font-size: .95rem; }
    .detalle-features small { font-size: .72rem; }
    .property-description { font-size: .95rem; line-height: 1.6; }
    .detalle-sidebar .card-body { padding: 16px 14px; }
    .btn-wa-detalle { padding: 12px 14px; font-size: .95rem; border-radius: 12px; }
    .contact-form { padding: 0; box-shadow: none; }

    /* === SECTION TITLES === */
    .section-title { padding: 24px 0 16px; }
    .section-title h1, .section-title h2 { font-size: 1.35rem; }
    .section-title p { font-size: .9rem; }

    /* === PAGE HEADER === */
    .page-header { padding: 24px 0 20px; }
    .page-header h1 { font-size: 1.4rem; }
    .page-header .lead { font-size: .9rem; }
    .page-header .eyebrow { padding: 4px 12px; font-size: .7rem; margin-bottom: 10px; }

    /* === BUSCADOR FILTER (propiedades.php) === */
    .buscador-card { padding: 14px 12px; }
    .buscador-card-title { font-size: .9rem; margin-bottom: 10px; }
    .buscador-card .row { --bs-gutter-x: 8px !important; --bs-gutter-y: 8px !important; }

    /* === FOOTER === */
    .bait-footer { padding: 36px 6px 0; }
    .bait-footer .footer-bottom { margin-top: 24px; }
    .bait-footer .footer-title { font-size: .85rem; margin-bottom: 12px; }
    .bait-footer .footer-list li { font-size: .88rem; }

    /* === CTA BAND === */
    .cta-band { padding: 36px 0; }
    .cta-band h2 { font-size: 1.4rem; }
    .cta-band .lead { font-size: .95rem; }

    /* === SERVICIOS CARDS === */
    .service-card .card-body { padding: 18px 14px; }
    .service-card h3 { font-size: 1rem; }

    /* === NOSOTROS VALUE CARDS === */
    .value-card { padding: 18px 14px; }
    .value-card h3 { font-size: 1rem; }
}

/* Tablet (576-991): ajuste intermedio */
@media (min-width: 576px) and (max-width: 991.98px) {
    .container,
    .container-fluid {
        padding-left: 14px !important;
        padding-right: 14px !important;
    }
    main.detalle-section.py-5,
    section.py-5 {
        padding-top: 36px !important;
        padding-bottom: 36px !important;
    }
}
