/* =========================================
   1. VARIABLES GLOBALES Y CONFIGURACIÓN BASE
   ========================================= */
:root {
   --primary: #194239; --primary-light: #235347; --dark: #111111; --white: #ffffff; --text-color: #333333;
   
   /* Fondos Premium Modo Claro */
   --bg-light-soft: #fdfdfd; --bg-light-accent: #eef3f1; 
   
   --neon: #00ff88; --accent-gold: #d4af37; --accent-blue: #007bff; --accent-purple: #6f42c1;
   
   /* Variables de Elegancia */
   --gold-soft: rgba(212, 175, 55, 0.1); --glass-white: rgba(255, 255, 255, 0.8);
   --border-light: rgba(25, 66, 57, 0.15); --glow-shadow: 0 8px 30px rgba(0, 255, 136, 0.2); 
   --gold-glow: 0 0 15px rgba(212, 175, 55, 0.5); --blue-glow: 0 0 15px rgba(0, 123, 255, 0.4); 
}

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap'); 

* { margin: 0; padding: 0; box-sizing: border-box; font-family: 'Poppins', sans-serif; max-width: 100%; } 

/* Fondo Premium Estético (Modo Claro) */
body { 
    scroll-behavior: smooth; color: var(--text-color); 
    background: linear-gradient(135deg, var(--bg-light-soft) 0%, var(--bg-light-accent) 100%); 
    background-attachment: fixed; overflow-x: hidden; 
} 

::-webkit-scrollbar { width: 10px; } 
::-webkit-scrollbar-track { background: var(--bg-light-accent); } 
::-webkit-scrollbar-thumb { background: var(--primary); border-radius: 5px; } 
::-webkit-scrollbar-thumb:hover { background: var(--accent-gold); } 

.reveal { opacity: 0; transform: translateY(40px); transition: 0.8s ease-out; } 
.reveal.active { opacity: 1; transform: translateY(0); } 

/* =========================================
   2. NAVEGACIÓN DUAL (PC Y MÓVIL DECORADO)
   ========================================= */

/* --- ESTILO PARA COMPUTADORAS (Escritorio) --- */
.main-header {
    background: rgba(25, 66, 57, 0.95);
    backdrop-filter: blur(10px);
    padding: 10px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* Logo adaptable */
.logo-small {
    height: 55px;
    width: auto;
    transition: all 0.3s ease;
}

.menu-toggle, .sidebar-lateral, .overlay-dark {
    display: none; 
}

.navbar {
    width: 100%;
    margin-top: 10px;
    background: rgba(0, 0, 0, 0.2);
}
.navbar ul {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 10px;
    padding: 10px;
}
.navbar li a {
    color: var(--white);
    text-decoration: none;
    padding: 8px 18px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 25px;
    border: 1px solid transparent;
    transition: all 0.3s ease;
}
.navbar li a:hover, .navbar li a.activo {
    background: rgba(0, 255, 136, 0.15);
    color: var(--neon);
    border-color: var(--neon);
    box-shadow: var(--glow-shadow);
}

/* --- ESTILO PARA MÓVIL (Menú Lateral Decorado) --- */
@media screen and (max-width: 768px) {
    .navbar { display: none !important; } 

    .logo-small {
        height: 42px; /* Se adapta al tamaño del teléfono */
    }

    .menu-toggle {
        display: flex !important;
        flex-direction: column;
        cursor: pointer;
        padding: 5px;
        z-index: 5001;
    }
    .menu-toggle .bar {
        height: 3px;
        width: 25px;
        background-color: var(--neon);
        margin: 3px 0;
        border-radius: 5px;
        transition: 0.4s;
    }

    /* Sidebar Decorado */
    .sidebar-lateral {
        display: flex;
        position: fixed;
        right: -100%; 
        top: 0;
        width: 280px; 
        height: 100vh;
        background: linear-gradient(135deg, rgba(11, 34, 24, 0.98), rgba(0, 0, 0, 0.98));
        backdrop-filter: blur(15px);
        z-index: 5000;
        transition: right 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        border-left: 2px solid var(--neon);
        flex-direction: column;
        padding-top: 20px;
    }

    .sidebar-lateral.active {
        right: 0;
    }

    /* Capa oscura para cerrar al tocar fuera */
    .overlay-dark {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0, 0, 0, 0.7);
        backdrop-filter: blur(4px);
        z-index: 4500;
        display: none; /* Se activa con JS */
    }
    
    .overlay-dark.active {
        display: block;
    }

    .nav-links-sidebar {
        list-style: none;
        padding: 40px 20px;
    }
    .nav-links-sidebar li {
        margin-bottom: 25px;
        opacity: 0;
        transform: translateX(20px);
        transition: 0.4s;
    }
    .sidebar-lateral.active li {
        opacity: 1;
        transform: translateX(0);
    }
    
    .nav-links-sidebar a {
        color: white;
        text-decoration: none;
        font-size: 1.1rem;
        display: block;
        border-bottom: 1px solid rgba(0,255,136,0.1);
        padding-bottom: 10px;
    }
}
@media screen and (max-width: 768px) {
    .timeline-vertical::after { left: 20px !important; transform: none !important; }
    .timeline-item { width: 100% !important; padding: 10px 10px 10px 45px !important; }
    .timeline-item.izquierda, .timeline-item.derecha { left: 0 !important; }
    .timeline-icon { left: 20px !important; transform: translateX(-50%) !important; }
}

/* =========================================
   3. SECCIONES GENERALES Y HERO
   ========================================= */
.hero-section{background:linear-gradient(rgba(0,0,0,0.75),rgba(0,0,0,0.85)),url('imagenes/inicio');background-size:cover;background-position:center;background-attachment:fixed;background-repeat:no-repeat;padding:100px 20px;text-align:center;border-radius:0 0 20px 20px;margin-bottom:40px} 
.hero-container{max-width:900px;margin:0 auto} .texto-destacado{font-size:2.5rem;font-weight:700;color:var(--neon);text-transform:uppercase;letter-spacing:1px;margin-bottom:15px} .subtexto-hero{font-size:1.1rem;color:var(--white);font-weight:300} 
.container{width:95%;max-width:1200px;margin:0 auto;padding:20px 0} .section-padding{padding:40px 0} 
.section-title{text-align:center;color:var(--accent-gold) !important;margin-bottom:40px;font-size:2.2rem;text-transform:uppercase;font-weight:bold;text-shadow:0 2px 5px rgba(0,0,0,0.1)} 
.grid-layout,.grid-ejes,.grid-historia{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:30px} 
/* =========================================
   4. AUTORIDADES: RECTORADO Y VICERRECTORADO
   ========================================= */
.grid-layout { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; } 

/* Tarjeta Principal del Rectorado */
.autoridad-principal { 
    display: block;
    background: var(--white); 
    background-image: radial-gradient(var(--border-light) 1px, transparent 1px); 
    background-size: 20px 20px; 
    border-radius: 20px; 
    padding: 60px 40px; 
    position: relative; 
    border: 1px solid var(--border-light); 
    box-shadow: 0 10px 1px var(--accent-gold), 0 20px 40px rgba(0,0,0,0.05); 
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1); 
    margin-bottom: 50px; 
}
.autoridad-principal:hover { transform: translateY(-5px); box-shadow: 0 15px 1px var(--neon), 0 30px 60px rgba(25, 66, 57, 0.1); }

.autoridad-badge { 
    position: absolute; top: -15px; left: 50%; transform: translateX(-50%); 
    background: var(--primary); color: var(--accent-gold); 
    padding: 8px 30px; border-radius: 50px; font-weight: bold; text-transform: uppercase; letter-spacing: 2px; 
    border: 2px solid var(--accent-gold); box-shadow: var(--gold-glow); z-index: 10; 
}

.autoridad-flex { display: flex; align-items: center; gap: 50px; flex-wrap: wrap; justify-content: center; }
.autoridad-visual-formal { flex: 1; min-width: 200px; max-width: 250px; text-align: center; }

/* Escudo con Efecto de Medalla */
.escudo-dorado-bg { 
    width: 200px; height: 200px; background: var(--white); border-radius: 50%; 
    display: flex; align-items: center; justify-content: center; 
    border: 2px solid var(--accent-gold); outline: 8px solid var(--bg-light-accent); 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); position: relative; margin: 0 auto; 
    transition: transform 0.8s ease; 
}
.autoridad-principal:hover .escudo-dorado-bg { transform: rotateY(180deg); }

.escudo-dorado-bg::after { 
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; border-radius: 50%; 
    background: linear-gradient(45deg, transparent 45%, rgba(212, 175, 55, 0.4) 50%, transparent 55%); 
    background-size: 200% 200%; animation: brilloEscudo 4s infinite; 
}
@keyframes brilloEscudo { 0% { background-position: -200% -200%; } 100% { background-position: 200% 200%; } }
.escudo-autoridad { width: 110px; filter: drop-shadow(0 5px 10px rgba(0,0,0,0.1)); }

.autoridad-info-formal { flex: 2; min-width: 300px; text-align: left; }
.autoridad-info-formal h3 { 
    color: var(--primary); 
    background: linear-gradient(to right, var(--primary), var(--accent-gold)); 
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text;
    font-weight: 800; font-size: 2.5rem; margin-bottom: 5px; font-family: 'Playfair Display', serif; 
}
.cargo-text { color: var(--accent-gold); font-weight: 600; text-transform: uppercase; letter-spacing: 1px; }
.linea-oro { border: 0; height: 2px; background: linear-gradient(90deg, var(--accent-gold), transparent); margin: 20px 0; width: 250px; }
.frase-autoridad { font-style: italic; color: #666; font-size: 1.1rem; }

/* Tarjetas de Vicerrectores (Glassmorphism de Día) */
.card-autoridad { 
    display: flex; flex-direction: column; 
    background: var(--glass-white); backdrop-filter: blur(10px); 
    border-radius: 20px; border: 2px solid var(--white); padding: 10px; 
    box-shadow: 0 10px 25px var(--gold-soft); transition: all 0.4s ease; text-align: center; height: 100%;
}
.card-autoridad:hover { border-color: var(--accent-gold); transform: scale(1.02) translateY(-5px); box-shadow: 0 15px 35px rgba(212, 175, 55, 0.2); }

.autoridad-header { padding: 12px; font-weight: bold; font-size: 0.9rem; text-transform: uppercase; letter-spacing: 1px; border-radius: 12px 12px 0 0; }
.autoridad-header.gold { background: var(--primary); color: var(--accent-gold); border-bottom: 3px solid var(--accent-gold); }

.autoridad-body { 
    flex-grow: 1; display: flex; flex-direction: column; justify-content: center;
    background: var(--white); border-radius: 0 0 12px 12px; padding: 30px; 
    border: 1px solid var(--bg-light-accent); border-top: none; 
}
.autoridad-body h3 { color: var(--primary); font-weight: 700; margin-bottom: 8px; }
.autoridad-body p { color: #666; font-size: 0.9rem; }

.icon-formal { width: 65px; height: 65px; background: var(--bg-light-accent); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; margin: 0 auto 15px; font-size: 1.8rem; transition: 0.5s ease; border: 1px solid rgba(25, 66, 57, 0.1); }
.card-autoridad:hover .icon-formal { background: var(--primary); color: var(--accent-gold); transform: rotateY(360deg); border-color: var(--accent-gold); box-shadow: var(--gold-glow);}

/* =========================================
   5. MENÚ FLOTANTE LATERAL
   ========================================= */
.menu-flotante-lateral { position: fixed; right: 0; top: 50%; transform: translateY(-50%); display: flex; flex-direction: column; gap: 10px; z-index: 1000; }
.item-flotante { display: flex; align-items: center; flex-direction: row-reverse; position: relative; }
.boton-circulo { width: 45px; height: 45px; background-color: var(--primary); color: var(--white); border-radius: 50px 0 0 50px; display: flex; justify-content: center; align-items: center; font-size: 20px; cursor: pointer; transition: all 0.4s ease; opacity: 0.3; transform: translateX(25px); text-decoration: none;}
.item-flotante:nth-child(1):hover .boton-circulo { background-color: var(--accent-gold); color: white; opacity: 1; transform: translateX(-15px); border-radius: 50%; box-shadow: var(--gold-glow); }
.item-flotante:nth-child(2):hover .boton-circulo { background-color: var(--primary-light); color: white; opacity: 1; transform: translateX(-15px); border-radius: 50%; box-shadow: var(--glow-shadow); }

.panel-info { background-color: rgba(255, 255, 255, 0.95); color: #333; padding: 12px 18px; border-radius: 8px; border-left: 4px solid var(--primary); box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2); width: max-content; max-width: 250px; position: absolute; right: 70px; opacity: 0; visibility: hidden; transform: translateX(20px) scale(0.9); transition: all 0.3s ease; border: 1px solid var(--border-light); }
.panel-info h4 { color: var(--primary); margin-top: 0; margin-bottom: 5px; font-size: 16px; font-weight: bold;}
.item-flotante:hover .panel-info { opacity: 1; visibility: visible; transform: translateX(0) scale(1); }

/* =========================================
   6. FOOTER (PIE DE PÁGINA)
   ========================================= */
.footer-main { background: var(--dark); color: #ccc; padding: 60px 20px 20px; margin-top: auto; border-top: 4px solid var(--accent-gold); }
.footer-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 40px; }
.footer-col h4 { color: var(--accent-gold) !important; border-bottom: 2px solid var(--neon); display: inline-block; margin-bottom: 20px; padding-bottom: 5px; text-transform: uppercase;}
.footer-col ul { list-style: none; }
.footer-col a { color: #ccc; text-decoration: none; transition: 0.3s; }
.footer-col a:hover { color: var(--neon); }
.footer-bottom { text-align: center; margin-top: 40px; padding-top: 20px; border-top: 1px solid #333; font-size: 0.85rem; }

/* =========================================
   7. MEDIA QUERIES (RESPONSIVE MÓVIL)
   ========================================= */
@media screen and (max-width: 768px) {
    html, body { overflow-x: hidden !important; width: 100%; position: relative; }
    .header-text h1 { font-size: 1rem; } .header-text p { font-size: .7rem; }
    .hero-section { padding: 60px 15px; background-attachment: scroll; }
    .texto-destacado { font-size: 1.8rem; } .section-title { font-size: 1.6rem; margin-bottom: 25px; }
    
    .menu-toggle { display: flex; }
    .navbar ul { flex-direction: column; background-color: var(--primary); max-height: 0; overflow: hidden; transition: max-height .4s ease-out; padding: 0; gap: 0; }
    .navbar ul.active { max-height: 500px; padding: 10px 0; }
    .navbar li { width: 100%; text-align: center; border-top: 1px solid rgba(0,255,136,0.1); }
    .navbar li a { padding: 15px; display: block; border-radius: 0; }
    .navbar .dropdown-content { position: static; transform: none; box-shadow: none; background: rgba(0,0,0,0.2); min-width: 100%; border-top: none; }
    .menu-toggle.is-active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.is-active .bar:nth-child(1) { transform: translateY(9px) rotate(45deg); }
    .menu-toggle.is-active .bar:nth-child(3) { transform: translateY(-9px) rotate(-45deg); }

    .autoridad-principal { padding: 50px 20px 30px; text-align: center; }
    .autoridad-info-formal { text-align: center; }
    .autoridad-info-formal h3 { font-size: 1.8rem; }
    .linea-oro { margin: 15px auto; }
    
    .boton-circulo { width: 40px; height: 40px; font-size: 18px; transform: translateX(10px); }
    .panel-info { max-width: 180px; right: 55px; font-size: 0.8rem; }
    .panel-info h4 { font-size: 14px; }
}

/* =========================================
   8. MODO OSCURO (EXCLUSIVO AUTORIDADES)
   ========================================= */
body.dark-mode { background: #0d1117 !important; color: #e6edf3 !important; }
body.dark-mode .main-header { background: rgba(13, 17, 23, 0.7) !important; border-bottom: 1px solid rgba(0, 255, 136, 0.15) !important; box-shadow: none !important; }
body.dark-mode .navbar ul { background: transparent !important; }
body.dark-mode .section-title { color: var(--accent-gold) !important; text-shadow: var(--gold-glow); }
body.dark-mode .hero-section { background: linear-gradient(rgba(0, 0, 0, 0.692), rgba(0, 0, 0, 0.582)), url('imagenes/inicio') !important; background-size: cover !important; background-position: center !important; background-attachment: fixed !important; background-repeat: no-repeat !important; }
/* Tarjetas de Autoridades en la noche */
body.dark-mode .autoridad-principal { 
    background: rgba(30, 35, 40, 0.8) !important; border-color: rgba(212, 175, 55, 0.3) !important; 
    box-shadow: 0 10px 1px var(--accent-gold), 0 20px 40px rgba(0,0,0,0.5) !important; 
    background-image: radial-gradient(rgba(255,255,255,0.05) 1px, transparent 1px) !important;
}
body.dark-mode .autoridad-principal:hover { box-shadow: 0 15px 1px var(--neon), 0 30px 60px rgba(0,0,0,0.6) !important; }
body.dark-mode .escudo-dorado-bg { background: #0d1117 !important; outline-color: rgba(255,255,255,0.05) !important; }
body.dark-mode .autoridad-info-formal h3 { background: none !important; -webkit-text-fill-color: initial !important; color: var(--white) !important; text-shadow: var(--gold-glow); }
body.dark-mode .frase-autoridad { color: #a3b3bc !important; }

body.dark-mode .card-autoridad { background: rgba(13, 17, 23, 0.6) !important; border-color: rgba(212, 175, 55, 0.2) !important; box-shadow: 0 10px 25px rgba(0,0,0,0.5) !important; }
body.dark-mode .autoridad-body { background: rgba(30, 35, 40, 0.8) !important; border-color: transparent !important; }
body.dark-mode .autoridad-body h3 { color: var(--white) !important; }
body.dark-mode .autoridad-body p { color: #a3b3bc !important; }
body.dark-mode .icon-formal { background: #0d1117 !important; color: var(--accent-gold) !important; border-color: rgba(212, 175, 55, 0.3) !important; }
body.dark-mode .card-autoridad:hover .icon-formal { background: var(--accent-gold) !important; color: #111 !important; box-shadow: var(--gold-glow) !important; }