/* ============================================================
   styles/hero.css
   ============================================================ */

/* ── Section ───────────────────────────────────────────────── */
.hero {
    position: relative;
    width: 100%;
    overflow: hidden;
    background: #1a0800;
    height: clamp(380px, 92vw, 580px);
}

/* ── Background ────────────────────────────────────────────── */
/* .hero__bg itself is now styled in hero-bg.css (as a child of
   .hero__bg-layer, inside the sliding .hero__bg-stack track) —
   see styles/hero-bg.css. */

/* Note: this used to darken the single full-bleed hero image for text
   legibility. .hero__bg-viewport (styles/hero-bg.css) now sits above
   it at z-index:2, so this scrim is fully covered and has no visible
   effect — the backdrop darkens itself instead (its own blur/brightness
   filter), and the card is meant to stay at true brightness. Left in
   place rather than deleted in case it's ever needed for a state that
   doesn't fully cover the hero. */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom,
        rgba(0,0,0,0.10) 0%,
        rgba(0,0,0,0.05) 40%,
        rgba(0,0,0,0.55) 100%);
    z-index: 1;
    pointer-events: none;
}

/* ── Carousel wrapper ──────────────────────────────────────── */
.hero__carousel {
    position: relative;
    z-index: 2;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* ── Slides viewport ───────────────────────────────────────── */
.hero__slides-wrap {
    flex: 1;
    overflow: hidden;
    position: relative;
    /* CRITICAL: force LTR so translateX works correctly even on RTL page */
    direction: ltr;
}

.hero__slides {
    display: flex;
    width: 400%;
    height: 100%;
    transition: transform 0.65s cubic-bezier(0.77, 0, 0.18, 1);
    will-change: transform;
    /* LTR so slides go left→right and translateX(-25%) works */
    direction: ltr;
}

.hero__slide {
    width: 25%;
    height: 100%;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: clamp(12px, 3vw, 20px);
    gap: clamp(6px, 2vw, 12px);
    /* content inside slide is RTL */
    direction: rtl;
}

/* ── Slide text ────────────────────────────────────────────── */
.hero__slide-text {
    text-align: center;
    direction: rtl;
}

.hero__slide-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: clamp(26px, 6vw, 34px);
    height: clamp(26px, 6vw, 34px);
    border-radius: 50%;
    background: #FF5C00;
    color: #fff;
    font-size: clamp(0.7rem, 2.5vw, 0.95rem);
    font-weight: 900;
    margin-bottom: 4px;
    box-shadow: 0 2px 12px rgba(255,92,0,0.5);
}

.hero__slide-title {
    font-size: clamp(1.1rem, 5vw, 1.7rem);
    font-weight: 900;
    color: #fff;
    text-shadow: 0 2px 14px rgba(0,0,0,0.6);
    line-height: 1.2;
    margin-bottom: 2px;
}

.hero__slide-sub {
    font-size: clamp(0.62rem, 2.5vw, 0.82rem);
    color: rgba(255,255,255,0.88);
    font-weight: 600;
    text-shadow: 0 1px 6px rgba(0,0,0,0.5);
    line-height: 1.4;
    padding: 0 8px;
}

/* ── Phone image ───────────────────────────────────────────── */
.hero__phone {
    height: clamp(170px, 48vw, 300px);
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 8px 28px rgba(0,0,0,0.5));
    display: block;
}

/* ── Step bar — hidden, navigation via auto-play only ──────── */
.hero__stepbar {
    display: none;
}

.hero__step-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 8px 2px;
    gap: 3px;
    cursor: pointer;
    border: none;
    background: none;
    border-top: 2.5px solid transparent;
    transition: background 0.3s, border-color 0.3s;
    font-family: inherit;
}

.hero__step-btn.active {
    background: rgba(255,92,0,0.22);
    border-top-color: #FF5C00;
}

.hero__step-btn-num {
    width: clamp(17px, 4.5vw, 22px);
    height: clamp(17px, 4.5vw, 22px);
    border-radius: 50%;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.45);
    font-size: clamp(0.5rem, 2vw, 0.62rem);
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.3s, color 0.3s;
}

.hero__step-btn.active .hero__step-btn-num {
    background: #FF5C00;
    color: #fff;
}

.hero__step-btn-label {
    font-size: clamp(0.48rem, 2vw, 0.62rem);
    font-weight: 700;
    color: rgba(255,255,255,0.4);
    direction: rtl;
    white-space: nowrap;
    transition: color 0.3s;
}

.hero__step-btn.active .hero__step-btn-label {
    color: #fff;
}

/* ── Progress bar ──────────────────────────────────────────── */
/* Animated via transform: scaleX() instead of width — width is a layout
   property, so animating it every ~3.4s (for as long as someone stays on
   the homepage) was firing a continuous stream of tiny layout shifts and
   inflating CLS. transform is compositor-only, so this is visually
   identical but layout-shift-free. */
.hero__progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    width: 100%;
    transform: scaleX(0);
    transform-origin: left;
    background: #FF5C00;
    z-index: 11;
    border-radius: 0 2px 2px 0;
}

/* ══════════════════════════════════════════════════════════
   DESKTOP ≥900px
   All 4 phones shown side-by-side, active one floats/glows
══════════════════════════════════════════════════════════ */
@media (min-width: 900px) {

    .hero {
        height: clamp(460px, 52vw, 780px);
    }

    /* hide mobile-only chrome */
    .hero__stepbar,
    .hero__progress { display: none; }

    /* unlock the clipping */
    .hero__slides-wrap {
        overflow: visible;
        direction: ltr;
    }

    /* override: show all 4 phones in a row, no sliding */
    .hero__slides {
        width: 100%;
        height: 100%;
        transform: none !important;
        transition: none !important;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        gap: clamp(12px, 2.5vw, 36px);
        padding: 0 clamp(24px, 5vw, 80px) clamp(24px, 4vw, 50px);
    }

    .hero__slide {
        width: auto;
        flex: 1;
        max-width: 200px;
        justify-content: flex-end;
        /* each phone floats at a different speed */
        animation: phoneFloat 4s ease-in-out infinite;
    }

    /* stagger the float animation so they don't all move together */
    .hero__slide:nth-child(1) { animation-delay: 0s;    animation-duration: 4.0s; }
    .hero__slide:nth-child(2) { animation-delay: 0.6s;  animation-duration: 3.6s; }
    .hero__slide:nth-child(3) { animation-delay: 1.1s;  animation-duration: 4.2s; }
    .hero__slide:nth-child(4) { animation-delay: 0.3s;  animation-duration: 3.8s; }

    /* stagger heights for depth */
    .hero__slide:nth-child(1) .hero__phone { height: clamp(160px, 17vw, 270px); }
    .hero__slide:nth-child(2) .hero__phone { height: clamp(200px, 23vw, 370px); }
    .hero__slide:nth-child(3) .hero__phone { height: clamp(180px, 20vw, 320px); }
    .hero__slide:nth-child(4) .hero__phone { height: clamp(168px, 18vw, 290px); }

    /* glow on the tallest phone */
    .hero__slide:nth-child(2) .hero__phone {
        filter: drop-shadow(0 0 28px rgba(255,92,0,0.55))
                drop-shadow(0 8px 24px rgba(0,0,0,0.5));
    }
}



/* ── Online counter widget ─────────────────────────────────── */
.hero__online {
    position: absolute;
    top: clamp(10px, 2.5vw, 16px);
    right: clamp(10px, 2.5vw, 16px);
    z-index: 4;
    display: flex;
    align-items: center;
    gap: 5px;
    background: rgba(0, 0, 0, 0.45);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 999px;
    padding: 5px 11px 5px 8px;
    cursor: default;
    user-select: none;
    transition: background 0.3s;
}

.hero__online:hover {
    background: rgba(0, 0, 0, 0.62);
}

/* ── Social links — vertical stack, top-left of hero ────────
   Links are left as href="#" placeholders — fill in the real
   profile/channel URLs later.                                */
.hero__social {
    position: absolute;
    top: clamp(10px, 2.5vw, 16px);
    left: clamp(10px, 2.5vw, 16px);
    z-index: 4;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.hero__social-btn {
    width: clamp(32px, 8vw, 38px);
    height: clamp(32px, 8vw, 38px);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255, 255, 255, 0.25);
    color: #fff;
    box-shadow: 0 2px 10px rgba(0,0,0,0.25);
    transition: filter 0.2s, transform 0.15s;
    -webkit-tap-highlight-color: transparent;
}
.hero__social-btn svg { width: 54%; height: 54%; flex-shrink: 0; }
.hero__social-btn:hover  { transform: translateY(-2px) scale(1.06); filter: brightness(1.12); }
.hero__social-btn:active { transform: scale(0.94); }
.hero__social-btn--whatsapp   { background: #25D366; }
.hero__social-btn--facebook   { background: #1877F2; }
.hero__social-btn--instagram  { background: linear-gradient(45deg, #f09433, #e6683c, #dc2743, #cc2366, #bc1888); border-color: transparent; }
.hero__social-btn--tiktok     { background: #010101; border-color: #25F4EE; }

/* Green pulsing dot */
.online-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
    flex-shrink: 0;
    box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.7);
    animation: onlinePing 1.8s ease-in-out infinite;
}

.online-dot.pulse {
    animation: none;
    background: #4ade80;
}

@keyframes onlinePing {
    0%   { box-shadow: 0 0 0 0   rgba(34,197,94,0.7); }
    70%  { box-shadow: 0 0 0 7px rgba(34,197,94,0);   }
    100% { box-shadow: 0 0 0 0   rgba(34,197,94,0);   }
}

/* Count number */
.online-num {
    font-size: clamp(0.72rem, 2vw, 0.88rem);
    font-weight: 900;
    color: #fff;
    line-height: 1;
    min-width: 14px;
    text-align: center;
    transition: transform 0.18s ease, opacity 0.18s ease;
}

/* Label */
.online-lbl {
    font-size: clamp(0.48rem, 1.4vw, 0.6rem);
    font-weight: 600;
    color: rgba(255,255,255,0.75);
    letter-spacing: 0.02em;
    white-space: nowrap;
}

/* ── Bottom badges strip ───────────────────────────────────── */
.hero__badges {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 3;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: clamp(10px, 2.5vw, 16px) clamp(20px, 6vw, 48px);
    background: linear-gradient(to top, rgba(0,0,0,0.55) 0%, transparent 100%);
    direction: rtl;
}

.hero__badge {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    color: #fff;
    opacity: 0.92;
    transition: opacity 0.2s, transform 0.2s;
}

.hero__badge:hover {
    opacity: 1;
    transform: translateY(-2px);
}

.hero__badge svg {
    width: clamp(18px, 4.5vw, 26px);
    height: clamp(18px, 4.5vw, 26px);
    stroke: #fff;
    filter: drop-shadow(0 1px 4px rgba(0,0,0,0.4));
}

.hero__badge span {
    font-size: clamp(0.52rem, 1.8vw, 0.72rem);
    font-weight: 700;
    white-space: nowrap;
    text-shadow: 0 1px 6px rgba(0,0,0,0.6);
    letter-spacing: 0.01em;
}

@media (min-width: 900px) {
    .hero__badges {
        gap: clamp(32px, 5vw, 64px);
        padding: clamp(14px, 2vw, 22px) clamp(40px, 8vw, 100px);
    }
    .hero__badge svg {
        width: clamp(22px, 2.5vw, 30px);
        height: clamp(22px, 2.5vw, 30px);
    }
    .hero__badge span {
        font-size: clamp(0.65rem, 1vw, 0.82rem);
    }
}

/* float keyframe */
@keyframes phoneFloat {
    0%,  100% { transform: translateY(0px);  }
    50%        { transform: translateY(-14px); }
}