/* css/components.css - VERSIÓN FINAL INTEGRADA */

/* --- Estilos para las secciones de iconos --- */
.tipos-hospedaje,
.tipos-restaurantes,
.tipos-actividades {
    display: flex;
    justify-content: center;
    padding: 20px;
    flex-wrap: wrap;
}

/* Selector unificado para los íconos */
.icono-tarjeta {
    text-align: center;
    margin: 20px;
    min-width: 200px;
    background-color: #ffffff;
    border-radius: 8px;
    transition: background-color 0.3s ease, transform 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

.icono-tarjeta:hover {
    background-color: #f0f0f0;
    transform: translateY(-6px);
    box-shadow: 0 12px 25px rgba(0, 0, 0, 0.15);
}

.icono-tarjeta a {
    text-decoration: none;
    color: inherit;
    display: block;
    padding: 15px;
}

.icono-tarjeta h3 {
    margin-top: 10px;
    margin-bottom: 5px;
}

.icono-tarjeta p {
    font-size: 0.9em;
    color: #666;
}

/* --- Estilos para las tarjetas de contenido --- */

.cards-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 50px;
    padding: 20px;
    max-width: 1200px;
    margin: 0 auto;
    justify-content: center;
}

/* Sobreescribe la regla Grid para esta página */
.cards-container.servicios-layout {
    display: block; 
}

/* Para las secciones con pocas tarjetas (Hospedajes) */
.tarjetas-al-centro {
    display: flex;
    flex-direction: row; 
    justify-content: center; 
    flex-wrap: wrap;        
    gap: 100px; 
    padding: 20px;
}

/* --- LAYOUT SUBSECCIONES (.grid-subseccion) --- */
.grid-subseccion {
    display: grid;
    grid-template-columns: repeat(2, 1fr); 
    gap: 20px; 
    padding: 20px 10px;
    max-width: 1200px;
    margin: 0 auto; 
}

.grid-subseccion .card {
    width: auto; 
    min-height: 450px; 
    height: 100%;       
    flex-shrink: 0;
    display: flex;       
    flex-direction: column; 
    justify-content: flex-end; 
}

/* MEDIA QUERY: PANTALLAS GRANDES (Escritorio - 3 columnas generales) */
@media (min-width: 992px) {
    .grid-subseccion {
        grid-template-columns: repeat(3, 1fr);
        gap: 50px; 
        padding: 20px;
    }
}

.actividades-centradas {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 40px; 
    padding: 20px;
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.distribucion-especial {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 80px;
}

.restaurantes-layout {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
    gap: 20px;
}

/* Fila inferior de Otros Servicios */
.fila-inferior-servicios {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 100px;
}

/* --- DISEÑO BASE DE LA TARJETA (Escritorio) --- */
.card {
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    background-color: #fff;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    
    /* Dimensiones fijas para Escritorio */
    height: 400px; 
    width: 250px; 
}

.card:hover {
    transform: scale(1.02);
}

.card a {
    display: block;
    text-decoration: none !important;
    color: inherit !important;
    padding: 15px;
}

.card img {
    max-width: 250px;
    max-height: 250px;
    display: block;
    object-fit: contain;
}

.card h3 {
    margin-top: 10px;
    margin-bottom: 5px;
}

.card p {
    font-size: 0.9em;
    color: #666;
    margin-bottom: 10px;
}

/* --- Botón de Texto "Ver detalles" --- */
.ver-detalles {
    color: #0d46d6; 
    font-weight: 700; 
    font-size: 0.9rem; 
    margin-top: 15px; 
    display: inline-flex; 
    align-items: center; 
    gap: 5px;
    transition: gap 0.2s ease;
}

/* --- REGLA EXCLUSIVA PARA LA PÁGINA DE ACTIVIDADES (ESCRITORIO 3x3) --- */
@media (min-width: 992px) {
    .actividades-page-layout .distribucion-especial {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 40px !important; 
        max-width: 1100px;
        margin: 0 auto;
        padding: 40px 0;
    }

    .actividades-page-layout .card {
        width: 280px !important; 
        height: 420px !important;
        margin: 0 auto !important;
        display: flex !important;
        flex-direction: column !important;
    }

    .actividades-page-layout {
        display: block !important;
        width: 100% !important;
        max-width: 1200px !important;
        margin: 0 auto !important;
    }
}

/* --- CONFIGURACIÓN EXCLUSIVA PARA SERVICIOS EN ESCRITORIO (3 x 3) --- */
@media (min-width: 992px) {
    .servicios-page-layout .distribucion-especial {
        display: grid !important;
        grid-template-columns: repeat(3, 1fr) !important; 
        gap: 40px !important; 
        max-width: 1100px;
        margin: 40px auto !important;
        justify-items: center;
    }

    .servicios-page-layout .card {
        width: 250px !important; 
        height: 400px !important;
        display: flex !important;
        flex-direction: column !important;
    }
}

/* --- CONFIGURACIÓN EXCLUSIVA PARA BIENES RAÍCES EN ESCRITORIO (2 Centradas) --- */
@media (min-width: 992px) {
    .bienes-raices-layout .distribucion-especial {
        display: flex !important;
        flex-direction: row !important;
        justify-content: center !important;
        gap: 60px !important; 
        padding: 40px 0 !important;
        width: 100% !important;
    }

    .bienes-raices-layout .card {
        width: 250px !important; 
        height: 400px !important;
        margin: 0 !important;
    }
}