/* css/comunidades.css - AJUSTES SOLICITADOS */
:root {
    --primary-green: #013836;
    --primary-brown: #8d4c2c;
    --dark-text: #333;
}

body {
    font-family: 'Montserrat', sans-serif;
    color: var(--dark-text);
    overflow-x: hidden;
}

/* REMOVER EL FONDO VERDE DEL TEXTO */
.pagina-resguardo {
    min-height: 100vh;
    background-image: url('../img/comunidades/DJI_0960.jpg');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    display: flex;
    align-items: center;
}

/* CONTENEDOR PRINCIPAL - SIN FONDO VERDE */
.contenedor-texto-resguardo {
    height: 100%;
    padding: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.texto-resguardo-interno {
    max-width: 800px;
    /* QUITAR EL FONDO VERDE Y ESTILOS ASOCIADOS */
    padding: 0;
    background-color: transparent;
    border-radius: 0;
    box-shadow: none;
}

.texto-resguardo-interno h1 {
    font-size: 3rem;
    font-weight: 800;
    color: white;
    margin-bottom: 30px;
    text-transform: uppercase;
    text-shadow: 3px 3px 12px rgba(0, 0, 0, 0.9); /* Aumentar sombra para mejor legibilidad */
}

.parrafo-resguardo p {
    font-size: 1.1rem;
    color: white;
    text-align: justify;
    line-height: 1.8;
    margin: 0;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.8); /* Añadir sombra al texto también */
}

/* CONTENEDOR DE IMÁGENES - REDUCIR ALTURA */
.contenedor-comunidades-horizontal {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.fila-comunidades-horizontal {
    display: flex;
    width: 100%;
    height: 65vh; /* REDUCIDO DE 80% A 65vh (más moderado) */
    gap: 10px;
    max-height: 600px; /* Altura máxima para evitar que crezcan demasiado */
}

.comunidad-horizontal {
    flex: 1;
    height: 100%;
    position: relative;
    cursor: pointer;
    overflow: hidden;
    border-radius: 8px;
    transition: all 0.4s ease;
}

.comunidad-horizontal:hover {
    flex: 1.4;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
}

.imagen-comunidad-horizontal {
    width: 100%;
    height: 100%;
}

.imagen-comunidad-horizontal img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.comunidad-horizontal:hover .imagen-comunidad-horizontal img {
    transform: scale(1.1);
}

/* OVERLAY MEJORADO */
.overlay-comunidad-horizontal {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 25px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
    text-align: center;
}

.overlay-comunidad-horizontal h3 {
    color: white;
    font-size: 1.4rem;
    font-weight: 700;
    text-transform: uppercase;
    margin: 0;
    letter-spacing: 1.5px;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.8);
}

.comunidad-horizontal:hover .overlay-comunidad-horizontal h3 {
    font-size: 1.6rem;
}

/* SECCIÓN DE DETALLES - AJUSTADA */
.seccion-comunidades-detalle {
    padding: 80px 0;
    background-color: #f8f9fa;
}

.articulo-comunidad-detalle {
    margin-bottom: 100px;
    padding: 60px 0;
    background-color: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}

.articulo-comunidad-detalle:last-child {
    margin-bottom: 0;
}

.contenedor-imagen-comunidad {
    padding: 0 40px;
}

.imagen-principal-comunidad {
    width: 100%;
    height: 500px;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.imagen-principal-comunidad img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.imagen-principal-comunidad:hover img {
    transform: scale(1.05);
}

.contenido-comunidad-detalle {
    padding: 0 40px;
}

.encabezado-articulo {
    margin-bottom: 30px;
}

.titulo-comunidad {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-green);
    margin-bottom: 10px;
    text-transform: uppercase;
}

.subtitulo-comunidad {
    font-size: 1.3rem;
    color: var(--primary-brown);
    font-weight: 600;
    padding-left: 15px;
    border-left: 3px solid var(--primary-brown);
}

.cuerpo-articulo {
    margin-top: 30px;
}

.texto-introduccion {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--dark-text);
    margin-bottom: 30px;
    text-align: justify;
}

.contenido-expandible {
    display: none;
}

.seccion-expandida {
    margin-bottom: 30px;
}

.seccion-expandida h4 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 15px;
}

.seccion-expandida p {
    font-size: 1rem;
    line-height: 1.7;
    color: var(--dark-text);
}

.boton-expandir {
    background-color: var(--primary-brown);
    color: white;
    border: none;
    padding: 12px 30px;
    border-radius: 25px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.boton-expandir:hover {
    background-color: var(--primary-green);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* FOOTER */
footer.footer-section {
    background-color: #013836;
    color: white;
    padding: 40px 20px;
    text-align: center;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 20px;
}

.footer-links a {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.footer-links a:hover {
    color: #f8f9fa;
    text-decoration: underline;
}

/* RESPONSIVE CORREGIDO */
@media (max-width: 1200px) {
    .fila-comunidades-horizontal {
        height: 60vh; /* Aún más reducido en pantallas más pequeñas */
        max-height: 550px;
    }
}

@media (max-width: 992px) {
    .pagina-resguardo {
        flex-direction: column;
    }
    
    .contenedor-texto-resguardo {
        height: 50vh;
        padding: 40px 30px;
    }
    
    .contenedor-comunidades-horizontal {
        height: 50vh;
        padding: 40px 30px;
    }
    
    .fila-comunidades-horizontal {
        height: 45vh; /* Ajustado para tablets */
        max-height: 450px;
    }
    
    .texto-resguardo-interno h1 {
        font-size: 2.2rem;
    }
    
    .overlay-comunidad-horizontal h3 {
        font-size: 1.2rem;
    }
    
    .comunidad-horizontal:hover .overlay-comunidad-horizontal h3 {
        font-size: 1.4rem;
    }
}

@media (max-width: 768px) {
    .contenedor-texto-resguardo {
        height: auto;
        min-height: 40vh;
        padding: 30px 20px;
    }
    
    .texto-resguardo-interno h1 {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .contenedor-comunidades-horizontal {
        height: auto;
        min-height: 40vh;
        padding: 30px 20px;
    }
    
    .fila-comunidades-horizontal {
        flex-direction: column;
        height: auto;
        max-height: none;
        gap: 15px;
        padding: 20px 0;
    }
    
    .comunidad-horizontal {
        width: 100%;
        height: 200px; /* Fijo en móviles */
        flex: none !important;
    }
    
    .comunidad-horizontal:hover {
        height: 220px;
        flex: none !important;
    }
    
    .overlay-comunidad-horizontal {
        padding: 15px;
    }
    
    .overlay-comunidad-horizontal h3 {
        font-size: 1.2rem;
    }
    
    .comunidad-horizontal:hover .overlay-comunidad-horizontal h3 {
        font-size: 1.3rem;
    }
    
    .titulo-comunidad {
        font-size: 1.8rem;
        text-align: center;
    }
    
    .subtitulo-comunidad {
        font-size: 1.1rem;
        text-align: center;
        border-left: none;
        padding-left: 0;
        border-top: 2px solid var(--primary-brown);
        padding-top: 10px;
        margin-top: 10px;
    }
    
    .contenedor-imagen-comunidad,
    .contenido-comunidad-detalle {
        padding: 0 20px;
    }
}

@media (max-width: 576px) {
    .contenedor-texto-resguardo {
        padding: 20px 15px;
    }
    
    .texto-resguardo-interno h1 {
        font-size: 1.6rem;
    }
    
    .parrafo-resguardo p {
        font-size: 1rem;
    }
    
    .contenedor-comunidades-horizontal {
        padding: 20px 15px;
    }
    
    .comunidad-horizontal {
        height: 180px;
    }
    
    .comunidad-horizontal:hover {
        height: 200px;
    }
    
    .overlay-comunidad-horizontal h3 {
        font-size: 1.1rem;
    }
    
    .comunidad-horizontal:hover .overlay-comunidad-horizontal h3 {
        font-size: 1.2rem;
    }
    
    .imagen-principal-comunidad {
        height: 300px;
    }
    
    .contenedor-imagen-comunidad,
    .contenido-comunidad-detalle {
        padding: 0 15px;
    }
    
    .titulo-comunidad {
        font-size: 1.6rem;
    }
    
    .subtitulo-comunidad {
        font-size: 1rem;
    }
    
    .boton-expandir {
        width: 100%;
        text-align: center;
    }
}