/* NEXO SUPERIOR — Sistema de Diseño Premium y Capa Estilizada */

:root {
    --color-navy-deep: #06101e;
    --color-navy-dark: #0a2540;
    --color-navy-medium: #112240;
    --color-blue-primary: #0056b3;
    --color-blue-light: #3b82f6;
    --color-gold-light: #f59e0b;
    --color-gold-primary: #d4af37;
    --color-gold-dark: #b45309;
    --color-whatsapp: #25d366;
    --color-whatsapp-hover: #1ebe57;
    --color-gray-bg: #f8fafc;
    --color-text-dark: #0f172a;
    --color-text-light: #475569;
    --font-title: 'Poppins', sans-serif;
    --font-body: 'Roboto', sans-serif;
    --shadow-premium: 0 10px 30px -10px rgba(2, 12, 27, 0.15);
    --shadow-hover: 0 20px 40px -15px rgba(2, 12, 27, 0.25);
    --transition-smooth: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Base Adjustments */
html, body {
    overflow-x: hidden;
    max-width: 100%;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-dark);
    background-color: var(--color-gray-bg);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-title);
    letter-spacing: -0.02em;
    word-break: break-word;
}

/* Glassmorphism Navbar */
.nexo-navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    transition: var(--transition-smooth);
}

.nexo-navbar.scrolled {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 30px -10px rgba(0,0,0,0.06);
}

/* Navbar Logo Styles */
.nexo-navbar img {
    transition: var(--transition-smooth);
}
.nexo-navbar.scrolled img {
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.04));
}

/* Premium Typography Gradients */
.gradient-text-gold {
    background: linear-gradient(135deg, #f59e0b 0%, #d4af37 50%, #b45309 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.gradient-text-blue {
    background: linear-gradient(135deg, #3b82f6 0%, #0056b3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Hero Section Premium Styles */
.nexo-hero {
    background: linear-gradient(to right, rgba(6, 16, 30, 0.92), rgba(10, 37, 64, 0.75)), url('https://images.unsplash.com/photo-1576091160550-2173dba999ef?w=1920&auto=format&fit=crop&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    position: relative;
    overflow: hidden;
    min-height: 100vh;
    padding-top: 8rem;
    padding-bottom: 5rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

@media (max-width: 640px) {
    .nexo-hero {
        padding-top: 9.5rem; /* Pushes content down on mobile past the 80px navbar */
        padding-bottom: 5rem;
        min-height: auto;
    }
    .nexo-hero h1 {
        font-size: 1.875rem !important; /* text-3xl for better sizing on small devices */
        line-height: 1.25 !important;
    }
    .nexo-card h4, .tarjeta-curso h4 {
        font-size: 1.125rem !important; /* text-lg to avoid text clipping */
    }
}

.nexo-hero::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 75% 30%, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
    pointer-events: none;
    z-index: 1;
}

/* Typewriter Animation Utility */
.typewriter-cursor::after {
    content: '|';
    animation: blink 0.75s step-end infinite;
}

@keyframes blink {
    from, to { color: transparent }
    50% { color: var(--color-gold-primary) }
}

/* Premium Cards */
.nexo-card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-premium);
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.nexo-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-hover);
    border-color: rgba(212, 175, 55, 0.4);
}

.nexo-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(to right, var(--color-navy-dark), var(--color-blue-primary));
    transform: scaleX(0);
    transform-origin: left;
    transition: var(--transition-smooth);
}

.nexo-card:hover::before {
    transform: scaleX(1);
}

/* Priority areas styling */
.area-card {
    transition: var(--transition-smooth);
    border: 1px solid rgba(226, 232, 240, 0.8);
}
.area-card:hover {
    background: #ffffff;
    border-color: var(--color-gold-primary);
    box-shadow: var(--shadow-hover);
    transform: translateY(-5px);
}

/* Stats Counter Section */
.stat-box {
    border-right: 1px solid rgba(226, 232, 240, 0.8);
}
.stat-box:last-child {
    border-right: none;
}
@media (max-width: 768px) {
    .stat-box {
        border-right: none;
        border-bottom: 1px solid rgba(226, 232, 240, 0.8);
        padding-bottom: 20px;
        margin-bottom: 20px;
    }
    .stat-box:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }
}

/* Floating WhatsApp Premium with Waves */
.float-wa-premium {
    position: fixed;
    width: 60px;
    height: 60px;
    bottom: 30px;
    right: 30px;
    background-color: var(--color-whatsapp);
    color: #ffffff;
    border-radius: 50%;
    text-align: center;
    font-size: 32px;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.3);
    z-index: 999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
}

.float-wa-premium:hover {
    background-color: var(--color-whatsapp-hover);
    transform: scale(1.1) rotate(10deg);
    box-shadow: 0 8px 20px rgba(37, 211, 102, 0.4);
}

.float-wa-premium::before,
.float-wa-premium::after {
    content: '';
    position: absolute;
    inset: -5px;
    border-radius: 50%;
    background: var(--color-whatsapp);
    opacity: 0.4;
    z-index: -1;
    animation: pulseRipple 2s infinite;
}

.float-wa-premium::after {
    animation-delay: 0.5s;
}

@keyframes pulseRipple {
    0% {
        transform: scale(0.95);
        opacity: 0.5;
    }
    50% {
        opacity: 0.3;
    }
    100% {
        transform: scale(1.3);
        opacity: 0;
    }
}

/* Carrusel Eventos / Estudiantes */
.carousel-container {
    overflow: hidden;
    position: relative;
    width: 100%;
}
.carousel-container::before,
.carousel-container::after {
    content: '';
    position: absolute;
    top: 0;
    bottom: 0;
    width: 100px;
    z-index: 2;
    pointer-events: none;
}
.carousel-container::before {
    left: 0;
    background: linear-gradient(to right, var(--color-gray-bg), transparent);
}
.carousel-container::after {
    right: 0;
    background: linear-gradient(to left, var(--color-gray-bg), transparent);
}

.carousel-track-infinite {
    display: flex;
    width: max-content;
    animation: scrollInfinite 60s linear infinite;
}
.carousel-track-infinite:hover {
    animation-play-state: paused;
}

@keyframes scrollInfinite {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

/* Micro-animations */
.fade-in-up {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1), transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

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

/* Fallback: never leave content permanently hidden */
@media (prefers-reduced-motion: reduce) {
    .fade-in-up {
        opacity: 1 !important;
        transform: none !important;
    }
}

/* Tab buttons and filters sidebar */
.filter-btn {
    transition: var(--transition-smooth);
    border: 1px solid rgba(226, 232, 240, 1);
}
.filter-btn:hover {
    border-color: var(--color-blue-primary);
    color: var(--color-blue-primary);
}
.filter-btn.active {
    background-color: var(--color-navy-dark) !important;
    color: #ffffff !important;
    border-color: var(--color-navy-dark) !important;
}

/* Custom Checkbox styles */
.custom-checkbox {
    width: 18px;
    height: 18px;
    border: 2px solid #cbd5e1;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    cursor: pointer;
}
.checkbox-container input:checked + .custom-checkbox {
    background-color: var(--color-blue-primary);
    border-color: var(--color-blue-primary);
}
.checkbox-container input:checked + .custom-checkbox::after {
    content: '✓';
    color: white;
    font-size: 11px;
    font-weight: bold;
}

/* Premium PDF Tabs */
.pdf-tab-btn {
    border-bottom: 3px solid transparent;
    transition: var(--transition-smooth);
}
.pdf-tab-btn.active {
    border-color: var(--color-gold-primary);
    color: var(--color-gold-primary);
}

/* Backdrops and modales */
.modal-backdrop {
    background: rgba(15, 23, 42, 0.75);
    backdrop-filter: blur(8px);
}

/* Sección Hero de Verificación QR y DNI */
.bg-hero-qr {
    background-image: linear-gradient(135deg, rgba(10, 37, 64, 0.95) 0%, rgba(0, 86, 179, 0.9) 100%), url('images/banner_sanluis.webp');
    background-size: cover;
    background-position: center;
}

.glass-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}


/* ==========================================================================
   DROPDOWN MENÚ VERIFICACIONES (UNASAM / UNICA)
   ========================================================================== */
.dropdown-verif {
    position: relative;
}
.dropdown-verif:hover .dropdown-verif-menu,
.dropdown-verif:focus-within .dropdown-verif-menu {
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    pointer-events: auto !important;
}
.dropdown-verif-menu {
    opacity: 0;
    visibility: hidden;
    transform: translateY(6px);
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.2s;
}
.dropdown-verif-menu::before {
    content: '';
    position: absolute;
    top: -12px;
    left: 0;
    width: 100%;
    height: 14px;
}
