/* ==========================================================
   JOEAI Sub-page shared styles — GCC-SMB Arabic-first edition
   Used by all service + industry + self-serve landing pages.
   Keeps each sub-page small (<600 lines) by centralizing
   layout + component styles here.
   ========================================================== */

/* Arabic-first fonts loaded via the page <head> (Tajawal + Cairo) */
@import url('https://fonts.googleapis.com/css2?family=Tajawal:wght@400;500;700;800;900&family=Cairo:wght@400;600;700;800;900&family=Inter:wght@400;500;600;700;800;900&display=swap');

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
    --bg: #060810;
    --bg2: #090b14;
    --bg-card: #0d1020;
    --bg-card2: #111428;
    --text: #e8ecff;
    --text-muted: rgba(232, 236, 255, 0.55);
    --text-subtle: rgba(232, 236, 255, 0.3);
    --cyan: #00e5ff;
    --cyan2: #00b8d4;
    --green: #00ff88;
    --purple: #8b5cf6;
    --border: rgba(0, 229, 255, 0.1);
    --border2: rgba(0, 229, 255, 0.06);
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-ar: 'Tajawal', 'Cairo', 'Inter', sans-serif;
    --glow-cyan: 0 0 30px rgba(0, 229, 255, 0.3), 0 0 60px rgba(0, 229, 255, 0.15);
    --glow-green: 0 0 30px rgba(0, 255, 136, 0.25), 0 0 60px rgba(0, 255, 136, 0.1);
    --nav-bg: rgba(6, 8, 16, 0.85);
}

[data-theme="light"] {
    --bg: #f0f4ff;
    --bg2: #e4eaf8;
    --bg-card: #ffffff;
    --bg-card2: #eef2ff;
    --text: #0d1020;
    --text-muted: rgba(13, 16, 32, 0.6);
    --text-subtle: rgba(13, 16, 32, 0.35);
    --cyan: #0077cc;
    --cyan2: #005fa3;
    --green: #009955;
    --purple: #6d3de0;
    --border: rgba(0, 119, 204, 0.18);
    --border2: rgba(0, 119, 204, 0.1);
    --nav-bg: rgba(240, 244, 255, 0.9);
}

html { scroll-behavior: smooth; -webkit-font-smoothing: antialiased; }

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; transition: color 0.2s; }
ul { list-style: none; }

/* ========== NAVIGATION ========== */
.sp-nav {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 100;
    background: var(--nav-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
}
.sp-nav-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 18px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.sp-logo {
    font-weight: 900;
    font-size: 20px;
    letter-spacing: -0.5px;
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sp-nav-links { display: flex; gap: 28px; align-items: center; }
.sp-nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted);
}
.sp-nav-links a:hover { color: var(--cyan); }
.sp-nav-cta {
    padding: 10px 18px;
    border-radius: 8px;
    background: var(--cyan);
    color: var(--bg) !important;
    font-weight: 700;
    font-size: 13px;
}
.sp-nav-cta:hover { box-shadow: var(--glow-cyan); transform: translateY(-1px); }

@media (max-width: 768px) {
    .sp-nav-inner { padding: 14px 20px; }
    .sp-nav-links { gap: 14px; }
    .sp-nav-links a:not(.sp-nav-cta) { display: none; }
}

/* ========== HERO ========== */
.sp-hero {
    position: relative;
    padding: 140px 32px 80px;
    overflow: hidden;
}
.sp-hero::before {
    content: "";
    position: absolute;
    top: -200px; right: -200px;
    width: 600px; height: 600px;
    background: radial-gradient(circle, rgba(0, 229, 255, 0.15), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.sp-hero::after {
    content: "";
    position: absolute;
    bottom: -300px; left: -200px;
    width: 700px; height: 700px;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.12), transparent 70%);
    pointer-events: none;
    z-index: 0;
}
.sp-hero-inner {
    max-width: 1000px;
    margin: 0 auto;
    position: relative;
    z-index: 1;
}
.sp-crumb {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 14px;
    background: rgba(0, 229, 255, 0.08);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--cyan);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 24px;
}
.sp-crumb a { color: var(--text-muted); }
.sp-crumb a:hover { color: var(--cyan); }
.sp-hero h1 {
    font-size: clamp(36px, 5vw, 60px);
    line-height: 1.1;
    font-weight: 900;
    letter-spacing: -1.5px;
    margin-bottom: 24px;
}
.sp-hero h1 .accent {
    background: linear-gradient(135deg, var(--cyan), var(--purple));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.sp-hero-sub {
    font-size: 18px;
    color: var(--text-muted);
    max-width: 700px;
    margin-bottom: 32px;
    line-height: 1.6;
}
.sp-hero-ctas {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 40px;
}
.sp-btn-primary {
    padding: 14px 28px;
    background: var(--cyan);
    color: var(--bg) !important;
    border-radius: 10px;
    font-weight: 700;
    font-size: 15px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s;
}
.sp-btn-primary:hover { box-shadow: var(--glow-cyan); transform: translateY(-2px); }
.sp-btn-ghost {
    padding: 14px 28px;
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border);
    border-radius: 10px;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.2s;
}
.sp-btn-ghost:hover { border-color: var(--cyan); color: var(--cyan); }

/* Hero stat chips */
.sp-chips {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 20px;
}
.sp-chip {
    padding: 12px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 10px;
}
.sp-chip-num {
    font-size: 20px;
    font-weight: 800;
    color: var(--cyan);
    line-height: 1;
}
.sp-chip-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* ========== SECTIONS ========== */
.sp-sec {
    padding: 80px 32px;
    position: relative;
}
.sp-sec-inner {
    max-width: 1100px;
    margin: 0 auto;
}
.sp-sec-label {
    display: inline-block;
    font-size: 12px;
    font-weight: 700;
    color: var(--cyan);
    letter-spacing: 1.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.sp-sec-title {
    font-size: clamp(28px, 4vw, 42px);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -1px;
    margin-bottom: 18px;
}
.sp-sec-sub {
    font-size: 17px;
    color: var(--text-muted);
    max-width: 720px;
    margin-bottom: 48px;
}

/* What's included grid */
.sp-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
}
.sp-feature {
    padding: 24px 22px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 14px;
    transition: all 0.2s;
}
.sp-feature:hover { border-color: rgba(0, 229, 255, 0.3); transform: translateY(-2px); }
.sp-feature-icon {
    width: 40px; height: 40px;
    background: rgba(0, 229, 255, 0.1);
    border: 1px solid rgba(0, 229, 255, 0.2);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 14px;
    color: var(--cyan);
}
.sp-feature h3 {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
.sp-feature p {
    font-size: 14px;
    color: var(--text-muted);
    line-height: 1.55;
}

/* Pricing tiers */
.sp-pricing {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 24px;
}
.sp-tier {
    padding: 32px 28px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    position: relative;
    transition: all 0.2s;
}
.sp-tier.featured {
    border-color: var(--cyan);
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.05), var(--bg-card));
    box-shadow: 0 0 40px rgba(0, 229, 255, 0.1);
}
.sp-tier-badge {
    position: absolute;
    top: -12px; left: 50%;
    transform: translateX(-50%);
    padding: 4px 14px;
    background: var(--cyan);
    color: var(--bg);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}
.sp-tier-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 12px;
}
.sp-tier-price {
    font-size: 34px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}
.sp-tier-price-sub {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 22px;
}
.sp-tier ul {
    margin-bottom: 24px;
}
.sp-tier ul li {
    padding: 8px 0;
    font-size: 14px;
    color: var(--text);
    display: flex;
    align-items: flex-start;
    gap: 10px;
    border-bottom: 1px solid var(--border2);
}
.sp-tier ul li::before {
    content: "✓";
    color: var(--cyan);
    font-weight: 800;
    flex-shrink: 0;
}
.sp-tier ul li:last-child { border-bottom: none; }
.sp-tier-btn {
    display: block;
    text-align: center;
    padding: 14px;
    border-radius: 10px;
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    font-weight: 700;
    font-size: 14px;
    transition: all 0.2s;
}
.sp-tier-btn:hover { background: var(--cyan); color: var(--bg); }
.sp-tier.featured .sp-tier-btn { background: var(--cyan); color: var(--bg); }
.sp-tier.featured .sp-tier-btn:hover { box-shadow: var(--glow-cyan); }

/* Who it's for */
.sp-who {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 14px;
}
.sp-who-item {
    padding: 20px 18px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
}
.sp-who-item .sp-who-emoji {
    font-size: 22px;
    display: block;
    margin-bottom: 8px;
}

/* FAQ accordion */
.sp-faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 12px;
    overflow: hidden;
}
.sp-faq-q {
    padding: 20px 24px;
    font-weight: 700;
    font-size: 15px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    transition: color 0.2s;
}
.sp-faq-q:hover { color: var(--cyan); }
.sp-faq-q::after {
    content: "+";
    font-size: 20px;
    color: var(--cyan);
    transition: transform 0.2s;
    flex-shrink: 0;
}
.sp-faq-item.open .sp-faq-q::after { content: "−"; }
.sp-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
    padding: 0 24px;
    color: var(--text-muted);
    font-size: 14px;
    line-height: 1.7;
}
.sp-faq-item.open .sp-faq-a {
    max-height: 400px;
    padding: 0 24px 20px;
}

/* Final CTA */
.sp-cta {
    margin: 60px 32px 80px;
    max-width: 1100px;
    margin-left: auto;
    margin-right: auto;
    padding: 60px 40px;
    background: linear-gradient(135deg, rgba(0, 229, 255, 0.08), rgba(139, 92, 246, 0.1));
    border: 1px solid var(--border);
    border-radius: 24px;
    text-align: center;
}
.sp-cta h2 {
    font-size: clamp(26px, 4vw, 36px);
    font-weight: 800;
    letter-spacing: -0.8px;
    margin-bottom: 14px;
}
.sp-cta p {
    font-size: 16px;
    color: var(--text-muted);
    max-width: 560px;
    margin: 0 auto 28px;
}

/* Footer */
.sp-footer {
    background: var(--bg2);
    border-top: 1px solid var(--border);
    padding: 48px 32px 24px;
}
.sp-footer-inner {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 32px;
    margin-bottom: 32px;
}
.sp-footer-col h5 {
    font-size: 13px;
    font-weight: 700;
    color: var(--text);
    letter-spacing: 0.5px;
    text-transform: uppercase;
    margin-bottom: 14px;
}
.sp-footer-col a {
    display: block;
    padding: 4px 0;
    font-size: 13px;
    color: var(--text-muted);
}
.sp-footer-col a:hover { color: var(--cyan); }
.sp-footer-col p {
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.6;
}
.sp-footer-bot {
    max-width: 1100px;
    margin: 0 auto;
    padding-top: 20px;
    border-top: 1px solid var(--border2);
    font-size: 12px;
    color: var(--text-subtle);
    text-align: center;
}

@media (max-width: 768px) {
    .sp-hero { padding: 110px 20px 60px; }
    .sp-sec { padding: 60px 20px; }
    .sp-cta { padding: 40px 24px; margin: 40px 20px; }
    .sp-footer-inner { grid-template-columns: 1fr; }
}

/* Utility: pricing strikethrough/highlight */
.sp-note-strong { color: var(--cyan); font-weight: 700; }
.sp-note-warn { color: #ff9d4a; font-weight: 700; }

/* ==========================================================
   RTL / Arabic support (primary language for GCC market)
   ========================================================== */
html[dir="rtl"] body,
html[lang="ar"] body { font-family: var(--font-ar); direction: rtl; text-align: right; }
html[dir="rtl"] .sp-hero h1,
html[lang="ar"] .sp-hero h1 { letter-spacing: 0; line-height: 1.25; }
html[dir="rtl"] .sp-crumb { direction: rtl; }
html[dir="rtl"] .sp-nav-cta,
html[dir="rtl"] .sp-btn-primary,
html[dir="rtl"] .sp-btn-ghost,
html[dir="rtl"] .sp-tier-btn { letter-spacing: 0; }
html[dir="rtl"] .sp-feature,
html[dir="rtl"] .sp-tier,
html[dir="rtl"] .sp-who-item,
html[dir="rtl"] .sp-faq-item { text-align: right; }
html[dir="rtl"] .sp-tier ul li { direction: rtl; }
html[dir="rtl"] .sp-tier ul li::before { margin-left: 10px; margin-right: 0; }
html[dir="rtl"] .sp-faq-q::after { margin-left: 0; margin-right: auto; }
html[dir="rtl"] .sp-nav-links { flex-direction: row-reverse; }
html[dir="rtl"] .sp-footer-col { text-align: right; }
html[dir="rtl"] .sp-hero::before { left: -200px; right: auto; }
html[dir="rtl"] .sp-hero::after { right: -200px; left: auto; }
html[dir="rtl"] .sp-chip-num,
html[dir="rtl"] .sp-tier-price { direction: ltr; display: inline-block; }

/* ==========================================================
   Self-serve pricing + Stripe-checkout specific components
   (used by /pricing.html and product subscription pages)
   ========================================================== */
.sp-plan-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 32px;
}
.sp-plan {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 18px;
    padding: 32px 26px;
    position: relative;
    display: flex;
    flex-direction: column;
    transition: all 0.2s;
}
.sp-plan:hover {
    border-color: rgba(0, 229, 255, 0.35);
    transform: translateY(-3px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.3);
}
.sp-plan.featured {
    border-color: var(--cyan);
    background: linear-gradient(180deg, rgba(0, 229, 255, 0.07), var(--bg-card));
    box-shadow: 0 0 50px rgba(0, 229, 255, 0.12);
}
.sp-plan-badge {
    position: absolute;
    top: -14px;
    left: 50%;
    transform: translateX(-50%);
    padding: 5px 16px;
    background: var(--cyan);
    color: var(--bg);
    border-radius: 20px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.6px;
    text-transform: uppercase;
    white-space: nowrap;
}
.sp-plan-name {
    font-size: 13px;
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-bottom: 10px;
}
.sp-plan-price {
    font-size: 40px;
    font-weight: 900;
    line-height: 1;
    margin-bottom: 4px;
}
.sp-plan-price small {
    font-size: 15px;
    font-weight: 500;
    color: var(--text-muted);
}
.sp-plan-tagline {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
    padding-bottom: 18px;
    border-bottom: 1px solid var(--border2);
}
.sp-plan ul {
    flex: 1;
    margin-bottom: 24px;
}
.sp-plan ul li {
    padding: 8px 0;
    font-size: 14px;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}
.sp-plan ul li::before {
    content: "✓";
    color: var(--cyan);
    font-weight: 800;
    flex-shrink: 0;
}
.sp-plan-cta {
    display: block;
    text-align: center;
    padding: 14px;
    border-radius: 10px;
    background: transparent;
    color: var(--cyan);
    border: 1px solid var(--cyan);
    font-weight: 800;
    font-size: 14px;
    transition: all 0.2s;
    cursor: pointer;
}
.sp-plan-cta:hover { background: var(--cyan); color: var(--bg); }
.sp-plan.featured .sp-plan-cta {
    background: var(--cyan);
    color: var(--bg);
}
.sp-plan.featured .sp-plan-cta:hover { box-shadow: var(--glow-cyan); }

/* Three-track section (self-serve / premium / digital) */
.sp-tracks {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
    margin-top: 28px;
}
.sp-track {
    padding: 28px 24px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: all 0.2s;
}
.sp-track:hover { border-color: rgba(0, 229, 255, 0.3); }
.sp-track-icon { font-size: 32px; margin-bottom: 14px; }
.sp-track h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.sp-track p { font-size: 14px; color: var(--text-muted); line-height: 1.6; margin-bottom: 14px; }
.sp-track-price {
    font-size: 13px;
    font-weight: 600;
    color: var(--cyan);
    border-top: 1px solid var(--border);
    padding-top: 12px;
}

/* Trust row (used on homepage + product pages) */
.sp-trust-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    margin-top: 24px;
    align-items: center;
    justify-content: center;
}
.sp-trust-item {
    padding: 8px 16px;
    background: rgba(0, 229, 255, 0.06);
    border: 1px solid var(--border);
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
}
.sp-trust-item strong { color: var(--cyan); }
