/* Variables CSS */
:root {
    --primary-color: #3498db; /* Azul oscuro */
    --secondary-color: #3498db; /* Azul vibrante */
    --accent-color: #e74c3c; /* Rojo para acentos/botones */
    --text-color: #333;
    --light-text-color: #ecf0f1;
    --bg-light: #f4f7f6;
    --bg-dark: #233140; /* Fondo más oscuro para secciones */
    --border-color: #ddd;
    --font-sans: 'Inter', sans-serif;
    --font-serif: 'Source Serif Pro', serif;
    --header-height: 80px;
    --header-scrolled-height: 60px;
}

/* Base y Reseteo */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}


 body {
    font-family: var(--font-sans);
    line-height: 1.6;
    color: var(--text-color);
    background-color: var(--bg-light);
    overflow-x: hidden;
}


.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-padded {
    padding: 80px 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-serif);
    color: var(--primary-color);
    margin-bottom: 20px;
    text-align: center;
    letter-spacing: 0.4px;
}


h2 {
    font-size: 2.5em;
    margin-bottom: 40px;
    position: relative;
    padding-bottom: 10px;
}
h2::after {
    content: '';
    position: absolute;
    left: 50%;
    bottom: 0;
    transform: translateX(-50%);
    width: 60px;
    height: 3px;
    background-color: var(--secondary-color);
    border-radius: 5px;
}

p {
    margin-bottom: 15px;
    margin-left: 25px;
}

a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}
a:hover {
    color: var(--accent-color);
}

/* Botones */
.btn {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 5px;
    font-weight: bold;
    text-align: center;
    transition: background-color 0.3s ease, color 0.3s ease, transform 0.2s ease;
    cursor: pointer;
    border: none;
    font-size: 1em;
}

.btn-primary {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
}
.btn-primary:hover {
    background-color: #2980b9;
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--accent-color);
    color: var(--light-text-color);
}
.btn-secondary:hover {
    background-color: #c0392b;
    transform: translateY(-2px);
}

.btn-tertiary {
    background-color: transparent;
    color: var(--secondary-color);
    border: 2px solid var(--secondary-color);
    padding: 8px 15px;
}
.btn-tertiary:hover {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
}

.btn-download {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    margin-top: 20px;
}
.btn-download:hover {
    background-color: #34495e;
}
.btn-download i {
    margin-right: 8px;
}

/* Header */
header {
    background-color: var(--primary-color);
    color: var(--light-text-color);
    padding: 15px 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    transition: height 0.3s ease, padding 0.3s ease;
    height: var(--header-height);
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

header.scrolled {
    height: var(--header-scrolled-height);
    padding: 10px 0;
    background-color: rgba(44, 62, 80, 0.95); /* Ligeramente transparente */
}

header .logo {
    display: flex;
    align-items: center;
    margin-left: 20px;
}
header .logo img {
    height: 250px; /* Ajusta según tu logo */
    margin-right: 10px;
}
header .logo h1 {
    margin: 0;
    font-size: 1.8em;
    color: var(--light-text-color);
}

header nav ul {
    list-style: none;
    display: flex;
    margin-right: 20px;
}
header nav ul li {
    margin-left: 30px;
}
header nav ul li a {
    color: var(--light-text-color);
    font-weight: bold;
    font-size: 1.1em;
    position: relative;
    padding-bottom: 5px;
}
header nav ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: width 0.3s ease;
}
header nav ul li a:hover::after {
    width: 100%;
}

.nav-toggle {
    display: none; /* Oculto por defecto en desktop */
    background: none;
    border: none;
    font-size: 2em;
    color: var(--light-text-color);
    cursor: pointer;
    padding: 5px 15px;
}
.nav-toggle .icon-bar {
    display: block;
    width: 30px;
    height: 3px;
    background-color: var(--light-text-color);
    margin: 6px 0;
    transition: 0.4s;
}

/* Hero Carousel */
.hero-carousel {
    position: relative;
    width: 100%;
    height: 600px; /* Altura del carrusel hero */
    overflow: hidden;
    margin-top: var(--header-height); /* Espacio para el header fijo */
}

.hero-carousel .carousel-track {
    display: flex;
    height: 100%;
    transition: transform 0.7s ease-in-out;
}

.hero-carousel .carousel-slide {
    min-width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--light-text-color);
    text-align: center;
    position: relative;
    animation: fadeIn 1s ease-in-out; /* Animación de fade-in para cada slide */
}
.hero-carousel .carousel-slide::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6); /* Overlay oscuro */
}

.hero-carousel .slide-content {
    position: relative;
    z-index: 2;
    max-width: 800px;
    padding: 20px;
    background: rgba(0, 0, 0, 0.3); /* Fondo semitransparente para el texto */
    border-radius: 10px;
}
.hero-carousel .slide-content h2 {
    color: var(--light-text-color);
    font-size: 3.5em;
    margin-bottom: 20px;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
.hero-carousel .slide-content p {
    font-size: 1.3em;
    margin-bottom: 30px;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.hero-carousel .carousel-nav {
    position: absolute;
    top: 50%;
    width: 100%;
    display: flex;
    justify-content: space-between;
    transform: translateY(-50%);
    z-index: 3;
}
.hero-carousel .carousel-nav button {
    background-color: rgba(0,0,0,0.5);
    color: var(--light-text-color);
    border: none;
    padding: 15px 10px;
    cursor: pointer;
    font-size: 2em;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}
.hero-carousel .carousel-nav button:hover {
    background-color: rgba(0,0,0,0.8);
}

.hero-carousel .carousel-indicators {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}
.hero-carousel .carousel-indicators .dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255,255,255,0.5);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.hero-carousel .carousel-indicators .dot.active {
    background-color: var(--secondary-color);
    transform: scale(1.2);
}

/* Stats Section */
.stats-section {
    background-color: var(--secondary-color);
    color: var(--light-text-color);
    padding: 60px 0;
    text-align: center;
}
.stats-section .container {
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    gap: 30px;
}
.stats-section .stat-item {
    flex: 1 1 200px;
    max-width: 250px;
    background-color: rgba(0,0,0,0.2);
    padding: 25px;
    border-radius: 10px;
    transition: transform 0.3s ease, background-color 0.3s ease;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.stats-section .stat-item:hover {
    transform: translateY(-5px);
    background-color: rgba(0,0,0,0.3);
}
.stats-section .stat-item .count {
    font-size: 3.5em;
    font-weight: bold;
    margin-bottom: 5px;
    display: block;
    color: var(--light-text-color);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.2);
}
.stats-section .stat-item p {
    font-size: 1.2em;
    margin: 0;
}

/* Propuesta Educativa - Cards Grid */
#propuesta {
    background-color: var(--bg-light);
    padding-top: 100px; /* Ajuste para el header fijo */
}
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    justify-content: center;
}
.card {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 30px;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: center;
}
.card:hover {
    transform: translateY(-10px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
}
.card h3 {
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 15px;
}
.card p {
    font-size: 1em;
    color: var(--text-color);
    flex-grow: 1; /* Para que el contenido crezca y los botones estén alineados */
}
.card .btn {
    margin-top: 20px;
}

/* Galería - Carousel */
#galeria {
    background-color: var(--bg-dark);
    color: var(--light-text-color);
}
#galeria h2 {
    color: var(--light-text-color);
}
#galeria h2::after {
    background-color: var(--secondary-color);
}

.carousel-container-gallery {
    position: relative;
    width: 90%;
    max-width: 900px;
    margin: 0 auto;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}

.carousel-slide-gallery {
    display: flex;
    transition: transform 0.5s ease-in-out;
}
.carousel-slide-gallery img {
    width: 100%;
    height: 500px; /* Altura fija para las imágenes del carrusel */
    object-fit: cover;
    flex-shrink: 0;
    border-radius: 10px;
    cursor: zoom-in;
}

.prev-btn-gallery, .next-btn-gallery {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.6);
    color: var(--light-text-color);
    border: none;
    padding: 10px 15px;
    font-size: 1.8em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 5px;
    z-index: 10;
}
.prev-btn-gallery:hover, .next-btn-gallery:hover {
    background-color: rgba(0,0,0,0.8);
}
.prev-btn-gallery {
    left: 10px;
}
.next-btn-gallery {
    right: 10px;
}

.carousel-dots-gallery {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}
.carousel-dots-gallery .dot {
    width: 10px;
    height: 10px;
    background-color: rgba(255,255,255,0.4);
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.3s ease;
}
.carousel-dots-gallery .dot.active {
    background-color: var(--secondary-color);
    transform: scale(1.2);
}

/* Noticias */
#noticias {
    background-color: var(--bg-light);
}
.news-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}
.news-item {
    background-color: #fff;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    padding: 25px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.news-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}
.news-item h3 {
    font-size: 1.5em;
    color: var(--primary-color);
    margin-bottom: 10px;
    text-align: left;
}
.news-item .date {
    font-size: 0.9em;
    color: #777;
    margin-bottom: 15px;
    text-align: left;
}
.news-item .summary {
    font-size: 1em;
    color: var(--text-color);
    flex-grow: 1;
    margin-bottom: 20px;
    text-align: left;
}
.news-item .btn {
    align-self: flex-start; /* Alinea el botón a la izquierda */
}
#load-more-news {
    display: block;
    margin: 50px auto 0;
}

/* Contacto */
#contacto {
    background-color:rgb(0, 145, 255);
    color: var(--light-text-color);
}
#contacto h2 {
    color: var(--light-text-color);
}
#contacto h2::after {
    background-color: var(--secondary-color);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: flex-start;
    margin-bottom: 50px;
}
.contact-info p {
    font-size: 1.1em;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}
.contact-info p i {
    margin-right: 15px;
    color: var(--secondary-color);
    font-size: 1.4em;
    width: 25px; /* Para alinear íconos */
    text-align: center;
}
.contact-info a {
    color: var(--light-text-color);
    text-decoration: underline;
}
.contact-info a:hover {
    color: var(--secondary-color);
}

.social-links {
    margin-top: 30px;
}
.social-links a {
    color: var(--light-text-color);
    font-size: 2em;
    margin-right: 20px;
    transition: color 0.3s ease, transform 0.3s ease;
}
.social-links a:hover {
    color: var(--secondary-color);
    transform: translateY(-3px);
}

.map-container {
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
}
.map-container iframe {
    width: 100%;
    height: 350px;
    border: none;
}

#contact-form {
    background-color: var(--bg-dark);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    max-width: 700px;
    margin: 0 auto;
}
#contact-form h3 {
    color: var(--light-text-color);
    margin-bottom: 30px;
    text-align: center;
}
#contact-form .form-group {
    margin-bottom: 20px;
}
#contact-form input[type="name"],
#contact-form input[type="password"],
#contact-form input[type="email"],
#contact-form textarea {
    width: 100%;
    padding: 12px 15px;
    margin-bottom: 5px;
    border: 1px solid #555;
    border-radius: 5px;
    background-color: #333;
    color: var(--light-text-color);
    font-size: 1em;
    transition: border-color 0.3s ease;
}
#contact-form input[type="text"]::placeholder,
#contact-form input[type="password"]::placeholder,
#contact-form input[type="email"]::placeholder,
#contact-form textarea::placeholder {
    color: #aaa;
}
#contact-form input[type="text"]:focus,
#contact-form input[type="email"]:focus,
#contact-form input[type="password"]::placeholder,
#contact-form textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}
#contact-form textarea {
    resize: vertical;
}

#contact-form .btn-primary {
    width: 100%;
    padding: 15px;
    font-size: 1.1em;
}

.error-message {
    color: #ffdddd; /* Rojo claro para errores en fondo oscuro */
    background-color: #c0392b; /* Fondo rojo oscuro */
    padding: 8px 12px;
    border-radius: 5px;
    font-size: 0.9em;
    margin-top: 5px;
    display: none; /* Oculto por defecto */
}
.status-message {
    padding: 12px 15px;
    border-radius: 5px;
    margin-top: 20px;
    text-align: center;
    font-weight: bold;
    display: none; /* Oculto por defecto */
    color: var(--light-text-color);
}
.status-message.success {
    background-color: #27ae60; /* Verde */
}
.status-message.error {
    background-color: #e74c3c; /* Rojo */
}

/* Spinner para formulario */
.spinner {
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid var(--light-text-color);
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    display: inline-block;
    vertical-align: middle;
    margin-right: 10px;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Footer */
footer {
    background-color: #1a252f; /* Un poco más oscuro que primary */
    color: var(--light-text-color);
    padding: 50px 0 20px;
    font-size: 0.95em;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}
.footer-column h4 {
    color: var(--secondary-color);
    margin-bottom: 20px;
    font-size: 1.4em;
    text-align: left;
}
.footer-column p {
    color: #bbb;
    line-height: 1.8;
}
.footer-column ul {
    list-style: none;
}
.footer-column ul li {
    margin-bottom: 10px;
}
.footer-column ul li a {
    color: #bbb;
}
.footer-column ul li a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}
.social-links-footer a {
    color: var(--light-text-color);
    font-size: 1.8em;
    margin-right: 15px;
    transition: color 0.3s ease;
}
.social-links-footer a:hover {
    color: var(--secondary-color);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid #333;
    padding-top: 20px;
    font-size: 0.9em;
    color: #999;
}
.footer-bottom a {
    color: #999;
    margin: 0 10px;
}
.footer-bottom a:hover {
    color: var(--secondary-color);
}

/* Modals */
.modal {
    display: none; /* Hidden by default */
    position: fixed; /* Stay in place */
    z-index: 1001; /* Sit on top */
    left: 0;
    top: 0;
    width: 100%; /* Full width */
    height: 100%; /* Full height */
    overflow: auto; /* Enable scroll if needed */
    background-color: rgba(0,0,0,0.7); /* Black w/ opacity */
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.modal-content {
    background-color: #fefefe;
    margin: auto;
    padding: 30px;
    border-radius: 10px;
    max-width: 800px;
    width: 90%;
    position: relative;
    box-shadow: 0 5px 20px rgba(0,0,0,0.4);
    animation: fadeInScale 0.3s ease-out;
}
.modal-content h4 {
    color: var(--primary-color);
    font-size: 2em;
    margin-bottom: 25px;
    text-align: center;
}
.modal-content p {
    font-size: 1.1em;
    line-height: 1.7;
    margin-bottom: 15px;
}
.modal-content ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 15px;
}
.modal-content ul li {
    margin-bottom: 8px;
}

.close-button {
    color: #aaa;
    position: absolute;
    top: 15px;
    right: 25px;
    font-size: 35px;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.3s ease;
}
.close-button:hover,
.close-button:focus {
    color: var(--accent-color);
    text-decoration: none;
    cursor: pointer;
}

/* Tabs dentro del Modal */
.tabs-container {
    margin-top: 20px;
}
.tab-buttons {
    display: flex;
    justify-content: center;
    margin-bottom: 20px;
    border-bottom: 2px solid var(--border-color);
}
.tab-button {
    background-color: transparent;
    border: none;
    padding: 12px 20px;
    cursor: pointer;
    font-size: 1.1em;
    font-weight: bold;
    color: #777;
    border-bottom: 3px solid transparent;
    transition: color 0.3s ease, border-bottom-color 0.3s ease;
}
.tab-button:hover {
    color: var(--secondary-color);
}
.tab-button.active {
    color: var(--primary-color);
    border-bottom-color: var(--secondary-color);
}
.tab-content {
    display: none;
    padding: 20px 0;
}
.tab-content.active {
    display: block;
    animation: fadeIn 0.5s ease-out;
}
.tab-content h5 {
    font-size: 1.6em;
    color: var(--secondary-color);
    margin-bottom: 15px;
    text-align: left;
}
.small-text {
    font-size: 0.85em;
    color: #888;
    margin-top: 15px;
}


/* Lightbox para Galería */
.lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    z-index: 1002; /* Higher than modals */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.9);
    justify-content: center;
    align-items: center;
    overflow: hidden;
    padding: 20px;
}
.lightbox-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    max-width: 90%;
    max-height: 90%;
    background-color: transparent; /* No background for content itself */
    position: relative;
}
.lightbox-close {
    position: absolute;
    top: 0px;
    right: 0px;
    color: var(--light-text-color);
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1003;
    background: rgba(0,0,0,0.5);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: background-color 0.3s ease, color 0.3s ease;
}
.lightbox-close:hover {
    color: var(--accent-color);
    background-color: rgba(0,0,0,0.7);
}

.lightbox-image-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 80vh; /* Adjust height for image */
    margin-bottom: 20px;
}
.lightbox-current-image {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 0 20px rgba(0,0,0,0.5);
    animation: fadeIn 0.5s ease-out;
}

.lightbox-prev, .lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background-color: rgba(0,0,0,0.5);
    color: var(--light-text-color);
    border: none;
    padding: 10px 15px;
    font-size: 2em;
    cursor: pointer;
    transition: background-color 0.3s ease;
    border-radius: 5px;
}
.lightbox-prev:hover, .lightbox-next:hover {
    background-color: rgba(0,0,0,0.7);
}
.lightbox-prev {
    left: 0px;
}
.lightbox-next {
    right: 0px;
}

.lightbox-thumbnails {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding-bottom: 10px; /* Space for scrollbar */
    max-width: 100%;
    justify-content: center;
}
.lightbox-thumbnails img {
    width: 80px;
    height: 60px;
    object-fit: cover;
    border-radius: 5px;
    cursor: pointer;
    opacity: 0.6;
    border: 2px solid transparent;
    transition: opacity 0.3s ease, border-color 0.3s ease;
}
.lightbox-thumbnails img.active,
.lightbox-thumbnails img:hover {
    opacity: 1;
    border-color: var(--secondary-color);
}

/* Scrollbar personalizado para lightbox-thumbnails */
.lightbox-thumbnails::-webkit-scrollbar {
    height: 8px;
}
.lightbox-thumbnails::-webkit-scrollbar-track {
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}
.lightbox-thumbnails::-webkit-scrollbar-thumb {
    background: rgba(255,255,255,0.4);
    border-radius: 10px;
}
.lightbox-thumbnails::-webkit-scrollbar-thumb:hover {
    background: rgba(255,255,255,0.6);
}


/* Animaciones */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}
@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.95); }
    to { opacity: 1; transform: scale(1); }
}

/* Media Queries para Responsive Design */
@media (max-width: 1024px) {
    .hero-carousel .slide-content h2 {
        font-size: 2.8em;
    }
    .hero-carousel .slide-content p {
        font-size: 1.1em;
    }
    .contact-grid {
        grid-template-columns: 1fr;
    }
    .map-container {
        order: -1; /* Mueve el mapa arriba en móviles */
    }
}

@media (max-width: 768px) {
    /* Header */
    header {
        padding: 10px 0;
        height: var(--header-height); /* Mantiene la altura normal en mobile */
    }
    header .logo {
        margin-left: 15px;
    }
    header .logo h1 {
        font-size: 1.5em;
    }
    header nav ul {
        display: none; /* Oculta el menú en pantallas pequeñas */
        flex-direction: column;
        position: fixed;
        top: var(--header-height);
        right: 0;
        background-color: var(--primary-color);
        width: 100%;
        height: calc(100vh - var(--header-height));
        padding: 20px;
        box-shadow: -2px 0 5px rgba(0,0,0,0.2);
        transform: translateX(100%); /* Oculto a la derecha */
        transition: transform 0.4s ease-out;
        z-index: 999; /* Debajo del header */
    }
    strong{
        margin-right: 20px;
    }
    header nav.nav-open ul {
        transform: translateX(0); /* Muestra el menú */
    }
    header nav ul li {
        margin: 15px 0;
        text-align: center;
    }
    header nav ul li a {
        font-size: 1.4em;
        display: block;
        padding: 10px 0;
    }
    .nav-toggle {
        display: block; /* Muestra el botón hamburguesa */
        margin-right: 15px;
        position: relative;
        z-index: 1001; /* Asegura que esté por encima del menú desplegado */
    }
    .nav-toggle.active .icon-bar:nth-child(1) { transform: rotate(-45deg) translate(-5px, 6px); }
    .nav-toggle.active .icon-bar:nth-child(2) { opacity: 0; }
    .nav-toggle.active .icon-bar:nth-child(3) { transform: rotate(45deg) translate(-5px, -6px); }

    /* Hero Carousel */
    .hero-carousel {
        height: 450px;
    }
    .hero-carousel .slide-content h2 {
        font-size: 2.2em;
    }
    .hero-carousel .slide-content p {
        font-size: 1em;
    }

    /* Stats Section */
    .stats-section .stat-item {
        flex-basis: 45%;
    }

    /* Cards Grid (Propuesta) */
    .cards-grid {
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    }

    /* Galería */
    .carousel-slide-gallery img {
        height: 350px;
    }

    /* Contacto */
    #contact-form {
        padding: 30px;
    }

    /* Footer */
    .footer-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }
    .footer-column h4 {
        text-align: center;
    }
    .social-links-footer {
        display: flex;
        justify-content: center;
        margin-top: 15px;
    }

    /* Modals */
    .modal-content {
        width: 95%;
        padding: 20px;
    }
    .modal-content h4 {
        font-size: 1.6em;
    }
    .tab-button {
        font-size: 1em;
        padding: 10px 15px;
    }

    /* Lightbox */
    .lightbox-image-container {
        height: 70vh;
    }
    .lightbox-prev, .lightbox-next {
        font-size: 1.5em;
        padding: 8px 10px;
    }
    .lightbox-thumbnails img {
        width: 60px;
        height: 45px;
    }
}

@media (max-width: 480px) {
    h2 {
        font-size: 2em;
    }
    .hero-carousel {
        height: 350px;
    }
    .hero-carousel .slide-content h2 {
        font-size: 1.8em;
    }
    .hero-carousel .slide-content p {
        font-size: 0.9em;
    }
    .btn {
        padding: 10px 20px;
        font-size: 0.9em;
    }
    .stats-section .stat-item {
        flex-basis: 100%;
        max-width: 300px; /* Para que no se estiren demasiado */
    }
    .carousel-slide-gallery img {
        height: 280px;
    }
    .prev-btn-gallery, .next-btn-gallery {
        font-size: 1.5em;
    }
    .news-item h3 {
        font-size: 1.3em;
    }
    .contact-info p {
        font-size: 1em;
    }
    .modal-content h4 {
        font-size: 1.4em;
    }
    .lightbox-image-container {
        height: 60vh;
    }
    .lightbox-thumbnails img {
        width: 50px;
        height: 38px;
    }
    .lightbox-close {
        font-size: 30px;
        width: 40px;
        height: 40px;
    }
}

/* Clases para efectos de JavaScript */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}
.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.sr-only { /* Para accesibilidad: ocultar visualmente pero mantener para lectores de pantalla */
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.borde-contacto {
    background-color: var(--bg-dark);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.3);
    max-width: 700px;
    margin: 0 auto;
}

body {
    font-family: 'Arial', 'Helvetica', sans-serif;
}