/* Variables CSS para colores y tipografía */
:root {
    --primary-color: #00bcd4; /* Azul cian brillante */
    --secondary-color: #8e2de2; /* Morado intenso */
    --accent-color-1: #42e695; /* Verde esmeralda */
    --accent-color-2: #ff7e5f; /* Coral */
    --dark-bg: #1a1a2e; /* Fondo oscuro principal */
    --dark-card-bg: #2a2a4a; /* Fondo oscuro para tarjetas */
    --text-light: #f0f0f0; /* Texto claro */
    --text-muted: #aaaaaa; /* Texto atenuado */
    --font-primary: 'Poppins', sans-serif;
    --border-gradient: linear-gradient(90deg, var(--primary-color), var(--secondary-color));
}

/* Reset básico y estilos generales */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-primary);
    line-height: 1.6;
    color: var(--text-light);
    background-color: var(--dark-bg);
    overflow-x: hidden; 
    transition: overflow 0.3s ease; 
}

body.menu-open {
    overflow: hidden; 
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

h1, h2, h3 {
    font-weight: 700;
    margin-bottom: 1em;
    color: var(--primary-color);
}

h1 { font-size: 3.5em; text-align: center; }
h2 { font-size: 2.5em; border-bottom: 2px solid var(--primary-color); padding-bottom: 0.5em; margin-top: 1.5em; }
h3 { font-size: 1.8em; color: var(--accent-color-1); }

/* Estilo específico para el título principal del hero */
.hero-title { 
    font-size: 4.5em;
    margin-bottom: 0.2em;
    line-height: 1.1;
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 8px rgba(0,255,255,0.5));
}
p { margin-bottom: 1em; }
ul { list-style: none; margin-bottom: 1em; }

ul li {
    padding-left: 1.5em;
    position: relative;
    margin-bottom: 0.5em;
}

ul li::before {
    content: '→';
    color: var(--accent-color-1);
    position: absolute;
    left: 0;
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--accent-color-1);
}

/* Botones */
.btn-primary, .btn-secondary {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 50px;
    font-weight: 600;
    text-transform: uppercase;
    transition: all 0.3s ease;
    text-align: center;
    margin-top: 1em;
    font-size: 0.9em;
    cursor: pointer;
}

.btn-primary {
    background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    border: none;
    box-shadow: 0 5px 15px rgba(0, 200, 220, 0.4);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0, 200, 220, 0.6);
}

.btn-secondary {
    background: none;
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-secondary:hover {
    background-color: var(--primary-color);
    color: var(--dark-bg);
}

/* Header - Hero Section */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: linear-gradient(135deg, #0f0c29, #302b63, #24243e);
    overflow: hidden;
}

/* LOGOTIPOS ADICIONALES (3 logos) */
.header-logos {
    position: absolute;
    top: 20px;
    width: 100%;
    padding: 0 20px;
    z-index: 5;
    display: flex;
    align-items: center;
    justify-content: space-between; 
}

.side-logo {
    max-height: 50px; 
    width: auto;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.4));
    max-width: 30%; 
    height: auto;
    object-fit: contain;
}

.middle-logo {
    flex-shrink: 0;
    max-height: 60px;
    width: auto;
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
}

.left-logo {
    flex-grow: 1; 
    display: flex;
    align-items: center;
    justify-content: flex-start;
}
.right-logo {
    flex-grow: 1;
    display: flex;
    align-items: center;
    justify-content: flex-end;
}

.left-logo img, .right-logo img {
    max-width: 100%;
}


.hero-content {
    z-index: 2;
    position: relative;
    padding: 20px;
}

.hero-logo {
    width: 250px;
    height: auto;
    margin-bottom: 20px;
    filter: drop-shadow(0 0 15px var(--primary-color));
}

.hero-section p {
    font-size: 1.5em;
    color: var(--text-light);
    margin-bottom: 2em;
}

.hero-waves {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 150px; 
    background: url('data:image/svg+xml;utf8,<svg viewBox="0 0 1440 320" xmlns="http://www.w3.org/2000/svg"><path fill="%231a1a2e" fill-opacity="1" d="M0,288L48,272C96,256,192,224,288,197.3C384,171,480,149,576,160C672,171,768,213,864,213.3C960,213,1056,171,1152,154.7C1248,139,1344,149,1392,154.7L1440,160L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    background-repeat: no-repeat;
    background-size: cover;
    background-position: bottom;
    z-index: 1;
    animation: waveAnimation 20s ease-in-out infinite alternate;
}

@keyframes waveAnimation {
    0% { transform: scaleY(1); }
    50% { transform: scaleY(1.05); }
    100% { transform: scaleY(1); }
}

/* Navbar */
.navbar {
    background-color: rgba(30, 30, 46, 0.95); 
    padding: 15px 0;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Estilo del menú de escritorio */
.navbar .nav-links {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    list-style: none; 
}

.navbar .nav-links li {
    margin: 0 15px;
    padding-left: 0; 
}

.navbar .nav-links li::before {
    content: none; 
}

.navbar .nav-links a {
    color: var(--text-light); 
    font-weight: 600;
    padding: 5px 0;
    position: relative;
}

.navbar .nav-links a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--border-gradient);
    transition: width 0.3s ease;
}

.navbar .nav-links a:hover::after {
    width: 100%;
}

/* MENU HAMBURGUESA */
.hamburger-menu {
    display: none;
    background: none;
    border: none;
    font-size: 1.5em;
    color: var(--text-light);
    cursor: pointer;
    padding: 5px;
}

/* OVERLAY */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 98; 
    display: none;
    transition: opacity 0.3s ease;
}

.overlay.active {
    display: block;
}

/* Section Cards */
.section-card {
    background-color: var(--dark-card-bg);
    border-radius: 15px;
    padding: 40px;
    margin: 40px 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.5);
    border: 1px solid transparent;
    border-image: var(--border-gradient);
    border-image-slice: 1;
    position: relative;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    transition: transform 0.6s ease-out, opacity 0.6s ease-out;
}

.section-card.visible {
    transform: translateY(0);
    opacity: 1;
}

/* Timeline (Ajustado para menos espacio vertical) */
.timeline {
    display: flex;
    flex-wrap: wrap;
    position: relative;
    padding: 10px 0; 
    margin-bottom: 2em;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 50%;
    top: 0;
    width: 2px;
    height: 100%;
    background: linear-gradient(to bottom, var(--primary-color), var(--secondary-color));
    transform: translateX(-50%);
    z-index: 0;
}

.timeline-item {
    width: 50%;
    padding: 8px 0;
    position: relative;
    display: flex;
    align-items: center;
    color: var(--text-light);
    font-weight: 400;
}

.timeline-item:nth-child(odd) {
    padding-right: 25px;
    justify-content: flex-end;
    text-align: right;
}

.timeline-item:nth-child(even) {
    padding-left: 25px;
    justify-content: flex-start;
    text-align: left;
}

.timeline-item::before {
    content: '';
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background-image: linear-gradient(45deg, var(--primary-color), var(--secondary-color));
    z-index: 1;
    top: 50%;
    transform: translateY(-50%);
}

.timeline-item:nth-child(odd)::before {
    right: -5px;
}

.timeline-item:nth-child(even)::before {
    left: -5px;
}

.timeline-date {
    font-weight: 600;
    color: var(--accent-color-1);
    font-size: 1em;
    margin-bottom: 0.2em;
    display: block;
}

.timeline-item p {
    margin-bottom: 0;
}

.grid-tematicas, .grid-mentorias {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 2em;
}

.tematica-item, .mentoria-item {
    background-color: rgba(0, 188, 212, 0.1); 
    border-radius: 10px;
    padding: 20px;
    text-align: center;
    font-weight: 600;
    border: 1px solid var(--primary-color);
    transition: transform 0.3s ease, background-color 0.3s ease;
}

.tematica-item:hover, .mentoria-item:hover {
    transform: translateY(-5px);
    background-color: rgba(0, 188, 212, 0.2);
    box-shadow: 0 5px 15px rgba(0, 188, 212, 0.3);
}

.table-responsive {
    overflow-x: auto;
    margin-top: 2em;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1em;
}

table th, table td {
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 12px 15px;
    text-align: left;
}

table thead th {
    background-image: linear-gradient(to right, var(--primary-color), var(--secondary-color));
    color: var(--text-light);
    font-weight: 600;
}

table tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.05);
}

table tbody tr:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

.note {
    font-style: italic;
    color: var(--text-muted);
    text-align: center;
    margin-top: 1em;
}

.awards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 25px;
    margin-top: 2em;
    text-align: center;
}

.award-item {
    background-color: var(--dark-card-bg);
    border-radius: 15px;
    padding: 30px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
    cursor: default;
}

.award-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
}

.award-item span {
    font-size: 3em;
    display: block;
    margin-bottom: 0.3em;
}

.award-item.gold {
    border: 3px solid gold;
    box-shadow: 0 0 25px rgba(255, 215, 0, 0.8);
}
.award-item.silver {
    border: 3px solid silver;
    box-shadow: 0 0 25px rgba(192, 192, 192, 0.8);
}
.award-item.bronze {
    border: 3px solid #cd7f32;
    box-shadow: 0 0 25px rgba(205, 127, 50, 0.8);
}

.award-item h3 {
    margin-bottom: 0.5em;
    color: var(--text-light);
    background: linear-gradient(45deg, var(--primary-color), var(--accent-color-1));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.award-item p {
    color: var(--text-muted);
}

.footer-section {
    background-color: #111122; 
    padding: 50px 0 20px;
    text-align: center;
    border-top: 2px solid var(--primary-color);
    margin-top: 50px;
}

.footer-section .quote {
    font-style: italic;
    font-size: 1.4em;
    margin-bottom: 30px;
    color: var(--accent-color-2);
    text-shadow: 0 0 10px rgba(255, 126, 95, 0.5);
}

.footer-details p {
    margin-bottom: 10px;
    color: var(--text-muted);
}

.footer-details a {
    color: var(--primary-color);
    font-weight: 600;
}

.copyright {
    margin-top: 40px;
    font-size: 0.9em;
    color: var(--text-muted);
}

/* Animaciones de scroll (JavaScript) */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}


/* RESPONSIVE DESIGN & MENU MOVIL */
@media (max-width: 992px) {
    
    /* Mostrar el icono de hamburguesa */
    .hamburger-menu {
        display: block;
        z-index: 101; 
        position: absolute;
        right: 20px;
        top: 15px;
    }
    
    .navbar .container {
        display: flex;
        justify-content: flex-end; 
        position: relative;
    }

    /* Menú Off-Canvas (Lateral) */
    .navbar .nav-links {
        position: fixed;
        top: 0;
        right: -300px;
        width: 250px;
        height: 100%;
        background-color: var(--dark-bg);
        flex-direction: column;
        justify-content: flex-start;
        padding-top: 80px;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.8);
        transition: right 0.3s ease-in-out;
        z-index: 99; 
    }
    
    /* Estado activo del menú (mostrado) */
    .navbar .nav-links.active {
        right: 0;
    }

    .navbar .nav-links li {
        margin: 15px 0;
        width: 100%;
        text-align: center;
    }

    .navbar .nav-links a {
        display: block;
        padding: 10px 0;
        font-size: 1.1em;
        color: var(--text-light); 
    }

    /* OVERLAY */
    .overlay.active {
        display: block;
    }

    /* Ajuste de Logos en móvil */
    .header-logos {
        padding: 0 10px;
    }

    .middle-logo {
        max-height: 50px;
        position: static; 
        transform: none;
        order: 2; 
    }

    .left-logo {
        order: 1;
        justify-content: flex-start;
    }

    .right-logo {
        order: 3;
        justify-content: flex-end;
    }

    .side-logo {
        max-height: 40px; 
    }
    
    /* Autoescalado del título */
    .hero-title {
        font-size: 3.5em; 
    }

    /* Timeline Responsivo */
    .timeline::before { left: 15px; } 

    .timeline-item {
        width: 100%;
        padding: 8px 0;
        padding-left: 40px; 
        text-align: left;
        justify-content: flex-start;
    }

    .timeline-item:nth-child(odd) {
        padding-right: 0;
        text-align: left;
        justify-content: flex-start;
    }

    .timeline-item:nth-child(odd)::before {
        left: 10px; 
        right: auto;
    }

    .timeline-item:nth-child(even)::before {
        left: 10px;
    }
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.8em;
    }
    
    .side-logo {
        max-height: 35px;
    }
    .middle-logo {
        max-height: 45px;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2em;
    }
    
    .side-logo {
        max-height: 30px;
    }
    .middle-logo {
        max-height: 40px;
    }
    
    .header-logos {
        top: 10px;
        padding: 0 10px;
    }
}