/* ===============================
   BUSCADOR DE VIVIENDA 1
================================ */

.hero-search {
    position: relative;
    min-height: 93vh;
    background-image: url('/img/banner_img_index.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.65);
    z-index: 1;
}

.z-2 {
    position: relative;
    z-index: 2;
}

.hero-title {
    font-size: 42px;
    font-weight: 700;
    color: #f5a623;
}

.hero-subtitle {
    font-size: 18px;
    opacity: .9;
}

.search-box-modern {
    background: rgba(255,255,255,0.95);
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0,0,0,.25);
}

.position-relative {
    position: relative !important;
    box-shadow: 5px 1px 15px #0000;
}


/* ===============================
   BUSCADOR DE VIVIENDA 2
================================ */

.form-select-lg {
    font-size: 1rem;
}

.form-select {
    color: #000;
}

.search-hero {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.py-8 {
    padding-top: 5rem !important;
    padding-bottom: 5rem !important;
}

.search-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('/img/banner_img_buscador.png');
    background-size: cover;
    background-position: center;
    z-index: 0;
}

.search-bg::after {
    content: "";
    position: absolute;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.45);
    top: 0;
    left: 0;
    z-index: 0;
}

.search-box {
    backdrop-filter: blur(0px);
    position: relative;
    z-index: 2;
}


/* ===============================
   RESULTADOS BUSCADOR
================================ */

.resultados-section {
    background: #f2f2f2;
}

.modelo-card {
    background: #fff;
    border-radius: 6px;
    overflow: hidden;
    box-shadow: 0 4px 18px rgba(0,0,0,0.12);
    transition: all .3s ease;
    display: flex;
    flex-direction: column;
    height: 100%;
}

.modelo-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.18);
}

.modelo-img {
    position: relative;
    height: auto;
    overflow: hidden;
}

.modelo-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.modelo-body {
    padding: 20px;
    flex-grow: 1;
}

.modelo-titulo {
    font-weight: 600;
    margin-bottom: 8px;
}

.modelo-precio {
    font-weight: 700;
    font-size: 18px;
    margin-bottom: 12px;
    color: #000;
}

.modelo-desc {
    font-size: 14px;
    color: #666;
}

.modelo-footer {
    background: #f8f8f8;
    padding: 12px;
    display: flex;
    justify-content: space-between;
    font-size: 13px;
    border-top: 1px solid #eee;
}

.modelo-footer div {
    display: flex;
    align-items: center;
    gap: 5px;
}


/* ===============================
   MODELO DE VIVIENDA
================================ */

body {
    background: #f5f5f5;
}

.model-title {
    font-weight: 700;
    font-size: 32px;
}

.main-image {
    border-radius: 8px;
    overflow: hidden;
}

.card-info {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,.05);
}

.section-title {
    font-weight: 700;
    margin-bottom: 20px;
}

.property-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 8px rgba(0,0,0,.06);
    transition: 0.3s;
}

.property-card:hover {
    transform: translateY(-5px);
}

.advisor-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
}

.brochure-box {
    background: #fff;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
}

.map-container {
    border-radius: 8px;
    overflow: hidden;
    background: #ddd;
    height: 350px;
}

.form-box {
    background: #fff;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 3px 10px rgba(0,0,0,.05);
}


/* ===============================
   BOTON CALL TO ACTION
================================ */

html {
    scroll-behavior: smooth;
}

.cta-flotante {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
    background: #FDA12B;
    color: #fff;
    padding: 16px 20px;
    font-size: 14px;
    font-weight: 600;
    border-radius: 8px 0 0 8px;
    text-decoration: none;
    box-shadow: 0 5px 20px rgba(0,0,0,0.35);
    z-index: 9999;
    transition: all .3s ease;
}

.cta-flotante:hover {
    background: #FBAC46;
    color: #fff;
    padding-right: 25px;
}

@media (max-width: 768px) {
    .cta-flotante {
        font-size: 12px;
        padding: 14px 10px;
        top: 65%;
    }
}


/* ===============================
   FILTROS (NUEVO BLOQUE)
================================ */

/* CONTENEDOR NORMAL */
.filtros-container {
    width: 100%;
    position: relative;
}

.filtros-contenido {
    border-radius: 16px;
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

/* WRAPPER BASE */
#filtrosWrapper {
    width: 100%;
    transition: 
        width 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        transform 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
        box-shadow 0.3s ease,
        padding 0.3s ease,
        border-radius 0.3s ease,
        top 0.3s ease;

    will-change: transform, width;
}

/* STICKY */
#filtrosWrapper.sticky {
    position: fixed;
    top: 80px;
    left: 50%;
    transform: translate(-50%, -10px);
    animation: flotarSuave 0.4s ease forwards;
    width: 60%;
    max-width: 900px;
    padding: 12px 20px;
    border-radius: 16px;
    z-index: 1000;
}

/* ANIMACIÓN */
@keyframes flotarSuave {
    from {
        transform: translate(-50%, -25px);
        opacity: 0;
        scale: 0.97;
    }
    to {
        transform: translate(-50%, 0);
        opacity: 1;
        scale: 1;
    }
}

/* COMPACTO */
#filtrosWrapper.compacto {
    padding: 8px 15px;
}

#filtrosWrapper.compacto select {
    font-size: 13px;
}

/* CARD */
.filtros-card {
    background: #ffffff;
    border-radius: 18px;
    padding: 20px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
}

.filtros-card:hover {
    box-shadow: 0 12px 35px rgba(0,0,0,0.12);
}

/* GRID */
.filtros-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 15px;
}

/* ITEMS */
.filtro-item {
    display: flex;
    flex-direction: column;
}

.filtro-item label {
    font-size: 12px;
    font-weight: 600;
    color: #888;
    margin-bottom: 5px;
}

.filtro-item select {
    border: 1px solid #e5e5e5;
    border-radius: 10px;
    padding: 10px;
    font-size: 14px;
    transition: all 0.25s ease;
    background: #fafafa;
    width: 100%;
    min-width: 0;
}

.filtro-item select:hover {
    border-color: #007bff;
    background: #fff;
}

.filtro-item select:focus {
    outline: none;
    border-color: #007bff;
    box-shadow: 0 0 0 2px rgba(0,123,255,0.15);
}

/* TABLET */
@media (max-width: 1150px) {
    .filtros-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    #filtrosWrapper.sticky {
        width: 95%;
        padding: 10px;
    }

    #filtrosWrapper.compacto select {
        font-size: 12px;
    }
}

/* MOBILE GRID */
@media (max-width: 500px) {
    .filtros-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    #filtrosWrapper.sticky {
        width: 85%;
    }
}

/* BOTÓN MOBILE */
.btn-filtros-mobile {
    display: none;
    background: #ffffff;
    border: 1px solid #e5e5e5;
    border-radius: 999px;
    width: 100%;
    height: 42px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
    align-items: center;
    justify-content: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.btn-filtros-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.12);
    border-color: #f59e0b;
}

/* MOBILE ACORDEÓN */
@media (max-width: 767px) {

    .btn-filtros-mobile {
        display: flex;
    }

    #filtrosWrapper {
        overflow: hidden;
        transition: all 0.4s ease;
    }

    #filtrosWrapper.cerrado {
        max-height: 60px;
    }

    #filtrosWrapper.abierto {
        max-height: 2000px;
    }

    .filtros-contenido {
        padding-top: 10px;
    }
}

/* EXTRA */
@media (min-width: 768px) {
    .btn-filtros-mobile {
        display: none !important;
    }
}