/* ====================================================================
   ADDITIONAL STYLES for v3 — Hero Stats, API Badge, FAQ Grid, 
   Scroll Reveal, Features Grid 6, Arabic RTL
====================================================================
*/

/* --- Hero Stats --- */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 30px;
    border-top: 1px solid var(--border-light);
}

.hero-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
}

.hero-stat strong {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-600);
    letter-spacing: -0.03em;
}

.hero-stat span {
    font-size: 0.8rem;
    color: var(--text-secondary);
    font-weight: 600;
}

.hero-stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-light);
}

/* Features Grid 6 → now 8 cards = 4 columns */
.features-grid-6 {
    grid-template-columns: repeat(4, 1fr);
}

/* Icon box extra colors */
.icon-box.red {
    background-color: var(--danger-light);
    color: var(--danger-main);
}

.icon-box.teal {
    background-color: #ccfbf1;
    color: #0d9488;
}

.icon-box.pink {
    background-color: #fce7f3;
    color: #db2777;
}

.icon-box.cyan {
    background-color: #cffafe;
    color: #0891b2;
}

/* --- API Trust Badge on Integration Cards --- */
.api-badge {
    font-size: 0.65rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--success-dark);
    background: var(--success-light);
    padding: 2px 8px;
    border-radius: 100px;
    margin-top: -5px;
}

/* --- API Trust Banner --- */
.api-trust-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, #f0fdf4 0%, #ecfdf5 100%);
    border: 1px solid #bbf7d0;
    border-radius: var(--radius-md);
    padding: 20px 28px;
    margin-top: 40px;
}

.api-trust-banner i {
    font-size: 2rem;
    color: var(--success-main);
    flex-shrink: 0;
}

.api-trust-banner p {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin: 0;
    max-width: none;
}

/* --- FAQ Grid (Inline in Landing Page) --- */
.faq-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    max-width: 1000px;
    margin: 0 auto;
}

.faq-grid .faq-item {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 14px;
    padding: 28px;
    transition: all 0.3s ease;
}

.faq-grid .faq-item:hover {
    border-color: var(--primary-200);
    box-shadow: var(--shadow-md);
    transform: translateY(-3px);
}

.faq-grid .faq-item h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.faq-grid .faq-item h3 i {
    color: var(--primary-500);
    font-size: 0.9rem;
}

.faq-grid .faq-item p {
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-secondary);
    margin-bottom: 0;
    max-width: none;
}

/* --- Language Switch Button --- */
.btn-lang {
    font-size: 0.9rem;
    padding: 8px 16px;
}

/* --- Scroll Reveal Animation --- */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* Stagger animations for grid items */
.features-grid .reveal-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.features-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.features-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.features-grid .reveal-on-scroll:nth-child(4) { transition-delay: 0.2s; }
.features-grid .reveal-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.features-grid .reveal-on-scroll:nth-child(6) { transition-delay: 0.3s; }

.integrations-wrapper .reveal-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.integrations-wrapper .reveal-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.integrations-wrapper .reveal-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.integrations-wrapper .reveal-on-scroll:nth-child(4) { transition-delay: 0.2s; }
.integrations-wrapper .reveal-on-scroll:nth-child(5) { transition-delay: 0.25s; }
.integrations-wrapper .reveal-on-scroll:nth-child(6) { transition-delay: 0.3s; }

.faq-grid .reveal-on-scroll:nth-child(odd) { transition-delay: 0.05s; }
.faq-grid .reveal-on-scroll:nth-child(even) { transition-delay: 0.15s; }

.pricing-grid .reveal-on-scroll:nth-child(1) { transition-delay: 0.05s; }
.pricing-grid .reveal-on-scroll:nth-child(2) { transition-delay: 0.1s; }
.pricing-grid .reveal-on-scroll:nth-child(3) { transition-delay: 0.15s; }
.pricing-grid .reveal-on-scroll:nth-child(4) { transition-delay: 0.2s; }

/* --- Responsive Adjustments for New Elements --- */
@media (max-width: 768px) {
    .hero-stats {
        justify-content: center;
        gap: 16px;
    }
    
    .hero-stat strong {
        font-size: 1.2rem;
    }
    
    .features-grid-6 {
        grid-template-columns: 1fr !important;
    }
    
    .faq-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
    
    .api-trust-banner {
        flex-direction: column;
        text-align: center;
        padding: 20px;
    }
}

@media (max-width: 1024px) {
    .features-grid-6 {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* =================================================================
   RTL SUPPORT (Arabic Version)
================================================================= */
html[dir="rtl"] {
    text-align: right;
}

html[dir="rtl"] body {
    direction: rtl;
}

html[dir="rtl"] .hero-container {
    flex-direction: row-reverse;
}

html[dir="rtl"] .split-layout {
    flex-direction: row-reverse;
}

html[dir="rtl"] .split-layout.reversed {
    flex-direction: row;
}

html[dir="rtl"] .nav-links {
    direction: rtl;
}

html[dir="rtl"] .btn-primary-arrow::after {
    content: '←';
    margin-left: 0;
    margin-right: 6px;
}

html[dir="rtl"] .btn-primary-arrow:hover::after {
    transform: translateX(-5px);
}

html[dir="rtl"] .footer-col a:hover {
    padding-left: 0;
    padding-right: 8px;
}

html[dir="rtl"] .footer-col a:hover::before {
    content: '‹';
    left: auto;
    right: 0;
}

html[dir="rtl"] .neural-sequencer {
    direction: rtl;
}

html[dir="rtl"] .ns-svg-paths {
    transform: scaleX(-1);
    transform-origin: center;
    left: auto !important;
    right: -80px !important;
}

html[dir="rtl"] .ns-column.start {
    align-items: flex-end;
    padding-right: 0;
    padding-left: 10px;
}

html[dir="rtl"] .ns-column.end {
    padding-left: 0;
    padding-right: 80px;
}

html[dir="rtl"] .ns-modules-stack {
    align-items: flex-start;
}

/* Fait avancer le carré actif dans le bon sens (vers la gauche) */
html[dir="rtl"] .ns-module.active {
    transform: translateX(-8px) !important;
}

/* Déplace le badge vert ("En stock", etc.) sur le bord gauche du module au lieu du droit */
html[dir="rtl"] .ns-result-pop {
    right: auto !important;
    left: 10px !important;
}

html[dir="rtl"] .ns-module.active .ns-result-pop {
    right: auto !important;
    left: -15px !important;
}

html[dir="rtl"] .neural-sequencer .ns-card,
html[dir="rtl"] .neural-sequencer .ns-badge,
html[dir="rtl"] .neural-sequencer .ns-module,
html[dir="rtl"] .neural-sequencer .ns-result-pop,
html[dir="rtl"] .neural-sequencer .studio-card {
    direction: rtl;
    text-align: right;
}

html[dir="rtl"] .studio-card:hover {
    transform: translateX(-5px);
}

html[dir="rtl"] .phone-mockup {
    transform: rotateY(-12deg) rotateX(5deg);
}

html[dir="rtl"] .phone-mockup:hover {
    transform: rotateY(0deg) rotateX(0deg) translateY(-15px);
}

/* AR logo: keep image to the left of text (visually) */
html[dir="rtl"] .logo {
    flex-direction: row-reverse;
}

/* Force nav links single line */
.nav-links a {
    white-space: nowrap;
}

/* Language toggle */
.lang-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--slate-100);
    border-radius: 100px;
    padding: 4px;
    cursor: pointer;
    border: 1px solid var(--border-light);
}

.lang-toggle a {
    padding: 6px 14px;
    border-radius: 100px;
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    text-decoration: none;
}

.lang-toggle a.active {
    background: #fff;
    color: var(--primary-600);
    box-shadow: var(--shadow-sm);
}

.lang-toggle a:hover:not(.active) {
    color: var(--text-main);
}

@media (max-width: 768px) {
    html[dir="rtl"] .hero-container {
        flex-direction: column !important;
    }
    
    html[dir="rtl"] .split-layout,
    html[dir="rtl"] .split-layout.reversed {
        flex-direction: column !important;
    }
}
