@font-face {
    font-family: 'Montserrat';
    src: url('../Font/Montserrat-SemiBold.woff2') format('woff2');
}

@font-face {
    font-family: 'Sole Serif Display';
    src: url('../Font/sole-serif-display-bold.otf') format('opentype');
}

html,
body {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

.site-main {
    flex: 1;
}

/* ==========================================
   Filtros
   ========================================== */

.filtro {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px;
    font: 600 16px 'Montserrat', sans-serif;
}

.filtro-group-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    max-width: 1200px;
    padding: 20px;
    background: #122548;
    color: #fff5e0;
    border-radius: 20px;
}

.filtro-group-top select {
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font: inherit;
}

.filtro-group-bottom {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    width: 100%;
    max-width: 900px;
    margin: 20px auto;
}

.floating-group {
    position: relative;
    width: 220px;
}

.floating-group input {
    width: 100%;
    padding: .85rem 1rem .45rem;
    border: 1px solid #122548;
    border-radius: 30px;
    box-sizing: border-box;
    outline: none;
    background: transparent;
    color: #122548;
    font-family: 'Montserrat', sans-serif;
}

.floating-group label {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    padding: 0 .35rem;
    background: white;
    color: #122548;
    transition: .25s;
    pointer-events: none;
}

.floating-group input:focus + label,
.floating-group input:not(:placeholder-shown) + label {
    top: 0;
    font-size: .75rem;
    color: #17305e;
}

/* Contenedor del doble slider */
.slider-container {
    position: relative;
    width: 250px;
    height: 40px;
}

/* Línea fija del slider */
.slider-container::before {
    content: "";
    position: absolute;
    width: 100%;
    height: 8px;
    top: 16px;
    background: #d9d9d9;
    border-radius: 10px;
}

/* Inputs de rango */
.range-slider {
    position: absolute;
    width: 100%;
    height: 8px;
    top: 16px;
    background: none;
    pointer-events: none;
    appearance: none;
    -webkit-appearance: none;
    margin: 0;
}

/* Barra del navegador Chrome */
.range-slider::-webkit-slider-runnable-track {
    height: 8px;
    background: transparent;
}

/* Botones circulares */
.range-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    margin-top: -6px;
    background: #122548;
    border: 2px solid #fff5e0;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
    transition: transform .1s ease;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

/* Firefox */
.range-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    background: #122548;
    border: 2px solid #fff5e0;
    border-radius: 50%;
    cursor: pointer;
    pointer-events: auto;
}

#aplicar_filtro {
    width: 180px;
    margin: 20px auto;
    padding: 10px 20px;
    border: none;
    border-radius: 30px;
    background: #122548;
    color: #fff5e0;
    font: inherit;
    cursor: pointer;
    transition: .3s;
}

#aplicar_filtro:hover {
    background: #17305e;
    color: gray;
}

.titulo-filtros {
    display: none;
}

/* ==========================================
   Catálogo
   ========================================== */

.catalogo-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    justify-items: center;
    padding-bottom: 30px;
}

.propiedad-card {
    display: flex;
    flex-direction: column;
    width: 450px;
    height: 600px;
    background: #fff5e0;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(18, 37, 72, 0.15);
}

.propiedad-img {
    width: 100%;
    height: 295px;
    object-fit: cover;
}

.propiedad-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    padding: 25px;
    font-family: 'Montserrat', sans-serif;
}

.propiedad-info h2 {
    margin: 0 0 10px;
    font-size: 24px;
}

.precio-mxn {
    font-size: 18px;
    font-weight: bold;
    color: #122548;
}

.info_card {
    display: flex;
    justify-content: space-between;
    margin: 15px 0;
}

.propiedad_detalles {
    margin-top: auto;
    width: 180px;
    padding: 10px 20px;
    text-align: center;
    text-decoration: none;
    background: #122548;
    color: #fff5e0;
    border-radius: 30px;
    transition: .3s;
}

.propiedad_detalles:hover {
    background: #17305e;
    color: gray;
}

/* ==========================================
   Paginación
   ========================================== */

.paginacion {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin: 50px 0;
    font-family: 'Montserrat', sans-serif;
}

.paginacion .paginacion-numero {
    width: 45px;
    height: 45px;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
    text-decoration: none;
    background: #fff5e0;
    color: #122548;
    font-weight: 700;
    transition: all 0.3s ease;
}

.paginacion .paginacion-numero:hover,
.paginacion .paginacion-numero.activo {
    background: #122548;
    color: #fff5e0;
}

.paginacion .paginacion-btn {
    text-decoration: none;
    color: #122548;
    font-weight: 700;
    font-size: 1rem;
    padding: 0 8px;
    background: transparent;
    transition: color 0.2s ease, transform 0.2s ease;
}

.paginacion a.paginacion-btn:hover {
    color: #3b82f6;
}

.paginacion .paginacion-btn.deshabilitado {
    color: #999999;
    cursor: not-allowed;
    opacity: 0.6;
}

/* ==========================================
   Widget Chat WhatsApp / Burbuja Flotante
   ========================================== */

.chat-widget {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 12px;
    font-family: 'Montserrat', sans-serif;
}

/* Agrupador horizontal para alinear botón + mensaje a la izquierda */
.chat-burbuja-container {
    display: flex;
    flex-direction: row-reverse; /* Pone el botón a la derecha y el mensaje a la izquierda */
    align-items: center;
    gap: 10px;
}

/* Tarjeta desplegable de WhatsApp */
.chat-card {
    position: relative;
    max-width: 350px;
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    overflow: hidden;
    
    /* Control de animación para abrir/cerrar */
    display: none;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.chat-card.activo {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

/* Botón de cierre "X" */
.cerrar-chat {
    position: absolute;
    top: 15px;
    right: 15px;
    background: transparent;
    border: none;
    font-size: 1.3rem;
    color: #122548;
    cursor: pointer;
    opacity: 0.7;
    transition: all 0.2s ease;
    z-index: 10;
    padding: 0;
    line-height: 1;
}

.cerrar-chat:hover {
    opacity: 1;
    transform: scale(1.15);
    color: #e74c3c;
}

.chat-texto {
    padding: 30px 25px 25px;
    color: #122548;
}

.chat-texto h3 {
    margin: 0 0 10px;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
}

.chat-texto p {
    margin: 0 0 20px;
    font-size: 0.9rem;
    line-height: 1.5;
    color: #555;
}

.asesor {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 20px;
}

.asesor img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid #fff5e0;
}

.asesor div {
    display: flex;
    flex-direction: column;
}

.asesor strong {
    font-size: 0.95rem;
    font-weight: 700;
}

.asesor span {
    font-size: 0.8rem;
    color: #777;
}

.btn-whatsapp {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    padding: 12px;
    background-color: #25d366;
    color: #ffffff;
    border-radius: 10px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    box-sizing: border-box;
    transition: background-color 0.3s ease;
}

.btn-whatsapp:hover {
    background-color: #1ebe57;
}

/* Mensaje pequeño a la IZQUIERDA del botón circular */
.mensaje-burbuja {
    position: relative;
    background: #122548; /* Fondo azul obscuro */
    color: #ffffff;
    padding: 10px 18px;
    border-radius: 30px;
    font-size: 0.9rem;
    font-weight: 600;
    white-space: nowrap; /* Mantiene el texto en una sola línea */
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

/* Flecha apuntando a la DERECHA (hacia el botón de la imagen) */
.mensaje-burbuja::after {
    content: "";
    position: absolute;
    top: 50%;
    right: -8px; /* Coloca el triángulo pegado al borde derecho del mensaje */
    transform: translateY(-50%);
    border-width: 6px 0 6px 8px;
    border-style: solid;
    border-color: transparent transparent transparent #122548;
}

/* Botón circular principal */
.burbuja {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: #122548;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    padding: 0;
    overflow: hidden;
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.burbuja:hover {
    transform: scale(1.05);
}

.burbuja img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* ==========================================
   Responsive - Teléfono
   ========================================== */

@media (max-width: 768px) {

    .filtro {
        width: 100%;
        padding: 20px 15px 30px;
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .titulo-filtros {
        width: 100%;
        max-width: 360px;
        margin: 0 auto 20px;
        text-align: center;
        font-family: 'Montserrat', sans-serif;
        font-size: 2rem;
        color: #122548;
    }

    .filtro-form {
        width: 70%;
        display: flex;
        flex-direction: column;
        align-items: center;
        margin-right: 30px;
    }

    .filtro-group-top {
        width: 100%;
        max-width: 400px;
        display: flex;
        flex-direction: column;
        gap: 18px;
        padding: 25px;
        background: #fff;
        border-radius: 25px;
        box-shadow: 0 8px 25px rgba(0,0,0,.12);
    }

    .filtro-group-top label {
        margin-bottom: 5px;
        font-size: .95rem;
        font-weight: 600;
        color: #122548;
    }

    .filtro-group-top select {
        width: 100%;
        height: 52px;
        padding: 0 18px;
        border: 1px solid #d8d8d8;
        border-radius: 14px;
        background: white;
        font-size: 1rem;
        color: #122548;
    }

    .filtro-group-bottom {
        width: 100%;
        max-width: 470px;
        display: flex;
        flex-direction: column;
        gap: 20px;
        margin-top: 45px;
    }

    #precio {
        display: none;
    }

    .floating-group {
        width: 100%;
    }

    .floating-group input {
        width: 100%;
        height: 55px;
        box-sizing: border-box;
    }

    .floating-group label {
        background: #fff;
    }

    #aplicar_filtro {
        width: 100%;
        height: 56px;
        margin-top: 10px;
        border-radius: 16px;
        font-size: 1.1rem;
        font-weight: 600;
    }

    .catalogo-grid {
        grid-template-columns: 1fr;
        gap: 25px;
        padding: 0 15px 30px;
    }

    .propiedad-card {
        width: 90%;
        max-width: 360px;
        height: auto;
    }

    .propiedad-img {
        height: 220px;
    }

    .propiedad-info {
        padding: 20px;
    }

    .propiedad-info h2 {
        font-size: 1.4rem;
    }

    .precio-mxn {
        font-size: 1.15rem;
    }

    .info_card {
        display: flex;
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .propiedad_detalles {
        width: 100%;
        box-sizing: border-box;
        text-align: center;
    }

    .chat-card {
        max-width: 290px;
    }
}