/* -------------------------------------------------------
   STYLE-AR.CSS
   Emerald Elite Theme + Ledger Stax Promo
   Version: Arabic (RTL)
   -------------------------------------------------------
*/

/* --- 1. CORE CONFIGURATION & VARIABLES --- */
:root {
    --emerald-deep: #013220;
    --emerald-rich: #024A32;
    --emerald-vibrant: #0A4D2E;
    --gold-prestige: #D4AF37;
    --gold-light: #F3E5AB;
    --text-light: #f0f0f0;
    --glass-border: rgba(212, 175, 55, 0.3);
    --stax-bg-dark: #013220;
    --stax-bg-light: #024A32;
    --stax-gold: #D4AF37;
    --stax-text-primary: #E5E7EB;
}

/* --- 2. GLOBAL SETTINGS (RTL) --- */
body {
    background-color: var(--emerald-deep);
    background-image: linear-gradient(180deg, #024A32 0%, #013220 100%);
    color: var(--text-light);
    font-family: 'Tajawal', sans-serif;
    overflow-x: hidden;
    min-height: 100vh;
    direction: rtl;
    text-align: right;
}

h1, h2, h3, h4, .font-heading {
    font-family: 'Tajawal', sans-serif;
    letter-spacing: 0;
}

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #013220; }
::-webkit-scrollbar-thumb { background: #D4AF37; border-radius: 3px; }

/* --- 3. SCROLL PROGRESS BAR --- */
#scroll-progress {
    position: fixed;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(to left, #D4AF37, #F3E5AB);
    transform-origin: right;
    transform: scaleX(0);
    z-index: 9999;
    transition: transform 0.1s linear;
}

/* --- 4. ANIMATIONS & TEXT EFFECTS --- */
.gold-text {
    background: linear-gradient(to left, #D4AF37, #F3E5AB, #D4AF37);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    background-size: 200% auto;
    animation: shine 4s linear infinite;
}
@keyframes shine { to { background-position: -200% center; } }

/* Scroll-triggered fade-in: starts hidden, revealed by JS adding .is-visible */
.fade-in-section {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.fade-in-section.is-visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered children animation */
.fade-in-section:nth-child(2) { transition-delay: 0.1s; }
.fade-in-section:nth-child(3) { transition-delay: 0.2s; }

/* --- 5. MAIN CONTAINER ARCHITECTURE --- */
.stax-wrapper {
    background: linear-gradient(145deg, rgba(10, 77, 46, 0.5), rgba(1, 50, 32, 0.75));
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1fr;
    margin-bottom: 3rem;
    transition: border-color 0.4s ease, transform 0.4s ease;
    position: relative;
}

@media (min-width: 1024px) {
    .stax-wrapper { grid-template-columns: 1fr 1fr; }
    .stax-wrapper.full-width { grid-template-columns: 1fr; }
    .stax-wrapper.reverse .stax-visual { order: 2; }
    .stax-wrapper.reverse .stax-text { order: 1; }
}

.stax-wrapper:hover {
    border-color: var(--gold-prestige);
    transform: translateY(-4px);
}

.stax-visual {
    background: radial-gradient(circle at center, rgba(2, 74, 50, 0.5) 0%, rgba(1, 50, 32, 0.9) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    position: relative;
    min-height: 320px;
}

.stax-text {
    padding: 3rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: right;
}

.stax-text h2 { font-size: 2.5rem; font-weight: 700; color: #fff; margin-bottom: 0.5rem; line-height: 1.1; }
.stax-text h3 { font-size: 1.25rem; font-weight: 600; color: var(--gold-prestige); margin-bottom: 1.5rem; }
.stax-text p { color: #e5e7eb; line-height: 1.8; margin-bottom: 1.5rem; font-size: 1.05rem; }

/* --- 6. LISTS --- */
.elite-list li {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.75rem;
    color: #e5e7eb;
}

/* --- 7. BUTTONS --- */
.btn-gold {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    color: #013220;
    font-weight: 800;
    padding: 1rem 2.5rem;
    border-radius: 0.5rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    border: 1px solid var(--gold-light);
    position: relative;
    overflow: hidden;
}
.btn-gold::after {
    content: '';
    position: absolute;
    top: 0; right: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to left, transparent, rgba(255,255,255,0.25), transparent);
    transition: right 0.5s ease;
}
.btn-gold:hover::after { right: 120%; }
.btn-gold:hover {
    background: linear-gradient(135deg, #F3E5AB 0%, #D4AF37 100%);
    transform: translateY(-2px);
}

.btn-outline-gold {
    background: transparent;
    border: 2px solid var(--gold-prestige);
    color: var(--gold-prestige);
    font-weight: 700;
    padding: 0.75rem 2rem;
    border-radius: 0.5rem;
    transition: all 0.3s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}
.btn-outline-gold:hover {
    background: rgba(212, 175, 55, 0.1);
    color: #fff;
    border-color: #fff;
}

/* --- 8. LINK CARDS --- */
.link-card {
    background: rgba(2, 74, 50, 0.4);
    padding: 1rem;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    transition: all 0.3s;
    border: 1px solid rgba(212, 175, 55, 0.1);
}
.link-card:hover {
    background: rgba(2, 74, 50, 0.8);
    border-color: var(--gold-prestige);
    transform: translateY(-3px);
}

/* --- 9. NAVIGATION --- */
.nav-glass {
    background: rgba(1, 50, 32, 0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(212, 175, 55, 0.15);
}

/* --- 10. PRICE DISPLAY --- */
.price-display {
    display: flex;
    align-items: baseline;
    justify-content: center;
    gap: 0.5rem;
    direction: ltr;
}

/* --- 11. TIER CARDS --- */
.tier-card {
    background: rgba(10, 20, 16, 0.6);
    border: 1px solid rgba(212, 175, 55, 0.1);
    border-radius: 0.75rem;
    padding: 1.75rem;
    display: flex;
    flex-direction: column;
    transition: all 0.3s ease;
}
.tier-card:hover { transform: translateY(-4px); border-color: rgba(212, 175, 55, 0.4); }
.tier-card-highlighted {
    background: rgba(212, 175, 55, 0.05);
    border-color: rgba(212, 175, 55, 0.5);
    transform: scale(1.02);
}

/* --- 12. BACKGROUND EFFECTS --- */
#background-effects {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: -1; pointer-events: none;
    will-change: transform;
}
.glow-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: float 10s infinite ease-in-out;
}
@keyframes float { 0%, 100% { transform: translate(0,0); } 50% { transform: translate(20px, -20px); } }

@media (max-width: 768px) {
    #background-effects { display: none; }
}

/* --- 13. LEDGER STAX PROMO SECTION (RTL) --- */
.stax-promo-section {
    font-family: 'Tajawal', sans-serif;
    background: linear-gradient(-140deg, var(--emerald-vibrant) 0%, var(--emerald-rich) 100%);
    color: var(--text-light);
    padding: 40px;
    margin: 40px auto;
    max-width: 900px;
    border-radius: 16px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    overflow: hidden;
}
.stax-container { display: flex; align-items: center; gap: 40px; flex-direction: row; }
.stax-image-area { flex: 1; }
.stax-video { width: 100%; height: auto; border-radius: 10px; display: block; border: 1px solid rgba(212, 175, 55, 0.3); }
.stax-content { flex: 1.5; text-align: right; }
.stax-content h2 { font-size: 32px; font-weight: 700; color: #fff; margin-top: 0; margin-bottom: 0; line-height: 1.2; }
.stax-gold-title { font-size: 22px; font-weight: 600; color: var(--gold-prestige); margin-top: 5px; margin-bottom: 20px; }
.stax-content p { font-size: 16px; line-height: 1.8; margin-bottom: 30px; color: #f0f0f0; text-align: right; }
.stax-cta-button {
    display: inline-block;
    background-color: var(--gold-prestige);
    color: var(--emerald-deep);
    padding: 14px 30px;
    font-size: 16px;
    font-weight: bold;
    text-decoration: none;
    border-radius: 8px;
    text-align: center;
    border: 2px solid var(--gold-prestige);
    transition: all 0.3s ease-in-out;
}
.stax-cta-button:hover { background-color: transparent; color: var(--gold-prestige); transform: translateY(-3px); }

@media (max-width: 768px) {
    .stax-container { flex-direction: column; }
    .stax-content { text-align: center; }
    .stax-content p { text-align: center; }
    .stax-promo-section { padding: 24px; }
}

/* --- 14. EXPERT BADGE --- */
.expert-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 0.375rem 1rem;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--gold-light);
}
.expert-badge .glow-dot {
    width: 8px; height: 8px;
    background-color: var(--gold-prestige);
    border-radius: 50%;
    animation: ping-glow 2s infinite;
}
@keyframes ping-glow {
    0%, 100% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.4); opacity: 1; }
}

/* --- 15. STATS / TRUST BAR --- */
.stats-bar {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1px;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 1rem;
    overflow: hidden;
}
.stat-item {
    background: rgba(1, 50, 32, 0.6);
    padding: 1.5rem 1rem;
    text-align: center;
}
.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: #fff;
    display: block;
    line-height: 1;
    direction: ltr;
}
.stat-label { font-size: 0.8rem; color: #9ca3af; margin-top: 0.4rem; display: block; }

/* --- 16. TESTIMONIALS --- */
.testimonial-card {
    background: rgba(2, 74, 50, 0.3);
    border: 1px solid rgba(212, 175, 55, 0.15);
    border-radius: 1rem;
    padding: 1.75rem;
    transition: border-color 0.3s;
}
.testimonial-card:hover { border-color: rgba(212, 175, 55, 0.4); }
.testimonial-stars { color: #D4AF37; font-size: 1rem; margin-bottom: 0.75rem; letter-spacing: 2px; }
.testimonial-text { color: #d1d5db; line-height: 1.8; font-size: 0.95rem; margin-bottom: 1rem; }
.testimonial-author { font-weight: 700; color: #fff; font-size: 0.875rem; }
.testimonial-role { color: #6b7280; font-size: 0.8rem; }

/* --- 17. FAQ --- */
.faq-item {
    border-bottom: 1px solid rgba(212, 175, 55, 0.1);
}
.faq-question {
    width: 100%;
    text-align: right;
    padding: 1.25rem 0;
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    background: none;
    border: none;
    font-family: 'Tajawal', sans-serif;
    gap: 1rem;
}
.faq-question:hover { color: var(--gold-prestige); }
.faq-icon {
    width: 24px; height: 24px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    shrink: 0;
    transition: transform 0.3s, border-color 0.3s;
    flex-shrink: 0;
    color: var(--gold-prestige);
    font-size: 1rem;
    line-height: 1;
}
.faq-item.open .faq-icon { transform: rotate(45deg); border-color: var(--gold-prestige); }
.faq-answer {
    color: #9ca3af;
    font-size: 0.95rem;
    line-height: 1.8;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, padding-bottom 0.3s;
}
.faq-item.open .faq-answer { max-height: 300px; padding-bottom: 1.25rem; }

/* --- 18. PRICING COMPARISON TABLE --- */
.pricing-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}
.pricing-table th {
    padding: 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(212, 175, 55, 0.2);
    color: #9ca3af;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}
.pricing-table th.featured { color: var(--gold-prestige); }
.pricing-table td {
    padding: 0.875rem 1rem;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: #d1d5db;
}
.pricing-table td:first-child { text-align: right; color: #9ca3af; }
.pricing-table tr:hover td { background: rgba(212, 175, 55, 0.03); }
.check-yes { color: #34d399; font-size: 1.1rem; }
.check-no { color: #4b5563; font-size: 1.1rem; }
.col-featured td { background: rgba(212, 175, 55, 0.04); }

/* --- 19. WHATSAPP FLOAT BUTTON --- */
.wa-float {
    position: fixed;
    bottom: 90px;
    left: 24px;
    width: 56px;
    height: 56px;
    background: #25D366;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    transition: transform 0.3s, box-shadow 0.3s;
    text-decoration: none;
}
.wa-float:hover { transform: scale(1.1); }
.wa-float svg { width: 28px; height: 28px; fill: #fff; }

/* --- 20. MOBILE STICKY CTA --- */
.mobile-sticky-cta {
    position: fixed;
    bottom: 0;
    left: 0; right: 0;
    z-index: 900;
    padding: 12px 16px;
    background: rgba(1, 50, 32, 0.97);
    border-top: 1px solid rgba(212, 175, 55, 0.3);
    display: none;
}
@media (max-width: 768px) {
    .mobile-sticky-cta { display: flex; gap: 10px; }
    .wa-float { bottom: 80px; }
}
.mobile-sticky-cta a {
    flex: 1;
    text-align: center;
    padding: 14px 8px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.875rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    font-family: 'Tajawal', sans-serif;
}
.mobile-sticky-primary {
    background: linear-gradient(135deg, #D4AF37 0%, #B8860B 100%);
    color: #013220;
    border: 1px solid var(--gold-light);
}
.mobile-sticky-secondary {
    background: transparent;
    color: var(--gold-prestige);
    border: 1px solid var(--gold-prestige);
}

/* --- 21. TRUST LOGO BAR --- */
.trust-bar {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    flex-wrap: wrap;
    padding: 1.5rem 0;
}
.trust-bar-label {
    font-size: 0.75rem;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    white-space: nowrap;
}
.trust-item {
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.75rem;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 4px;
    white-space: nowrap;
}

/* --- 22. COUNTER ANIMATION --- */
.counter-value { transition: all 0.1s; }
