/* ========== SECCIÓN CULTURA Y TRADICIONES ========== */

/* Contenedor principal */
.contenedor-principal {
    max-width: 1200px;
    margin: 0 auto;
    padding: 40px 20px;
}

.titulo-principal {
    text-align: center;
    font-size: 2.5rem;
    color: hsl(210, 29%, 24%);
    margin-bottom: 50px;
    position: relative;
    padding-bottom: 15px;
}

.titulo-principal::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100px;
    height: 4px;
    background-color: #e74c3c;
    border-radius: 2px;
}

/* Grid de cajitas - DISPOSICIÓN 3 COLUMNAS */
.grid-cajitas {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* Cajitas de imagen - ALTURA FIJA Y AJUSTE DE IMAGEN */
.cajita-imagen {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    height: 350px; /* ALTURA FIJA */
    width: 100%;
}

.cajita-imagen:hover {
    transform: translateY(-5px);
}

/* CONTENEDOR DE IMAGEN - CRÍTICO */
.imagen-contenedor {
    width: 100%;
    height: 100%;
    position: relative;
}

/* IMAGEN DENTRO DEL CONTENEDOR - CRÍTICO */
.imagen-contenedor img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Esto hace que la imagen se ajuste */
    display: block;
    transition: transform 0.5s ease;
}

.cajita-imagen:hover .imagen-contenedor img {
    transform: scale(1.05);
}

/* Cajitas de texto - MISMA ALTURA QUE LAS IMÁGENES */
.cajita-texto {
    background-color: #ffffff;
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    height: 350px; /* MISMA ALTURA QUE LAS IMÁGENES */
    display: flex;
    flex-direction: column;
    justify-content: space-between; /* Distribuye el contenido */
}

.cajita-texto:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

.icono-texto {
    font-size: 2.5rem;
    color: #0056b3;
    margin-bottom: 20px;
    text-align: center;
}

.cajita-texto h3 {
    color: #0056b3;
    font-size: 1.8rem;
    margin-bottom: 15px;
    text-align: center;
}

.cajita-texto p {
    color: #555;
    line-height: 1.6;
    margin-bottom: 25px;
    flex-grow: 1;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
}

/* Botón "Conocer más" */
.boton-mas {
    display: inline-block;
    background-color: #0056b3;
    color: white;
    padding: 12px 25px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    text-align: center;
    transition: all 0.3s ease;
    border: 2px solid #0056b3;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-size: 0.9rem;
    align-self: center;
    width: fit-content;
}

.boton-mas:hover {
    background-color: transparent;
    color: #0056b3;
}

/* Separador */
.separador {
    height: 2px;
    background: linear-gradient(to right, transparent, #0056b3, transparent);
    margin-top: 40px;
}

/* RESPONSIVE */
@media (max-width: 1100px) {
    .grid-cajitas {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cajita-imagen,
    .cajita-texto {
        height: 320px;
    }
}

@media (max-width: 768px) {
    .grid-cajitas {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .titulo-principal {
        font-size: 2rem;
    }
    
    .cajita-imagen,
    .cajita-texto {
        height: 300px;
    }
    
    .cajita-texto {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .cajita-imagen,
    .cajita-texto {
        height: 280px;
    }
    
    .titulo-principal {
        font-size: 1.8rem;
    }
}