/* =========================================
   PÁGINA COMUNIDAD: ESTILOS ESPECÍFICOS
   ========================================= */

/* 1. CABECERA CON FONDO VERDE SÓLIDO */
.community-hero {
    position: relative;
    width: 100%;
    /* Reducimos el alto de 70vh a 40vh */
    height: 40vh; 
    /* Reducimos el alto mínimo de 500px a 300px */
    min-height: 300px; 
    
    background-color: #0B1713; 
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
}

/* Capa oscura sobre la imagen para que el texto se lea perfecto */
.community-hero-overlay {
    display: none; 
}

.community-hero-content {
    position: relative;
    z-index: 2;
    color: #E3D3C1; /* Dorado claro */
    padding-top: 5rem; /* Ajuste por el menú flotante */
}

.community-tag {
    font-family: var(--font-sans);
    font-size: 0.85rem;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: #9CA89B; /* Verde salvia */
    display: block;
    margin-bottom: 1.5rem;
}

.community-hero-content h1 {
    font-family: var(--font-serif);
    font-size: clamp(3.5rem, 6vw, 5.5rem);
    font-weight: 400;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.community-hero-content h1 .italic-text {
    font-style: italic;
    font-size: 1.1em;
}

/* 2. ARTÍCULO EDITORIAL (Letra Capital) */
.community-article {
    background-color: #FDFBF7; /* Beige crema */
    padding: 8rem 1.5rem;
}

.article-container {
    max-width: 800px; /* Estrecho para que sea cómodo de leer */
    margin: 0 auto;
}

.article-title {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: #2D2522;
    text-align: center;
    margin-bottom: 3rem;
    font-weight: 400;
}

.article-body p {
    font-family: var(--font-sans);
    font-size: 1.1rem;
    color: #5A4D45;
    line-height: 1.8;
    font-weight: 300;
    margin-bottom: 2rem;
}

/* El truco de la Letra Capital en el primer párrafo */
.article-body p:first-child::first-letter {
    font-family: var(--font-serif);
    font-size: 4.5rem;
    color: #A86442; /* Terracota */
    float: left;
    line-height: 1;
    padding-right: 0.8rem;
    padding-top: 0.3rem;
}

/* 3. SECCIÓN DIVIDIDA: IMPORTANCIA NACIONAL (Diseño Centrado) */
.community-importance {
    /* La franja de fondo verde que ocupa toda la pantalla */
    background-color: #0B1713; 
    padding: 6rem 1.5rem; 
}

.importance-grid {
    /* Limitamos el ancho para que no toque los márgenes */
    max-width: 1000px; 
    margin: 0 auto;
    
    display: grid;
    grid-template-columns: 1fr 1fr;
    
    /* Efecto de "caja" flotante sobre la franja verde */
    background-color: #0B1713; 
    border-radius: 8px;
    overflow: hidden;
    
    /* Sombra elegante */
    box-shadow: 0 20px 40px rgba(0,0,0,0.2);
}

.importance-image {
    width: 100%;
    height: 100%;
    min-height: 400px;
}

.importance-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.importance-text {
    /* Padding generoso para que el texto no toque los bordes del recuadro */
    padding: 4rem 3.5rem; 
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.deco-header {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 2rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: #E3D3C1; /* Texto dorado claro para contrastar el verde */
    text-transform: uppercase;
    font-weight: 500;
}

.deco-header .deco-star {
    color: #A86442; /* Mantenemos la estrella terracota */
}

.importance-text h3 {
    font-family: var(--font-serif);
    /* Tamaño ligeramente más contenido */
    font-size: clamp(2rem, 3vw, 2.6rem); 
    color: #E3D3C1; /* Título en dorado claro */
    margin-bottom: 2rem;
    line-height: 1.2;
    font-weight: 400;
}

.importance-text p {
    font-family: var(--font-sans);
    font-size: 1rem;
    color: #9CA89B; /* Verde salvia claro para una lectura suave */
    line-height: 1.7;
    font-weight: 300;
    margin-bottom: 1.5rem;
}



/* =========================================
   NUEVAS SECCIONES: MAPA, IDENTIDAD, ORGANIZACIÓN, GALERÍA
   ========================================= */

/* 1B. MAPA Y GEOGRAFÍA (Fondo Verde) */
.community-map {
    background-color: #0B1713; /* Fondo verde bosque profundo */
    padding: 6rem 1.5rem; /* Amplié el espacio arriba y abajo para que respire mejor */
}
.map-container {
    max-width: 1000px;
    margin: 0 auto;
}
.section-subtitle {
    font-family: var(--font-serif);
    font-size: 2rem;
    color: #E3D3C1; /* Título en dorado claro/crema */
    margin-bottom: 1rem;
    text-align: center;
}
.map-container p {
    font-family: var(--font-sans);
    color: #9CA89B; /* Texto en verde salvia para lectura cómoda */
    margin-bottom: 3rem;
    text-align: center;
    line-height: 1.7;
}
.map-placeholder {
    width: 100%;
    height: 400px;
    background-color: rgba(253, 251, 247, 0.05); 
    border: 1px solid rgba(227, 211, 193, 0.1); 
    border-radius: 8px;
    
    /* Esta es la propiedad clave para que el mapa no se salga de las esquinas redondas */
    overflow: hidden; 
    
    /* Quitamos el display:flex porque ya no estamos centrando texto, el iframe ocupará todo */
    display: block; 
}

/* 2. IDENTIDAD CULTURAL */
.community-identity {
    background-color: #FDFBF7;
    padding: 6rem 1.5rem;
    border-top: 1px solid rgba(45, 37, 34, 0.1); /* Línea divisoria elegante */
}
.identity-container {
    max-width: 1000px;
    margin: 0 auto;
}
.deco-header-dark {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    margin-bottom: 1rem;
    font-family: var(--font-sans);
    font-size: 0.75rem;
    letter-spacing: 0.2em;
    color: #5A4D45;
    text-transform: uppercase;
}
.deco-header-dark .deco-star { color: #A86442; }
.identity-container h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    color: #2D2522;
    margin-bottom: 3rem;
}
.identity-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
}
.identity-card h4 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: #A86442;
    margin-bottom: 1rem;
}
.identity-card p {
    font-family: var(--font-sans);
    color: #5A4D45;
    line-height: 1.7;
}

/* 3. ORGANIZACIÓN Y LIDERAZGO */
.community-organization {
    background-color: #0B1713; /* Fondo verde bosque para contraste */
    padding: 8rem 1.5rem;
}
.org-container {
    max-width: 1000px;
    margin: 0 auto;
    color: #E3D3C1;
}
.org-container h2 {
    font-family: var(--font-serif);
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 4rem;
}
.org-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
}
.org-item {
    background-color: rgba(253, 251, 247, 0.05); /* Tarjeta translúcida */
    padding: 3rem;
    border-radius: 8px;
    border: 1px solid rgba(227, 211, 193, 0.1);
}
.org-item h4 {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    color: #E3D3C1;
    margin-bottom: 1rem;
}
.org-item p {
    font-family: var(--font-sans);
    color: #9CA89B;
    line-height: 1.7;
}

/* =========================================
   4. LUGARES EMBLEMÁTICOS (Coverflow Slider 3D)
   ========================================= */
.emblematic-places {
    position: relative;
    background-color: #0B1713; /* Mantenemos el fondo verde oscuro */
    padding: 8rem 0;
    overflow: hidden;
}
.emblematic-bg {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    /* Ponemos una textura de fondo muy oscura y difuminada */
    background-image: url('https://picsum.photos/id/1018/1600/900?grayscale');
    background-size: cover;
    background-position: center;
    filter: blur(15px) brightness(0.15);
    z-index: 1;
}
.emblematic-container {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    text-align: center;
}
.emblematic-container h2 {
    font-family: var(--font-serif);
    font-size: 2.8rem;
    margin-bottom: 3rem;
    color: #E3D3C1;
}
.carousel-wrapper {
    position: relative;
    height: 550px;
    display: flex;
    align-items: center;
    justify-content: center;
    perspective: 1200px; /* Profundidad de la cámara 3D */
}
.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transform-style: preserve-3d;
}
.carousel-slide {
    position: absolute;
    width: 320px;
    height: 480px;
    background-color: #000;
    overflow: hidden;
    /* Transición suave al moverse */
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1), opacity 0.6s ease, z-index 0.6s, filter 0.6s;
    box-shadow: 0 20px 40px rgba(0,0,0,0.8);
    opacity: 0;
    pointer-events: none;
}
.carousel-slide img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.6;
    transition: opacity 0.6s;
}

/* --- ESTADOS DEL 3D --- */
/* Tarjeta central (Activa) */
.carousel-slide.active {
    transform: translateX(0) scale(1) translateZ(50px) rotateY(0deg);
    z-index: 5;
    opacity: 1;
    pointer-events: auto;
}
.carousel-slide.active img { opacity: 1; }

/* Tarjetas adyacentes (Inclinadas) */
.carousel-slide.prev-1 {
    transform: translateX(-60%) scale(0.85) translateZ(-100px) rotateY(30deg);
    z-index: 4;
    opacity: 0.7;
}
.carousel-slide.next-1 {
    transform: translateX(60%) scale(0.85) translateZ(-100px) rotateY(-30deg);
    z-index: 4;
    opacity: 0.7;
}

/* Tarjetas extremas (Más al fondo) */
.carousel-slide.prev-2 {
    transform: translateX(-110%) scale(0.7) translateZ(-250px) rotateY(45deg);
    z-index: 3;
    opacity: 0.3;
}
.carousel-slide.next-2 {
    transform: translateX(110%) scale(0.7) translateZ(-250px) rotateY(-45deg);
    z-index: 3;
    opacity: 0.3;
}

/* Textos sobre la tarjeta activa */
.slide-content {
    position: absolute;
    bottom: 0; left: 0; width: 100%;
    padding: 3rem 1.5rem 2rem;
    background: linear-gradient(to top, rgba(11,23,19,0.95) 0%, rgba(11,23,19,0.8) 50%, rgba(11,23,19,0) 100%);
    text-align: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s 0.2s ease;
}
.carousel-slide.active .slide-content {
    opacity: 1;
    transform: translateY(0);
}
.slide-content h3 {
    font-family: var(--font-sans);
    font-size: 1.4rem;
    color: #FDFBF7;
    margin-bottom: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 2px;
}
.slide-line {
    width: 30px;
    height: 2px;
    background-color: #A86442;
    margin: 0 auto 1rem;
}
.slide-content p {
    font-family: var(--font-sans);
    font-size: 0.9rem;
    color: #E3DBCB;
    line-height: 1.6;
}

/* Botones de navegación */
.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: #E3D3C1;
    font-size: 4rem;
    font-weight: 300;
    cursor: pointer;
    z-index: 10;
    transition: color 0.3s, transform 0.3s;
    padding: 20px;
}
.carousel-btn:hover { color: #A86442; transform: translateY(-50%) scale(1.1); }
.prev-btn { left: 5%; }
.next-btn { right: 5%; }

/* Responsive */
@media (max-width: 900px) {
    .carousel-slide { width: 260px; height: 400px; }
    .carousel-slide.prev-1 { transform: translateX(-45%) scale(0.85) translateZ(-100px) rotateY(25deg); }
    .carousel-slide.next-1 { transform: translateX(45%) scale(0.85) translateZ(-100px) rotateY(-25deg); }
    .carousel-btn { font-size: 2.5rem; }
    .prev-btn { left: 0; }
    .next-btn { right: 0; }
}

