/* Reset y estilos base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Montserrat', sans-serif;
    overflow-x: hidden;
}

/* Barra de navegación transparente */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1.5rem 0;
    background: transparent;
    transition: all 0.3s ease;
    z-index: 1000;
}

/* Navbar con fondo al hacer scroll */
.navbar.navbar-scroll {
    background: rgba(0, 0, 0, 0.9);
    padding: 1rem 0;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.3);
}

.contenedor-nav {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Logo */
.logo a {
    font-family: 'Playfair Display', serif;
    font-size: 1.8rem;
    font-weight: 900;
    color: #fff;
    text-decoration: none;
    letter-spacing: 1px;
    transition: color 0.3s ease;
}

.logo a:hover {
    color: #f0a500;
}

/* Menú de navegación */
.menu-nav {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.menu-nav > li {
    position: relative;
}

.menu-nav li a {
    color: #fff;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 400;
    letter-spacing: 0.5px;
    transition: color 0.3s ease;
    position: relative;
    display: block;
}

.menu-nav > li > a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: #f0a500;
    transition: width 0.3s ease;
}

.menu-nav > li > a:hover {
    color: #f0a500;
}

.menu-nav > li > a:hover::after {
    width: 100%;
}

/* Menú desplegable */
.menu-desplegable {
    position: relative;
}

.enlace-desplegable {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.flecha {
    font-size: 0.7rem;
    transition: transform 0.3s ease;
}

.menu-desplegable:hover .flecha {
    transform: rotate(180deg);
}

.submenu {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-top: 1rem;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 10px;
    padding: 1rem 0;
    min-width: 280px;
    list-style: none;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    border: 1px solid rgba(240, 165, 0, 0.2);
    max-height: 70vh;
    overflow-y: auto;
    z-index: 1000;
}

/* Scrollbar personalizado para el submenu */
.submenu::-webkit-scrollbar {
    width: 6px;
}

.submenu::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.1);
    border-radius: 10px;
}

.submenu::-webkit-scrollbar-thumb {
    background: #f0a500;
    border-radius: 10px;
}

.menu-desplegable:hover .submenu {
    opacity: 1;
    visibility: visible;
    margin-top: 0.5rem;
}

.submenu li {
    padding: 0;
}

.submenu li a {
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.8);
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.submenu li a:hover {
    background: rgba(240, 165, 0, 0.1);
    color: #f0a500;
    border-left-color: #f0a500;
    padding-left: 2rem;
}

.submenu li a::after {
    display: none;
}

/* Botón menú móvil */
.boton-menu {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
}

.boton-menu span {
    width: 25px;
    height: 3px;
    background: #fff;
    transition: all 0.3s ease;
    border-radius: 2px;
}

/* Hero a pantalla completa */
.hero {
    position: relative;
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    overflow: hidden;
}

/* Contenedor del hero */
.contenedor-hero {
    text-align: center;
    color: #fff;
    z-index: 2;
    padding: 0 2rem;
    animation: aparecerHero 1s ease-out;
}

/* Título principal */
.titulo-hero {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3rem, 8vw, 7rem);
    font-weight: 900;
    margin-bottom: 1.5rem;
    line-height: 1.1;
    letter-spacing: 2px;
    text-shadow: 2px 2px 20px rgba(0, 0, 0, 0.3);
}

/* Subtítulo */
.subtitulo-hero {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1rem, 2vw, 1.5rem);
    font-weight: 300;
    letter-spacing: 1px;
    line-height: 1.6;
    max-width: 700px;
    margin: 0 auto;
    opacity: 0.95;
    text-shadow: 1px 1px 10px rgba(0, 0, 0, 0.2);
}

/* Animación de aparición */
@keyframes aparecerHero {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive - Tablets */
@media (max-width: 768px) {
    .menu-nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        gap: 2rem;
        transition: right 0.3s ease;
        padding: 2rem;
    }

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

    .boton-menu {
        display: flex;
        z-index: 1001;
    }

    .boton-menu.activo span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .boton-menu.activo span:nth-child(2) {
        opacity: 0;
    }

    .boton-menu.activo span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .contenedor-nav {
        padding: 0 1.5rem;
    }
}

/* Número de efecto */
.numero-efecto {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.2rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.6);
    margin-bottom: 1rem;
    letter-spacing: 3px;
}

/* ========================================
   EFECTO 1: PARTÍCULAS FLOTANTES
   ======================================== */
.hero-particulas {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

#canvasParticulas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   EFECTO 2: GRADIENTE ANIMADO
   ======================================== */
.hero-gradiente {
    background: #000;
}

.fondo-gradiente-animado {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(45deg, #ff6b6b, #4ecdc4, #45b7d1, #f7b731, #5f27cd);
    background-size: 400% 400%;
    animation: gradienteMovimiento 15s ease infinite;
    z-index: 1;
}

@keyframes gradienteMovimiento {
    0% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
    100% {
        background-position: 0% 50%;
    }
}

/* ========================================
   EFECTO 3: ONDAS ANIMADAS
   ======================================== */
.hero-ondas {
    background: linear-gradient(180deg, #0f2027 0%, #203a43 50%, #2c5364 100%);
}

.contenedor-ondas {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.onda {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.3;
}

.onda:nth-child(1) {
    animation: ondaMovimiento 10s linear infinite;
}

.onda:nth-child(2) {
    animation: ondaMovimiento 15s linear infinite;
    animation-delay: -5s;
}

.onda:nth-child(3) {
    animation: ondaMovimiento 20s linear infinite;
    animation-delay: -10s;
}

.forma-onda {
    fill: rgba(255, 255, 255, 0.2);
}

@keyframes ondaMovimiento {
    0% {
        transform: translateX(0) translateY(0);
    }
    100% {
        transform: translateX(-50%) translateY(20px);
    }
}

/* ========================================
   EFECTO 4: REJILLA LÍQUIDA INTERACTIVA
   ======================================== */
.hero-mesh {
    background: linear-gradient(135deg, #0a0a0a, #1a0a2e, #0a0a0a);
}

#canvasMesh {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   EFECTO 5: PARALLAX CON CAPAS
   ======================================== */
.hero-parallax {
    background: #0a0a0a;
    perspective: 1000px;
    overflow: hidden;
}

.capa-parallax {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 120%;
    height: 120%;
    background-size: cover;
    background-position: center;
    z-index: 1;
    transition: transform 0.1s ease-out;
    will-change: transform;
}

.capa-1 {
    background: radial-gradient(circle at 30% 40%, rgba(138, 43, 226, 0.6) 0%, transparent 60%);
    transform: translateZ(100px) scale(1.2);
}

.capa-2 {
    background: radial-gradient(circle at 70% 60%, rgba(30, 144, 255, 0.5) 0%, transparent 60%);
    transform: translateZ(50px) scale(1.1);
}

.capa-3 {
    background: radial-gradient(circle at 50% 50%, rgba(255, 20, 147, 0.4) 0%, transparent 60%);
    transform: translateZ(0px) scale(1);
}

/* Formas 3D flotantes - Optimizadas para mejor rendimiento */
.forma-3d {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    border: 2px solid rgba(255, 255, 255, 0.15);
    animation: flotar 8s ease-in-out infinite;
    box-shadow: 0 0 60px rgba(138, 43, 226, 0.4);
    will-change: transform;
}

/* Capa 1 - Más cerca */
.forma-3d-1 {
    width: 300px;
    height: 300px;
    top: 15%;
    left: 10%;
    animation-delay: 0s;
    background: radial-gradient(circle, rgba(138, 43, 226, 0.25), transparent);
}

.forma-3d-2 {
    width: 280px;
    height: 280px;
    bottom: 20%;
    right: 15%;
    animation-delay: 2s;
    background: radial-gradient(circle, rgba(30, 144, 255, 0.25), transparent);
}

/* Capa 2 - Profundidad media */
.forma-3d-3 {
    width: 320px;
    height: 320px;
    top: 40%;
    left: 60%;
    animation-delay: 1s;
    background: radial-gradient(circle, rgba(255, 20, 147, 0.2), transparent);
}

.forma-3d-4 {
    width: 300px;
    height: 300px;
    bottom: 30%;
    left: 25%;
    animation-delay: 3s;
    background: radial-gradient(circle, rgba(0, 255, 255, 0.2), transparent);
}

/* Capa 3 - Más lejos */
.forma-3d-5 {
    width: 280px;
    height: 280px;
    top: 10%;
    right: 10%;
    animation-delay: 1.5s;
    background: radial-gradient(circle, rgba(255, 215, 0, 0.15), transparent);
}

.forma-3d-6 {
    width: 260px;
    height: 260px;
    bottom: 15%;
    left: 50%;
    animation-delay: 2.5s;
    background: radial-gradient(circle, rgba(0, 255, 127, 0.15), transparent);
}

@keyframes flotar {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(5deg);
    }
    50% {
        transform: translateY(0) rotate(0deg);
    }
    75% {
        transform: translateY(20px) rotate(-5deg);
    }
}

/* ========================================
   EFECTO 6: LÍNEAS CONECTADAS
   ======================================== */
.hero-lineas {
    background: linear-gradient(135deg, #1e3c72 0%, #2a5298 100%);
}

#canvasLineas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   EFECTO 7: ESTRELLAS EN MOVIMIENTO
   ======================================== */
.hero-estrellas {
    background: radial-gradient(ellipse at bottom, #1b2735 0%, #090a0f 100%);
}

#canvasEstrellas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   NAVEGACIÓN LATERAL CON PUNTOS
   ======================================== */
.navegacion-puntos {
    position: fixed;
    right: 2rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 999;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.punto {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    border: 2px solid rgba(255, 255, 255, 0.5);
    transition: all 0.3s ease;
    position: relative;
    cursor: pointer;
}

.punto:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.3);
}

.punto.activo {
    background: #f0a500;
    border-color: #f0a500;
    box-shadow: 0 0 10px rgba(240, 165, 0, 0.5);
}

/* Tooltip para los puntos */
.punto::before {
    content: attr(data-tooltip);
    position: absolute;
    right: 25px;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.9);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    font-size: 0.85rem;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.punto:hover::before {
    opacity: 1;
}

/* ========================================
   EFECTO 8: MATRIX RAIN
   ======================================== */
.hero-matrix {
    background: #000;
}

#canvasMatrix {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   EFECTO 9: FORMAS GEOMÉTRICAS
   ======================================== */
.hero-geometrico {
    background: linear-gradient(135deg, #0f0c29 0%, #302b63 50%, #24243e 100%);
}

#canvasGeometrico {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   EFECTO 10: LUCIÉRNAGAS
   ======================================== */
.hero-luciernagas {
    background: linear-gradient(180deg, #0a0e27 0%, #1a1a2e 100%);
}

#canvasLuciernagas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   EFECTO 11: AURORA BOREAL
   ======================================== */
.hero-aurora {
    background: linear-gradient(180deg, #000428 0%, #004e92 100%);
}

#canvasAurora {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   EFECTO 12: HÉLICE DE ADN
   ======================================== */
.hero-adn {
    background: radial-gradient(ellipse at center, #1a1a2e 0%, #0f0f1e 100%);
}

#canvasADN {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   EFECTO 13: EFECTO RIPPLE
   ======================================== */
.hero-ondulacion {
    background: linear-gradient(135deg, #134e5e 0%, #71b280 100%);
}

#canvasOndulacion {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* ========================================
   EFECTO 14: NUBE NEBULOSA
   ======================================== */
.hero-nebulosa {
    background: #000;
}

.contenedor-nebulosa {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1;
}

.nube {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
}

.nube-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #ff006e 0%, transparent 70%);
    top: 10%;
    left: 5%;
    animation: nubeFlotante1 20s ease-in-out infinite;
}

.nube-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #8338ec 0%, transparent 70%);
    top: 40%;
    right: 10%;
    animation: nubeFlotante2 22s ease-in-out infinite;
}

.nube-3 {
    width: 550px;
    height: 550px;
    background: radial-gradient(circle, #3a86ff 0%, transparent 70%);
    bottom: 15%;
    left: 30%;
    animation: nubeFlotante3 25s ease-in-out infinite;
}

.nube-4 {
    width: 450px;
    height: 450px;
    background: radial-gradient(circle, #fb5607 0%, transparent 70%);
    top: 60%;
    right: 25%;
    animation: nubeFlotante4 18s ease-in-out infinite;
}

@keyframes nubeFlotante1 {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(150px, -80px) scale(1.2) rotate(5deg);
    }
    50% {
        transform: translate(250px, 60px) scale(0.85) rotate(-3deg);
    }
    75% {
        transform: translate(80px, 120px) scale(1.1) rotate(8deg);
    }
}

@keyframes nubeFlotante2 {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    20% {
        transform: translate(-120px, 90px) scale(1.25) rotate(-6deg);
    }
    40% {
        transform: translate(-220px, -50px) scale(0.8) rotate(4deg);
    }
    60% {
        transform: translate(-80px, -140px) scale(1.15) rotate(-8deg);
    }
    80% {
        transform: translate(50px, 70px) scale(0.95) rotate(3deg);
    }
}

@keyframes nubeFlotante3 {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    25% {
        transform: translate(180px, 130px) scale(0.85) rotate(7deg);
    }
    50% {
        transform: translate(-150px, -90px) scale(1.3) rotate(-5deg);
    }
    75% {
        transform: translate(100px, -120px) scale(1.05) rotate(10deg);
    }
}

@keyframes nubeFlotante4 {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
    }
    33% {
        transform: translate(-180px, 140px) scale(1.2) rotate(-9deg);
    }
    66% {
        transform: translate(120px, -100px) scale(0.9) rotate(6deg);
    }
}

/* ========================================
   EFECTO 15: LLUVIA DIGITAL
   ======================================== */
.hero-digital {
    background: #0d0d0d;
}

#canvasDigital {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

/* Responsive - Tablets */
@media (max-width: 768px) {
    .menu-nav {
        position: fixed;
        top: 0;
        right: -100%;
        height: 100vh;
        width: 70%;
        max-width: 300px;
        background: rgba(0, 0, 0, 0.95);
        flex-direction: column;
        justify-content: flex-start;
        align-items: stretch;
        gap: 0;
        transition: right 0.3s ease;
        padding: 5rem 0 2rem 0;
        overflow-y: auto;
    }

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

    .boton-menu {
        display: flex;
        z-index: 1001;
    }

    .boton-menu.activo span:nth-child(1) {
        transform: rotate(45deg) translate(8px, 8px);
    }

    .boton-menu.activo span:nth-child(2) {
        opacity: 0;
    }

    .boton-menu.activo span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }

    .contenedor-nav {
        padding: 0 1.5rem;
    }

    .menu-nav > li {
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        width: 100%;
    }

    .menu-nav > li > a {
        padding: 1rem 2rem;
    }

    .menu-nav > li > a::after {
        display: none;
    }

    /* Submenu en móvil */
    .submenu {
        position: static;
        transform: none;
        margin-top: 0;
        opacity: 1;
        visibility: visible;
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.3s ease;
        background: rgba(0, 0, 0, 0.5);
        border: none;
        border-radius: 0;
        box-shadow: none;
    }

    .menu-desplegable.activo .submenu {
        max-height: 600px;
    }

    .submenu li a {
        padding: 0.75rem 2.5rem;
        font-size: 0.9rem;
    }

    .submenu li a:hover {
        padding-left: 3rem;
    }

    .blob-1, .blob-2, .blob-3 {
        width: 300px;
        height: 300px;
    }

    .nube-1, .nube-2, .nube-3, .nube-4 {
        width: 350px;
        height: 350px;
    }

    .navegacion-puntos {
        right: 1rem;
        gap: 0.8rem;
    }

    .punto {
        width: 10px;
        height: 10px;
    }

    .punto::before {
        display: none;
    }
}

/* Responsive - Móviles */
@media (max-width: 480px) {
    .logo a {
        font-size: 1.5rem;
    }

    .contenedor-nav {
        padding: 0 1rem;
    }

    .titulo-hero {
        letter-spacing: 1px;
    }

    .subtitulo-hero {
        font-size: 1rem;
    }

    .numero-efecto {
        font-size: 1rem;
    }

    .blob-1, .blob-2, .blob-3 {
        width: 200px;
        height: 200px;
    }

    .nube-1, .nube-2, .nube-3, .nube-4 {
        width: 250px;
        height: 250px;
    }

    .navegacion-puntos {
        right: 0.5rem;
        gap: 0.6rem;
    }

    .punto {
        width: 8px;
        height: 8px;
        border-width: 1px;
    }
}