:root {
    --bg: #070d19;
    --bg-card: rgba(15, 23, 42, 0.72);
    --border: rgba(56, 189, 248, 0.16);
    --text: #f1f5f9;
    --text-muted: #94a3b8;
    --primary: #0ea5e9;
    --primary-bright: #38bdf8;
    --accent: #8b5cf6;
    --success: #10b981;
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
    font-family: 'Inter', 'Noto Sans Arabic', 'Noto Sans SC', 'Noto Sans JP', 'Noto Sans KR', 'Noto Sans Thai', 'Noto Sans Devanagari', system-ui, sans-serif;
    background: radial-gradient(circle at 20% 0%, #0f1f3d 0%, var(--bg) 52%);
    color: var(--text);
    line-height: 1.65;
    min-height: 100vh;
    overflow-x: hidden;
}
a { color: var(--primary-bright); text-decoration: none; }
a:hover { text-decoration: underline; }
img { max-width: 100%; height: auto; }
.container { width: 100%; max-width: 1220px; margin: 0 auto; padding: 0 1.25rem; }

/* Header & Nav (strict single-line no-wrap across all 25 languages) */
.site-header {
    position: sticky; top: 0; z-index: 90;
    background: rgba(7, 13, 25, 0.9);
    backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--border);
}
.nav-row {
    display: flex; align-items: center; justify-content: space-between;
    gap: 0.85rem; height: 64px; flex-wrap: nowrap;
}
.brand-link {
    display: inline-flex; align-items: center; gap: 0.55rem; white-space: nowrap; flex-shrink: 0;
    font-weight: 800; font-size: 1.05rem; color: #fff; text-decoration: none !important;
}
.brand-link img { width: 28px; height: 28px; border-radius: 7px; flex-shrink: 0; }
.nav-links {
    display: flex; align-items: center; gap: 1rem; flex-wrap: nowrap; white-space: nowrap;
}
.nav-links a {
    color: #cbd5e1; font-size: 0.88rem; font-weight: 600; text-decoration: none;
    white-space: nowrap; flex-shrink: 0; transition: color 0.18s;
}
.nav-links a:hover, .nav-links a.active { color: var(--primary-bright); }
.nav-actions { display: flex; align-items: center; gap: 0.5rem; flex-wrap: nowrap; flex-shrink: 0; }
.btn-header-cta {
    padding: 0.44rem 0.85rem !important; font-size: 0.82rem !important; white-space: nowrap; flex-shrink: 0;
}
.nav-burger {
    display: none; align-items: center; justify-content: center;
    background: rgba(15, 23, 42, 0.85); color: #e2e8f0; border: 1px solid var(--border);
    border-radius: 8px; width: 34px; height: 34px; font-size: 1.05rem; cursor: pointer; flex-shrink: 0;
}

.btn-primary {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: linear-gradient(135deg, var(--primary), #2563eb);
    color: #fff !important; font-weight: 700; font-size: 0.9rem;
    padding: 0.65rem 1.25rem; border-radius: 10px; border: none;
    text-decoration: none !important; box-shadow: 0 6px 20px rgba(14, 165, 233, 0.25);
    transition: transform 0.15s, box-shadow 0.15s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 26px rgba(14, 165, 233, 0.38); }
.btn-outline {
    display: inline-flex; align-items: center; gap: 0.45rem;
    background: rgba(15, 23, 42, 0.7); color: #e2e8f0 !important;
    border: 1px solid rgba(148, 163, 184, 0.3); font-weight: 600; font-size: 0.9rem;
    padding: 0.65rem 1.2rem; border-radius: 10px; text-decoration: none !important;
}
.btn-outline:hover { border-color: var(--primary-bright); color: var(--primary-bright) !important; }

/* Language Dropdown */
.lang-wrap { position: relative; }
.lang-btn {
    display: inline-flex; align-items: center; gap: 6px;
    background: rgba(15, 23, 42, 0.85); color: #e2e8f0;
    border: 1px solid var(--border); border-radius: 8px;
    padding: 0.42rem 0.75rem; font-size: 0.82rem; font-weight: 600; cursor: pointer;
}
.lang-menu {
    display: none; position: absolute; right: 0; top: calc(100% + 8px);
    width: 260px; max-height: 380px; overflow-y: auto;
    background: #0f172a; border: 1px solid rgba(56, 189, 248, 0.28);
    border-radius: 12px; padding: 0.45rem; box-shadow: 0 18px 40px rgba(0,0,0,0.55); z-index: 120;
}
.lang-menu.open { display: grid; grid-template-columns: 1fr; gap: 2px; }
.lang-opt {
    display: flex; align-items: center; gap: 8px; padding: 0.45rem 0.65rem;
    border-radius: 7px; color: #cbd5e1; font-size: 0.82rem; font-weight: 500;
}
.lang-opt:hover, .lang-opt.active { background: rgba(14, 165, 233, 0.16); color: #fff; text-decoration: none; }

/* Hero */
.hero-sec { padding: 3.5rem 0 2.5rem; }
.hero-grid { display: grid; grid-template-columns: 1.08fr 1fr; gap: 2.5rem; align-items: center; }
.hero-badge {
    display: inline-block; font-size: 0.72rem; font-weight: 800; letter-spacing: 0.08em;
    color: var(--primary-bright); background: rgba(14, 165, 233, 0.14);
    border: 1px solid rgba(56, 189, 248, 0.35); padding: 0.3rem 0.75rem; border-radius: 99px; margin-bottom: 1rem;
}
.hero-title { font-size: clamp(1.85rem, 3.6vw, 2.8rem); line-height: 1.18; font-weight: 800; margin-bottom: 1rem; }
.hero-sub { color: var(--text-muted); font-size: 1.02rem; margin-bottom: 1.5rem; }
.hero-ctas { display: flex; gap: 0.75rem; flex-wrap: wrap; }
.hero-media img {
    border-radius: 14px; border: 1px solid rgba(56, 189, 248, 0.28);
    box-shadow: 0 16px 50px rgba(14, 165, 233, 0.22); display: block;
}

/* Cards & Grids */
.section { padding: 3rem 0; }
.sec-head { text-align: center; max-width: 720px; margin: 0 auto 2.2rem; }
.sec-head h2 { font-size: clamp(1.45rem, 2.5vw, 2rem); font-weight: 800; margin-bottom: 0.55rem; }
.sec-head p { color: var(--text-muted); font-size: 0.96rem; }

.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.15rem; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.card {
    background: var(--bg-card); border: 1px solid var(--border);
    border-radius: 14px; padding: 1.35rem; display: flex; flex-direction: column;
    transition: border-color 0.2s, transform 0.2s;
}
.card:hover { border-color: rgba(56, 189, 248, 0.45); transform: translateY(-2px); }
.card-icon { font-size: 1.7rem; margin-bottom: 0.7rem; }
.card h3 { font-size: 1.08rem; font-weight: 700; margin-bottom: 0.45rem; color: #f8fafc; }
.card p { font-size: 0.88rem; color: var(--text-muted); flex: 1; margin-bottom: 0.9rem; }
.pillar-tag {
    display: inline-block; font-size: 0.72rem; font-weight: 700; color: var(--primary-bright);
    background: rgba(14, 165, 233, 0.12); padding: 0.2rem 0.55rem; border-radius: 6px; margin-bottom: 0.65rem;
}

/* Comparison Table */
.cmp-wrap { overflow-x: auto; border-radius: 14px; border: 1px solid var(--border); background: var(--bg-card); }
.cmp-table { width: 100%; border-collapse: collapse; min-width: 640px; }
.cmp-table th, .cmp-table td { padding: 1rem 1.15rem; border-bottom: 1px solid rgba(148, 163, 184, 0.12); text-align: left; vertical-align: top; }
.cmp-table th { background: rgba(14, 165, 233, 0.1); color: #fff; font-size: 0.92rem; }
.cmp-table td:last-child { color: #a7f3d0; font-weight: 500; }

/* Article View */
.breadcrumbs { display: flex; gap: 0.45rem; flex-wrap: wrap; font-size: 0.82rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.article-wrap { max-width: 840px; margin: 0 auto; }
.article-h1 { font-size: clamp(1.65rem, 3vw, 2.35rem); font-weight: 800; line-height: 1.25; margin-bottom: 0.85rem; }
.article-meta { display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.83rem; color: var(--text-muted); margin-bottom: 1.5rem; }
.article-cover { border-radius: 14px; border: 1px solid var(--border); margin-bottom: 1.75rem; width: 100%; }
.article-body { font-size: 1.02rem; color: #e2e8f0; }
.article-body h2 { font-size: 1.45rem; font-weight: 800; margin: 2rem 0 0.75rem; color: #fff; }
.article-body h3 { font-size: 1.18rem; font-weight: 700; margin: 1.4rem 0 0.5rem; color: var(--primary-bright); }
.article-body p { margin-bottom: 1rem; }
.article-body ul, .article-body ol { margin: 0 0 1.1rem 1.4rem; }
.article-body li { margin-bottom: 0.45rem; }
.article-body code { background: rgba(14, 165, 233, 0.14); color: #7dd3fc; padding: 0.12rem 0.4rem; border-radius: 5px; font-size: 0.9em; }
.article-body table { width: 100%; border-collapse: collapse; margin: 1.35rem 0; background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; display: block; overflow-x: auto; }
.article-body th, .article-body td { padding: 0.78rem 1rem; border-bottom: 1px solid rgba(148, 163, 184, 0.14); text-align: left; font-size: 0.92rem; }
.article-body th { background: rgba(14, 165, 233, 0.12); color: #fff; font-weight: 700; }
[dir="rtl"] .article-body th, [dir="rtl"] .article-body td { text-align: right; }

/* CTA Banner & FAQ */
.cta-box {
    background: linear-gradient(135deg, rgba(14, 165, 233, 0.18), rgba(139, 92, 246, 0.16));
    border: 1px solid rgba(56, 189, 248, 0.35); border-radius: 16px;
    padding: 2rem; text-align: center; margin: 2.5rem 0;
}
.cta-box h2, .cta-box h3 { font-size: 1.45rem; font-weight: 800; margin-bottom: 0.6rem; }
.cta-box p { color: #cbd5e1; max-width: 680px; margin: 0 auto 1.25rem; }
.faq-list { display: grid; gap: 0.85rem; margin-top: 1rem; }
.faq-item { background: var(--bg-card); border: 1px solid var(--border); border-radius: 12px; padding: 1rem 1.2rem; }
.faq-item h3 { font-size: 1rem; color: #fff; margin-bottom: 0.35rem; }
.faq-item p { font-size: 0.9rem; color: var(--text-muted); margin: 0; }

/* Footer */
.site-footer { border-top: 1px solid var(--border); padding: 2.5rem 0; margin-top: 3rem; color: var(--text-muted); font-size: 0.86rem; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2rem; }
.footer-grid h4 { color: #fff; margin-bottom: 0.7rem; font-size: 0.95rem; }
.footer-grid ul { list-style: none; display: grid; gap: 0.4rem; }

/* RTL Support (ar, fa) */
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .cmp-table th, [dir="rtl"] .cmp-table td { text-align: right; }
[dir="rtl"] .article-body ul, [dir="rtl"] .article-body ol { margin: 0 1.4rem 1.1rem 0; }

@media (max-width: 1024px) {
    .hero-grid, .grid-4, .grid-3, .footer-grid { grid-template-columns: 1fr; }
    .nav-burger { display: inline-flex; }
    .nav-links {
        display: none; position: absolute; top: 100%; left: 0; right: 0;
        background: #0b1324; border-bottom: 1px solid var(--border);
        padding: 0.85rem 1.25rem; flex-direction: column; align-items: flex-start; gap: 0.65rem;
        box-shadow: 0 14px 32px rgba(0, 0, 0, 0.55); z-index: 110;
    }
    .nav-links.mobile-open { display: flex; }
}
@media (max-width: 480px) {
    .container { padding: 0 0.85rem; }
    .brand-link { font-size: 0.94rem; gap: 0.4rem; }
    .brand-link img { width: 24px; height: 24px; }
    .lang-btn { padding: 0.34rem 0.52rem; font-size: 0.76rem; }
    .btn-header-cta { padding: 0.36rem 0.62rem !important; font-size: 0.76rem !important; }
}
