/* ... (mantener variables y globals previos) */

:root {
    --bg-base: #0a0a0f;
    --bg-surface: #14141e;
    --primary: #6366f1;
    /* Indigo */
    --primary-glow: rgba(99, 102, 241, 0.4);
    --secondary: #ec4899;
    /* Pink */
    --accent-unim: #f59e0b;
    /* Amber */
    --accent-ibm: #0ea5e9;
    /* Sky blue */

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    --glass-bg: rgba(20, 20, 30, 0.5);
    --glass-border: rgba(255, 255, 255, 0.08);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Space Grotesk', sans-serif;
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-base);
    color: var(--text-primary);
    overflow-x: hidden;
    position: relative;
}

html[dir="rtl"] {
    text-align: right;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Lang Selector */
.lang-selector {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    padding: 5px 10px;
    border-radius: 8px;
    font-family: 'Space Grotesk', sans-serif;
    cursor: pointer;
    font-size: 0.9rem;
    outline: none;
    margin-left: 20px;
}

.lang-selector option {
    background: var(--bg-surface);
    color: var(--text-primary);
}

/* Navbar Premium */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    padding: 1.5rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 9999;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.navbar.scrolled {
    padding: 1rem 5%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
}

.nav-brand a {
    font-size: 1.5rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.gradient-text {
    background: linear-gradient(to right, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2.5rem;
}

.nav-item {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary);
    transition: width 0.3s ease;
}

.nav-item:hover {
    color: var(--text-primary);
}

.nav-item:hover::after {
    width: 100%;
}

/* Background ANIMATION Blob */
.bg-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    filter: blur(80px);
}

.blob {
    position: absolute;
    border-radius: 50%;
    opacity: 0.5;
    animation: drift 20s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: var(--primary);
    top: -10%;
    left: -10%;
    animation-delay: 0s;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: var(--secondary);
    bottom: -20%;
    right: -10%;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: var(--accent-unim);
    top: 40%;
    left: 40%;
    animation-delay: -10s;
    opacity: 0.3;
}

@keyframes drift {
    100% {
        transform: translate(50px, 50px) scale(1.1);
    }
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 5%;
    position: relative;
    padding-top: 80px;
}

.hero-content {
    max-width: 900px;
    /* FIX ANCLA Botones: Quitando el transform 3D que captura/superpone los clicks de la UI */
    z-index: 10;
    position: relative;
}

/* Glitch Animation */
.glitch {
    font-size: clamp(3rem, 8vw, 6rem);
    font-weight: 700;
    text-transform: uppercase;
    position: relative;
    color: var(--text-primary);
    margin-bottom: 1rem;
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: transparent;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 var(--secondary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 var(--primary);
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% {
        clip: rect(10px, 9999px, 85px, 0);
    }

    5% {
        clip: rect(32px, 9999px, 4px, 0);
    }

    10% {
        clip: rect(6px, 9999px, 83px, 0);
    }

    15% {
        clip: rect(82px, 9999px, 32px, 0);
    }

    20% {
        clip: rect(15px, 9999px, 95px, 0);
    }

    25% {
        clip: rect(40px, 9999px, 12px, 0);
    }

    30% {
        clip: rect(62px, 9999px, 73px, 0);
    }

    35% {
        clip: rect(2px, 9999px, 5px, 0);
    }

    100% {
        clip: rect(12px, 9999px, 81px, 0);
    }
}

@keyframes glitch-anim2 {
    0% {
        clip: rect(81px, 9999px, 12px, 0);
    }

    5% {
        clip: rect(5px, 9999px, 2px, 0);
    }

    10% {
        clip: rect(73px, 9999px, 62px, 0);
    }

    15% {
        clip: rect(12px, 9999px, 40px, 0);
    }

    20% {
        clip: rect(95px, 9999px, 15px, 0);
    }

    25% {
        clip: rect(32px, 9999px, 82px, 0);
    }

    30% {
        clip: rect(83px, 9999px, 6px, 0);
    }

    35% {
        clip: rect(4px, 9999px, 32px, 0);
    }

    100% {
        clip: rect(85px, 9999px, 10px, 0);
    }
}

.subtitle {
    font-size: 1.3rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-weight: 300;
}

/* Botones Neon / Glow */
.hero-buttons {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    position: relative;
    z-index: 50;
    /* Garantizando Clicabilidad en Botones */
}

.btn {
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
    z-index: 55;
}

.btn-glow {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 20px var(--primary-glow);
    border: 1px solid transparent;
}

.btn-glow:hover {
    background: #4f46e5;
    box-shadow: 0 0 40px var(--primary-glow);
    transform: translateY(-3px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--secondary);
    transform: translateY(-3px);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    opacity: 0.7;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    20%,
    50%,
    80%,
    100% {
        transform: translateY(0);
    }

    40% {
        transform: translateY(-15px);
    }

    60% {
        transform: translateY(-7px);
    }
}

/* Sections */
.section {
    padding: 120px 5% 60px;
    max-width: 1400px;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

.section-header {
    margin-bottom: 60px;
    text-align: center;
}

.badge {
    padding: 6px 15px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    letter-spacing: 2px;
    display: inline-block;
    margin-bottom: 15px;
}

.badge-uniminuto {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-unim);
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.badge-ibm {
    background: rgba(14, 165, 233, 0.15);
    color: var(--accent-ibm);
    border: 1px solid rgba(14, 165, 233, 0.3);
}

.section-header h2 {
    font-size: 2.5rem;
    font-weight: 700;
}

.divider {
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-unim), transparent);
    margin: 20px auto 0;
    border-radius: 2px;
}

.divider-ibm {
    background: linear-gradient(90deg, var(--accent-ibm), transparent);
}

html[dir="rtl"] .divider {
    background: linear-gradient(270deg, var(--accent-unim), transparent);
}

html[dir="rtl"] .divider-ibm {
    background: linear-gradient(270deg, var(--accent-ibm), transparent);
}

/* 3D Glass Cards (Tilt) */
.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 24px;
    padding: 40px;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 30px 50px rgba(0, 0, 0, 0.3);
    /* Transform Preserve 3D for parallax inside card */
    transform-style: preserve-3d;
}

.card-glow {
    position: absolute;
    width: 150px;
    height: 150px;
    background: var(--accent-unim);
    filter: blur(100px);
    opacity: 0.5;
    top: -50px;
    right: -50px;
    border-radius: 50%;
    transition: all 0.5s ease;
}

.ibm-glow {
    background: var(--accent-ibm);
}

.glass-card:hover .card-glow {
    transform: scale(1.5);
}

.card-icon {
    font-size: 3rem;
    color: white;
    margin-bottom: 25px;
    transform: translateZ(30px);
}

.glass-card h3 {
    font-size: 1.8rem;
    margin-bottom: 15px;
    transform: translateZ(20px);
}

.glass-card p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    flex-grow: 1;
    margin-bottom: 30px;
    transform: translateZ(10px);
}

.card-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    transform: translateZ(20px);
}

.mt-4 {
    margin-top: 1rem;
}

/* Premium Element: Cyber links */
.cyber-link {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 15px 20px;
    border-radius: 12px;
    color: var(--text-primary);
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
    overflow: hidden;
    z-index: 50;
    /* Fix para poder hacer hover de enlace dentro del tilt */
}

.cyber-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 2px;
    height: 100%;
    background: var(--accent-unim);
    transition: width 0.3s;
    z-index: 0;
}

.cyber-link:hover::before {
    width: 100%;
    opacity: 0.1;
}

.cyber-link i,
.cyber-link span {
    position: relative;
    z-index: 1;
}

/* Locked Card Style */
.locked-card {
    opacity: 0.6;
}

.locked-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 10, 15, 0.8);
    backdrop-filter: blur(5px);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-size: 2rem;
    color: var(--text-secondary);
    border-radius: 24px;
}

.locked-overlay span {
    font-size: 1rem;
    margin-top: 10px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

/* Premium Card (Módulo 4) */
.premium-card {
    border-image: linear-gradient(45deg, var(--primary), var(--secondary)) 1;
    border: 2px solid transparent;
    background: linear-gradient(var(--bg-surface), var(--bg-surface)) padding-box,
        linear-gradient(135deg, var(--primary), var(--secondary)) border-box;
}

.premium-badge {
    position: absolute;
    top: 25px;
    right: -35px;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    padding: 5px 40px;
    font-size: 0.8rem;
    font-weight: 700;
    text-transform: uppercase;
    transform: rotate(45deg);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
}

.ibm-btn {
    background: var(--accent-ibm);
    box-shadow: 0 0 20px rgba(14, 165, 233, 0.4);
    justify-content: center;
    z-index: 50;
    position: relative;
}

.ibm-btn:hover {
    background: #0284c7;
    box-shadow: 0 0 40px rgba(14, 165, 233, 0.6);
}

.w-100 {
    width: 100%;
    text-align: center;
}

/* Footer Fino */
footer {
    padding: 60px 5% 30px;
    margin-top: 100px;
}

.footer-glass {
    max-width: 1200px;
    margin: 0 auto;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 50px;
    text-align: center;
}

.footer-center h2 {
    font-size: 2rem;
    margin-bottom: 10px;
    background: linear-gradient(to right, var(--text-primary), var(--text-secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-center p {
    color: var(--text-secondary);
    margin-bottom: 30px;
}

.social-links-footer {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-bottom: 40px;
}

.social-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.2rem;
    border: 1px solid var(--glass-border);
    transition: all 0.3s;
}

.social-btn:hover {
    background: var(--primary);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px var(--primary-glow);
}

.footer-bottom {
    border-top: 1px solid var(--glass-border);
    padding-top: 30px;
    color: var(--text-secondary);
    font-size: 0.9rem;
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-base);
}

::-webkit-scrollbar-thumb {
    background: var(--glass-border);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--primary);
}

/* Responsividad */
@media (max-width: 768px) {
    .navbar {
        flex-direction: column;
        gap: 20px;
        padding: 1.5rem 5%;
        background: rgba(10, 10, 15, 0.95);
    }

    .hero {
        padding-top: 120px;
    }

    .glitch {
        font-size: 2.5rem;
    }

    .cards-grid {
        grid-template-columns: 1fr;
    }

    .glass-card {
        padding: 30px 20px;
    }
}