/* --- Variables y Estilos Base --- */
:root {
    --color-background: #F5F5DC;
    --color-primary: #8B4513;
    --color-text: #333333;
    --color-secondary-text: #556B2F;
    --font-main: 'Lato', sans-serif;
    --font-title: 'Oswald', sans-serif;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
    font-family: var(--font-main);
    color: var(--color-text);
    background-color: var(--color-background);
    line-height: 1.6;
    padding-top: 100px;
}

.container { max-width: 1200px; margin: 0 auto; padding: 2rem 1.5rem; }

.section-title {
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.5rem;
    text-transform: uppercase;
    text-align: center;
    margin-bottom: 2rem;
    color: var(--color-primary);
}

/* --- Modal, Header, Nav, Submenus (Sin cambios) --- */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85); display: flex;
    justify-content: center; align-items: center; z-index: 2001;
    transition: opacity 0.3s ease;
}
.modal-content { background: white; padding: 3rem; border-radius: 8px; text-align: center; }
.modal-content h2 { margin-bottom: 2rem; }
.modal-buttons button {
    font-size: 1.2rem; padding: 0.8rem 2.5rem; margin: 0 1rem; cursor: pointer;
    border: 2px solid var(--color-primary); background-color: var(--color-primary);
    color: white; border-radius: 5px; transition: background-color 0.3s, color 0.3s;
}
.modal-buttons button:hover { background-color: white; color: var(--color-primary); }
.hidden { opacity: 0; pointer-events: none; }

header {
    position: fixed; top: 0; left: 0; width: 100%; z-index: 1000;
    background-color: #ffffff; padding: 1rem 2rem;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
.header-container { display: flex; justify-content: space-between; align-items: center; max-width: 1400px; margin: 0 auto; }
.logo-area { display: flex; align-items: center; }
.logo { height: 60px; margin-right: 1rem; }
.museum-name { font-family: var(--font-title); font-size: 1.5rem; color: var(--color-primary); text-transform: uppercase; }

.main-nav { display: flex; align-items: center; }
.main-nav > ul { list-style: none; display: flex; }
.main-nav li { position: relative; margin: 0 1rem; }
.main-nav a { text-decoration: none; color: var(--color-secondary-text); font-weight: bold; padding: 0.5rem 0; transition: color 0.3s; display: flex; align-items: center; gap: 0.3rem; }
.main-nav a:hover { color: var(--color-primary); }
.main-nav .social-icon-item a { font-size: 1.2rem; padding: 0.5rem; }
.main-nav .social-icon-item:first-of-type { margin-left: 2rem; padding-left: 1rem; border-left: 1px solid #ccc; }
.main-nav .social-icon-item { margin: 0 0.2rem; }

.submenu { opacity: 0; visibility: hidden; position: absolute; top: 100%; left: 0; background: white; list-style: none; padding: 0.5rem 0; border-radius: 5px; box-shadow: 0 4px 12px rgba(0,0,0,0.15); min-width: 220px; z-index: 10; transform: translateY(10px); transition: opacity 0.3s ease, transform 0.3s ease, visibility 0.3s; }
.dropdown:hover > .submenu { opacity: 1; visibility: visible; transform: translateY(0); }
.submenu li { width: 100%;  }
.submenu a { display: block; padding: 0.7rem 1.2rem; white-space: nowrap; }

.submenu .submenu { position: static; display: block; max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out; box-shadow: none; border-radius: 0; padding-left: 1rem; background-color: rgba(0, 0, 0, 0.03); }
.submenu .dropdown:hover > .submenu { max-height: 500px; }
.submenu .dropdown > a .fa-chevron-right { display: none; }
.submenu .dropdown > a::after { content: '\f078'; font-family: "Font Awesome 6 Free"; font-weight: 900; margin-left: auto; padding-left: 1rem; transition: transform 0.3s ease; }
.submenu .dropdown:hover > a::after { transform: rotate(180deg); }

/* --- Contenido Principal (Carrusel, Misión/Visión, etc.) --- */
.hero-section { height: 90vh; width: 100%; padding: 0; }
.carousel { position: relative; width: 100%; height: 100%; overflow: hidden; }
.carousel-slide { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background-size: contain; background-position: center; background-repeat: no-repeat; opacity: 0; transition: opacity 1.5s ease; display: flex; align-items: flex-end; justify-content: center; }
.carousel-slide.active { opacity: 1; }
.carousel-slide .caption { background-color: rgba(0, 0, 0, 0.6); color: white; padding: 1rem 2rem; margin-bottom: 2rem; border-radius: 5px; font-size: 1.5rem; text-align: center; }
.carousel-control { position: absolute; top: 50%; transform: translateY(-50%); background: rgba(0, 0, 0, 0.5); color: white; border: none; font-size: 2rem; padding: 0.5rem 1rem; cursor: pointer; z-index: 10; }
.carousel-control.prev { left: 10px; }
.carousel-control.next { right: 10px; }

.mission-vision-section { padding: 2rem 0; }
.mission-vision { display: flex; gap: 2rem; max-width: 1200px; margin: 0 auto; padding: 0 1rem;}
.mission, .vision { flex: 1; padding: 2rem;  background-color: white;  border-radius: 10px; box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);}
.mission h2, .vision h2 { font-family: var(--font-title); color: var(--color-primary); margin-bottom: 1rem;   border-bottom: 2px solid #ddd;   padding-bottom: 0.5rem;}
.mission p, .vision p { font-family: 'Montserrat', sans-serif; text-align: justify; }

#cambio-agricola .content-layout { display: flex; flex-direction: column; gap: 2rem; }
#cambio-agricola p { font-family: 'Montserrat', sans-serif; text-align: justify; }
.content-layout img { max-width: 100%; height: auto; border-radius: 8px; }
.layout-item { display: flex; gap: 1.5rem; align-items: center; }
.img-left { flex-direction: row; }
.text-left { flex-direction: row-reverse; }
.img-left img, .text-left img { flex-basis: 40%; }
.img-left p, .text-left p { flex-basis: 60%; }
/*.full-width-image img { width: 100%; }*/
.layout-item.full-width-image img {
    width: 50%; /* Cambia este valor al porcentaje que prefieras */
    display: block; 
    margin: 0 auto; /* Para centrar la imagen */
}
.three-images { justify-content: space-between; }
.three-images img { width: 32%; }
.two-paragraphs, .centered-image, .three-paragraphs, .centered-image-text, .full-width-image { flex-direction: column; }

/* Estilo específico para la imagen de la flecha */
.layout-item.three-images .image-flecha {
    width: 250px; /* Cambia este valor al ancho que necesites (ej: 30px, 80px) */
    height: auto; /* Mantiene la proporción de la imagen */
    /* O puedes usar un porcentaje si prefieres */
    /* width: 5%; */ 
}

/* Opcional: Centrar la flecha verticalmente si está desalineada */
.layout-item.three-images {
    align-items: center; /* Asegura que todos los elementos se alineen al centro vertical */
}

.info-text {
    /* Fondo que distingue el bloque */
    background-color: #f7f7f7; /* Un gris muy claro para diferenciarlo del blanco de las tarjetas */
    
    /* Padding interno generoso */
    padding: 30px; 
    
    /* CENTRADO Y ANCHO LIMITADO: Para que no ocupe todo el ancho de la página */
    max-width: 800px; /* Limita el ancho para mejor lectura */
    margin: 40px auto; /* Centra el bloque horizontalmente */
    
    /* Sombra y esquinas redondeadas para el efecto "tarjeta" */
    border-radius: 10px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.05); /* Sombra muy sutil */
    
    /* Eliminamos las líneas sólidas de borde si usamos fondo y sombra */
    border: none; 
}

/* Estilo para el título principal si lo tienes fuera del contenedor */
.section-title {
    text-align: center;
    margin-bottom: 1.5rem;
}

/* Estilos de subtítulos (Horarios, Dirección, Teléfono) */
.info-text h3 {
    color: var(--color-primary, #1a237e); /* Hace que los títulos resalten */
    border-bottom: 1px solid #eee; /* Línea de separación sutil para cada sub-sección */
    padding-bottom: 5px;
    margin-top: 1.5rem;
    margin-bottom: 0.5rem;
}

.author-info p:nth-child(3) {
    margin-bottom: 1.5rem; /* Ajusta este valor (ej: 1rem, 20px) según el espacio deseado */
}
/* --- Footer Corregido --- */
.site-footer {
    background-color: #556B2F;
    color: #f0f0f0;
    padding: 2.5rem 1.5rem;
    margin-top: 4rem;
}
.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}
.footer-info { text-align: left; }
.footer-info h3 { font-family: var(--font-title); color: white; margin-bottom: 1rem; }
.footer-info p { margin: 0.5rem 0; }
.footer-legal, .visit-counter { text-align: center; }

.footer-whatsapp-icon {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    margin-top: 1rem;
    width: 48px;
    height: 48px;
    background-color: #25D366;
    border-radius: 50%;
    transition: transform 0.3s ease;
    text-decoration: none; 
}
.footer-whatsapp-icon i { font-size: 1.8rem; color: white; }
.footer-whatsapp-icon:hover { transform: scale(1.1); }


/* --- ESTILOS PARA EL MENÚ DE HAMBURGUESA Y MÓVIL --- */
.mobile-nav-toggle { display: none; }
.icon-close { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

@media (max-width: 992px) {
    .mobile-nav-toggle { display: block; position: absolute; top: 2rem; right: 2rem; z-index: 2000; background: transparent; border: 0; cursor: pointer; }
    .mobile-nav-toggle .fas { font-size: 2rem; color: var(--color-primary); }

    .main-nav > ul {
        position: fixed; left: auto; right: 0; top: 0; bottom: 0; width: auto; max-width: 280; min-width: 200; flex-direction: column; justify-content: flex-start; align-items: flex-start;
        padding: min(10vh, 5rem) 2rem; gap: 0.8rem; background-color: rgba(255, 255, 255, 0.9);
        backdrop-filter: blur(10px); transform: translateX(100%); transition: transform 350ms ease-out;
    }
    .main-nav > ul[data-visible="true"] { transform: translateX(0%); }

    .main-nav .submenu {
        max-height: 0; overflow: hidden; transition: max-height 0.4s ease-out;
        display: block; position: static; opacity: 1; visibility: visible;
        transform: none; box-shadow: none; background: transparent; padding-left: 1rem; border-radius: 0;
    }
    .main-nav li.dropdown.active > .submenu { max-height: 500px; }
    .main-nav .dropdown > a > .fa-chevron-down { transition: transform 0.3s ease-out; }
    .main-nav li.dropdown.active > a > .fa-chevron-down { transform: rotate(180deg); }
    
    .main-nav .social-icon-item:first-of-type { margin-left: 0; padding-left: 0; border-left: none; margin-top: 1rem; }
    .main-nav .social-icon-item a { padding: 0.5rem; font-size: 1.5rem; }

    .header-container, .mission-vision, .contact-info, .three-images, .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .mission-vision {
        flex-direction: column;
    }
    .layout-item, .img-left, .text-left {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }
    
    .footer-legal, .visit-counter, .footer-info { text-align: center; }
    .three-images img { width: 100%; margin-bottom: 1rem; }
}