/* ==================== VARIABLES GLOBALES ==================== */
:root {
    --color-gold: #D4AF37;
    --color-gold-light: #FFD700;
    --color-gold-dark: #B8943F;
}

/* ==================== RESET Y BASE ==================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    overflow-x: hidden; /* CORREGIDO: hidden en lugar de auto */
}

body {
    background: rgba(0, 0, 0, 0.95);
    min-height: 100vh;
    position: relative;
}

/* ==================== MATRIX BACKGROUND GLOBAL ==================== */
#matrix-background {
    position: fixed;
    inset: 0;
    z-index: 0;
    opacity: 0;
    transition: opacity 1s ease;
    pointer-events: none;
}

#matrix-background.active {
    opacity: 0.35;
}

/* ==================== CURSOR PERSONALIZADO ==================== */
.custom-cursor {
    position: fixed;
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-gold-light);
    background-color: rgba(251, 191, 36, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    z-index: 9999;
    transition: transform 0.15s ease-out, width 0.2s ease-out, height 0.2s ease-out, background-color 0.2s ease-out;
    opacity: 0;
}

.custom-cursor.visible { 
    opacity: 1; 
}

.custom-cursor.hover-interactive {
    width: 60px;
    height: 60px;
    background-color: rgba(251, 191, 36, 0.4);
}

@media (pointer: coarse) {
    .custom-cursor { 
        display: none; 
    }
}

/* ==================== ANIMACIONES DE SCROLL ==================== */
[data-animation] {
    opacity: 0;
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

[data-animation="fade-up"] { 
    transform: translateY(50px); 
}

[data-animation="fade-down"] { 
    transform: translateY(-50px); 
}

[data-animation="fade-left"] { 
    transform: translateX(50px); 
}

[data-animation="fade-right"] { 
    transform: translateX(-50px); 
}

[data-animation].is-visible {
    opacity: 1;
    transform: translateY(0) translateX(0);
}

/* ==================== LOADER ==================== */
#loading-screen {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 1s ease;
    overflow: hidden;
}

#loading-screen.hide {
    opacity: 0;
    pointer-events: none;
}

#matrix-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    pointer-events: none;
}

#loader-logo {
    position: relative;
    width: 200px;
    height: auto;
    opacity: 0;
    z-index: 2;
    animation: logoAppearProgressive 3s ease 0.5s forwards;
    filter: drop-shadow(0 0 20px var(--color-gold-light));
}

@keyframes logoAppearProgressive {
    0% {
        opacity: 0;
        filter: blur(10px) drop-shadow(0 0 20px var(--color-gold-light));
        transform: scale(0);
    }
    70% {
        opacity: 0.95;
        filter: blur(5px) drop-shadow(0 0 20px var(--color-gold-light));
        transform: scale(0.7);
    }
    100% {
        opacity: 1;
        filter: blur(0px) drop-shadow(0 0 20px var(--color-gold-light));
        transform: scale(1);
    }
}

/* Ocultar contenido durante el loader */
body.has-loader:not(.loaded) > header,
body.has-loader:not(.loaded) > main,
body.has-loader:not(.loaded) > footer {
    opacity: 0;
    transform: translateY(10px);
}

header, main, footer {
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

/* ==================== UTILIDADES ==================== */
.shadow-text {
    text-shadow: 0 4px 10px rgba(251, 191, 36, 0.3);
}

@keyframes spin-slow {
    from { transform: rotate(0deg); } 
    to { transform: rotate(360deg); }
}

.animate-spin-slow { 
    animation: spin-slow 20s linear infinite; 
}

@keyframes marquee {
    from { transform: translateX(0); } 
    to { transform: translateX(-50%); }
}

.animate-marquee { 
    animation: marquee 40s linear infinite; 
}

/* ==================== BOTÓN DE VIDEO GIRATORIO ==================== */
.rotating-text-button {
    position: relative;
    width: 160px;
    height: 160px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s;
}

.rotating-text-button:hover { 
    transform: scale(1.05); 
}

.rotating-text-button textPath {
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.2em;
    fill: var(--color-gold-light);
}

.rotating-text-button .play-icon-container {
    width: 96px;
    height: 96px;
    background-color: #000000;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 20px rgba(251, 191, 36, 0.3);
    transition: transform 0.3s, box-shadow 0.3s;
    animation: pulse-glow 2.5s infinite ease-in-out;
}

.rotating-text-button:hover .play-icon-container {
    transform: scale(1.1);
    box-shadow: 0 10px 30px rgba(251, 191, 36, 0.5);
}

@keyframes pulse-glow {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

/* ==================== FAQ ACORDEÓN ==================== */
.faq-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.5s ease-in-out;
}

/* ==================== BARRAS DE PROGRESO ==================== */
.progress-bar {
    transition: width 1.5s ease-out;
}

/* ==================== RESPONSIVE ==================== */
.contenedor {
    width: 100%;
    padding: 1rem;
}

/* Tablets */
@media (min-width: 768px) {
    .contenedor {
        max-width: 750px;
        margin: 0 auto;
    }
}

/* Desktop */
@media (min-width: 1024px) {
    .contenedor {
        max-width: 960px;
    }
}

/* Desktop Large */
@media (min-width: 1280px) {
    .contenedor {
        max-width: 1200px;
    }
}

/* ==================== FIX RESPONSIVE MOBILE ==================== */
/* ELIMINADO EL min-width QUE BLOQUEABA EL RESPONSIVE */
@media (max-width: 768px) {
    body {
        min-width: 100% !important; /* CORREGIDO */
    }
    
    .container {
        min-width: 100% !important; /* CORREGIDO */
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Asegurar que el contenido principal no quede debajo del header */
body {
    padding-top: 0;
}

/* Ajustes para dispositivos touch */
@media (hover: none) and (pointer: coarse) {
    .custom-cursor {
        display: none !important;
    }
    
    /* Mejorar área de toque en móviles */
    button, a {
        min-height: 44px;
        min-width: 44px;
    }
}