/* --- VARIABLES --- */
:root {
    --color-principal: #014493;
    --color-secundario: #00AFEF;
    --color-blanco: #FFFFFF;
    --color-texto: #333333;
    --color-fondo-claro: #f4f8fa;
    --font-principal: 'Poppins', sans-serif;
    --navbar-height: 70px;
    --logo-height: 80px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { font-family: var(--font-principal); color: var(--color-texto); padding-top: calc(var(--navbar-height) + 10px); }

/* --- NAVBAR --- */
.navbar {
    position: fixed; top: 0; left: 0; width: 100%;
    background: var(--color-principal); color: var(--color-blanco);
    padding: 10px 0; z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.navbar .container { display: flex; justify-content: space-between; align-items: center; }

/* Logo */
.navbar .logo { position: relative; height: 50px; width: 150px; }
.navbar .logo-img {
    position: absolute; top: -10px; left: 0;
    width: 100%; height: var(--logo-height);
    object-fit: contain;
    border-radius: 0 0 10px 10px;
    box-shadow: none;
    z-index: 1002;
}

.navbar .menu ul { list-style: none; display: flex; gap: 25px; }
.navbar .menu a { color: var(--color-blanco); text-decoration: none; font-weight: 600; transition: color 0.3s; }
.navbar .menu a:hover { color: var(--color-secundario); }

/* --- HERO SECTION --- */
.hero {
    position: relative;
    height: 85vh;
    min-height: 600px;
    display: flex; align-items: center; justify-content: center;
    color: var(--color-blanco); overflow: hidden;
}

.video-background {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%; z-index: -2;
}
.video-background video {
    width: 100%; height: 100%; object-fit: cover;
}

/* Capa oscura */
.overlay {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(1, 68, 147, 0.75); 
    z-index: -1;
}

.hero-content {
    position: relative; z-index: 1;
    width: 100%; max-width: 900px;
    padding: 20px; text-align: center;
    display: flex; flex-direction: column; align-items: center;
}

/* --- CARRUSEL --- */
.carousel-container {
    position: relative;
    width: 100%;
    height: 350px; /* Espacio para el texto */
    display: flex; justify-content: center; align-items: center;
}

.carousel-item {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.6s ease-in-out, visibility 0.6s;
    display: flex; flex-direction: column; align-items: center;
}

.carousel-item.active {
    opacity: 1;
    visibility: visible;
    z-index: 2;
}

/* --- CONTROLES DEL CARRUSEL --- */
.carousel-control {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    font-size: 3rem;
    cursor: pointer;
    padding: 10px;
    transition: color 0.3s, transform 0.3s;
    z-index: 10;
    user-select: none;
}

.carousel-control:hover {
    color: #fff;
    transform: translateY(-50%) scale(1.1);
}

.carousel-control.prev { left: -60px; } /* Fuera del contenedor de texto, pero dentro de hero-content */
.carousel-control.next { right: -60px; }

/* --- INDICADORES (PUNTOS) --- */
.carousel-indicators {
    display: flex;
    gap: 10px;
    margin-top: 10px; /* Espacio entre el texto y los puntos */
    margin-bottom: 20px; /* Espacio antes del botón CTA */
    z-index: 10;
}

.dot {
    width: 12px;
    height: 12px;
    background-color: rgba(255, 255, 255, 0.4);
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: background-color 0.3s, transform 0.3s;
}

.dot:hover { background-color: rgba(255, 255, 255, 0.8); }
.dot.active { 
    background-color: var(--color-secundario); 
    transform: scale(1.2);
}

/* Estilos de Texto dentro del Carrusel */
.slide-title {
    font-size: 2.8rem; margin-bottom: 20px; font-weight: 700;
    text-shadow: 0 2px 5px rgba(0,0,0,0.3);
    line-height: 1.2;
}
.slide-text { font-size: 1.4rem; font-weight: 300; }

/* Cajas de información */
.info-box, .info-list {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(4px);
    padding: 20px; border-radius: 15px;
    border: 1px solid rgba(255,255,255,0.3);
    width: 90%; max-width: 600px;
    text-align: left; margin: 0 auto;
}

.info-list { list-style: none; }
.info-list li {
    padding: 8px 0;
    border-bottom: 1px solid rgba(255,255,255,0.2);
    font-size: 1.1rem;
}
.info-list li:last-child { border-bottom: none; }

.info-box p { margin-bottom: 10px; font-size: 1.1rem; }
.highlight { font-weight: bold; color: var(--color-secundario); background: #fff; padding: 5px 10px; border-radius: 5px; display: inline-block; color: var(--color-principal); margin-top: 5px;}
.note { margin-top: 10px; font-style: italic; font-size: 0.9rem; opacity: 0.9; }
hr { border: 0; border-top: 1px solid rgba(255,255,255,0.3); margin: 10px 0; }

/* Botón CTA en Hero */
.cta-hero-btn {
    margin-top: 10px;
}

/* Botones Generales */
.btn {
    padding: 12px 30px; border-radius: 50px; text-decoration: none;
    font-weight: 600; transition: all 0.3s; display: inline-block;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2); border: none; cursor: pointer;
}
.btn-primary { background: var(--color-secundario); color: #fff; }
.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.3); }
.btn-secondary { background: #fff; color: var(--color-principal); border: 2px solid var(--color-principal); }

/* --- RESTO DE SECCIONES --- */
.container { max-width: 1100px; margin: 0 auto; padding: 0 20px; }
.section { padding: 60px 0; text-align: center; }
.section h2 { color: var(--color-principal); margin-bottom: 40px; font-size: 2.2rem; }
.bg-light { background: var(--color-fondo-claro); }

.grid-container { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.card { background: #fff; padding: 30px; border-radius: 10px; box-shadow: 0 5px 20px rgba(0,0,0,0.05); }
.card-icon { width: 80px; height: 80px; border-radius: 50%; margin-bottom: 20px; }
.tag { background: #e0f7ff; color: var(--color-secundario); padding: 5px 10px; border-radius: 20px; font-size: 0.8rem; display: inline-block; margin-top: 10px; }

.card-simple { background: var(--color-fondo-claro); padding: 20px; border-radius: 8px; border-left: 5px solid var(--color-secundario); text-align: left; }

.cta { background: var(--color-principal); color: #fff; }
.cta h2 { color: #fff; }
.cta-buttons { display: flex; gap: 20px; justify-content: center; flex-wrap: wrap; }
footer { background: #222; color: #aaa; padding: 20px 0; text-align: center; }

/* Whatsapp */
.whatsapp-float {
    position: fixed; bottom: 20px; right: 20px; background: #25D366; color: #fff;
    padding: 10px 15px; border-radius: 50px; display: flex; align-items: center; gap: 10px;
    text-decoration: none; font-weight: bold; box-shadow: 0 4px 10px rgba(0,0,0,0.3); z-index: 2000;
}
.whatsapp-icon { width: 24px; fill: #fff; }
/* --- MODAL AVISO --- */
/* --- MODAL AVISO --- */
.modal {
    display: none; /* Oculto por defecto */
    position: fixed; 
    z-index: 2001; /* Por encima de todo */
    left: 0; top: 0; width: 100%; height: 100%;
    background-color: rgba(0,0,0,0.6); /* Fondo oscuro */
    justify-content: center; align-items: center;
    animation: fadeIn 0.4s;
}

.modal-content {
    background-color: #fff;
    margin: 20px;
    padding: 30px;
    border-radius: 15px;
    width: 90%; max-width: 600px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    text-align: left;
    animation: slideDown 0.4s;
    
    /* MODIFICACIONES PARA HACER SCROLL */
    max-height: 90vh; /* Limita la altura al 90% del viewport */
    display: flex; /* Habilita el flexbox para distribuir el espacio verticalmente */
    flex-direction: column; /* Apila el contenido verticalmente */
}

.close-modal {
    position: absolute; top: 15px; right: 20px;
    color: #aaa; font-size: 28px; font-weight: bold;
    cursor: pointer;
}
.close-modal:hover { color: #333; }

.modal-title {
    color: var(--color-principal);
    font-size: 1.8rem; margin-bottom: 20px;
    text-align: center; border-bottom: 2px solid var(--color-secundario);
    padding-bottom: 10px;
    /* Asegura que el título no se comprima */
    flex-shrink: 0; 
}

.modal-body { 
    color: var(--color-texto); 
    margin-bottom: 20px; 
    
    /* HACE QUE EL CUERPO SE DESPLACE Y OCUPE EL ESPACIO RESTANTE */
    overflow-y: auto; 
    flex-grow: 1; /* Permite que el cuerpo ocupe todo el espacio disponible */
    padding-right: 5px; /* Pequeño padding para mejor visualización del scrollbar */
}
.modal-item { margin-bottom: 15px; }
.modal-item h3 { color: var(--color-principal); margin-bottom: 5px; font-size: 1.2rem; }
.modal-location { font-style: italic; color: #666; margin-top: 5px; }
.modal-note { color: #888; font-style: italic; }

.modal-btn { 
    display: block; width: 100%; text-align: center; 
    margin-top: 20px; 
    /* Asegura que el botón no se comprima */
    flex-shrink: 0; 
}

/* Animaciones */
@keyframes fadeIn { from {opacity: 0;} to {opacity: 1;} }
@keyframes slideDown { from {transform: translateY(-50px); opacity: 0;} to {transform: translateY(0); opacity: 1;} }

/* --- RESPONSIVE --- */
.menu-toggle { display: none; flex-direction: column; gap: 5px; cursor: pointer; }
.menu-toggle span { width: 25px; height: 3px; background: #fff; }

@media (max-width: 768px) {
    .navbar .logo-img { position: static; width: auto; height: 50px; background: none; box-shadow: none; border-radius: 0; }
    .navbar .logo { width: auto; height: auto; }
    
    .menu-toggle { display: flex; }
    .navbar .menu { 
        display: none; position: absolute; top: 100%; left: 0; width: 100%;
        background: var(--color-principal); flex-direction: column; padding: 20px;
    }
    .navbar .menu.active { display: flex; }
    .navbar .menu ul { flex-direction: column; gap: 15px; }

    .grid-container { grid-template-columns: 1fr; }
    
    .hero { height: auto; min-height: 100vh; padding-top: 60px; padding-bottom: 60px;} 
    
    /* Ajustes para móviles del carrusel */
    .carousel-container { height: auto; min-height: 450px; } /* Más alto en móvil */
    .carousel-item { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); }
    
    /* Flechas más pequeñas y pegadas en móvil */
    .carousel-control { font-size: 2rem; padding: 5px; }
    .carousel-control.prev { left: -10px; }
    .carousel-control.next { right: -10px; }
    
    .slide-title { font-size: 1.8rem; }
    .slide-text, .info-list li { font-size: 1rem; }
    
    .whatsapp-float span { display: none; }
    .whatsapp-float { padding: 12px; border-radius: 50%; }
}