/* === HERO SECTION (ex styles.css L68-149) === */

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    padding: 10rem 0 6rem;
}

.hero .container {
    position: relative;
    z-index: 2;
    display: grid;
    align-items: center;
    gap: var(--spacing-xl);
    grid-template-columns: 1fr 1fr;
}

.hero-content {
    max-width: 600px;
}

.hero-content h1 {
    margin-bottom: var(--spacing-md);
    background: linear-gradient(90deg, var(--color-primary), var(--color-secondary), var(--color-tertiary));
    color: transparent;
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    animation: glow 3s ease-in-out infinite alternate;
    background-clip: text;
    background-clip: text;
}

.hero-subtitle {
    margin-bottom: var(--spacing-lg);
    color: var(--color-text-secondary);
    font-size: 1.25rem;
}

.hero-cta {
    display: flex;
    gap: var(--spacing-md);
}

.hero-image {
    position: relative;
}

.hero-image-container {
    position: relative;
    z-index: 2;
    overflow: hidden;
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
}

.hero-image-container img {
    width: 100%;
    height: auto;
    display: block;
    transition: transform var(--transition-normal);
}

.hero-image-container:hover img {
    transform: scale(1.05);
}

.glow-effect {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 1;
    width: 80%;
    height: 80%;
    background: radial-gradient(
        circle,
        var(--color-primary-glow) 0%,
        var(--color-tertiary-glow) 50%,
        transparent 70%
    );
    filter: blur(60px);
    transform: translate(-50%, -50%);
    animation: pulse 4s ease-in-out infinite alternate;
    opacity: 0.6;
}

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

/* ===== RESPONSIVE OPTIMIZADO ===== */

/* Tablet (≤1024px) */
@media (max-width: 1024px) {
    .hero {
        padding: 8rem 0 4rem;
    }
    
    .hero .container {
        grid-template-columns: 1fr;
        gap: var(--spacing-lg);
        text-align: center;
    }
    
    .hero-content {
        max-width: 100%;
        order: 1;
    }
    
    .hero-content h1 {
        font-size: 3rem;
    }
    
    .hero-subtitle {
        font-size: 1.15rem;
    }
    
    .hero-cta {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .hero-image {
        order: 2;
        max-width: 500px;
        margin: 0 auto;
    }
    
    .glow-effect {
        width: 70%;
        height: 70%;
        filter: blur(40px);
    }
}

/* Mobile (≤768px) */
@media (max-width: 768px) {
    .hero {
        padding: 4rem 0 2rem; /* Reducido de 6rem 0 3rem */
        min-height: 70vh; /* Asegurar altura mínima */
    }
    
    .hero .container {
        gap: var(--spacing-sm); /* Reducido de var(--spacing-md) */
        padding: 0 var(--spacing-sm); /* Añadir padding lateral */
    }
    
    .hero-content h1 {
        font-size: 2.2rem; /* Aumentado de 2.5rem para más impacto */
        line-height: 1.2; /* Mejorado de 1.3 */
        margin-bottom: var(--spacing-sm); /* Reducido */
    }
    
    .hero-subtitle {
        font-size: 1.05rem; /* Aumentado de 1.1rem */
        margin-bottom: var(--spacing-md); /* Aumentado */
        line-height: 1.4; /* Mejorado */
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-sm);
        margin-top: var(--spacing-md); /* Añadir margen superior */
    }
    
    .hero-cta .btn {
        width: 100%;
        max-width: 300px; /* Aumentado de 280px */
        padding: 0.9rem 1.5rem; /* Aumentado */
        font-size: 1rem; /* Aumentado de 0.95rem */
    }
    
    .hero-image {
        max-width: 350px; /* Reducido de 400px */
        margin-top: var(--spacing-md); /* Añadir margen superior */
    }
    
    .hero-image-container {
        border-radius: var(--border-radius-md);
    }
    
    .glow-effect {
        width: 50%; /* Reducido de 60% */
        height: 50%; /* Reducido de 60% */
        filter: blur(25px); /* Reducido de 30px */
        opacity: 0.3; /* Reducido de 0.4 */
    }
}

/* Mobile pequeño (≤480px) */
@media (max-width: 480px) {
    .hero {
        padding: 3rem 0 1.5rem; /* Reducido de 4rem 0 2rem */
        min-height: 65vh; /* Añadir altura mínima */
    }
    
    .hero-content h1 {
        font-size: 1.8rem; /* Aumentado de 2rem para más impacto */
        line-height: 1.2; /* Mejorado de 1.4 */
        margin-bottom: var(--spacing-xs); /* Añadir margen inferior */
    }
    
    .hero-subtitle {
        font-size: 1rem; /* Mantenido */
        line-height: 1.4; /* Mejorado de 1.5 */
        margin-bottom: var(--spacing-sm); /* Añadir margen inferior */
    }
    
    .hero-cta {
        margin-top: var(--spacing-sm); /* Añadir margen superior */
    }
    
    .hero-cta .btn {
        padding: 0.8rem 1.2rem; /* Aumentado de 0.7rem 1.2rem */
        font-size: 0.98rem; /* Aumentado de 0.95rem */
    }
    
    .hero-image {
        max-width: 280px; /* Reducido de 320px */
        margin-top: var(--spacing-sm); /* Añadir margen superior */
    }
    
    .hero-image-container {
        border-radius: var(--border-radius-sm);
    }
    
    .glow-effect {
        width: 40%; /* Reducido de 50% */
        height: 40%; /* Reducido de 50% */
        filter: blur(15px); /* Reducido de 20px */
        opacity: 0.2; /* Reducido de 0.3 */
    }
}

/* ===== OPTIMIZACIONES ESPECÍFICAS PARA RESPONSIVE ===== */

/* Eliminar elementos innecesarios en responsive para dar más protagonismo al mensaje */
@media (max-width: 768px) {
    /* Ocultar elementos que puedan estar causando franjas innecesarias */
    .hero::before,
    .hero::after {
        display: none !important;
    }
    
    /* Optimizar el contenedor del hero */
    .hero .container {
        max-width: 100%;
        margin: 0 auto;
    }
    
    /* Asegurar que no hay elementos flotantes */
    .hero * {
        box-sizing: border-box;
    }
}

/* Optimizar animaciones para dispositivos móviles */
@media (prefers-reduced-motion: reduce) {
    .hero-content h1 {
        animation: none;
    }
    
    .glow-effect {
        animation: none;
        opacity: 0.2;
    }
    
    .hero-image-container img {
        transition: none;
    }
}

/* Optimizar para pantallas de alta densidad */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .hero-image-container img {
        image-rendering: -webkit-optimize-contrast;
        image-rendering: crisp-edges;
    }
}

/* ===== MEJORAS DE ACCESIBILIDAD ===== */

/* Focus visible para botones del hero */
.hero-cta .btn:focus {
    outline: 2px solid var(--color-primary);
    outline-offset: 2px;
}

/* Mejor contraste para texto */
.hero-subtitle {
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* ===== OPTIMIZACIONES DE IMAGEN ===== */

/* Lazy loading y optimización */
.hero-image-container img {
    loading: lazy;
    decoding: async;
}

/* Fallback para imágenes que no cargan */
.hero-image-container img:not([src]) {
    background: linear-gradient(45deg, var(--color-card-bg), var(--color-border));
    min-height: 200px;
}

/* ===== ESTÁNDARES DE CALIDAD ===== */

/* Consistencia con el sistema de diseño */
.hero-content h1 {
    font-weight: var(--nx-font-weight-bold);
}

.hero-subtitle {
    font-weight: var(--nx-font-weight-normal);
}

.hero-cta .btn {
    font-weight: var(--nx-font-weight-medium);
}

/* Animaciones exclusivas del hero */
@keyframes glow {
    0% {
        text-shadow: 0 0 10px var(--color-primary-glow);
    }
    50% {
        text-shadow: 0 0 20px var(--color-secondary-glow), 0 0 30px var(--color-tertiary-glow);
    }
    100% {
        text-shadow: 0 0 10px var(--color-primary-glow);
    }
}

@keyframes pulse {
    0% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.8);
    }
    50% {
        opacity: 0.6;
        transform: translate(-50%, -50%) scale(1);
    }
    100% {
        opacity: 0.4;
        transform: translate(-50%, -50%) scale(0.8);
    }
}
