/* Importamos una tipografía moderna y profesional */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700;800&display=swap');

:root {
    /* Paleta de colores modernizada */
    --azul-oscuro: #0a2540;
    --azul-claro: #0052cc;
    --celeste-brillante: #00d4ff;
    --blanco: #ffffff;
    --gris-claro: #f6f9fc;
    --texto: #333d47;
    --texto-suave: #6b7c93;
    
    /* Sombras profesionales */
    --shadow-sm: 0 4px 6px rgba(50, 50, 93, 0.11), 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 15px 35px rgba(50, 50, 93, 0.1), 0 5px 15px rgba(0, 0, 0, 0.07);
    --shadow-hover: 0 18px 40px rgba(0, 82, 204, 0.15);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Poppins', sans-serif;
}

body {
    background-color: var(--gris-claro);
    color: var(--texto);
    line-height: 1.7;
    overflow-x: hidden;
}

/* --- HEADER GLASSMORPHISM --- */
header {
    background: rgba(10, 37, 64, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 1rem 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), background 0.3s ease, padding 0.3s ease;
    will-change: transform;
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 20px;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 15px;
}

.main-logo {
    height: 70px;
    width: auto;
    filter: drop-shadow(0px 2px 4px rgba(0,0,0,0.3));
}

.logo-text {
    display: flex;
    flex-direction: column;
    border-left: 3px solid var(--celeste-brillante);
    padding-left: 15px;
}

.school-name {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--blanco);
    letter-spacing: 0.5px;
    line-height: 1.2;
}

.school-tagline {
    font-size: 0.75rem;
    color: var(--celeste-brillante);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 1px;
}

.nav-links {
    display: flex;
    list-style: none;
    gap: 25px;
}

.nav-links li a {
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--celeste-brillante);
    transition: width 0.3s ease;
}

.nav-links li a:hover {
    color: var(--blanco);
}

.nav-links li a:hover::after {
    width: 100%;
}

.header-hidden {
    transform: translateY(-100%);
}

/* --- SLIDER PRINCIPAL --- */
.slider-container {
    width: 100%;
    background-color: var(--azul-oscuro);
}

.slide {
    width: 100%;
    height: 80vh;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.overlay {
    background: rgba(10, 37, 64, 0.6);
    backdrop-filter: blur(4px);
    padding: 3rem;
    border-radius: 20px;
    text-align: center;
    max-width: 650px;
    color: white;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.1);
    animation: floatIn 1s cubic-bezier(0.25, 0.46, 0.45, 0.94) forwards;
}

@keyframes floatIn {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

.overlay h1 { 
    font-size: 2.5rem; 
    font-weight: 800;
    margin-bottom: 1.5rem; 
    line-height: 1.2;
}

/* --- BOTONES --- */
.btn-main, .btn-card, .btn-interesante {
    display: inline-block;
    padding: 12px 28px;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    border: none;
}

.btn-main, .btn-card {
    background: linear-gradient(135deg, var(--azul-claro), #0073ff);
    color: white;
    box-shadow: 0 4px 15px rgba(0, 82, 204, 0.4);
}

.btn-interesante {
    background: linear-gradient(135deg, var(--celeste-brillante), #00a8cc);
    color: var(--azul-oscuro);
    margin-top: 20px;
    font-size: 1.1rem;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.4);
}

.btn-main:hover, .btn-card:hover, .btn-interesante:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
}

/* --- CONTENEDORES Y GRID --- */
.container { 
    padding: 5rem 8%; 
    max-width: 1300px; 
    margin: 0 auto; 
}

.intro { text-align: center; margin-bottom: 4rem; }
.intro h2 { font-size: 2.2rem; color: var(--azul-oscuro); margin-bottom: 1rem;}
.intro p { font-size: 1.1rem; color: var(--texto-suave); max-width: 700px; margin: 0 auto;}

.grid-carreras {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 40px;
    margin: 3rem 0;
}

/* --- TARJETAS --- */
.card {
    background: var(--blanco);
    padding: 2rem;
    border-radius: 20px;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: all 0.4s ease;
    position: relative;
    top: 0;
    border-bottom: 4px solid transparent;
}

.card:hover {
    top: -10px;
    box-shadow: var(--shadow-hover);
    border-bottom: 4px solid var(--celeste-brillante);
}

.card-img {
    width: 100%;
    height: 200px;
    overflow: hidden;
    border-radius: 15px;
    margin-bottom: 1.5rem;
    box-shadow: inset 0 0 20px rgba(0,0,0,0.1);
}

.card-img img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    transition: transform 0.6s ease; 
}

.card:hover .card-img img { 
    transform: scale(1.08); 
}

.card h3 { color: var(--azul-oscuro); font-size: 1.5rem; margin-bottom: 1rem; }
.card p { color: var(--texto-suave); margin-bottom: 1.5rem; font-size: 0.95rem; }

/* --- BANNER DE INSCRIPCIÓN --- */
.inscripcion-banner {
    background: linear-gradient(135deg, var(--azul-oscuro) 0%, var(--azul-claro) 100%);
    color: white;
    padding: 5rem 2rem;
    border-radius: 30px;
    text-align: center;
    margin: 6rem 0;
    box-shadow: var(--shadow-lg);
    position: relative;
    overflow: hidden;
}

.inscripcion-banner::after {
    content: '';
    position: absolute;
    top: -50%; right: -10%;
    width: 300px; height: 300px;
    background: radial-gradient(circle, var(--celeste-brillante) 0%, transparent 70%);
    opacity: 0.2;
    border-radius: 50%;
}

.inscripcion-content { position: relative; z-index: 2; }
.inscripcion-content h2 { font-size: 2.2rem; margin-bottom: 1rem; }

/* --- SECCIONES DE CARRERAS --- */
.detalle-carrera {
    background: var(--blanco);
    border-radius: 25px;
    padding: 3rem;
    margin-bottom: 4rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.detalle-carrera:hover {
    box-shadow: var(--shadow-hover);
}

.header-carrera {
    display: flex;
    align-items: center;
    gap: 40px;
    margin-bottom: 3rem;
}

.header-carrera.reverse { flex-direction: row-reverse; }

.img-carrera-header {
    width: 45%;
    max-width: 500px;
    border-radius: 20px;
    object-fit: cover;
    box-shadow: var(--shadow-lg);
}

.header-info h3 {
    font-size: 2.2rem;
    color: var(--azul-oscuro);
    margin-bottom: 1.2rem;
}

.header-info p {
    font-size: 1.05rem;
    color: var(--texto-suave);
}

/* Tablas */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

table thead {
    background: var(--azul-oscuro);
    color: white;
}

table th { padding: 15px; font-weight: 600; text-transform: uppercase; font-size: 0.85rem; letter-spacing: 0.5px;}
table td { padding: 15px; text-align: center; border-bottom: 1px solid #eee; color: var(--texto); }
table tbody tr:last-child td { border-bottom: none; }
table tbody tr:hover { background-color: rgba(0, 82, 204, 0.03); }
table td:first-child { text-align: left; font-weight: 600; color: var(--azul-claro); }

/* contenedor scroll para tablas */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 5px;
}

.table-responsive table {
    width: 100%;
    min-width: 600px; 
    border-collapse: collapse;
}

/* =========================================
   ALINEACIÓN DE ENCABEZADOS EN TABLAS
   (Plan de Evaluación, Cronogramas y PAE)
   ========================================= */

/* Primera columna de cualquier tabla → Izquierda */
table thead th:first-child {
    text-align: left !important;
    padding-left: 20px;
}

/* Última columna de cualquier tabla → Derecha */
table thead th:last-child {
    text-align: right !important;
    padding-right: 20px;
}

/* Columnas intermedias (como "Detalle" en Cronogramas 
   o "Plato Principal" en PAE) → Centrado */
table thead th:not(:first-child):not(:last-child) {
    text-align: center !important;
}

/* Coherencia visual: los <td> siguen la misma lógica */
table tbody td:first-child {
    text-align: left !important;
    padding-left: 20px;
}

table tbody td:last-child {
    text-align: right !important;
    padding-right: 20px;
}

table tbody td:not(:first-child):not(:last-child) {
    text-align: center !important;
}

/* Ajuste para móviles: todo a la izquierda para mejor lectura */
@media (max-width: 600px) {
    table thead th,
    table tbody td {
        text-align: left !important;
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* --- UTILIDADES DE ANIMACIÓN --- */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease-out, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- FOOTER --- */
footer { 
    background: var(--azul-oscuro); 
    color: rgba(255,255,255,0.7); 
    text-align: center; 
    padding: 2rem; 
    font-size: 0.9rem;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 900px) {
    .header-carrera, .header-carrera.reverse { flex-direction: column; text-align: center; }
    .img-carrera-header { width: 100%; }
    .nav-links { display: none; }
    .overlay h1 { font-size: 2rem; }
}

/* Menú desplegable y botón Hamburguesa */
.menu-desplegable { position: relative; display: inline-block; }

.btn-menu {
    background: rgba(255, 255, 255, 0.1);
    border: 1.5px solid var(--celeste-brillante);
    color: var(--celeste-brillante);
    padding: 8px 15px;
    font-size: 1.2rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-menu:hover { 
    background: var(--celeste-brillante); 
    color: var(--azul-oscuro);
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.4);
}

.dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    left: auto;
    top: 140%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    min-width: 240px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
    border-radius: 15px;
    z-index: 1001;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.05);
}

.dropdown-content a {
    color: var(--azul-oscuro);
    padding: 14px 20px;
    text-decoration: none;
    display: block;
    font-weight: 500;
    font-size: 0.95rem;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.dropdown-content a:hover {
    background-color: var(--gris-claro);
    color: var(--azul-claro);
    padding-left: 28px; 
}

.show { display: block; animation: slideDownFade 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275); }

@keyframes slideDownFade {
    from { opacity: 0; transform: translateY(-15px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- TABLÓN DE NOTICIAS Y SLIDERS --- */
.noticias-slider {
    width: 100%;
    max-width: 1100px;
    margin: 40px auto;
    overflow: hidden;
    border-radius: 20px;
    position: relative;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.news-track {
    display: flex;
    transition: transform 0.6s ease-in-out;
}

.news-item {
    min-width: 100%;
    height: 400px;
}

.news-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.prev, .next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 2px solid rgba(255, 255, 255, 0.3);
    color: var(--blanco);
    border-radius: 50%;
    font-size: 1.8rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 10;
    box-shadow: var(--shadow-sm);
    user-select: none;
}

.prev { left: 25px; }
.next { right: 25px; }

.prev:hover, .next:hover {
    background: var(--celeste-brillante);
    color: var(--azul-oscuro);
    border-color: var(--celeste-brillante);
    box-shadow: 0 0 25px rgba(0, 212, 255, 0.6);
    transform: translateY(-50%) scale(1.15);
}

@media (max-width: 600px) {
    .prev, .next {
        width: 45px;
        height: 45px;
        font-size: 1.4rem;
    }
    .prev { left: 15px; }
    .next { right: 15px; }
}

/* --- ORGANIGRAMA --- */
.organigrama-section {
    padding: 60px 5%;
    background-color: var(--gris-claro);
    text-align: center;
}

.organigrama-container {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.puesto {
    background: var(--blanco);
    border: 2px solid var(--azul-oscuro);
    padding: 15px;
    border-radius: 8px;
    min-width: 200px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: 0.3s;
}

.puesto h4 { color: var(--azul-oscuro); margin-bottom: 5px; }
.puesto.consejo { border-style: dashed; background: #eef6ff; }
.puesto.simple { border-color: var(--celeste-brillante); }

.linea-vertical {
    width: 2px;
    height: 30px;
    background: var(--celeste-brillante);
}

.puesto-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 15px;
    width: 100%;
    margin-top: 10px;
}
.puesto-grid .puesto {
    flex: 1 1 220px;     
    max-width: 280px; 
    text-align: center;  
}

.nivel { width: 100%; display: flex; justify-content: center; gap: 40px; }

@media (max-width: 768px) {
    .nivel { flex-direction: column; align-items: center; gap: 15px; }
    .puesto-grid { grid-template-columns: 1fr; }
}

/* --- CRONOGRAMAS Y MENÚ --- */
.cronograma-card {
    background: var(--blanco);
    border-radius: 22px;
    box-shadow: 0 20px 40px rgba(15, 31, 74, 0.12);
    margin-bottom: 40px;
    overflow: hidden;
    border: 1px solid rgba(15, 32, 72, 0.08);
}

.card-header {
    padding: 1.6rem 1.75rem;
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, #0c2d5f 0%, #113d7b 100%);
}

/* Selector de Sección (A-D) dentro del header de cada cronograma */
.section-selector {
    display: inline-flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.14);
    border: 1px solid rgba(255, 255, 255, 0.2);
}
.section-selector label {
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}
.section-selector select {
    min-width: 70px;
    border: none;
    border-radius: 999px;
    padding: 0.65rem 0.95rem;
    font-weight: 700;
    color: #102e53;
    background: #ffffff;
    outline: none;
    box-shadow: inset 0 1px 2px rgba(15, 20, 50, 0.08);
}
.card-header .header-left { display:flex; flex-direction:column; gap: 0.35rem; }
.card-header .header-left h3 { margin: 0; font-size: 1.35rem; }
.card-header .header-left span { color: rgba(255, 255, 255, 0.85); font-size: 0.95rem; }

.i-momento { background-color: var(--azul-oscuro); }
.ii-momento { background-color: var(--azul-claro); }
.iii-momento { background-color: var(--celeste-brillante); }

.card-body {
    padding: 1.5rem 1.5rem 1.75rem;
    background: #eef4ff;
}

.card-body table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
    border-radius: 0 0 1.5rem 1.5rem;
    overflow: hidden;
    box-shadow: inset 0 0 0 1px rgba(15, 34, 74, 0.05);
}

.card-body td {
    padding: 1rem 1.1rem;
    border: none;
    font-size: 0.96rem;
}

.card-body tbody tr {
    display: table-row;
    background: #ffffff;
}

.card-body tbody tr + tr {
    border-top: 1px solid #eef3fb;
}

.card-body tbody tr:hover {
    background-color: rgba(15, 57, 103, 0.05);
}

.cronograma-card table td:first-child {
    width: 40%;
}

.pdf-cell a {
    color: #0b3b74;
    text-decoration: none;
}

.pdf-cell a:hover {
    text-decoration: underline;
}

.cronograma-card table td:first-child {
    text-align: left;
    font-weight: 700;
    color: #0b3b74;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.cronograma-card table td:last-child {
    text-align: right;
    color: #5d7398;
    font-weight: 600;
}

@media (max-width: 900px) {
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    .card-body tr {
        grid-template-columns: 1fr;
        text-align: left;
    }
    .cronograma-card table td:last-child {
        text-align: left;
    }
}

main.container div[style*="border-left"] {
    box-shadow: var(--shadow-sm);
    animation: slideDownFade 0.5s ease-out;
}

@media (max-width: 600px) {
    .cronograma-card table th, 
    .cronograma-card table td {
        padding: 12px 10px;
        font-size: 0.85rem;
    }
}

/* --- INSTALACIONES Y SEDES --- */
.galeria-instalaciones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    margin: 40px 0;
}

.foto-slot {
    background: var(--blanco);
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    overflow: hidden;
    transition: transform 0.3s ease;
    border: 1px solid #eee;
}

.foto-slot:hover {
    transform: translateY(-10px);
}

.img-wrapper {
    height: 200px;
    overflow: hidden;
}

.img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.slot-info {
    padding: 20px;
    text-align: center;
}

.slot-info h3 {
    color: var(--azul-oscuro);
    margin-bottom: 10px;
}

.ubicacion-panel {
    background: var(--gris-claro);
    border-radius: 20px;
    display: flex;
    flex-wrap: wrap;
    margin: 50px 0;
    overflow: hidden;
}

.map-info {
    flex: 1;
    min-width: 300px;
    padding: 40px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.map-info h2 {
    color: var(--azul-oscuro);
    margin-bottom: 20px;
}

.coordenadas {
    margin-top: 20px;
    display: flex;
    gap: 20px;
    font-size: 0.9rem;
    color: #666;
}

.map-container {
    flex: 1.5;
    min-width: 300px;
    height: 450px;
}

@media (max-width: 768px) {
    .ubicacion-panel {
        flex-direction: column;
    }
}

/* menu trompo alimenticio  */
.nutricion-container {
    display: flex;
    align-items: center;
    gap: 50px;
    background: var(--blanco);
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-sm);
    margin-top: 40px;
}

.nutricion-texto {
    flex: 1.2;
}

.nutricion-texto h3 {
    color: var(--azul-oscuro);
    font-size: 1.6rem;
    margin-bottom: 15px;
}

.nutricion-texto p {
    color: var(--texto-suave);
    font-size: 1rem;
    line-height: 1.8;
}

.consejo-saludable {
    margin-top: 20px;
    background-color: var(--gris-claro);
    padding: 15px;
    border-left: 4px solid var(--celeste-brillante);
    border-radius: 4px 12px 12px 4px;
    font-size: 0.9rem;
    color: var(--texto);
}

.nutricion-img {
    flex: 0.8;
    display: flex;
    justify-content: center;
    align-items: center;
}

.nutricion-img img {
    max-width: 100%;
    height: auto;
    max-height: 350px;
    object-fit: contain;
    filter: drop-shadow(0px 5px 15px rgba(0,0,0,0.1));
    transition: transform 0.3s ease;
}

.nutricion-container:hover .nutricion-img img {
    transform: rotate(3deg) scale(1.05); 
}

@media (max-width: 768px) {
    .nutricion-container {
        flex-direction: column-reverse;
        text-align: center;
        padding: 2rem;
    }
    
    .consejo-saludable {
        text-align: left;
    }
}
.telegram-chat-btn {
    position: fixed;
    bottom: 30px;      /* Distancia desde el borde inferior */
    right: 30px;       /* Distancia desde el borde derecho */
    background-color: #0088cc; /* Color oficial de Telegram */
    color: white;
    padding: 12px 20px;
    border-radius: 50px; /* Forma de píldora redondeada */
    text-decoration: none;
    font-weight: bold;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    z-index: 9999;     /* Garantiza que esté siempre encima de todo */
    transition: transform 0.3s ease, background-color 0.3s;
}

.telegram-chat-btn:hover {
    background-color: #006699;
    transform: scale(1.05); /* Pequeño efecto al pasar el ratón */
}

/* Para asegurar que no tape contenido en móviles */
@media (max-width: 600px) {
    .telegram-chat-btn {
        bottom: 15px;
        right: 15px;
        padding: 10px 15px;
        font-size: 0.9em;
    }
}