/**
 * CeltaTV - Global Design System
 * Paleta de Colores Oficial (Inspirada en AstroPay)
 * =====================================================
 * Este archivo es la FUENTE DE VERDAD para todos los colores del proyecto.
 * Para cualquier componente nuevo, utilizar estas variables.
 */

:root {
    /* ========================================
       COLORES PRINCIPALES (PALETA ASTROPAY)
       ======================================== */

    /* Color Primario / Acento (Marca) 
       Uso: Botones principales, enlaces destacados, CTAs, iconos activos */
    --color-brand-primary: #13E8A4;

    /* Color de Fondo Principal (Oscuro)
       Uso: Fondo general del body, secciones oscuras, footers */
    --color-bg-main: #0B111B;

    /* Color de Texto Principal / Fondos Claros
       Uso: Títulos, texto sobre fondos oscuros, fondos de tarjetas */
    --color-text-primary: #FFFFFF;

    /* Color de Texto Secundario / Elementos Neutros
       Uso: Subtítulos, textos de apoyo, bordes sutiles, iconos inactivos */
    --color-text-secondary: #8E98A8;

    /* ========================================
       VARIABLES DERIVADAS
       ======================================== */

    /* Estados del color primario */
    --color-brand-primary-hover: #1AFFB4;
    --color-brand-primary-active: #0FD994;

    /* Transparencias del color primario */
    --color-brand-primary-glow: rgba(19, 232, 164, 0.3);
    --color-brand-primary-subtle: rgba(19, 232, 164, 0.1);
    --color-brand-primary-border: rgba(19, 232, 164, 0.2);

    /* Superficies */
    --color-surface: #111827;
    --color-surface-elevated: #1F2937;

    /* Bordes */
    --color-border-subtle: rgba(255, 255, 255, 0.05);
    --color-border-default: rgba(255, 255, 255, 0.1);

    /* Estados de éxito/error (mantienen consistencia con primario) */
    --color-success: #13E8A4;
    --color-error: #EF4444;
    --color-warning: #F59E0B;
}

/* ========================================
   UTILIDADES CSS GLOBALES
   ======================================== */

/* Clase glass con nuevos colores */
.glass-global {
    background-color: rgba(17, 24, 39, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--color-brand-primary-border);
}

.glass-global:hover {
    border-color: rgba(19, 232, 164, 0.4);
    box-shadow: 0 0 40px var(--color-brand-primary-glow);
}

/* Text glow effect */
.text-glow-global {
    text-shadow: 0 0 25px rgba(19, 232, 164, 0.6);
}

/* Neon border effect */
.neon-border-global {
    box-shadow: 0 0 15px var(--color-brand-primary-glow),
        inset 0 0 10px var(--color-brand-primary-subtle);
}

/* Primary button style */
.btn-primary-global {
    background: linear-gradient(135deg, var(--color-brand-primary) 0%, rgba(19, 232, 164, 0.7) 100%);
    color: var(--color-bg-main);
    font-weight: 700;
    transition: all 0.3s ease;
}

.btn-primary-global:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--color-brand-primary-glow);
}

/* ========================================
   AURORA BACKGROUND ANIMATIONS
   ======================================== */

.aurora-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
    background: var(--color-bg-main);
    pointer-events: none;
}

.aurora-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: aurora-move 20s infinite alternate;
}

.aurora-orb:nth-child(1) {
    top: -10%;
    left: -10%;
    width: 50vw;
    height: 50vw;
    background: radial-gradient(circle, var(--color-brand-primary-20), transparent 70%);
    animation-duration: 25s;
}

.aurora-orb:nth-child(2) {
    bottom: -10%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(19, 232, 164, 0.15), transparent 70%);
    animation-duration: 30s;
    animation-delay: -5s;
}

.aurora-orb:nth-child(3) {
    top: 40%;
    left: 40%;
    width: 40vw;
    height: 40vw;
    background: radial-gradient(circle, rgba(11, 17, 27, 0.8), transparent 70%);
    mix-blend-mode: overlay;
    animation-duration: 20s;
    animation-delay: -10s;
}

@keyframes aurora-move {
    0% {
        transform: translate(0, 0) scale(1);
    }

    100% {
        transform: translate(10%, 10%) scale(1.1);
    }
}

/* ========================================
   SCROLL REVEAL ANIMATIONS
   ======================================== */

.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Stagger Delays */
.delay-100 {
    transition-delay: 100ms;
}

.delay-200 {
    transition-delay: 200ms;
}

.delay-300 {
    transition-delay: 300ms;
}

.delay-400 {
    transition-delay: 400ms;
}

.delay-500 {
    transition-delay: 500ms;
}

/* Adaptive Carousel Styles */
.promo-banner-carousel {
    height: auto !important;
    min-height: 0 !important;
}

.carousel-track {
    display: flex;
    align-items: flex-start;
    transition: transform 0.5s ease-in-out;
    height: auto;
}

.promo-slide {
    flex: 0 0 100%;
    position: relative;
    height: auto;
    width: 100%;
}

.promo-slide img {
    width: 100%;
    height: auto;
    object-fit: contain;
    display: block;
    /* Remove bottom space */
}

/* Ensure empty state has height */
.promo-banner-carousel:empty {
    min-height: 200px;
}

/* ========================================
   1. STICKY NAVIGATION REINFORCEMENT
   ======================================== */

/* Ensure navbar stays above all content */
#navbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 9999 !important;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

/* Add shadow when scrolled */
#navbar.scrolled {
    box-shadow: 0 4px 30px rgba(19, 232, 164, 0.15);
}

/* ========================================
   2. SLIDE-IN-RIGHT ANIMATION (On-Scroll)
   ======================================== */

/* Slide-In-Right reveal animation */
.reveal-slide-right {
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.reveal-slide-right.is-visible {
    opacity: 1;
    transform: translateX(0);
}



/* ========================================
   4. SIEMPRE TEXT GLOW EFFECT
   ======================================== */

/* Glow effect for SIEMPRE brand text (uppercase instances) */
.siempre-brand-glow {
    text-shadow:
        0 0 10px rgba(19, 232, 164, 0.4),
        0 0 20px rgba(19, 232, 164, 0.25),
        0 0 30px rgba(19, 232, 164, 0.15);
    color: var(--color-brand-primary, #13E8A4);
}

/* Alternative subtle glow using CSS filter for better legibility */
.siempre-subtle-glow {
    /* Breathing animation "Respiro" */
    animation: siempreGlowPulse 3s ease-in-out infinite;
    color: var(--color-brand-primary, #13E8A4);
}

/* ========================================
   5. FLOATING BRANDING LOGO
   ======================================== */

.floating-logo-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9998;
    /* High enough but below sticky nav (9999) if needed */
    pointer-events: none;
    /* Let clicks pass through if just visual, but we might want hover */
    pointer-events: auto;
    transition: all 0.3s ease;
}

.floating-logo-img {
    width: 100px;
    /* Approx 3cm */
    height: auto;
    /* Black and white aesthetic */
    filter: grayscale(100%) brightness(1.2) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    opacity: 0.4;
    /* 40% opacity */

    /* Subtle glow matched to background */

    /* Breathing animation */
    animation: floatingLogoBreathing 4s ease-in-out infinite;

    transition: all 0.4s ease;
}

/* ========================================
   6. BACK TO TOP BUTTON
   ======================================== */

.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    left: 2rem;
    z-index: 9998;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;

    background: rgba(11, 17, 27, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(19, 232, 164, 0.3);
    border-radius: 12px;
    padding: 10px 14px;

    color: var(--color-brand-primary);
    text-decoration: none;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;

    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);

    /* Initially hidden, JS will toggle .show */
    opacity: 0;
    transform: translateY(20px);
    pointer-events: none;
}

.back-to-top-btn.show {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}

.back-to-top-btn:hover {
    background: rgba(19, 232, 164, 0.15);
    border-color: var(--color-brand-primary);
    transform: translateY(-5px);
    box-shadow: 0 0 20px rgba(19, 232, 164, 0.4);
    color: #fff;
}

.back-to-top-arrow {
    width: 20px;
    height: 20px;
    stroke-width: 2.5;
    transition: transform 0.3s ease;
}

.back-to-top-btn:hover .back-to-top-arrow {
    transform: translateY(-3px);
}

/* Mobile check */
@media (max-width: 640px) {
    .back-to-top-btn {
        bottom: 1rem;
        left: 1rem;
        padding: 8px 12px;
        font-size: 0.7rem;
    }
}

/* Breathing animation for logo */
@keyframes floatingLogoBreathing {

    0%,
    100% {
        opacity: 0.4;
        transform: scale(1);
        filter: grayscale(100%) brightness(1.2) drop-shadow(0 0 10px rgba(255, 255, 255, 0.2));
    }

    50% {
        opacity: 0.6;
        /* Slight increase */
        transform: scale(1.03);
        /* Subtle expansion */
        filter: grayscale(100%) brightness(1.2) drop-shadow(0 0 15px rgba(255, 255, 255, 0.4));
        /* Stronger glow */
    }

}

/* Hover effect */
.floating-logo-container:hover .floating-logo-img {
    filter: grayscale(0%) brightness(1) drop-shadow(0 0 15px rgba(19, 232, 164, 0.4));
    /* Restore color on hover */
    opacity: 1;
    /* Full opacity on hover */
    animation: none;
    /* Pause breathing on hover */
    /* Teal glow on hover */
    transform: scale(1.05);
}

/* Mobile check: Adjust size/position if needed */
@media (max-width: 640px) {
    .floating-logo-container {
        bottom: 1rem;
        right: 1rem;
    }

    .floating-logo-img {
        width: 80px;
    }
}

/* Animation for SIEMPRE glow pulse (subtle breathing effect) */
@keyframes siempreGlowPulse {

    0%,
    100% {
        text-shadow:
            0 0 10px rgba(19, 232, 164, 0.3),
            0 0 20px rgba(19, 232, 164, 0.2);
    }

    50% {
        text-shadow:
            0 0 15px rgba(19, 232, 164, 0.45),
            0 0 30px rgba(19, 232, 164, 0.3);
    }
}

.siempre-glow-animated {
    animation: siempreGlowPulse 3s ease-in-out infinite;
}

/* ========================================
   5. COVERAGE WIDGET SLIDE-IN-RIGHT ANIMATION
   ======================================== */

/* Target the coverage widget container for slide-in-right */
.cobertura-widget {
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

.cobertura-widget.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* ========================================
   6. "QUE ES SIEMPRE" IMAGE SLIDE-IN-RIGHT
   ======================================== */

/* Target the image in the "¿Qué es Siempre?" section */
#wrap-image {
    opacity: 0;
    transform: translateX(80px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
    will-change: opacity, transform;
}

#wrap-image.is-visible {
    opacity: 1;
    transform: translateX(0);
}