/* ===============================================================================
   UNIVERSIDAD.CSS - Estilos de la Página de Universidad - VERSIÓN FINAL AJUSTADA
   =============================================================================== */

/* BASE STYLES */
body {
    background-color: #111415;
    color: #e1e3e4;
    font-family: 'Manrope', sans-serif;
    -webkit-tap-highlight-color: transparent;
    min-height: 100vh;
}

::selection {
    background-color: rgba(255, 192, 203, 0.3);
    color: #ffe7ea;
}

/* ===============================================================================
   GLASS CARD STYLES
   =============================================================================== */

.glass-card {
    background: rgba(29, 32, 33, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 192, 203, 0.15);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
}

.glass-card:hover {
    background: rgba(29, 32, 33, 0.8);
    border-color: rgba(255, 192, 203, 0.25);
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.15);
}

.soft-glow {
    box-shadow: 0 20px 50px rgba(183, 110, 121, 0.08);
}

/* ===============================================================================
   UNIVERSIDAD ESPECÍFICOS
   =============================================================================== */

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

/* ===============================================================================
   BACKGROUND DECORATIVE
   =============================================================================== */

body {
    min-height: max(884px, 100dvh);
    overflow-x: hidden;
}

.bg-orb {
    position: fixed;
    width: 400px;
    height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(183, 110, 121, 0.08) 0%, rgba(183, 110, 121, 0) 70%);
    filter: blur(60px);
    z-index: -1;
    pointer-events: none;
}

/* ===============================================================================
   SCROLLBAR HIDE
   =============================================================================== */

.no-scrollbar::-webkit-scrollbar {
    display: none;
}

.no-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* ===============================================================================
   MODAL STYLES
   =============================================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 100;
    animation: fadeIn 0.3s ease;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal-content {
    background: #111415;
    border-radius: 16px;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow-y: auto;
    animation: slideUp 0.3s ease;
    padding: 24px;
    border: 1px solid rgba(255, 192, 203, 0.2);
}

@keyframes fadeIn {
    from { 
        opacity: 0; 
    }
    to { 
        opacity: 1; 
    }
}

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

.modal-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin-bottom: 32px;
}

@media (max-width: 640px) {
    .modal-grid {
        grid-template-columns: 1fr;
    }
}

/* Icono activo en modal */
.active-icon {
    font-variation-settings: 'FILL' 1;
}

/* ===============================================================================
   BOTONES DEL MODAL
   =============================================================================== */

.modal-grid button,
.modal-grid a {
    background: rgba(29, 32, 33, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 192, 203, 0.15);
    padding: 24px 16px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    color: inherit;
}

.modal-grid button:hover,
.modal-grid a:hover {
    transform: translateY(-4px);
    background: rgba(29, 32, 33, 0.8);
    border-color: rgba(255, 192, 203, 0.25);
}

.modal-grid button:active,
.modal-grid a:active {
    transform: scale(0.95);
}

.modal-grid button .material-symbols-outlined,
.modal-grid a .material-symbols-outlined {
    font-size: 36px;
    margin-bottom: 12px;
    color: #ffe7ea;
    transition: transform 0.3s ease;
}

.modal-grid button:hover .material-symbols-outlined,
.modal-grid a:hover .material-symbols-outlined {
    transform: scale(1.1) rotate(5deg);
}

.modal-grid h3,
.modal-grid a h3 {
    font-size: 18px;
    font-weight: 600;
    color: #e1e3e4;
    margin-bottom: 4px;
}

.modal-grid p,
.modal-grid a p {
    font-size: 12px;
    color: #d5c2c4;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

/* ===============================================================================
   NAVBAR - DISEÑO PREMIUM BOTTOM - AJUSTADO Y CENTRADO
   =============================================================================== */

.navbar {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 750px;
    height: auto;
    padding: 20px 40px;
    background: rgba(29, 32, 33, 0.95);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 192, 203, 0.2);
    border-radius: 20px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    display: flex;
    justify-content: space-around;
    align-items: center;
    gap: 60px;
    z-index: 50;
}

/* NAV BUTTONS */
.nav-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 12px 24px;
    color: #a39e9c;
    text-decoration: none;
    cursor: pointer;
    border: none;
    background: transparent;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-btn:hover {
    transform: translateY(-2px);
    color: #ffe7ea;
}

.nav-btn:active {
    transform: scale(0.95);
}

/* NAV BUTTON ICON */
.nav-btn .material-symbols-outlined {
    font-size: 28px;
    font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
    transition: all 0.3s ease;
}

/* NAV BUTTON LABEL */
.nav-btn span:not(.material-symbols-outlined) {
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

/* NAV BUTTON ACTIVO */
.nav-btn.active {
    background: rgba(119, 86, 96, 0.4);
    border: 1px solid rgba(255, 192, 203, 0.3);
    color: #e1e3e4;
    padding: 12px 24px;
    box-shadow: 0 4px 16px rgba(183, 110, 121, 0.15);
}

.nav-btn.active .material-symbols-outlined {
    color: #ffe7ea;
    font-variation-settings: 'FILL' 0.5, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.nav-btn.active span:not(.material-symbols-outlined) {
    color: #e1e3e4;
}

/* ===============================================================================
   RESPONSIVE DESIGN
   =============================================================================== */

@media (max-width: 640px) {
    .navbar {
        bottom: 16px;
        width: 95%;
        padding: 12px 8px;
        gap: 0px;
    }

    .nav-btn {
        padding: 8px 4px;
        flex: 1;
        min-width: 0;
    }

    .nav-btn .material-symbols-outlined {
        font-size: 22px;
    }

    .nav-btn span:not(.material-symbols-outlined) {
        font-size: 8px;
        letter-spacing: 0px;
    }

    .nav-btn.active {
        padding: 8px 4px;
    }

    .modal-content {
        width: 95%;
        padding: 20px;
    }
}

/* ===============================================================================
   ANIMACIONES DE ENTRADA - PÁGINA UNIVERSIDAD
   =============================================================================== */

/* --- Keyframes base --- */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

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

@keyframes fadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.92); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes floatOrb {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33%       { transform: translate(8px, -12px) scale(1.04); }
    66%       { transform: translate(-6px, 6px) scale(0.97); }
}

@keyframes pulse-glow {
    0%, 100% { text-shadow: 0 0 10px rgba(255, 192, 203, 0.4); }
    50%       { text-shadow: 0 0 24px rgba(255, 192, 203, 0.85); }
}

@keyframes iconBounce {
    0%, 100% { transform: translateY(0); }
    40%       { transform: translateY(-6px); }
    70%       { transform: translateY(-3px); }
}

/* --- Clases utilitarias --- */
.animate-fade-in-up  { animation: fadeInUp  0.55s cubic-bezier(0.22,1,0.36,1) both; }
.animate-fade-in-down{ animation: fadeInDown 0.45s cubic-bezier(0.22,1,0.36,1) both; }
.animate-fade-in     { animation: fadeIn    0.4s ease both; }
.animate-scale-in    { animation: scaleIn   0.45s cubic-bezier(0.22,1,0.36,1) both; }
.animate-slide-left  { animation: slideInLeft 0.45s cubic-bezier(0.22,1,0.36,1) both; }
.glow-text           { animation: pulse-glow 1s ease; }

/* Delays escalonados */
.delay-0   { animation-delay: 0ms; }
.delay-100 { animation-delay: 100ms; }
.delay-150 { animation-delay: 150ms; }
.delay-200 { animation-delay: 200ms; }
.delay-280 { animation-delay: 280ms; }
.delay-360 { animation-delay: 360ms; }
.delay-440 { animation-delay: 440ms; }
.delay-520 { animation-delay: 520ms; }
.delay-600 { animation-delay: 600ms; }

/* Orbs de fondo flotantes */
.bg-orb {
    animation: floatOrb 10s ease-in-out infinite;
}
.bg-orb:nth-child(2) {
    animation-delay: -4s;
    animation-duration: 13s;
}
.bg-orb:nth-child(3) {
    animation-delay: -7s;
    animation-duration: 16s;
}

/* Ícono del logo en la topbar */
.logo-icon {
    animation: iconBounce 3.5s ease-in-out infinite;
    animation-delay: 1s;
}

/* Cards con hover mejorado */
.glass-card {
    transform-origin: center bottom;
}

/* Línea decorativa con grow animation */
@keyframes growLine {
    from { width: 0; opacity: 0; }
    to   { width: 3rem; opacity: 0.3; }
}
.divider-line {
    animation: growLine 0.6s ease forwards;
    animation-delay: 700ms;
    width: 0;
}

/* Modal con animación mejorada */
@keyframes modalSlideUp {
    from { opacity: 0; transform: translateY(40px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}
.modal-content {
    animation: modalSlideUp 0.35s cubic-bezier(0.22,1,0.36,1);
}

/* Botones del casillero con stagger al abrir el modal */
.modal-grid .link-btn {
    opacity: 0;
    animation: fadeInUp 0.4s cubic-bezier(0.22,1,0.36,1) forwards;
}
.modal-overlay.active .link-btn:nth-child(1) { animation-delay: 80ms; }
.modal-overlay.active .link-btn:nth-child(2) { animation-delay: 160ms; }
.modal-overlay.active .link-btn:nth-child(3) { animation-delay: 240ms; }
.modal-overlay.active .link-btn:nth-child(4) { animation-delay: 320ms; }


/* ===============================================================================
   ACCESIBILIDAD
   =============================================================================== */

@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

@media (prefers-color-scheme: light) {
    body {
        background-color: #f5f5f5;
        color: #1d2021;
    }

    .glass-card {
        background: rgba(255, 255, 255, 0.7);
        border-color: rgba(255, 192, 203, 0.3);
    }

    .navbar {
        background: rgba(255, 255, 255, 0.95);
        border-color: rgba(255, 192, 203, 0.3);
    }

    .nav-btn {
        color: #666;
    }

    .nav-btn.active {
        color: #1d2021;
        background: rgba(255, 192, 203, 0.15);
    }
}