/* MEC IN HOME - ESTILOS COMUNES DE LANDING PAGES (landing.css)
   Cada página define su color con variables en su propio <style>:
   --lp-accent, --lp-cta-bg, --lp-cta-color, --lp-surface */

:root {
    --lp-accent: #FFD21E;
    --lp-cta-bg: linear-gradient(135deg, #FFD21E 0%, #F59E0B 100%);
    --lp-cta-color: #000;
    --lp-surface: rgba(10, 15, 29, 0.96);
}

html {
    scroll-behavior: smooth;
}

img {
    max-width: 100%;
    height: auto;
}

a:focus-visible,
button:focus-visible,
[role="button"]:focus-visible {
    outline: 2px solid var(--lp-accent);
    outline-offset: 3px;
}

/* --- FAQ accesible ------------------------------------------------------ */
.faq-question i {
    transition: transform 0.3s ease;
}

.faq-item.is-open {
    border-color: color-mix(in srgb, var(--lp-accent) 45%, transparent);
}

.faq-item.is-open .faq-question {
    color: var(--lp-accent);
}

.faq-item.is-open .faq-question i {
    transform: rotate(180deg);
}

.faq-answer[hidden] {
    display: none !important;
}

.faq-item.is-open .faq-answer {
    animation: lpFadeDown 0.3s ease;
}

@keyframes lpFadeDown {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- Aparición al hacer scroll ------------------------------------------ */
.reveal {
    opacity: 0;
    transform: translateY(26px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.is-visible {
    opacity: 1;
    transform: none;
}

/* --- Cuenta regresiva --------------------------------------------------- */
.lp-countdown {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-bottom: 22px;
}

.lp-countdown-label {
    font-size: 0.8rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    color: var(--lp-accent);
    margin-right: 4px;
}

.lp-countdown-unit {
    min-width: 62px;
    padding: 8px 6px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.12);
    text-align: center;
    line-height: 1.1;
}

.lp-countdown-unit b {
    display: block;
    font-size: 1.5rem;
    font-weight: 900;
    color: #fff;
    font-variant-numeric: tabular-nums;
}

.lp-countdown-unit small {
    font-size: 0.68rem;
    color: #94A3B8;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

[data-when-past] {
    display: none;
}

body.event-past [data-when-past] {
    display: block;
}

body.event-past [data-when-future] {
    display: none !important;
}

/* --- WhatsApp flotante -------------------------------------------------- */
.lp-wa-float {
    position: fixed;
    right: 20px;
    bottom: 22px;
    z-index: 150;
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    transition: bottom 0.35s ease;
}

.lp-wa-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25D366;
    color: #fff;
    font-size: 1.9rem;
    box-shadow: 0 8px 22px rgba(37, 211, 102, 0.45);
    transition: transform 0.25s ease;
}

.lp-wa-bubble {
    padding: 8px 14px;
    border-radius: 20px;
    background: #fff;
    color: #1f2d3d;
    font-size: 0.82rem;
    white-space: nowrap;
    box-shadow: 0 6px 18px rgba(0, 0, 0, 0.3);
    opacity: 0;
    transform: translateX(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
    pointer-events: none;
}

.lp-wa-bubble b {
    color: #128c4a;
}

.lp-wa-float:hover .lp-wa-icon,
.lp-wa-float:focus-visible .lp-wa-icon {
    transform: scale(1.08);
}

.lp-wa-float:hover .lp-wa-bubble,
.lp-wa-float:focus-visible .lp-wa-bubble {
    opacity: 1;
    transform: none;
}

/* --- Barra de compra fija (solo móvil) ---------------------------------- */
.lp-sticky-cta {
    display: none;
}

@media (max-width: 768px) {
    .lp-sticky-cta {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 140;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
        background: var(--lp-surface);
        border-top: 1px solid rgba(255, 255, 255, 0.12);
        box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.45);
        backdrop-filter: blur(12px);
        transform: translateY(110%);
        transition: transform 0.35s ease;
    }

    .lp-sticky-cta.is-visible {
        transform: translateY(0);
    }

    .lp-sticky-info {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
        min-width: 0;
    }

    .lp-sticky-info strong {
        font-size: 1.15rem;
        font-weight: 900;
        color: #fff;
    }

    .lp-sticky-info span {
        font-size: 0.72rem;
        color: #94A3B8;
    }

    .lp-sticky-btn {
        flex-shrink: 0;
        padding: 12px 18px;
        border-radius: 12px;
        background: var(--lp-cta-bg);
        color: var(--lp-cta-color);
        font-weight: 900;
        font-size: 0.9rem;
        text-decoration: none;
        white-space: nowrap;
    }

    .lp-wa-float {
        right: 14px;
        bottom: 16px;
    }

    .lp-wa-icon {
        width: 52px;
        height: 52px;
        font-size: 1.7rem;
    }

    .lp-wa-bubble {
        display: none;
    }

    body.lp-sticky-open .lp-wa-float {
        bottom: 88px;
    }

    body {
        padding-bottom: env(safe-area-inset-bottom);
    }

    .lp-countdown {
        justify-content: center;
    }

    .lp-countdown-label {
        width: 100%;
        text-align: center;
        margin: 0;
    }

    .lp-countdown-unit {
        min-width: 58px;
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* --- Espacio para el widget de chat "🤖 Chatbot" (abajo a la izquierda, chat.ya.onl) --- */
@media (max-width: 768px) {
    .lp-sticky-cta {
        padding-left: 184px;
        justify-content: flex-end;
    }
}

@media (max-width: 479px) {
    /* En pantallas angostas solo queda el botón, a la derecha del chat */
    .lp-sticky-info {
        display: none;
    }
}
