/* --- VARIABLES DE COLOR (IDENTIDAD) --- */
:root {
    --olive: #708238;        /* Verde Olivo - Vida */
    --earth: #B5835A;        /* Tierra - Historia */
    --dark: #2C3E50;         /* Gris Oscuro - Legibilidad */
    --light: #f4f4f4;        /* Fondos suaves */
    --white: #ffffff;
}

/* --- RESET BÁSICO --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Open Sans', sans-serif;
    color: var(--dark);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden; /* Evita scroll horizontal */
}

h1, h2, h3, h4 {
    font-family: 'Montserrat', sans-serif;
}

/* --- TOP BAR (Línea verde superior) --- */
.top-bar {
    background-color: var(--olive);
    color: white;
    padding: 8px 5%;
    font-size: 0.85rem;
    display: flex;
    justify-content: flex-end;
    align-items: center;
}

/* --- HEADER PRINCIPAL --- */
header {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    padding: 0.8rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 3px solid var(--earth);
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px; /* Espacio entre logo imagen y texto */
    text-decoration: none; /* Por si lo hacemos link */
}

.header-logo {
    height: 50px; /* Tamaño controlado del logo cuadrado */
    width: auto;
    border-radius: 4px; /* Un toque sutil */
}

.logo-text {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.2rem;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.1;
}

.nav-links a {
    text-decoration: none;
    color: var(--dark);
    font-weight: 600;
    margin-left: 25px;
    font-size: 0.95rem;
    transition: color 0.3s;
    text-transform: uppercase;
}

.nav-links a:hover {
    color: var(--olive);
}

/* --- HERO SECTION --- */
.hero {
    /* Fondo con gradiente oscuro sobre la imagen para leer mejor el texto */
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.3)), url('images/home.jpg');
    background-size: cover;
    background-position: center;
    height: 85vh; /* Altura: 85% de la pantalla */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 20px;
}

.hero h1 {
    font-size: 3rem;
    margin-bottom: 15px;
    font-weight: 700;
    text-shadow: 0 2px 10px rgba(0,0,0,0.5);
}

.hero p {
    font-size: 1.3rem;
    max-width: 700px;
    margin-bottom: 30px;
}

/* --- SECCIONES GENERALES --- */
.info-section {
    padding: 80px 20px;
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
}

.info-section i {
    font-size: 2.5rem;
    color: var(--olive);
    margin-bottom: 20px;
}

/* --- ACORDEÓN COMISIÓN --- */
details.comision-box {
    background: var(--light);
    border: 1px solid #ddd;
    border-radius: 8px;
    padding: 15px;
    margin-top: 40px;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

details.comision-box[open] {
    background: white;
    border-color: var(--olive);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

summary {
    font-weight: 700;
    color: var(--dark);
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-right: 10px;
}

/* Flechita personalizada */
summary::after {
    content: '+'; 
    font-size: 1.5rem;
    color: var(--olive);
    font-weight: bold;
}

details[open] summary::after {
    content: '-';
}

.comision-list {
    margin-top: 20px;
    border-top: 1px solid #ccc;
    padding-top: 10px;
}

.comision-item {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted #ccc;
    font-size: 0.95rem;
}

.comision-header-small {
    margin-top: 15px;
    margin-bottom: 5px;
    font-size: 0.8rem;
    font-weight: 700;
    color: var(--olive);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.comision-text-block {
    font-size: 0.9rem;
    margin-bottom: 10px;
    line-height: 1.5;
}

/* --- GALERÍA --- */
.gallery-section {
    background-color: var(--light);
    padding: 60px 5%;
}

.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); /* Responsivo automático */
    gap: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.gallery-item {
    height: 250px;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
    position: relative;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover; /* Recorta la imagen para llenar el cuadro sin deformar */
    transition: transform 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.05); /* Efecto zoom suave */
}

/* --- AGENDA --- */
.agenda {
    padding: 60px 20px;
    text-align: center;
    background-color: var(--white);
}

.agenda-card {
    border-left: 5px solid var(--earth);
    background: white;
    padding: 25px;
    margin: 20px auto;
    max-width: 600px;
    box-shadow: 0 2px 15px rgba(0,0,0,0.05);
    text-align: left;
    border-radius: 0 8px 8px 0;
}

/* --- ESTILOS DINÁMICOS AGENDA CMS --- */
.agenda-grid {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto;
}

.agenda-card.dynamic-card {
    display: flex;
    flex-direction: row;
    align-items: flex-start;
    gap: 25px;
    margin: 0;
    width: 100%;
    max-width: 700px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.agenda-card.dynamic-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
}

.event-img-container {
    width: 150px;
    height: 150px;
    flex-shrink: 0;
    overflow: hidden;
    border-radius: 6px;
    margin-bottom: 0px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.08); /* Sombra suave para la miniatura */
}

.event-content {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Responsividad para móviles: volvemos a vista vertical */
@media (max-width: 600px) {
    .agenda-card.dynamic-card {
        flex-direction: column;
        align-items: center;
        text-align: center;
        gap: 15px;
    }
    .event-img-container {
        width: 100%;
        max-width: 250px;
        height: 180px;
    }
    .event-content {
        align-items: center;
    }
}

.event-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.agenda-card.dynamic-card:hover .event-img {
    transform: scale(1.03);
}

.past-card {
    background: #fcfcfc;
}

/* Imagen en blanco y negro, color al pasar el mouse */
.img-pasado {
    filter: grayscale(100%);
    transition: filter 0.4s ease, transform 0.4s ease;
}

.agenda-card.dynamic-card:hover .img-pasado {
    filter: grayscale(0%);
}

/* --- FORMULARIO --- */
.contact-section {
    background-color: var(--dark);
    color: white;
    padding: 60px 20px;
}

.contact-container {
    max-width: 600px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    color: #ccc;
}

.form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #444;
    background-color: rgba(255,255,255,0.1);
    color: white;
    border-radius: 4px;
    font-family: 'Open Sans', sans-serif;
}

.form-control:focus {
    outline: none;
    border-color: var(--olive);
    background-color: rgba(255,255,255,0.15);
}

textarea.form-control {
    resize: vertical;
    height: 120px;
}

.btn-submit {
    background-color: var(--olive);
    color: white;
    padding: 14px 30px;
    border: none;
    border-radius: 4px;
    font-weight: 700;
    cursor: pointer;
    width: 100%;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: background 0.3s;
}

.btn-submit:hover {
    background-color: #5d6e2e;
}

/* Honeypot */
.ohnohoney {
    opacity: 0;
    position: absolute;
    top: 0;
    left: 0;
    height: 0;
    width: 0;
    z-index: -1;
}

/* --- FOOTER --- */
footer {
    background-color: #1a252f;
    color: #888;
    padding: 40px 20px;
    text-align: center;
    font-size: 0.85rem;
    border-top: 4px solid var(--earth);
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .hero h1 { font-size: 2rem; }
    
    .logo-text { font-size: 1rem; }
    .header-logo { height: 40px; }
    
    .nav-links { display: none; } /* Menú oculto en móvil */
    
    header { justify-content: center; }
    .logo-container { justify-content: center; }
    .top-bar { justify-content: center; }
}

/* --- LOGO PIE DE PÁGINA --- */
.footer-logo {
    max-width: 150px;       /* Ajustá este número según el tamaño real de tu imagen */
    height: auto;
    margin-bottom: 20px;    /* Espacio entre el logo y el texto */
    display: inline-block;
}
/* --- SECCIÓN HISTORIA --- */
.historia-section {
    padding: 80px 5%;
    background-color: var(--white); /* Fondo blanco limpio */
    border-top: 1px solid #eee;
}

.historia-container {
    max-width: 1100px;
    margin: 0 auto;
    text-align: center;
}

.historia-section i.icono-historia {
    font-size: 2.5rem;
    color: var(--earth); /* Color tierra para lo histórico */
    margin-bottom: 20px;
}

.historia-split {
    display: flex;
    gap: 40px;
    text-align: left;
    margin-top: 40px;
    margin-bottom: 60px;
    align-items: center;
}

.historia-texto {
    flex: 1.2; /* Ocupa un poco más de espacio que la foto */
}

.historia-texto p {
    margin-bottom: 15px;
    font-size: 1.05rem;
    color: #444;
}

.historia-acta {
    flex: 0.8;
    text-align: center;
    background: var(--light);
    padding: 20px;
    border-radius: 8px;
}

.acta-img {
    width: 100%;
    max-width: 400px;
    border-radius: 4px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    border: 1px solid #ddd;
}

.acta-epigrafe {
    display: block;
    font-size: 0.85rem;
    color: #666;
    margin-top: 15px;
    font-style: italic;
}

.historia-galeria-titulo {
    color: var(--dark);
    margin-bottom: 30px;
    font-size: 1.8rem;
}

/* Responsivo para la sección historia */
@media (max-width: 768px) {
    .historia-split {
        flex-direction: column;
    }
}

/* --- GRILLA ESPECÍFICA PARA HISTORIA (4 FOTOS EN LÍNEA) --- */
.historia-galeria-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas iguales en PC */
    gap: 15px;
    max-width: 1100px;
    margin: 0 auto;
}

/* En celulares y tablets, las pasamos a 2 columnas para que se aprecien bien */
@media (max-width: 768px) {
    .historia-galeria-grid {
        grid-template-columns: repeat(2, 1fr); 
    }
}

/* En celulares muy pequeños, 1 columna */
@media (max-width: 480px) {
    .historia-galeria-grid {
        grid-template-columns: 1fr;
    }
}