/* ==========================================================================
   1. RESET & BASE
   ========================================================================== */
:root {
    --bg-dark: #050b14;
    --bg-black: #000000;
    --accent-blue: #1597d4;
    --text-white: #ffffff;
}

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

/* Bloqueo total de scroll lateral */
html, body {
    width: 100%;
    max-width: 100vw;
    overflow-x: hidden; /* <--- LA CLAVE */
    margin: 0;
    padding: 0;
    position: relative;
    scroll-behavior: smooth;
}

/* El reset para que los márgenes no sumen ancho extra */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Inter', sans-serif; /* Asegúrate de tenerla en el HTML o usa Arial */
    background-color: var(--bg-dark);
    color: var(--text-white);
    overflow-x: hidden;
    line-height: 1.2;
}

/* ==========================================================================
   2. HEADER & LOGO (EL DOMADOR DE LOGOS GIGANTES)
   ========================================================================== */
.main-header {
    width: 100%;
    padding: 40px 0 20px;
    text-align: center;
    position: relative;
    z-index: 10;
}

.logo {
    /* Aquí lo controlamos: ni muy grande ni muy chico */
    width: 100%;
    max-width: 150px; 
    height: auto;
    display: inline-block;
}

/* ==========================================================================
   3. HERO SECTION (SISTEMA DE CAPAS)
   ========================================================================== */
.hero-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 100%;
}

/* Capa 1: Título Gigante al fondo */
.title-layer {
    position: relative;
    z-index: 1;
    margin-top: 5px;
}

.title-img {
    width: 95vw;
    max-width: 800px; /* Tamaño masivo para impacto */
    height: auto;
}

/* Capa 2: Robot (Encimado) */
.robot-layer {
    position: relative;
    z-index: 2;
    margin-top: -45px; /* Sube la cabeza sobre el título */
}

.robot-img {
    width: 100%;
    max-width: 800px;
    display: block;
    margin: 0 auto;
}

/* Capa 3: Degradado que funde al robot con el negro */
.fade-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 500px; /* Cubre la base del robot */
    background: linear-gradient(to bottom, transparent 0%, var(--bg-black) 70%);
    z-index: 3;
    pointer-events: none;
}

/* Capa 4: Texto y Fecha en el frente */
.info-layer {
    position: relative;
    z-index: 4;
    margin-top: -220px; /* Lo subimos para que quede sobre el degradado */
    padding-bottom: 100px;
}

.tagline {
    font-size: 1.8rem;
    color: var(--text-white);
    margin-bottom: 20px;
    text-wrap: balance;
}

.date {
    font-size: clamp(2.5rem, 6vw, 4rem);
    color: var(--accent-blue);
    font-weight: 900;
    text-transform: uppercase;
}

/* ==========================================================================
   4. SECCIÓN REGISTRO
   ========================================================================== */
.registration-section {
    background-color: var(--bg-black);
    padding: 100px 0;
    position: relative;
    z-index: 5;
    margin-top: -90px;
}

/* --- RESPONSIVE --- */
@media (max-width: 768px) {
    .logo { max-width: 160px; }
    .title-img { width: 100%; }
    .robot-layer { margin-top: -60px; }
    .info-layer { margin-top: -120px; }
    .tagline { font-size: 1.2rem; }
    .date { font-size: 2rem; }
}


/* Definimos la animación del brillo */
@keyframes whiteGlow {
    0% {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    }
    50% {
        filter: drop-shadow(0 0 25px rgba(255, 255, 255, 0.7));
    }
    100% {
        filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
    }
}

/* Aplicamos la animación al título */
.title-img {
    width: 95vw;
    /* Sube este valor para que pueda expandirse en monitores grandes */
    max-width: 800px; 
    height: auto;
    
    /* Mantén tu animación de glow aquí si ya la pusiste */
    animation: whiteGlow 4s ease-in-out infinite;
}




/* ==========================================================================
   SECCIÓN REGISTRO (ANCHO AMPLIADO)
   ========================================================================== */
.registration-section {
    background-color: #000000;
    padding: 100px 0;
    position: relative;
    z-index: 5;
}

/* El nuevo contenedor: subimos de 800px a 1100px */
.container-form-wide {
    width: min(1100px, 100% - 40px);
    margin-inline: auto;
    margin-top: -50px;
}

.form-card {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(20px);
    padding: 60px; /* Más aire interno */
    border-radius: 24px;
}

.form-card h2 {
    text-align: center;
    margin-bottom: 50px;
    font-size: 1.8rem;
    letter-spacing: 3px;
    font-weight: 900;
}

/* Grillas dinámicas */
.input-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
    margin-bottom: 40px;
}

.select-grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr); /* 3 columnas iguales */
    gap: 20px;
}

.select-section {
    margin-bottom: 35px;
}

.select-section label {
    display: block;
    color: #1597d4;
    font-size: 0.85rem;
    font-weight: bold;
    text-transform: uppercase;
    margin-bottom: 15px;
    letter-spacing: 1px;
}

/* Estilo de Inputs */
input, select {
    width: 100%;
    padding: 18px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus, select:focus {
    outline: none;
    border-color: #1597d4;
    background: rgb(19, 19, 19);
    box-shadow: 0 0 15px rgba(21, 151, 212, 0.2);
}

/* Botón Centrado y Estilizado */
.button-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 50px;
}

.btn-register {
    width: 100%;
    max-width: 400px; /* Botón grande pero no exagerado */
    padding: 20px;
    background: #1597d4;
    color: #fff;
    border: none;
    border-radius: 50px;
    font-weight: bold;
    font-size: 1.2rem;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(21, 151, 212, 0.4);
    transition: 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.btn-register:hover {
    background: #00d2ff;
    transform: translateY(-5px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 210, 255, 0.5);
}

/* ==========================================================================
   RESPONSIVE (Para que no se rompa en tablets y móvil)
   ========================================================================== */
@media (max-width: 992px) {
    .select-grid-3 {
        grid-template-columns: 1fr; /* En tablets, los selects vuelven a ser 1 sola columna */
    }
}

@media (max-width: 768px) {
    .input-grid-2 {
        grid-template-columns: 1fr; /* Inputs uno sobre otro en móviles */
    }
    .form-card {
        padding: 30px 20px;
    }
}



.bg-layer {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    
    /* AGREGAR ESTO: */
    background-image: 
        radial-gradient(circle at 50% 0%, #085395 0%, transparent 70%), /* Medio círculo superior */
        url('../images/CIRCUITOS.png'); /* Tus circuitos de fondo */
        
    background-position: center top;
    background-repeat: no-repeat;
    background-size: 100% 1000px, cover; /* El gradiente abarca 1000px de alto */
}

/* ==========================================================================
   FOOTER ESTILIZADO
   ========================================================================== */
.main-footer {
    background-color: #000000; /* Fondo negro para fusionarse con el registro */
    padding: 60px 0 40px;
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05); /* Línea muy sutil arriba */
}

.footer-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Redes Sociales */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px; /* Espacio entre iconos */
    margin-bottom: 30px;
}

.social-links img {
    width: 32px; /* Tamaño ideal para redes sociales */
    height: auto;
    transition: all 0.3s ease;
    opacity: 0.8; /* Un poco más apagados por defecto */
}

/* Efecto al pasar el mouse */
.social-links a:hover img {
    opacity: 1;
    transform: translateY(-3px);
    filter: drop-shadow(0 0 8px rgba(21, 151, 212, 0.6)); /* Brillo azul sutil */
}

/* Enlace a la Web */
.footer-web {
    margin-top: 20px;
}

.footer-web a {
    color: #ffffff; /* Texto blanco como pediste */
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: 700; /* Bold para que resalte */
    letter-spacing: 1px;
    text-transform: uppercase;
    transition: color 0.3s ease;
}

.footer-web a:hover {
    color: #1597d4; /* Cambia al azul de la marca al pasar el mouse */
}

/* Ajuste para móvil */
@media (max-width: 768px) {
    .social-links {
        gap: 20px;
    }
    .social-links img {
        width: 28px;
    }
    .footer-web a {
        font-size: 0.9rem;
    }
}



.main-footer {
    /* Mantenemos tu fondo negro pero le encimamos el degradado */
    background: linear-gradient(to top, rgba(21, 151, 212, 0.4) 0%, transparent 120%), #000000;
    
    padding: 60px 0 40px;
    width: 100%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
}

/* ==========================================================================
   ANIMACIÓN DE ENERGÍA PARA EL ROBOT
   ========================================================================== */

/* Definimos el pulso de luz (puedes reutilizar el del título o crear este) */
@keyframes robotEnergyPulse {
    0% {
        /* Brillo suave de inicio */
        filter: drop-shadow(0 0 10px rgba(21, 151, 212, 0.3));
    }
    50% {
        /* Brillo intenso en el pico de la animación */
        filter: drop-shadow(0 0 40px rgba(21, 151, 212, 0.9));
    }
    100% {
        /* Volvemos al brillo suave */
        filter: drop-shadow(0 0 10px rgba(21, 151, 212, 0.3));
    }
}

/* Aplicamos la animación a la imagen del robot */
.robot-img {
    width: 100%;
    max-width: 800px; /* Ajusta según tu diseño */
    height: auto;
    display: block;
    margin: 0 auto;
    position: relative;
    z-index: 2; /* Asegura que esté al frente */

    /* --- LA MAGIA ESTÁ AQUÍ --- */
    /* Llamamos a la animación: nombre | duración | ritmo | repetición */
    animation: robotEnergyPulse 5s ease-in-out infinite;

    /* Ayuda al navegador a renderizar mejor la animación */
    will-change: filter; 
}

@media (max-width: 768px) {
    /* 1. Encierra al robot y sus circuitos */
    .robot-layer {
        width: 100%;
        overflow: hidden; /* Esto corta los circuitos que se salen de los hombros del robot */
        position: relative;
        margin-top: -25px;
    }

    .circuitos-img {
        width: 200%; /* Que sea grande, pero el overflow de arriba lo va a recortar */
        left: 50%;
        transform: translateX(-50%); /* Lo centramos para que no empuje a la derecha */
    }

    /* 2. Haz los Blobs más discretos */
    .blob {
        width: 200px; /* Redúcelos mucho en móvil */
        height: 200px;
        filter: blur(40px);
    }
}

/* --- SECCIÓN YOUTUBE DENTRO DEL HERO (MÁS GRANDE Y BOLD) --- */
.yt-hero-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 20px; /* Un poco más de espacio entre elementos más grandes */
    margin-top: 30px; /* Aumentado para equilibrar el nuevo tamaño */
    flex-wrap: wrap; 
}

.yt-text {
    color: #ffffff;
    font-size: 1.2rem; /* Aumentado de 1rem a 1.2rem */
    font-weight: 700; /* Cambiado de 300 (light) a 700 (bold) */
    letter-spacing: 0.5px; /* Un poco de separación para legibilidad */
}

.yt-logo-hero {
    height: 28px; /* Aumentado de 22px a 28px para que coincida con el texto */
    width: auto;
    vertical-align: middle;
}

.btn-yt-small {
    background-color: #FF0000;
    color: #ffffff;
    text-decoration: none;
    padding: 10px 22px; /* Un poco más de padding */
    border-radius: 4px;
    font-weight: 700; /* Ya era bold, pero lo confirmamos */
    font-size: 1rem; /* Aumentado de 0.85rem a 1rem */
    text-transform: uppercase;
    transition: all 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 0, 0, 0.2); /* Sombra suave para integración */
}

.btn-yt-small:hover {
    background-color: #cc0000;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 0, 0, 0.4); /* Hover más pronunciado */
}

/* Ajuste para móviles (mantenemos el tamaño bold pero reducimos escala general) */
@media (max-width: 768px) {
    .yt-hero-row {
        gap: 12px;
        margin-top: 20px;
    }
    .yt-text {
        font-size: 1.1rem; /* Un poco más chico en móvil pero sigue bold */
    }
    .yt-logo-hero {
        height: 24px;
    }
    .btn-yt-small {
        font-size: 0.9rem;
    }
}