/* ===================================
   HERO SECTION - DISEÑO PREMIUM CON VIDEO
   =================================== */

#hero {
    position: relative;
    height: 100vh;
    min-height: 100vh;
    min-height: 100svh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    box-sizing: border-box;
    padding: clamp(40px, 9vh, 80px) 0 clamp(35px, 8vh, 70px);
    background: linear-gradient(135deg, #0F0F23 0%, #1A1A2E 50%, #16213E 100%);
}

/* Video de fondo o imagen */
.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.hero-background::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(15, 15, 35, 0.95) 0%, rgba(26, 26, 46, 0.9) 50%, rgba(22, 33, 62, 0.95) 100%);
    opacity: 0;
    z-index: 2;
    animation: hero-overlay-fade 1.2s ease forwards 0.2s;
}

.hero-background img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.3;
    filter: saturate(1.15) contrast(1.05);
    transform: scale(1);
    animation: hero-image-fade 1.2s ease forwards;
}

@keyframes hero-image-fade {
    0% { opacity: 0.7; }
    100% { opacity: 0.3; }
}

@keyframes hero-overlay-fade {
    0% { opacity: 0.4; }
    100% { opacity: 1; }
}

/* Animated mesh gradient background */
.hero-mesh {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 3;
    opacity: 0;
    background: 
        radial-gradient(circle at 20% 50%, rgba(102, 126, 234, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(118, 75, 162, 0.15) 0%, transparent 50%),
        radial-gradient(circle at 40% 20%, rgba(0, 210, 211, 0.1) 0%, transparent 50%);
    animation: hero-layer-fade 0.9s ease forwards 0.8s, mesh-animation 15s ease-in-out infinite;
}

@keyframes mesh-animation {
    0%, 100% {
        transform: scale(1) rotate(0deg);
        opacity: 1;
    }
    50% {
        transform: scale(1.1) rotate(5deg);
        opacity: 0.8;
    }
}

/* Floating geometric shapes */
.hero-shapes {
    position: absolute;
    width: 100%;
    height: 100%;
    top: 0;
    left: 0;
    z-index: 4;
    overflow: hidden;
    opacity: 0;
    animation: hero-layer-fade 1s ease forwards 0.95s;
}

.hero-shape {
    position: absolute;
    opacity: 0.1;
    filter: blur(60px);
}

.hero-shape:nth-child(1) {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, #667EEA 0%, transparent 70%);
    top: -200px;
    right: -200px;
    animation: float-shape-1 20s ease-in-out infinite;
}

.hero-shape:nth-child(2) {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, #764BA2 0%, transparent 70%);
    bottom: -150px;
    left: -150px;
    animation: float-shape-2 18s ease-in-out infinite;
}

.hero-shape:nth-child(3) {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, #00D2D3 0%, transparent 70%);
    top: 40%;
    left: 50%;
    transform: translate(-50%, -50%);
    animation: float-shape-3 22s ease-in-out infinite;
}

@keyframes float-shape-1 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(100px, -80px) scale(1.1); }
    66% { transform: translate(-50px, 60px) scale(0.9); }
}

@keyframes float-shape-2 {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(-80px, 100px) scale(1.15); }
    66% { transform: translate(60px, -70px) scale(0.95); }
}

@keyframes float-shape-3 {
    0%, 100% { transform: translate(-50%, -50%) scale(1); }
    50% { transform: translate(-50%, -50%) scale(1.2); }
}

@keyframes hero-layer-fade {
    0% {
        opacity: 0;
    }
    100% {
        opacity: 1;
    }
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    text-align: center;
    color: var(--white);
    padding: clamp(1rem, 2vw, 2rem) clamp(1.25rem, 3.5vw, 3rem) 0;
    max-width: 960px;
    margin: 0 auto;
}

.hero-reveal {
    opacity: 0;
    transform: translateY(32px);
    animation: hero-reveal 0.85s cubic-bezier(0.18, 0.88, 0.28, 1) forwards;
}

.reveal-delay-1 { animation-delay: 0.65s; }
.reveal-delay-2 { animation-delay: 0.85s; }
.reveal-delay-3 { animation-delay: 1.05s; }
.reveal-delay-4 { animation-delay: 1.25s; }
.reveal-delay-5 { animation-delay: 1.4s; }

@keyframes hero-reveal {
    0% {
        opacity: 0;
        transform: translateY(32px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-stat-rise {
    0% {
        opacity: 0;
        transform: translateY(32px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

.hero-title {
    font-size: clamp(2.3rem, 4.6vw, 4.5rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: clamp(1rem, 2.2vw, 1.5rem);
    color: var(--white);
    letter-spacing: -0.02em;
}

.hero-title .gradient-text {
    background: linear-gradient(135deg, #667EEA 0%, #00D2D3 50%, #764BA2 100%);
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-animation 8s ease infinite;
}

@keyframes gradient-animation {
    0%, 100% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
}

.hero-description {
    font-size: clamp(0.95rem, 1.5vw, 1.3rem);
    color: var(--gray-light);
    max-width: 680px;
    margin: 0 auto clamp(1.25rem, 2.5vw, 2rem);
    line-height: 1.6;
    font-weight: 400;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: clamp(2rem, 3vw, 3rem);
}

.hero-cta .btn-lg {
    padding: 0.9rem 1.9rem;
    font-size: 0.9rem;
}

/* Hero Stats - Rediseñadas */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: clamp(0.75rem, 1.5vw, 1.5rem);
    max-width: 1100px;
    width: min(100%, 1100px);
    margin: 0 auto;
    text-align: left;
}

.hero-stat {
    position: relative;
    padding: clamp(1.2rem, 2vw, 1.8rem);
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    overflow: hidden;
    opacity: 0;
    transform: translateY(24px);
    animation: hero-stat-rise 0.85s ease forwards 1.6s;
    will-change: transform, opacity;
    text-align: center;
}

.hero-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-purple);
    transform: scaleX(0);
    transition: transform var(--transition-normal);
}

.hero-stat:hover {
    transform: translateY(-8px);
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(102, 126, 234, 0.5);
    box-shadow: 0 20px 60px rgba(102, 126, 234, 0.3);
}

.hero-stat:hover::before {
    transform: scaleX(1);
}

.hero-stats .hero-stat:nth-child(1) { animation-delay: 1.4s; }
.hero-stats .hero-stat:nth-child(2) { animation-delay: 1.5s; }
.hero-stats .hero-stat:nth-child(3) { animation-delay: 1.6s; }
.hero-stats .hero-stat:nth-child(4) { animation-delay: 1.7s; }
.hero-stats .hero-stat:nth-child(5) { animation-delay: 1.8s; }

.hero-stat-number {
    font-size: clamp(1.8rem, 3vw, 2.3rem);
    font-weight: 800;
    background: linear-gradient(135deg, #667EEA 0%, #00D2D3 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
    line-height: 1;
    margin-bottom: 0.75rem;
}

.hero-stat-label {
    font-size: clamp(0.8rem, 1.2vw, 0.95rem);
    color: var(--gray-light);
    font-weight: 500;
    letter-spacing: 0.5px;
}

/* Scroll Indicator - Mejorado */
.scroll-indicator {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 10;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    transition: all var(--transition-normal);
}

.scroll-indicator:hover {
    transform: translateX(-50%) translateY(-5px);
}

.scroll-text {
    font-size: 0.75rem;
    color: var(--gray-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

.scroll-indicator .mouse {
    width: 32px;
    height: 52px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 25px;
    position: relative;
}

.scroll-indicator .wheel {
    width: 4px;
    height: 12px;
    background: var(--white);
    border-radius: 2px;
    position: absolute;
    top: 12px;
    left: 50%;
    transform: translateX(-50%);
    animation: scroll-down 2s infinite;
}

@keyframes scroll-down {
    0% {
        opacity: 1;
        top: 12px;
    }
    100% {
        opacity: 0;
        top: 32px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hero-background::after,
    .hero-mesh,
    .hero-shapes,
    .hero-reveal,
    .hero-stats .hero-stat {
        animation: none !important;
        opacity: 1 !important;
        transform: none !important;
    }
    
    .hero-background::after {
        opacity: 1 !important;
    }
    
    .hero-background img {
        animation: none;
        opacity: 0.3 !important;
    }
}

/* Responsive */
@media (max-width: 991px) {
    #hero {
        padding: 90px 0 80px;
    }
    
    .hero-content {
        padding: 1.5rem clamp(1rem, 5vw, 2.5rem) 0;
    }
    
    .hero-stats {
        justify-content: center;
    }
}

@media (min-width: 1100px) {
    .hero-stats {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    #hero {
        height: auto;
        min-height: auto;
        padding: 120px 0 80px;
    }
    
    .hero-content {
        text-align: left;
        padding: 1rem 1.25rem 0;
    }
    
    .hero-badge {
        width: 100%;
        justify-content: center;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: stretch;
    }
    
    .hero-stats {
        grid-template-columns: 1fr;
        text-align: center;
    }
    
    .scroll-indicator {
        display: none;
    }
}

@media (max-width: 575px) {
    .hero-title {
        font-size: clamp(2.25rem, 9vw, 2.9rem);
    }
    
    .hero-stat {
        padding: 1.5rem;
        min-height: auto;
    }
}

