/**
 * RenderCore - Hero Section Styles
 * Hero section impactante para la página principal
 */

/* ============================================
   HERO SECTION CONTAINER
   ============================================ */

.hero-section {
    position: relative;
    width: 100%;
    min-height: 90vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    margin-top: 70px; /* Compensar header fijo */
    padding: 4rem 2rem 6rem 2rem; /* Más padding abajo para el botón */
    background: var(--bg-base);
}

/* ============================================
   FONDO ANIMADO
   ============================================ */

.hero-bg {
    position: absolute;
    inset: 0;
    z-index: 1;
    overflow: hidden;
}

.hero-bg .orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { 
        transform: translate(0, 0) scale(1); 
    }
    33% { 
        transform: translate(30px, -30px) scale(1.1); 
    }
    66% { 
        transform: translate(-20px, 20px) scale(0.9); 
    }
}

.orb-1 {
    width: 520px;
    height: 520px;
    left: -120px;
    top: -120px;
    background: radial-gradient(circle at 30% 30%, var(--primary-500), transparent 60%);
    animation-delay: 0s;
}

.orb-2 {
    width: 420px;
    height: 420px;
    right: -80px;
    top: 20%;
    background: radial-gradient(circle at 70% 30%, var(--primary-700), transparent 60%);
    animation-delay: 7s;
}

.orb-3 {
    width: 380px;
    height: 380px;
    left: 20%;
    bottom: -140px;
    background: radial-gradient(circle at 50% 50%, var(--primary-400), transparent 60%);
    animation-delay: 14s;
}

.hero-bg .grid {
    position: absolute;
    inset: 0;
    background-image: 
        linear-gradient(rgba(6, 182, 212, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(6, 182, 212, 0.03) 1px, transparent 1px);
    background-size: 28px 28px;
    mask-image: radial-gradient(ellipse at center, black 40%, transparent 70%);
}

.hero-bg .noise {
    position: absolute;
    inset: -50%;
    opacity: 0.03;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" width="160" height="160" viewBox="0 0 160 160"><filter id="n"><feTurbulence type="fractalNoise" baseFrequency="0.8" numOctaves="2" stitchTiles="stitch"/></filter><rect width="100%" height="100%" filter="url(%23n)" opacity="0.3"/></svg>');
    animation: noiseMove 8s steps(10) infinite;
}

@keyframes noiseMove {
    0%, 100% { transform: translate(0, 0); }
    10% { transform: translate(-5%, -10%); }
    20% { transform: translate(-15%, 5%); }
    30% { transform: translate(7%, -25%); }
    40% { transform: translate(-5%, 25%); }
    50% { transform: translate(-15%, 10%); }
    60% { transform: translate(15%, 0); }
    70% { transform: translate(0, 15%); }
    80% { transform: translate(3%, 25%); }
    90% { transform: translate(-10%, 10%); }
}

/* ============================================
   CONTENIDO DEL HERO
   ============================================ */

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    width: 100%;
    animation: fadeInUp 0.8s ease-out;
    margin-bottom: 3rem; /* Espacio para el botón de scroll */
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Título Principal */
.hero-title {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    font-weight: 900;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    min-height: 1.2em; /* Altura mínima para evitar movimiento */
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

.hero-title .typewriter-text {
    display: inline-block;
    min-width: 200px; /* Ancho mínimo para evitar saltos */
    text-align: center;
}

.hero-title .caret {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--primary-500);
    margin-left: 2px; /* Reducido de 8px a 2px para mejor sincronización */
    animation: blink 1s steps(1) infinite;
    vertical-align: middle;
    box-shadow: 0 0 10px var(--primary-500);
}

@keyframes blink {
    0%, 49% { opacity: 1; }
    50%, 100% { opacity: 0; }
}

/* Subtítulo */
.hero-subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.6;
}

/* ============================================
   BARRA DE BÚSQUEDA
   ============================================ */

.hero-search {
    max-width: 600px;
    margin: 0 auto 2.5rem;
    position: relative;
}

.hero-search-container {
    display: flex;
    align-items: center;
    background: var(--bg-elevated);
    border: 2px solid var(--border-base);
    border-radius: 50px;
    padding: 0.5rem;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-lg);
}

.hero-search-container:focus-within {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 4px rgba(6, 182, 212, 0.2), var(--glow-primary);
    background: var(--bg-tertiary);
}

.hero-search-input {
    flex: 1;
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-primary);
    font-size: 1rem;
    padding: 0.75rem 1.5rem;
    font-family: inherit;
}

.hero-search-input::placeholder {
    color: var(--text-tertiary);
}

.hero-search-btn {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gradient-primary);
    border: none;
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.hero-search-btn:hover {
    transform: scale(1.1);
    box-shadow: var(--glow-primary-hover);
}

.hero-search-btn:active {
    transform: scale(0.95);
}

/* ============================================
   BOTONES DE ACCIÓN (CTAs)
   ============================================ */

.hero-ctas {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-bottom: 3rem;
}

.hero-cta {
    padding: 1rem 2rem;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    position: relative;
    overflow: hidden;
}

.hero-cta-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: var(--glow-primary);
}

.hero-cta-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--glow-primary-hover);
}

.hero-cta-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border-color: var(--border-medium);
}

.hero-cta-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary-600);
    color: var(--primary-400);
    transform: translateY(-2px);
}

.hero-cta-tertiary {
    background: transparent;
    color: var(--text-secondary);
    border-color: var(--border-base);
}

.hero-cta-tertiary:hover {
    border-color: var(--primary-600);
    color: var(--primary-400);
    transform: translateY(-2px);
}

/* ============================================
   ESTADÍSTICAS RÁPIDAS
   ============================================ */

.hero-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 2rem;
    max-width: 900px;
    margin: 0 auto;
    padding: 2rem;
    background: rgba(26, 26, 26, 0.5);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid var(--border-base);
}

.hero-stat-item {
    text-align: center;
}

.hero-stat-number {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
    color: var(--primary-400);
    margin-bottom: 0.5rem;
    display: block;
    line-height: 1;
}

.hero-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ============================================
   BADGES DE CONFIANZA
   ============================================ */

.hero-badges {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 2rem;
    opacity: 0.8;
}

.hero-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.hero-badge i {
    color: var(--success-base);
    font-size: 1rem;
}

/* ============================================
   INDICADOR DE SCROLL
   ============================================ */

.hero-scroll-hint {
    position: absolute;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    z-index: 1; /* Reducir z-index para que no esté encima */
    transition: all 0.3s ease;
    animation: bounce 2s infinite;
    pointer-events: auto;
    opacity: 0.8;
    background: rgba(0, 0, 0, 0.3);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    backdrop-filter: blur(10px);
}

.hero-scroll-hint:hover {
    color: var(--primary-400);
}

.hero-scroll-hint i {
    font-size: 1.5rem;
}

.hero-scroll-hint span {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

@keyframes bounce {
    0%, 100% {
        transform: translateX(-50%) translateY(0);
    }
    50% {
        transform: translateX(-50%) translateY(-10px);
    }
}

/* ============================================
   AJUSTES PARA MAIN CONTENT
   ============================================ */

/* Cuando hay hero section, el main-content no necesita margin-top */
.hero-section + .main-content {
    margin-top: 0;
    padding-top: 3rem;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 768px) {
    .hero-section {
        min-height: 85vh;
        padding: 2rem 1rem;
    }

    .hero-title {
        font-size: 2rem;
        margin-bottom: 1rem;
    }

    .hero-subtitle {
        font-size: 0.95rem;
        margin-bottom: 2rem;
    }

    .hero-search {
        margin-bottom: 2rem;
    }

    .hero-ctas {
        flex-direction: column;
        align-items: stretch;
        margin-bottom: 2rem;
    }

    .hero-cta {
        width: 100%;
        justify-content: center;
    }

    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
        padding: 1.5rem;
    }

    .hero-stat-number {
        font-size: 1.75rem;
    }

    .hero-badges {
        flex-direction: column;
        gap: 0.75rem;
    }

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

@media (max-width: 480px) {
    .hero-section {
        min-height: 80vh;
    }

    .hero-stats {
        grid-template-columns: 1fr;
    }

    .hero-search-container {
        border-radius: 25px;
    }

    .hero-search-input {
        font-size: 0.9rem;
        padding: 0.6rem 1rem;
    }
}

