/* =========================================
   VARIABLES & RESET
   ========================================= */
:root {
    --bg-dark: #0a0a0f;
    --bg-panel: #13131f;
    --neon-blue: #00f0ff;
    --neon-orange: #ff9f43;
    --text-primary: #ffffff;
    --text-secondary: #b0b0b0;
    --text-muted: #888888;
    --font-heading: 'Orbitron', sans-serif;
    --font-body: 'Inter', sans-serif;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --transition: all 0.4s ease;
}

*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* =========================================
   BASE & TYPOGRAPHY
   ========================================= */
body {
    background-color: var(--bg-dark);
    color: var(--text-secondary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

img {
    max-width: 100%;
    display: block;
}

ul {
    list-style: none;
}

/* =========================================
   UTILITIES
   ========================================= */
.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    z-index: 2;
}

.section {
    padding: 6rem 0;
    position: relative;
}

.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-tag {
    display: inline-block;
    color: var(--neon-blue);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    margin-bottom: 1rem;
    padding: 0.4rem 1rem;
    border: 1px solid rgba(0, 240, 255, 0.3);
    border-radius: 50px;
    background: rgba(0, 240, 255, 0.05);
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.8rem);
    color: var(--text-primary);
    line-height: 1.2;
}

.text-gradient {
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-orange));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn {
    display: inline-block;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: var(--transition);
}

.btn-primary {
    background: linear-gradient(90deg, var(--neon-blue), #0099ff);
    color: var(--bg-dark);
    padding: 1rem 2.5rem;
    border-radius: 50px;
    font-size: 0.95rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 20px rgba(0, 240, 255, 0.2);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 40px rgba(0, 240, 255, 0.4);
}

.btn-form {
    width: 100%;
    padding: 1rem;
    background: transparent;
    color: var(--neon-orange);
    border: 1px solid var(--neon-orange);
    border-radius: 12px;
    font-size: 0.95rem;
    margin-top: 1rem;
}

.btn-form:hover {
    background: var(--neon-orange);
    color: var(--bg-dark);
    box-shadow: 0 0 30px rgba(255, 159, 67, 0.3);
}

/* =========================================
   HEADER & NAVIGATION
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1rem 0;
    transition: var(--transition);
}

.header.scrolled {
    background: rgba(10, 10, 15, 0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--glass-border);
    padding: 0.75rem 0;
}

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

.logo {
    font-family: var(--font-heading);
    font-weight: 900;
    font-size: 1.25rem;
    color: var(--text-primary);
    letter-spacing: 1px;
}

.logo span {
    color: var(--neon-blue);
    margin-left: 4px;
}

.nav-menu {
    display: flex;
    gap: 2.5rem;
    align-items: center;
}

.nav-link {
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.95rem;
    position: relative;
    padding: 0.5rem 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-orange));
    transition: width 0.3s ease;
}

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

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

.nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    width: 40px;
    height: 40px;
    position: relative;
    z-index: 1001;
}

.hamburger,
.hamburger::before,
.hamburger::after {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    position: absolute;
    left: 8px;
    transition: all 0.3s ease;
}

.hamburger {
    top: 19px;
}

.hamburger::before {
    content: '';
    top: -7px;
}

.hamburger::after {
    content: '';
    top: 7px;
}

.nav-toggle.active .hamburger {
    background: transparent;
}

.nav-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.nav-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    background: 
        radial-gradient(circle at 20% 50%, rgba(0, 240, 255, 0.05) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(255, 159, 67, 0.05) 0%, transparent 50%),
        var(--bg-dark);
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
}

.hero-subtitle {
    color: var(--neon-orange);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 1rem;
    display: inline-block;
    padding: 0.5rem 1.2rem;
    border: 1px solid rgba(255, 159, 67, 0.3);
    border-radius: 50px;
    background: rgba(255, 159, 67, 0.05);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    text-transform: uppercase;
}

.hero-desc {
    color: var(--text-secondary);
    font-size: 1.15rem;
    max-width: 600px;
    margin: 0 auto 2.5rem;
    line-height: 1.6;
}

.hero-scroll {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
}

.scroll-line {
    display: block;
    width: 1px;
    height: 60px;
    background: linear-gradient(to bottom, var(--neon-blue), transparent);
    animation: scrollPulse 2s infinite ease-in-out;
}

/* =========================================
   ABOUT / SOBRE LA ACADEMIA
   ========================================= */
.modular-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 2rem;
}

.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem 2rem;
    transition: var(--transition);
}

.glass-card:hover {
    border-color: rgba(0, 240, 255, 0.4);
    box-shadow: 0 20px 40px rgba(0, 240, 255, 0.08);
    transform: translateY(-8px);
}

.glass-card h3 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.glass-card p {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
}

.card-icon {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.card-icon svg {
    width: 28px;
    height: 28px;
}

.icon-blue {
    background: rgba(0, 240, 255, 0.1);
    color: var(--neon-blue);
}

.icon-orange {
    background: rgba(255, 159, 67, 0.1);
    color: var(--neon-orange);
}

/* =========================================
   PROGRAMS
   ========================================= */
.programas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.programa-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--transition);
}

.programa-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--neon-blue), var(--neon-orange));
    opacity: 0.5;
    transition: opacity 0.4s;
}

.programa-card:hover {
    transform: translateY(-8px);
    border-color: rgba(0, 240, 255, 0.3);
}

.programa-card:hover::before {
    opacity: 1;
}

.programa-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.programa-header h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--text-primary);
    max-width: 80%;
    line-height: 1.3;
}

.programa-num {
    font-family: var(--font-heading);
    font-size: 3rem;
    color: rgba(255, 255, 255, 0.05);
    line-height: 1;
}

.programa-card > p {
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
}

.programa-meta {
    display: flex;
    gap: 1.5rem;
    color: var(--neon-blue);
    font-size: 0.85rem;
    font-weight: 600;
}

.programa-meta li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.programa-meta li::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--neon-orange);
}

/* =========================================
   INDUSTRIAL LABORATORY
   ========================================= */
.lab-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2rem;
}

.lab-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    overflow: hidden;
    transition: var(--transition);
}

.lab-card:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 159, 67, 0.3);
    box-shadow: 0 15px 30px rgba(255, 159, 67, 0.08);
}

.lab-visual {
    height: 180px;
    position: relative;
    background: linear-gradient(135deg, rgba(0, 240, 255, 0.05), rgba(255, 159, 67, 0.05));
    overflow: hidden;
}

.lab-visual::before {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        0deg,
        transparent,
        transparent 2px,
        rgba(0, 240, 255, 0.03) 2px,
        rgba(0, 240, 255, 0.03) 4px
    );
    animation: scan 3s linear infinite;
}

.lab-visual::after {
    content: attr(data-num);
    position: absolute;
    bottom: 10px;
    right: 20px;
    font-family: var(--font-heading);
    font-size: 3.5rem;
    color: rgba(255, 255, 255, 0.06);
    line-height: 1;
}

.lab-info {
    padding: 1.5rem 2rem 2rem;
}

.lab-info h4 {
    font-family: var(--font-heading);
    color: var(--text-primary);
    font-size: 1.15rem;
    margin-bottom: 0.75rem;
}

.lab-platform,
.lab-funciones {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.lab-platform span,
.lab-funciones span {
    color: var(--neon-orange);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.25rem;
    margin-top: 0.75rem;
}

/* =========================================
   CONTACT
   ========================================= */
.contacto-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.contacto-glass,
.contacto-form-glass {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 3rem;
}

.contacto-desc {
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contacto-panels {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.panel-wide {
    grid-column: 1 / -1;
}

.panel-float {
    background: rgba(255, 255, 255, 0.02);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(0, 240, 255, 0.2);
    border-radius: 12px;
    padding: 1.5rem;
    transition: var(--transition);
}

.panel-float:hover {
    transform: translateY(-5px);
    border-color: rgba(255, 159, 67, 0.6);
    box-shadow: 0 10px 30px rgba(255, 159, 67, 0.1);
}

.panel-label {
    display: block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--neon-orange);
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.panel-float a,
.panel-float p {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.05rem;
}

.panel-float a:hover {
    color: var(--neon-blue);
}

/* Form */
.futuristic-form {
    display: flex;
    flex-direction: column;
}

.form-group {
    position: relative;
    margin-bottom: 1.5rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 10px;
    padding: 1rem;
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--neon-blue);
}

.form-group label {
    position: absolute;
    left: 1rem;
    top: 1rem;
    color: var(--text-muted);
    font-size: 1rem;
    transition: all 0.3s ease;
    pointer-events: none;
    background: var(--bg-dark);
    padding: 0 0.3rem;
}

.form-group input:focus + label,
.form-group input:not(:placeholder-shown) + label,
.form-group textarea:focus + label,
.form-group textarea:not(:placeholder-shown) + label {
    top: -0.6rem;
    left: 0.8rem;
    font-size: 0.75rem;
    color: var(--neon-blue);
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0 2rem;
    background: #050508;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    margin-top: 1rem;
    line-height: 1.6;
    font-size: 0.95rem;
}

.footer-links h4,
.footer-contact h4 {
    color: var(--text-primary);
    font-family: var(--font-heading);
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-links a,
.footer-contact a {
    color: var(--text-muted);
    display: block;
    margin-bottom: 0.75rem;
    transition: color 0.3s;
}

.footer-links a:hover,
.footer-contact a:hover {
    color: var(--neon-blue);
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid var(--glass-border);
    padding-top: 2rem;
    color: #666;
    font-size: 0.9rem;
}

/* =========================================
   SCROLL ANIMATIONS
   ========================================= */
.fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

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

.fade-up:nth-child(1) { transition-delay: 0.1s; }
.fade-up:nth-child(2) { transition-delay: 0.2s; }
.fade-up:nth-child(3) { transition-delay: 0.3s; }
.fade-up:nth-child(4) { transition-delay: 0.4s; }
.fade-up:nth-child(5) { transition-delay: 0.5s; }
.fade-up:nth-child(6) { transition-delay: 0.6s; }

/* =========================================
   ANIMATIONS
   ========================================= */
@keyframes scrollPulse {
    0% {
        transform: translateX(-50%) scaleY(1);
        opacity: 1;
    }
    50% {
        transform: translateX(-50%) scaleY(0.5);
        opacity: 0.5;
    }
    100% {
        transform: translateX(-50%) scaleY(1);
        opacity: 1;
    }
}

@keyframes scan {
    0% {
        transform: translateY(-100%);
    }
    100% {
        transform: translateY(100%);
    }
}

/* =========================================
   RESPONSIVE
   ========================================= */
@media (max-width: 768px) {
    .nav-toggle {
        display: block;
    }

    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 75%;
        height: 100vh;
        background: rgba(10, 10, 15, 0.95);
        backdrop-filter: blur(20px);
        flex-direction: column;
        align-items: flex-start;
        padding: 6rem 2rem;
        transition: right 0.4s ease;
        border-left: 1px solid var(--glass-border);
    }

    .nav-menu.active {
        right: 0;
    }

    .nav-menu li {
        width: 100%;
    }

    .nav-link {
        font-size: 1.1rem;
        padding: 1rem 0;
        display: block;
        border-bottom: 1px solid var(--glass-border);
    }

    .hero-title {
        font-size: 2.2rem;
    }

    .section {
        padding: 4rem 0;
    }

    .contacto-wrapper {
        grid-template-columns: 1fr;
    }

    .contacto-glass,
    .contacto-form-glass {
        padding: 2rem;
    }

    .contacto-panels {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

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

    .programa-num {
        font-size: 2rem;
    }
}

@media (max-width: 1024px) {
    .contacto-wrapper {
        gap: 2rem;
    }
}