/* --- Variables de Color (Azul y Amarillo) --- */
:root {
    --color-primary: #004a8f;    /* Azul oscuro Mision Pais */
    --color-secondary: #007bff;   /* Azul más claro para enlaces */
    --color-accent: #ffc107;     /* Amarillo Mision Pais */
    --color-text-dark: #212529;  /* Texto oscuro general */
    --color-text-light: #ffffff; /* Texto claro */
    --color-bg-light: #f8f9fa;   /* Fondo de secciones claras */
    --color-border: #dee2e6;     /* Borde para elementos */
    --color-shadow: rgba(0, 0, 0, 0.08); /* Sombra más estándar */
    --color-hover: #00376b;      /* Azul oscuro al pasar el ratón */

    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Open Sans', sans-serif;
}

/* --- Reset Básico y Estilos Globales --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--color-text-light);
    color: var(--color-text-dark);
    line-height: 1.7; /* Mayor interlineado para legibilidad */
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden; /* Evitar scroll horizontal accidental */
}

.container {
    max-width: 1200px; /* Un poco más ancho que antes */
    margin: 0 auto;
    padding: 0 25px; /* Más padding en los lados */
}

h1, h2, h3 {
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem; /* Más espacio */
    color: var(--color-primary); /* Color primario para títulos */
}

h1 { font-size: clamp(2.8rem, 6vw, 4.5rem); } /* Grande y responsivo */
h2 { font-size: clamp(2rem, 5vw, 3rem); }
h3 { font-size: clamp(1.5rem, 4vw, 2.2rem); color: var(--color-primary); } /* Ajuste de color para h3 */

p {
    margin-bottom: 1.2rem;
    max-width: 70ch; /* Mayor ancho para párrafos */
    font-size: 1.05rem; /* Ligeramente más grande */
    line-height: 1.8;
}

a {
    color: var(--color-secondary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--color-primary);
}

img {
    max-width: 100%;
    display: block;
    height: auto;
}

/* --- Botón CTA (Llamada a la Acción) --- */
.cta-button {
    display: inline-block;
    background-color: var(--color-accent);
    color: var(--color-text-dark);
    padding: 16px 36px; /* Más padding */
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    text-transform: uppercase;
    font-size: 1rem; /* Ligeramente más grande */
    letter-spacing: 0.8px;
    box-shadow: 0 6px 20px rgba(255, 193, 7, 0.4); /* Sombra más pronunciada */
    transition: all 0.3s ease;
    border: none; /* Asegurar que no tenga borde por defecto */
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(255, 193, 7, 0.6);
    background-color: #ffda47; /* Ligeramente más claro al pasar el ratón */
}

/* --- Header (Encabezado) --- */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95); /* Menos transparente */
    backdrop-filter: blur(10px); /* Más blur */
    border-bottom: 1px solid var(--color-border);
    z-index: 1000; /* Asegurar que esté siempre arriba */
    padding: 12px 0; /* Padding más compacto */
    box-shadow: 0 2px 10px rgba(0,0,0,0.05); /* Sombra sutil */
}

.header .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    display: block;
    height: 70px; /* Tamaño del logo aumentado */
    width: auto;
    z-index: 1001; /* Sobre el menú móvil */
}

.logo img {
    height: 100%;
    width: auto;
    object-fit: contain; /* Asegura que la imagen se vea completa */
}

/* --- NAVEGACIÓN (RESPONSIVE) --- */
.nav-links {
    display: flex;
    flex-direction: column;
    gap: 15px;
    list-style: none;
    position: fixed;
    top: 80px; /* Altura del header (12px*2 padding + 55px logo = 79px ~ 80px) */
    left: 0;
    width: 100%;
    height: calc(100vh - 80px);
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(12px);
    transform: translateX(100%);
    transition: transform 0.4s ease-out; /* Transición más suave */
    padding: 60px 20px; /* Más padding interno */
    text-align: center;
    overflow-y: auto;
}

.nav-links.active {
    transform: translateX(0);
}

.nav-links a {
    color: var(--color-text-dark);
    font-family: var(--font-heading);
    font-weight: 700;
    text-decoration: none;
    font-size: 1.6rem; /* Más grande en móvil */
    padding: 15px 0;
    display: block;
    border-bottom: 1px solid rgba(0,0,0,0.1); /* Separador sutil */
    transition: background-color 0.3s ease;
}

.nav-links a:hover {
    background-color: var(--color-bg-light);
    border-bottom-color: var(--color-accent);
}

.hamburger {
    display: block;
    font-size: 2.2rem; /* Más grande */
    color: var(--color-primary);
    background: none;
    border: none;
    cursor: pointer;
    z-index: 1001;
    padding: 10px; /* Más padding para área táctil */
    line-height: 1; /* Para centrar el ícono */
    transition: transform 0.3s ease;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    user-select: none;
    -webkit-user-select: none;
}

.hamburger:hover {
    transform: scale(1.1);
}
.hamburger:active {
    transform: scale(0.95);
}

/* --- Hero (Sección Principal) --- */
.hero {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100vh;
    text-align: center;
    color: var(--color-text-light);
    position: relative;
    overflow: hidden;
    padding-top: 80px; /* Ajuste para el header fijo */
}

.hero::before {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(to bottom, rgba(0, 74, 143, 0.6), rgba(0, 74, 143, 0.8)), /* Degradado más oscuro */
        url('static/fondo.jpg'); /* Asegúrate de tener esta imagen en tu carpeta static */
    background-size: cover; /* Cambiado a cover para mejor visual */
    background-position: center;
    background-attachment: fixed; /* Para efecto parallax */
    z-index: -1;
}

.hero h1 {
    color: var(--color-text-light);
    margin-bottom: 0.8rem;
    text-shadow: 2px 2px 8px rgba(0,0,0,0.4); /* Sombra para que destaque */
}

.hero p {
    font-size: 1.3rem; /* Más grande */
    color: rgba(255, 255, 255, 0.95);
    margin: 0 auto 2.5rem; /* Más espacio */
    max-width: 800px;
    text-shadow: 1px 1px 6px rgba(0,0,0,0.3);
}

/* --- Estilos de Secciones --- */
section {
    padding: 100px 0; /* Más padding para secciones */
    position: relative;
    overflow: hidden; /* Para contener elementos flotantes o animaciones */
}

#ubicacion {
    background-color: var(--color-bg-light);
}

section h2 {
    text-align: center;
    margin-bottom: 4rem; /* Más espacio */
    position: relative;
}
section h2::after { /* Subrayado decorativo para títulos */
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background-color: var(--color-accent);
    margin: 15px auto 0;
    border-radius: 2px;
}

section > .container > p {
     margin-left: auto;
     margin-right: auto;
     margin-bottom: 3.5rem; /* Más espacio */
     text-align: center;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); /* 4 columnas para que caigan en una sola línea en desktop */
    gap: 20px; /* Espacio reducido entre tarjetas para ajustar */
    margin-top: 50px;
}

/* Media query para móviles: 1 columna para mejor visualización en Android */
@media (max-width: 767px) {
    .cards-grid {
        grid-template-columns: repeat(1, 1fr);
    }
}

.card {
    background: var(--color-text-light);
    border-radius: 15px; /* Bordes más redondeados */
    padding: 30px; /* Más padding */
    box-shadow: 0 8px 25px var(--color-shadow); /* Sombra más suave y extendida */
    border-top: 5px solid var(--color-accent); /* Borde superior más grueso */
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    display: flex; /* Para mejor alineación de contenido */
    flex-direction: column;
    align-items: flex-start; /* Alinear el texto de las tarjetas a la izquierda */
}

.card:hover {
    transform: translateY(-8px); /* Más levantado al pasar el ratón */
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15); /* Sombra más pronunciada al pasar el ratón */
}

.card h3 {
    font-size: 1.4rem; /* H3 más grande en tarjetas */
    margin-bottom: 1rem;
}

.card p {
    font-size: 1rem; /* Párrafos normales en tarjetas */
    margin-bottom: 0.8rem;
}

/* --- LISTAS DENTRO DE TARJETAS (EQUIPO) --- */
.team-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1.5rem; /* Más espacio */
    font-size: 0.95rem;
    text-align: left;
    width: 100%; /* Para que ocupe todo el ancho disponible en la tarjeta */
}
.team-list li {
    margin-bottom: 0.8rem;
    padding-left: 20px;
    position: relative;
}
.team-list li::before { /* Bullet de diseño */
    content: '•';
    color: var(--color-accent);
    font-size: 1.5em;
    position: absolute;
    left: 0;
    top: -2px;
}
.team-list strong {
    color: var(--color-primary);
    display: inline; /* Vuelve a poner el nombre y rol en la misma línea */
    font-weight: 700;
}

.card cite {
    display: block;
    text-align: right;
    font-style: normal;
    color: var(--color-primary);
    margin-top: 1rem;
}

/* --- Sección CTA (Llamada a la Acción) --- */
#unete {
    background-color: var(--color-primary);
    color: var(--color-text-light);
    text-align: center;
    padding: 120px 0; /* Mucho más padding para destacarla */
}

#unete h2 {
    color: var(--color-text-light);
    margin-bottom: 2rem;
}
#unete h2::after { /* Subrayado en blanco para contrastar */
     background-color: var(--color-text-light);
}

#unete p {
    color: rgba(255, 255, 255, 0.95);
    font-size: 1.2rem;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

/* --- Modal --- */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed;
    z-index: 2000; /* Sobre todo */
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7); /* Overlay más oscuro para mejor contraste */
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(5px); /* Efecto blur en el fondo */
}

.modal-content {
    background: linear-gradient(135deg, var(--color-text-light) 0%, #f8f9fa 100%); /* Gradiente sutil */
    margin: 5% auto;
    padding: 40px; /* Más padding */
    border: none;
    width: 90%;
    max-width: 700px; /* Más ancho */
    border-radius: 20px; /* Bordes más redondeados */
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4); /* Sombra más pronunciada */
    position: relative;
}

.close {
    position: absolute;
    top: 20px;
    right: 20px;
    color: var(--color-primary);
    font-size: 32px; /* Más grande */
    font-weight: bold;
    cursor: pointer;
    background: var(--color-text-light);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.close:hover,
.close:focus {
    color: var(--color-text-light);
    background: var(--color-primary);
    transform: scale(1.1);
}

.modal-content h2 {
    font-size: clamp(1.5rem, 5vw, 2rem); /* Responsivo */
    color: var(--color-primary);
    margin-bottom: 20px;
    text-align: center;
    position: relative;
}

.modal-content h2::after {
    content: '';
    display: block;
    width: 60px;
    height: 4px;
    background: var(--color-accent);
    margin: 10px auto 0;
    border-radius: 2px;
}

.modal-content h3 {
    font-size: 1.4rem;
    color: var(--color-primary);
    margin-top: 30px;
    margin-bottom: 15px;
}

.modal-content p {
    margin-bottom: 15px;
    line-height: 1.7;
    font-size: 1rem;
}

.modal-content ul {
    margin-left: 20px;
    margin-bottom: 20px;
}

.modal-content li {
    margin-bottom: 10px;
    position: relative;
    padding-left: 25px;
}

.modal-content li::before {
    content: '✓';
    color: var(--color-accent);
    font-weight: bold;
    position: absolute;
    left: 0;
}

.modal-icon {
    text-align: center;
    font-size: 4rem;
    color: var(--color-accent);
    margin-bottom: 20px;
}

/* --- Back to Top Button --- */
#back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: none;
    background: var(--color-accent);
    color: var(--color-text-dark);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 20px;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
    z-index: 1000;
}

#back-to-top:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.3);
}

/* --- Footer (Pie de página) --- */
.footer {
    padding: 50px 20px; /* Más padding */
    background-color: var(--color-bg-light);
    color: var(--color-text-dark);
    text-align: center;
    font-size: 0.95rem;
    border-top: 1px solid var(--color-border);
}

.footer p {
    margin-bottom: 0.8rem;
    max-width: none; /* Para que el texto del footer no se limite */
}

.footer a {
    color: var(--color-primary);
    font-weight: 700;
    text-decoration: none;
    transition: color 0.3s ease, text-decoration 0.3s ease;
    margin: 0 8px; /* Espacio entre enlaces */
}

.footer a:hover {
    text-decoration: underline;
    color: var(--color-secondary);
}

/* --- Media Queries (Diseño de Escritorio) --- */
@media (min-width: 768px) {

    .hamburger {
        display: none; /* Ocultar hamburguesa en escritorio */
    }

    .nav-links {
        display: flex;
        flex-direction: row;
        gap: 30px; /* Más espacio entre enlaces en escritorio */
        position: static;
        width: auto;
        height: auto;
        background: none;
        backdrop-filter: none;
        transform: none;
        padding: 0;
        overflow-y: visible;
        align-items: center; /* Centrar verticalmente los enlaces */
    }

    .nav-links a {
        color: var(--color-text-dark);
        font-family: var(--font-body); /* Fuente del cuerpo para enlaces */
        font-weight: 600; /* Peso de fuente intermedio */
        font-size: 1.05rem; /* Tamaño más legible */
        padding: 5px 0;
        border-bottom: 2px solid transparent;
        transition: border-color 0.3s ease, color 0.3s ease;
    }

    .nav-links a:hover {
        color: var(--color-primary);
        border-bottom-color: var(--color-accent);
        background-color: transparent; /* Asegurar que no tenga fondo al pasar el ratón */
    }

    /* Ajustes para los enlaces del menú principal */
    .header .container {
        padding: 0 40px; /* Más padding en el header de escritorio */
    }

    /* Mantener consistencia en hero para todos los tamaños */
    .hero {
        padding-top: 80px;
        height: 100vh;
    }
}

/* Media query para tablets: 3 columnas en cards-grid */
@media (min-width: 768px) and (max-width: 1023px) {
    .cards-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Ajustes adicionales para mejor responsividad */
@media (max-width: 480px) {
    .container {
        padding: 0 15px;
    }
    .card {
        padding: 20px;
    }
    .cta-button {
        padding: 12px 24px;
        font-size: 0.9rem;
    }
}

/* Responsividad del modal de privacidad */
@media (max-width: 767px) {
    .modal-content {
        padding: 20px;
        margin: 10% auto;
        max-width: 90%;
    }
    .modal-content h2 {
        font-size: 1.5rem;
    }
    .modal-content h3 {
        font-size: 1.2rem;
    }
    .modal-content p {
        font-size: 0.9rem;
    }
    .close {
        font-size: 24px;
        width: 30px;
        height: 30px;
    }
    .modal-icon {
        font-size: 3rem;
    }
}

/* Estilos para sección cita */
#cita {
    padding: 3rem 1rem;
    text-align: center;
}

.cita-title {
    color: #0d47a1;
    font-size: 2rem;
    margin-bottom: 1rem;
}

.cita-description {
    max-width: 800px;
    margin: 0 auto 2rem;
    font-size: 1.2rem;
    color: #1565c0;
}

.cita-quote {
    font-size: 1.6rem;
    font-style: italic;
    color: #1e88e5;
    margin: 0 auto;
    max-width: 800px;
    padding: 2rem;
    background: #f0f8ff;
    border-left: 5px solid #64b5f6;
    border-radius: 10px;
    line-height: 1.6;
}

.cita-quote strong {
    display: inline-block;
    color: #0d47a1;
    font-size: 1.9rem;
    background: #bbdefb;
    padding: 0.5rem 1rem;
    border-radius: 8px;
}

.cita-quote span {
    display: block;
    margin-top: 1rem;
    font-size: 1.1rem;
    color: #1565c0;
}

/* Estilos para imágenes de equipo */
.team-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 10px;
    margin-bottom: 1rem;
}

/* Estilos para iframe del mapa */
.map-iframe {
    border: 0;
    border-radius: 10px;
}

/* Estilos para acciones del modal */
.modal-actions {
    text-align: center;
    margin-top: 1.5rem;
}
