/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   1. PALETA DE COLORES Y VARIABLES
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
:root {
    --bg-dark: #002037;         /* Azul petróleo base MATiLTi */
    --accent-yellow: #FFDE00;   /* Amarillo Vibrante MATiLTi */
    --accent-aqua: #00F2C3;     /* Verde Aqua Neón */
    --text-light: #F4F6F9;      /* Blanco Puro para Lectura */
    --text-muted: #8A99AD;      /* Gris Atenuado para descripciones */
    --glass-bg: rgba(0, 32, 55, 0.6); 
    --glass-border: rgba(0, 242, 195, 0.15);
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   2. RESETS Y ESTILOS GENERALES
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    overflow-x: hidden;
    line-height: 1.6;
    /* Protección CSS para prevenir selección accidental de texto */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}

section {
    padding: 140px 10%;
    min-height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

h2 {
    font-size: 2.8rem;
    font-weight: 800;
    margin-bottom: 50px;
    letter-spacing: -1px;
}

h2 span {
    color: var(--accent-aqua);
}

p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

/* Botón Principal Premium */
.btn-primary {
    display: inline-block;
    background-color: var(--accent-yellow);
    color: var(--bg-dark);
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    width: fit-content;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 20px rgba(255, 222, 0, 0.3);
    background-color: transparent;
    color: var(--accent-yellow);
    border-color: var(--accent-yellow);
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   3. BARRA SUPERIOR (TOP ANNOUNCEMENT)
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
.top-announcement {
    background: linear-gradient(90deg, var(--accent-aqua), var(--accent-yellow));
    color: #061c28;
    text-align: center;
    padding: 8px 15px;
    font-size: 14px;
    font-weight: 600;
    animation: slideDown 0.6s ease-out;
}

.top-announcement strong {
    color: #061c28;
}

.link-banner {
    color: #061c28;
    text-decoration: underline;
    margin-left: 10px;
    font-weight: bold;
    transition: color 0.3s ease;
}

.link-banner:hover {
    color: #ffffff;
}

@keyframes slideDown {
    from { transform: translateY(-100%); }
    to { transform: translateY(0); }
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   4. FLOATING NAVBAR (Glassmorphism & Neón)
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
header {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%);
    width: 80%;
    max-width: 1100px;
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(254, 254, 254, 0.08);
    padding: 15px 40px;
    border-radius: 100px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
}

.logo {
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-light);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-circle {
    width: 15px;
    height: 15px;
    background-color: var(--accent-aqua);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--accent-aqua);
}

nav a {
    color: var(--text-muted);
    text-decoration: none;
    margin: 0 15px;
    font-size: 0.95rem;
    transition: color 0.3s;
}

nav a:hover {
    color: var(--accent-aqua);
}

/* Efecto Neón para llamadas de acción en el menú */

a[href="#proximo-curso"] {
    position: relative;
    color: var(--accent-yellow) !important;
    font-weight: bold;
    animation: pulseGlow 2s infinite alternate;
}

@keyframes pulseGlow {
    0% {
        text-shadow: 0 0 2px var(--accent-yellow), 0 0 5px var(--accent-yellow);
    }
    100% {
        text-shadow: 0 0 8px var(--accent-aqua), 0 0 15px var(--accent-aqua);
    }
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   5. HERO SECTION & ARTE PRINCIPAL
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
#hero {
    position: relative;
    background: radial-gradient(circle at 80% 20%, rgba(0, 242, 195, 0.07) 0%, transparent 50%);
}

.hero-content {
    max-width: 700px;
}

.hero-content h1 {
    font-size: 4.5rem;
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    letter-spacing: -2px;
}

.hero-content h1 span {
    color: transparent;
    -webkit-text-stroke: 1px var(--text-light);
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 40px;
    max-width: 550px;
}

/* Contenedor Arte Principal MATiLTi */
.hero-content-image {
    max-width: 900px; 
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center; 
    justify-content: center;
    text-align: center;
    padding-top: 80px;
    position: relative;
    background: radial-gradient(circle, rgba(0, 242, 195, 0.05) 0%, transparent 60%);
}

.hero-brand-img {
    width: 100%;
    height: auto; 
    object-fit: contain;
    display: block;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.5));
    animation: flotarArte 4s ease-in-out infinite;
}

@keyframes flotarArte {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-12px); }
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   6. ABOUT US (Estilo Editorial)
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
#about {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 80px;
    align-items: center;
}

.about-text .philosophical {
    font-size: 1.8rem;
    color: var(--text-light);
    line-height: 1.4;
    margin-bottom: 30px;
    font-weight: 300;
    text-align: justify;
}

.about-image-container {
    position: relative;
    display: flex;
    justify-content: center;
}

.organic-shape {
    width: 100%;
    max-width: 400px;
    aspect-ratio: 1 / 1; 
    height: auto; 
    background: transparent; 
    border-radius: 50%; 
    border: 2px solid var(--accent-aqua); 
    box-shadow: 0 0 15px rgba(0, 242, 195, 0.4), inset 0 0 15px rgba(0, 242, 195, 0.4); 
    display: grid !important;
    place-items: center !important;
    overflow: hidden;
    margin: 0 auto;
}

.organic-shape::after {
    display: none !important; 
    content: none !important;
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   7. SERVICES & MODALES INTERACTIVOS
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: rgba(17, 34, 77, 0.3);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 24px;
    transition: all 0.4s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-aqua);
    box-shadow: 0 15px 30px rgba(0, 242, 195, 0.1);
}

.service-icon {
    width: 50px;
    height: 50px;
    border-radius: 12px;
    background: rgba(0, 242, 195, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    color: var(--accent-aqua);
    font-size: 1.5rem;
}

.service-card h3 {
    font-size: 1.4rem;
    margin-bottom: 15px;
    font-weight: 600;
}

.more-info-lbl {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--accent-aqua);
    margin-top: 20px;
    font-weight: 600;
    transition: transform 0.3s;
}

.service-card:hover .more-info-lbl {
    transform: translateX(5px);
}


/* Ventanas Modales Corregidas */
.custom-modal {
    display: none; 
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 20, 35, 0.85); 
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000; 
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-content {
    background-color: #002c4c; 
    border: 1px solid rgba(0, 242, 195, 0.2);
    border-radius: 28px;
    max-width: 580px;
    width: 100%;
    padding: 40px 30px;
    position: relative;
    box-shadow: 0 30px 70px rgba(0,0,0,0.5);
    animation: aparecerModal 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* En computadoras no limita alto ni fuerza scroll */
    max-height: 90vh;
    overflow-y: auto;
}

/* Personalización del Scrollbar para que se integre al diseño */
.modal-content::-webkit-scrollbar {
    width: 6px;
}

.modal-content::-webkit-scrollbar-track {
    background: rgba(0, 32, 55, 0.5);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: var(--accent-aqua);
    border-radius: 10px;
}

.close-modal {
    position: absolute;
    top: 15px;
    right: 20px;
    color: var(--accent-aqua); /* Color de alto contraste para móviles */
    font-size: 2.2rem;
    cursor: pointer;
    transition: color 0.3s;
    z-index: 10;
}

@keyframes aparecerModal {
    from { opacity: 0; transform: scale(0.92) translateY(10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.close-modal {
    position: absolute;
    top: 20px;
    right: 25px;
    color: var(--text-muted);
    font-size: 2rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-modal:hover {
    color: var(--accent-yellow);
}

.modal-icon-header {
    font-size: 2rem;
    color: var(--accent-aqua);
    margin-bottom: 15px;
}

.modal-content h3 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--text-light);
}

.modal-body-text p {
    color: #b0c4de;
    font-size: 1.05rem;
    margin-bottom: 15px;
    line-height: 1.6;
    text-align: justify;
}

.modal-body-text strong {
    color: var(--accent-yellow);
}

.btn-modal-whatsapp {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background-color: transparent;
    color: var(--accent-aqua);
    border: 2px solid var(--accent-aqua);
    padding: 12px 28px;
    border-radius: 50px;
    font-weight: 700;
    text-decoration: none;
    margin-top: 25px;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    width: 100%; 
    box-sizing: border-box;
}

.btn-modal-whatsapp:hover {
    background-color: var(--accent-aqua);
    color: var(--bg-dark);
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(0, 242, 195, 0.3);
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   8. PRÓXIMO CURSO (Flyer & Banner)
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
#proximo-curso {
    background: linear-gradient(to bottom, var(--bg-dark), rgba(0, 242, 195, 0.02));
    display: flex;
    align-items: center;
    justify-content: center;
}

.curso-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.curso-banner-wrapper {
    max-width: 650px; 
    width: 100%;
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
    border: 2px solid rgba(0, 242, 195, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 195, 0.05);
    transition: border-color 0.3s ease;
}

.curso-banner-wrapper:hover {
    border-color: var(--accent-aqua);
}

.curso-banner-img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
}

/* Modal Promocional Aislado */
.matilti-promo-modal {
    display: flex;
    position: fixed;
    z-index: 99999;
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%;
    background-color: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(5px);
    align-items: center; 
    justify-content: center;
    animation: matiltiFadeIn 0.5s ease-out;
}

.matilti-promo-content {
    max-width: 580px; /* Amplitud para que fechas largas tengan espacio */
    width: 90%;
    background: #061c28;
    border: 2px solid var(--accent-aqua);
    padding: 35px 25px; /* Padding equilibrado */
    border-radius: 16px;
    text-align: center;
    color: white;   
    position: relative;
    box-shadow: 0 10px 30px rgba(0, 242, 195, 0.2);
}

.matilti-promo-content h2, 
.matilti-promo-content .matilti-promo-title { 
    font-size: clamp(1.15rem, 2.2vw, 1.55rem); /* Ajustado para que el texto largo no rompa en pantalla grande */
    white-space: normal; /* Permite salto limpio si llega a hacer falta */
    line-height: 1.35;
    margin: 20px 0 15px 0;
}
/* En caso de que tengas el texto envuelto en spans destacados */
.matilti-promo-date {
    color: var(--accent-yellow);
    font-weight: 800;
}

.matilti-promo-badge {
    background: var(--accent-aqua); 
    color: #061c28;
    padding: 4px 12px; 
    border-radius: 20px;
    font-size: 12px; 
    font-weight: bold;
}

.matilti-promo-btn {
    display: inline-block; 
    margin-top: 15px;
    background: var(--accent-yellow); 
    color: #000;
    padding: 10px 20px; 
    border-radius: 25px;
    text-decoration: none; 
    font-weight: bold;
}

.matilti-promo-close {
    position: absolute; 
    right: 15px; 
    top: 10px;
    font-size: 24px; 
    cursor: pointer; 
    color: #aaa;
}

@keyframes matiltiFadeIn { 
    from { opacity: 0; transform: scale(0.9); } 
    to { opacity: 1; transform: scale(1); } 
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   9. CURRICULUM MAP (Skill-Tree Vertical)
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding-left: 50px;
}

.timeline::before {
    content: '';
    position: absolute;
    top: 0;
    left: 8px;
    height: 100%;
    width: 2px;
    background: linear-gradient(to bottom, var(--accent-aqua), transparent);
}

.timeline-item {
    position: relative;
    margin-bottom: 60px;
}

.timeline-dot {
    position: absolute;
    left: -49px;
    top: 5px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background-color: var(--bg-dark);
    border: 3px solid var(--accent-aqua);
    box-shadow: 0 0 10px var(--accent-aqua);
}

.timeline-content h3 {
    font-size: 1.3rem;
    color: var(--text-light);
    margin-bottom: 8px;
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   10. TESTIMONIOS Y VIDEOS
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
#testimonios-videos {
    background: linear-gradient(to bottom, rgba(0, 242, 195, 0.01), var(--bg-dark));
}

.videos-container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
}

.videos-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 40px;
}

.video-card {
    background: rgba(17, 34, 77, 0.15);
    border: 1px solid rgba(0, 242, 195, 0.15);
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.video-card:hover {
    border-color: var(--accent-aqua);
    box-shadow: 0 20px 40px rgba(0, 242, 195, 0.08);
    transform: translateY(-5px);
}

.video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* Relación 16:9 */
    height: 0;
    overflow: hidden;
    background: #000;
}

.video-wrapper iframe,
.video-wrapper video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
    pointer-events: none; 
}

.video-info {
    padding: 25px;
}

.video-info h3 {
    font-size: 1.3rem;
    margin-bottom: 10px;
    color: var(--text-light);
}

.video-info p {
    font-size: 0.95rem;
    color: var(--text-muted);
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   11. GALERÍA (Marquee Row)
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
.marquee-container {
    width: 100vw;
    margin-left: -11%;
    overflow: hidden;
    padding: 20px 0;
}

.marquee-row {
    display: flex;
    gap: 24px;
    width: max-content;
    animation: scrollMarquee 30s linear infinite;
    align-items: center;
}

.gallery-item {
    width: 400px;
    height: 260px;
    background: #11224D;
    border-radius: 20px;
    overflow: hidden;
    border: 1px solid rgba(0, 242, 195, 0.1);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    flex-shrink: 0;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    display: block;
}

@keyframes scrollMarquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   12. CONTACTO (Neon Underlined Form)
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
.contact-container {
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

.form-group {
    position: relative;
    margin-bottom: 45px;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(254, 254, 254, 0.2);
    padding: 12px 0;
    color: var(--text-light);
    font-size: 1.1rem;
    font-family: inherit;
    transition: border-color 0.3s;
    -webkit-user-select: text;
    -moz-user-select: text;
    -ms-user-select: text;
    user-select: text;
}

.form-input:focus {
    outline: none;
    border-bottom-color: var(--accent-aqua);
}

.form-label {
    position: absolute;
    top: 12px;
    left: 0;
    color: var(--text-muted);
    pointer-events: none;
    transition: all 0.3s ease;
}

.form-input:focus ~ .form-label,
.form-input:not(:placeholder-shown) ~ .form-label {
    top: -20px;
    font-size: 0.85rem;
    color: var(--accent-aqua);
}

.contact-container button {
    width: 100%;
    cursor: pointer;
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   RESTAURACIÓN: MENÚ HAMBURGUESA PARA MÓVILES
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */

/* Botón Hamburguesa (tres líneas / ícono) */
.hamburger-btn {
    display: none; /* Oculto en laptop/escritorio */
    background: transparent;
    border: none;
    cursor: pointer;
    flex-direction: column;
    justify-content: space-around;
    width: 28px;
    height: 22px;
    z-index: 1001;
    padding: 0;
}

.hamburger-btn span {
    width: 100%;
    height: 2.5px;
    background-color: var(--text-light);
    border-radius: 4px;
    transition: all 0.3s ease;
}

/* Estado activo cuando se abre el menú (transformación a X) */
.hamburger-btn.active span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
    background-color: var(--accent-aqua);
}

.hamburger-btn.active span:nth-child(2) {
    opacity: 0;
}

.hamburger-btn.active span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
    background-color: var(--accent-aqua);
}


/*Copilot metiendo su cuchara en las siguientes líneas para videos verticales*/
.video-wrapper {
  position: relative;
  width: 100%;
  max-width: 400px; /* ajusta según tu diseño */
  aspect-ratio: 9 / 16; /* mantiene formato vertical */
}

.video-wrapper iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  border: none;
}

/*Fin de la cuchara de copilot*/

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   SECCIÓN DE VIDEOS VERTICALES (REELS / SHORTS 9:16)
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */

.shorts-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center; /* Centra las tarjetas si hay 1, 2 o más */
    gap: 30px;
    width: 100%;
    max-width: 1100px;
    margin: 0 auto;
}

.short-card {
    background: rgba(17, 34, 77, 0.25);
    border: 1px solid rgba(0, 242, 195, 0.2);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
    
    /* Ancho óptimo para tarjetas de Reels/Shorts */
    width: 100%;
    max-width: 310px; 
    flex: 1 1 280px;
}

.short-card:hover {
    border-color: var(--accent-aqua);
    box-shadow: 0 20px 40px rgba(0, 242, 195, 0.15);
    transform: translateY(-6px);
}

/* Forzar relación de aspecto vertical 9:16 */
.short-wrapper {
    position: relative;
    width: 100%;
    padding-bottom: 177.77%; /* Proporción 9:16 exacta */
    height: 0;
    background: #000;
}

.short-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 0;
}

/* Contenedor relativo para posicionar la fecha sobre la imagen */
/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   CORRECCIÓN VOLANTE Y FECHA AUTOMÁTICA
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
#proximo-curso {
    display: flex;
    justify-content: center;
    align-items: center;
}

.flyer-wrapper {
    position: relative;
    width: 100%;
    max-width: 650px; /* <--- ESTO LIMITA EL TAMAÑO MÁXIMO DEL CARTEL */
    margin: 0 auto;
    border-radius: 28px;
    overflow: hidden;
    border: 2px solid rgba(0, 242, 195, 0.2);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 242, 195, 0.05);
}

.flyer-img {
    width: 100%;
    height: auto;
    display: block;
}

.flyer-fecha {
    position: absolute;
    top: 61.2%; 
    left: 18%;  
    
    color: #ffffff;
    font-family: inherit;
    /* Ajuste de tipografía a la escala de 650px */
    font-size: clamp(0.9rem, 2vw, 1.35rem); 
    font-weight: 700;
    line-height: 1;
    text-align: left;
    white-space: nowrap;
    
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.5);
    pointer-events: none;
}

/* ::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
   13. MEDIA QUERIES (Responsividad Móvil)
   :::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::::: */
@media (max-width: 968px) {

    .hamburger-btn {
        display: flex; /* Se activa el botón en móviles y tabletas */
    }

      nav { 
        display: flex;
        position: fixed;
        top: 0;
        right: -100%; /* Oculto fuera de pantalla por defecto */
        width: 75%;
        max-width: 320px;
        height: 100vh;
        background: rgba(0, 32, 55, 0.98);
        backdrop-filter: blur(15px);
        -webkit-backdrop-filter: blur(15px);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 25px;
        transition: right 0.4s cubic-bezier(0.16, 1, 0.3, 1);
        box-shadow: -10px 0 30px rgba(0,0,0,0.5);
        border-left: 1px solid rgba(0, 242, 195, 0.15);
        z-index: 999;
    }

    /* Clase que activa JavaScript cuando el usuario da clic en la hamburguesa */
    nav.active {
        right: 0;
    }

    nav a {
        margin: 10px 0; /* Espaciado vertical para que respire el resplandor neón */
        font-size: 1.25rem;
        text-align: center;
        width: 100%;
        display: block;
    }

    /* Opcional: Si quieres que el botón brillante resalte aún más en celular */
    nav a[href="#proximo-curso"] {
        font-size: 1.35rem; /* Un poco más grande para destacar */
    }

    header { 
        width: 95%; 
        padding: 15px 20px; 
    }
  
    #hero { 
        padding-top: 180px; 
    }
    .hero-content h1 { 
        font-size: 2.8rem; 
    }
    #about { 
        grid-template-columns: 1fr; 
        gap: 40px; 
    }
    section { 
        padding: 80px 5%; 
    }
    .gallery-item { 
        width: 300px; 
        height: 200px; 
    }
}

@media (max-width: 768px) {
    .videos-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

/* Adaptación de la modal para celulares */
@media (max-width: 580px) {
    
    .matilti-promo-content {
        max-width: 95%;
        padding: 30px 16px;
    }

    .matilti-promo-content h2,
    .matilti-promo-content .matilti-promo-title { 
        font-size: clamp(1.1rem, 4.5vw, 1.35rem); 
        white-space: normal; 
        word-break: keep-all; 
        line-height: 1.3;
        margin: 15px 0;
    }

    .matilti-promo-btn {
        width: 100%; /* Botón ancho para facilitar el toque con el pulgar */
    }

    .modal-content {
        max-height: 80vh; /* Limita el alto exclusivamente en celulares */
    }

} /* <--- Única llave de cierre del @media */


/* Posicionamiento optimizado de la Sede sobre el Volante */
.flyer-sede-wrapper {
    position: absolute;
    top: 66%;          /* <--- Subimos ligeramente el bloque para aprovechar el espacio azul */
    left: 5.5%;
    width: 48%;        /* <--- Ampliamos el ancho para que el texto fluya mejor horizontalmente */
    text-align: left;
    pointer-events: none;
    line-height: 1.15;  /* Interlineado más compacto */
}

.sede-titulo {
    font-size: clamp(0.68rem, 1.35vw, 1.05rem);
    color: #ffffff;
    font-weight: 500;
    margin: 0 0 2px 0;
}

.sede-titulo span {
    color: var(--accent-aqua);
    font-weight: 700;
}

.sede-horario {
    font-size: clamp(0.62rem, 1.15vw, 0.9rem);
    color: #ffffff;
    margin: 0 0 4px 0;
}

.sede-calle, 
.sede-colonia, 
.sede-alcaldia {
    font-size: clamp(0.62rem, 1.15vw, 0.9rem);
    color: var(--accent-aqua);
    font-weight: 600;
    margin: 0;
}

/* Referencia estilizada y compacta */
.sede-referencias {
    font-size: clamp(0.58rem, 1.05vw, 0.82rem);
    color: #d1d5db; /* Tono gris claro para dar jerarquía visual y no saturar */
    font-style: italic;
    margin-top: 3px;
    display: block;
    max-width: 95%;
}

/* ==========================================================================
   MODAL EVENTO ESPECIAL (T-GENIX COMPONENT)
   ========================================================================== */
.modal-evento-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.85);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 999999;
    padding: 20px;
    box-sizing: border-box;
}

.modal-evento-container {
    position: relative;
    max-width: 420px;
    width: 100%;
    background: transparent;
}

.modal-evento-img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    display: block;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
    border: 2px solid #FFD700;
}

.modal-evento-close {
    position: absolute;
    top: -15px;
    right: -15px;
    background: #FFD700;
    color: #000;
    border: 2px solid #000;
    font-weight: bold;
    font-size: 22px;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    line-height: 1;
}

.modal-evento-close:hover {
    transform: scale(1.1);
    background: #ffffff;
}

/* ==========================================================================
   PORTAL DE ALUMNOS Y LOGIN PRIVADO (T-GENIX COMPONENT)
   ========================================================================== */
.login-alumnos-section {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
    background: radial-gradient(circle at center, #1e293b 0%, #0d1117 100%);
}

.login-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 215, 0, 0.3);
    padding: 40px;
    border-radius: 16px;
    max-width: 420px;
    width: 100%;
    text-align: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.6);
}

.login-logo img {
    height: 60px;
    margin-bottom: 20px;
}

.login-card h2 {
    font-size: 1.6rem;
    margin-bottom: 10px;
    color: #ffffff;
}

.login-card h2 span {
    color: #FFD700;
}

.login-card p {
    color: #a0aec0;
    font-size: 0.95rem;
    margin-bottom: 25px;
}

.login-error {
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid #ef4444;
    color: #fca5a5;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    margin-bottom: 20px;
}

.back-link {
    display: inline-block;
    margin-top: 20px;
    color: #a0aec0;
    text-decoration: none;
    font-size: 0.85rem;
    transition: color 0.3s ease;
}

.back-link:hover {
    color: #FFD700;
}

/* ==========================================================================
   AJUSTES RESPONSIVE CABECERA ALUMNOS (MOBILE)
   ========================================================================== */
.alumnos-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: #0d1117;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    gap: 10px;
    flex-wrap: nowrap; /* Evita que los elementos se amontonen */
}

.alumnos-header .logo {
    display: flex;
    align-items: center;
    gap: 8px;
    text-decoration: none;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 700;
    white-space: nowrap; /* Evita saltos de línea en el logo */
}

.alumnos-header .logo span {
    color: #00e5ff;
    font-weight: 400;
}

.btn-logout {
    color: #ef4444;
    border: 1px solid #ef4444;
    padding: 6px 12px;
    border-radius: 20px;
    text-decoration: none;
    font-size: 0.8rem;
    white-space: nowrap; /* Mantiene "Cerrar Sesión" en una sola línea */
    flex-shrink: 0; /* Impide que el botón se reduzca o deforme */
    transition: all 0.3s ease;
}

/* Media Query para pantallas pequeñas (móviles) */
@media (max-width: 480px) {
    .alumnos-header .logo {
        font-size: 0.9rem;
    }
    
    .videoteca-title {
        font-size: 1.6rem;
    }
}

.btn-logout:hover {
    background: #ef4444;
    color: #ffffff;
}

/* Botones de Filtro */
.videoteca-filters {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 30px;
}

.filter-btn {
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #ffffff;
    padding: 8px 18px;
    border-radius: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9rem;
}

.filter-btn:hover,
.filter-btn.active {
    background: #00e5ff;
    color: #000000;
    border-color: #00e5ff;
    font-weight: bold;
}

/* Grid de Videos */
.videoteca-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 20px;
}

.video-card {
    display: block;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    overflow: hidden;
}