@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

/* Sobreescribir cualquier contendor del tema que pueda estar limitando el ancho */
body, html {
    overflow-x: hidden; /* Prevenir scroll horizontal */
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

/* Si hay un contenedor principal que esté limitando el ancho, sobreescríbelo */
.container, 
.content, 
.container-fluid, 
.wrapper-main, 
main, 
.main-content,
#content,
#main,
.site-content {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    margin-left: auto !important;
    margin-right: auto !important;
    overflow-x: hidden !important;
}

/* ESTILOS DEL CARRUSEL PRINCIPAL - CORREGIDOS PARA EFECTO FADE */
.main {
    position: relative;
    width: 100vw;
    height: 60vh;
    margin: 100px 0 0 0;
    overflow: hidden;
    z-index: 1;
}

.main.swiper.mySwiper {
    width: 100vw !important;
    /* height: 60vh !important; */
    max-width: 100% !important;
     max-height: 800px;
    position: relative;
    margin: 100px 0 0 0;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.main .swiper-wrapper {
    width: 100%;
    height: 100%;
}

.main .swiper-slide {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Filtro para slides */
.main .slide.filtro::before {
    content: "";
    position: absolute;
    height: 100%;
    width: 100%;
    background-color: rgba(0, 0, 0, 0.4);
    z-index: 10;
}

/* Imágenes y video del carrusel principal */
.main .slide .image,
.main .slide video {
    height: 100%;
    width: 100%;
    object-fit:cover;
    display: block;
}

/* Navegación y paginación del carrusel principal */
.main .swiper-button-next,
.main .swiper-button-prev {
    display: none; /* Oculta las flechas */
    color: white;
    background: rgba(0, 0, 0, 0.3);
    width: 50px;
    height: 50px;
    border-radius: 50%;
    margin-top: -25px;
    z-index: 20;
}

.main .swiper-button-next:hover,
.main .swiper-button-prev:hover {
    background: rgba(0, 0, 0, 0.5);
}

.main .swiper-button-next {
    right: 20px;
}

.main .swiper-button-prev {
    left: 20px;
}

.main .swiper-button-next::after,
.main .swiper-button-prev::after {
    font-size: 20px;
    font-weight: bold;
}

.main .swiper-pagination {
    bottom: 20px;
    z-index: 20;
}

.main .swiper-pagination-bullet {
    background: rgba(255, 255, 255, 0.5);
    opacity: 1;
    width: 12px;
    height: 12px;
}

.main .swiper-pagination-bullet-active {
    background: white;
}

/* ESTILOS DEL CARRUSEL DE PROPIEDADES (TARJETAS) */
.slide-container {
    max-width: 1200px;
    width: 100%;
    margin: 30px auto;
    padding: 30px 0;
    position: relative;
    z-index: 2;
}

.slide-content {
    position: relative;
    padding: 0 40px;
    margin: 0 auto;
    overflow: hidden;
}

.card-wrapper.swiper-wrapper {
    align-items: stretch; /* Permite que las tarjetas tengan alturas diferentes si es necesario */
}

.card.swiper-slide {
    background-color: #FFF;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    height: auto; /* CORRECCIÓN: Permite que la altura sea flexible */
    display: flex;
    flex-direction: column;
}

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

.image-content {
    position: relative;
    width: 100%;
    padding-top: 56.25%; /* Proporción 16:9 para la imagen */
    flex-shrink: 0;
}

.card-image {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

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

.property-header {
    padding: 15px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid var(--grisclaro);
    flex-shrink: 0;
}

.property-type {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--grisoscuro);
}

.property-price {
    font-size: 1.5rem;
    font-weight: 600;
    border-bottom: 4px solid var(--grisoscuro);
}

.card-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1; /* Permite que esta sección crezca para llenar el espacio */
    gap: 10px;
}

.property-title {
    font-size: 20px;
    font-weight: 500;
    color: var(--grisoscuro);
}

.property-location {
    font-size: 1rem;
    color: var(--grismedio);
    padding-bottom: 15px;
    border-bottom: 1px solid var(--grisclaro);
}

.property-features {
    display: flex;
    gap: 20px;
    margin-bottom: 10px;
}

.feature {
    display: flex;
    align-items: center;
    gap: 5px;
    color: var(--grismedio);
}

.feature i {
    font-size: 20px;
}

.button {
    width: 100%;
    padding: 12px;
    background-color: var(--grisoscuro);
    color: #FFF;
    border: none;
    text-decoration: none;
    border-radius: 30px;
    text-align: center;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.5px;
    margin-top: auto; /* Empuja el botón al final de la tarjeta */
}


.button:hover {
    background-color: #333;
}

/* Navegación y paginación del carrusel de propiedades */
.slide-container .swiper-button-next,
.slide-container .swiper-button-prev {
    color: var(--grisoscuro);
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid #ddd;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-top: -22.5px;
}

.slide-container .swiper-button-next:hover,
.slide-container .swiper-button-prev:hover {
    background: white;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
}

.slide-container .swiper-button-next { right: 10px; }
.slide-container .swiper-button-prev { left: 10px; }

.slide-container .swiper-button-next::after,
.slide-container .swiper-button-prev::after {
    font-size: 16px;
    font-weight: bold;
}

.slide-container .swiper-pagination {
    position: relative;
    bottom: auto;
    margin-top: 25px;
}

.slide-container .swiper-pagination-bullet {
    background: var(--grisclaro);
    opacity: 1;
    width: 10px;
    height: 10px;
}

.slide-container .swiper-pagination-bullet-active {
    background: var(--grisoscuro);
}


/* ESTILOS DE BÚSQUEDA */
.search-section {
    padding: 40px 0;
    text-align: center;
    width: 100%;
    margin-bottom: 30px;
}

.search-title {
    font-size: 2.5rem;
    color: var(--grisoscuro);
    margin-top: 20px !important;
    margin-bottom: 30px !important;
    font-weight: 500;
    text-align: center;
}

.sub-title {
    font-size: 1.5rem;
    color: var(--grisoscuro);
    margin-bottom: 40px;
    text-align: center;
}

.search-options {
    display: flex;
    width: 100%;
    height: 500px;
}

.search-option {
    flex: 1;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease;
    height: 100%;
}

.search-option:hover .search-overlay {
    background: rgba(0, 0, 0, 0.4);
}

.search-option img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.search-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: 0.3s ease;
}

.search-overlay-title {
    color: white;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 20px;
    text-transform: uppercase;
}

.search-button {
    background-color: white;
    color: var(--grisoscuro);
    border: none;
    padding: 10px 50px;
    border-radius: 0px;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.search-button:hover {
    background-color: var(--grisclaro);
    color: var(--grisoscuro);
    transform: translateY(-2px);
}

/* =================================================================
   MEDIA QUERIES OPTIMIZADAS 
   ================================================================= */

@media screen and (max-width: 1024px) {
    /* Ajustes generales para tablets y móviles */
    .search-title {
        font-size: 2.2rem;
        padding: 0 20px;
    }
}

@media screen and (max-width: 768px) {
    /* --- Carrusel Principal en Móviles --- */
    .main {
        height: 50vh;
        margin-top: 80px;
    }
    
    /* --- Carrusel de Propiedades en Tablets y Móviles --- */
    .slide-container {
        padding: 40px 0;
    }

    .slide-content {
        padding: 0 20px; /* Reducimos el padding lateral */
    }

    /* Ocultamos las flechas en pantallas táctiles para una experiencia más limpia */
    .slide-container .swiper-button-next,
    .slide-container .swiper-button-prev {
        display: none;
    }

    /* --- Sección de Búsqueda --- */
    .search-options {
        flex-direction: column;
        height: auto;
    }

    .search-option {
        height: 300px;
    }

    .search-overlay-title {
        font-size: 1.8rem;
    }
}

@media screen and (max-width: 480px) {
    /* Ajustes finos para móviles pequeños */
    .slide-content {
        padding: 0 15px; /* Aún menos padding */
    }

    /* --- Textos de las tarjetas --- */
    .property-type,
    .property-price {
        font-size: 1.1rem;
    }

    .property-title {
        font-size: 1.2rem;
    }

    .property-location {
        font-size: 0.9rem;
    }

    .feature {
        font-size: 0.9rem;
    }

    .button {
        padding: 10px;
        font-size: 0.9rem;
    }
    
    /* --- Sección de búsqueda en móviles pequeños --- */
    .search-option {
        height: 250px;
    }

    .search-overlay-title {
        font-size: 1.5rem;
    }

    .search-button {
        padding: 10px 30px;
        font-size: 0.9rem;
    }
}