/* ============================================================
   Homepage Polish v13 — تصميم وتجربة محسّنة
   ============================================================ */

:root {
    --hp-header-offset: 115px;
    --primary-orange: var(--primary);
}

/* ── Alerts ── */
#custom-alert-container {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 11000;
    width: 90%;
    max-width: 400px;
}

/* ── Ticker ── */
.ticker-wrap {
    background: linear-gradient(90deg, #78350f, #b45309, #78350f);
    height: 32px;
}

.ticker-item {
    font-size: 0.8rem;
    font-weight: 700;
}

/* ── Nav scroll spy ── */
.nav-links .nav-link.active,
.sidebar-link.active {
    color: var(--primary) !important;
}

.sidebar-wa-btn {
    margin-top: auto;
    width: 100%;
    justify-content: center;
    margin-bottom: 8px;
}

.btn-nav-wa {
    white-space: nowrap;
}

/* ── Section system ── */
.hp-section {
    position: relative;
    z-index: 2;
}

.hp-section--alt {
    background: linear-gradient(180deg, rgba(255,255,255,.02) 0%, transparent 100%);
    border-top: 1px solid var(--glass-border);
    border-bottom: 1px solid var(--glass-border);
}

.section-eyebrow {
    display: inline-block;
    color: var(--primary);
    font-size: 0.8rem;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    margin-bottom: 0.75rem;
}

.section-header .section-subtitle {
    color: var(--text-gray);
    font-size: 1.05rem;
    max-width: 36rem;
    margin: 0 auto;
    line-height: 1.7;
}

.section-header.tiktok-style {
    margin-bottom: 2.5rem;
}

.hp-review-link {
    color: var(--primary);
    font-weight: 700;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.hp-review-link:hover {
    color: #fcd34d;
}

/* ── Hero stats ── */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 2rem;
    list-style: none;
    padding: 0;
}

.hero-stats li {
    background: rgba(255,255,255,.04);
    border: 1px solid var(--glass-border);
    border-radius: 14px;
    padding: 12px 10px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    transition: border-color .25s, transform .25s;
}

.hero-stats li:hover {
    border-color: rgba(245, 158, 11, .35);
    transform: translateY(-2px);
}

.hero-stats i {
    color: var(--primary);
    font-size: 1.1rem;
}

.hero-stats strong {
    font-size: 1rem;
    color: #fff;
    line-height: 1.2;
}

.hero-stats span {
    font-size: 0.7rem;
    color: var(--text-gray);
}

/* ── Scroll reveal ── */
.hp-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity .55s ease, transform .55s ease;
}

.hp-reveal.is-visible {
    opacity: 1;
    transform: none;
}

.hp-reveal-delay {
    transition-delay: .12s;
}

/* ── Package cards polish (desktop) ── */
.package-card-tiktok {
    background: linear-gradient(145deg, rgba(0,242,234,.04) 0%, rgba(255,0,80,.04) 100%);
}

.package-card-tiktok.popular {
    box-shadow: 0 12px 40px rgba(255, 0, 80, 0.2);
}

/* ── CTA banner ── */
.hp-cta {
    position: relative;
    z-index: 2;
    padding: 0 0 4rem;
}

.hp-cta-inner {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2.5rem 2rem;
    border-radius: 24px;
    border: 1px solid rgba(245, 158, 11, .25);
    background:
        radial-gradient(ellipse at 100% 0%, rgba(255,0,80,.12), transparent 50%),
        radial-gradient(ellipse at 0% 100%, rgba(0,242,234,.1), transparent 50%),
        rgba(18,18,18,.9);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    flex-wrap: wrap;
}

.hp-cta-text h2 {
    font-size: 1.75rem;
    margin: 0.35rem 0 0.5rem;
    font-weight: 900;
}

.hp-cta-text p {
    color: var(--text-gray);
    margin: 0;
}

.hp-cta-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.hp-cta-wa:hover {
    border-color: #25d366;
    color: #25d366;
}

/* ── Footer ── */
.hp-footer {
    background: #080808;
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

.hp-footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2rem;
    text-align: right;
    margin-bottom: 2rem;
}

.hp-footer-links h4,
.hp-footer-contact h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
    font-weight: 800;
}

.hp-footer-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.hp-footer-links a {
    color: var(--text-gray);
    font-size: 0.95rem;
    transition: color .2s;
}

.hp-footer-links a:hover {
    color: var(--primary);
}

.hp-footer-wa {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 18px;
    border-radius: 12px;
    background: rgba(37, 211, 102, .12);
    border: 1px solid rgba(37, 211, 102, .35);
    color: #25d366;
    font-weight: 700;
}

.hp-footer-wa:hover {
    background: rgba(37, 211, 102, .2);
}

.footer-tagline {
    color: var(--text-gray);
    margin: 1rem 0 0;
    max-width: 280px;
    line-height: 1.7;
}

.footer-copy {
    color: #555;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    text-align: center;
}

.footer-copy a {
    color: var(--primary);
}

.hp-legal-trust {
    padding: 1.75rem 0;
    background: linear-gradient(180deg, rgba(245, 144, 13, .06) 0%, transparent 100%);
    border-bottom: 1px solid var(--glass-border);
    position: relative;
    z-index: 2;
}

.hp-legal-info {
    text-align: center;
    max-width: 640px;
    margin: 0 auto;
}

.hp-footer .hp-legal-info {
    margin-bottom: 1.75rem;
    padding-bottom: 1.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, .06);
}

.hp-legal-trust .hp-legal-info {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.hp-legal-info__text {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    color: var(--text-gray);
    font-size: 0.95rem;
    line-height: 1.7;
    margin: 0 0 0.5rem;
    flex-wrap: wrap;
}

.hp-legal-info__text i {
    color: var(--primary);
    font-size: 1.25rem;
    flex-shrink: 0;
}

.hp-legal-info__detail {
    margin: 0;
    color: #aaa;
    font-size: 0.9rem;
}

.hp-legal-info__detail + .hp-legal-info__detail {
    margin-top: 0.25rem;
}

.hp-legal-info__detail strong {
    color: #fff;
    font-weight: 800;
    letter-spacing: 0.02em;
}

.review-card .stars {
    color: #ffd700;
    margin-bottom: 10px;
}

/* ── Tabs / FAQ / packages mobile labels ── */
.cat-tab--disabled {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}

.category-content--hidden {
    display: none;
}

.faq-question {
    width: 100%;
    background: transparent;
    border: none;
    color: inherit;
    font: inherit;
    cursor: pointer;
    text-align: right;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
}

.faq-question span {
    font-weight: 700;
    font-size: 1.1rem;
    color: #fff;
    flex: 1;
}

.btn-package-tiktok .btn-label-short {
    display: none;
}

.hero-image img[fetchpriority="high"] {
    width: 80%;
    object-fit: contain;
}

/* ── UX widgets: avoid clash with WhatsApp FAB ── */
.back-to-top {
    right: 24px;
    left: auto;
    bottom: 100px;
}

.scroll-progress {
    top: 32px;
    background: linear-gradient(90deg, var(--primary), #fcd34d);
    height: 2px;
}

/* ── Mobile ── */
@media (max-width: 768px) {
    :root {
        --hp-header-offset: 100px;
    }

    .falling-coins {
        display: none;
    }

    .background-glows .glow {
        opacity: 0.07;
    }

    .hero {
        min-height: auto;
        padding-top: 7.5rem;
        padding-bottom: 2rem;
    }

    .hero-stats {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    .hero-stats li {
        padding: 10px 8px;
    }

    .section-padding {
        padding: 3rem 0;
    }

    .section-header h2 {
        font-size: 1.65rem;
    }

    .hp-cta-inner {
        padding: 1.5rem 1.25rem;
        flex-direction: column;
        text-align: center;
    }

    .hp-cta-text h2 {
        font-size: 1.35rem;
    }

    .hp-cta-actions {
        width: 100%;
        flex-direction: column;
    }

    .hp-cta-actions .btn-lg {
        width: 100%;
        justify-content: center;
    }

    .hp-footer-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
        text-align: center;
    }

    .hp-footer-brand .footer-tagline {
        max-width: none;
        margin-inline: auto;
    }

    .hp-footer-links ul {
        align-items: center;
    }

    .packages-grid-tiktok {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 10px;
        padding: 1rem 6px 0.5rem;
    }

    .package-card-tiktok {
        padding: 14px 10px 12px;
        margin-top: 14px;
        border-radius: 18px;
    }

    .package-card-tiktok:hover {
        transform: translateY(-4px) scale(1.01);
    }

    .package-card-tiktok.popular {
        transform: none;
    }

    .popular-badge-tiktok {
        font-size: 0.62rem;
        padding: 4px 10px;
        top: -11px;
    }

    .discount-badge {
        top: 8px;
        right: 8px;
        font-size: 0.62rem;
        padding: 3px 8px;
    }

    .tiktok-coin-icon {
        width: 52px;
        height: 52px;
        margin: 0 auto 8px;
    }

    .coin-inner {
        font-size: 1.35rem;
    }

    .coins-number {
        font-size: 1.35rem;
    }

    .coins-label {
        font-size: 0.62rem;
        text-align: center;
        line-height: 1.3;
    }

    .package-price-tiktok {
        margin-bottom: 10px;
        padding: 8px 6px;
    }

    .price-number {
        font-size: 1.15rem;
    }

    .price-currency {
        font-size: 0.7rem;
    }

    .btn-package-tiktok {
        padding: 9px 8px;
        font-size: 0.72rem;
        border-radius: 12px;
    }

    .btn-package-tiktok .btn-label-full {
        display: none;
    }

    .btn-package-tiktok .btn-label-short {
        display: inline;
    }

    .tiktok-info-banner {
        flex-direction: column;
        text-align: center;
        padding: 14px;
        font-size: 0.85rem;
    }

    .back-to-top {
        right: 16px;
        bottom: 88px;
    }
}

@media (max-width: 360px) {
    .packages-grid-tiktok {
        gap: 8px;
    }

    .coins-number {
        font-size: 1.2rem;
    }
}

@media (min-width: 769px) and (max-width: 992px) {
    .packages-grid-tiktok {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 20px;
    }

    .hp-footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hp-reveal {
        opacity: 1;
        transform: none;
        transition: none;
    }
}
