/* Styling for Properties Page */

/* Resets y Comunes - Heredados de estructura base pero asegurados aquí */
* {
    box-sizing: border-box;
    font-family: Arial, sans-serif;
}

/* Contenedor Principal */
.contenedor-propiedades {
    width: 100%;
    margin: 0 auto;
}

/* Buscador y Filtros */
.buscador-seccion {
    background: #f4f4f4;
    padding: 30px 20px;
    text-align: center;
}

.buscador-input {
    width: 100%;
    max-width: 600px;
    padding: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    outline: none;
}

.filtros-tabs {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 20px;
}

.tab-btn {
    padding: 10px 25px;
    border: 2px solid #6A8921;
    background: transparent;
    color: #6A8921;
    font-weight: bold;
    cursor: pointer;
    border-radius: 25px;
    transition: all 0.3s;
    font-size: 1rem;
}

.tab-btn.active,
.tab-btn:hover {
    background: #6A8921;
    color: white;
}

/* Grid de Propiedades */
.propiedades-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 30px;
    padding: 40px 20px;
    justify-content: center;
}

.propiedad-card {
    background: white;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s;
    display: flex;
    flex-direction: column;
}

.propiedad-card:hover {
    transform: translateY(-5px);
}

.propiedad-img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.propiedad-info {
    padding: 20px;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.propiedad-titulo {
    font-size: 1.2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 10px;
}

.propiedad-ubicacion {
    font-size: 0.9rem;
    color: #666;
    margin-bottom: 15px;
}

.propiedad-precio {
    font-size: 1.3rem;
    font-weight: bold;
    color: #6A8921;
    margin-top: auto;
}

.propiedad-tipo {
    display: inline-block;
    padding: 5px 10px;
    background: #eee;
    color: #555;
    border-radius: 4px;
    font-size: 0.8rem;
    margin-bottom: 10px;
    text-transform: uppercase;
    font-weight: bold;
}

/* ------------------------------------------- */
/* 1. Escritorio Extragrande (min-width: 1367px) */
/* ------------------------------------------- */
@media (min-width: 1367px) {
    .contenedor-propiedades {
        max-width: 1300px;
    }

    .propiedad-card {
        width: calc(33.333% - 20px);
    }
}

/* ------------------------------------------- */
/* 2. Escritorio Grande (1281px - 1366px) */
/* ------------------------------------------- */
@media (min-width: 1281px) and (max-width: 1366px) {
    .contenedor-propiedades {
        max-width: 1200px;
    }

    .propiedad-card {
        width: calc(33.333% - 20px);
    }
}

/* ------------------------------------------- */
/* 3. Escritorio Mediano (1025px - 1280px) */
/* ------------------------------------------- */
@media (min-width: 1025px) and (max-width: 1280px) {
    .contenedor-propiedades {
        max-width: 1000px;
    }

    .propiedad-card {
        width: calc(50% - 20px);
    }

    /* 2 columnas */
}

/* ------------------------------------------- */
/* 4. Tablet / iPad (768px - 1024px) */
/* ------------------------------------------- */
@media (min-width: 768px) and (max-width: 1024px) {
    .contenedor-propiedades {
        width: 95%;
    }

    .propiedad-card {
        width: calc(50% - 20px);
    }

    /* .propiedad-img aspect-ratio: 1/1 handles height */
}

/* ------------------------------------------- */
/* 5. Móvil Horizontal / Grandes (481px - 767px) */
/* ------------------------------------------- */
@media (min-width: 481px) and (max-width: 767px) {
    .contenedor-propiedades {
        width: 95%;
    }

    .propiedad-card {
        width: 100%;
        max-width: 400px;
    }

    /* .propiedad-img aspect-ratio: 1/1 handles height */

    .filtros-tabs {
        flex-wrap: wrap;
    }
}

/* ------------------------------------------- */
/* 6. Móvil Vertical (320px - 480px) */
/* ------------------------------------------- */
@media (min-width: 320px) and (max-width: 480px) {
    .contenedor-propiedades {
        width: 100%;
    }

    .propiedad-card {
        width: 100%;
    }

    /* .propiedad-img aspect-ratio: 1/1 handles height */

    .tab-btn {
        width: 100%;
        margin-bottom: 5px;
    }

    .filtros-tabs {
        flex-direction: column;
        padding: 0 20px;
    }
}