/* ============================================================
   Arab Thinkers Co — شركة المفكرون العرب
   Main stylesheet (RTL + LTR, Light + Dark)
   Brand colors extracted from logo:
   Blue #1B75BC · Purple #6E5CA8 · Gradient purple→blue
   ============================================================ */

:root {
  --c-blue: #1b75bc;
  --c-blue-light: #2e9be0;
  --c-purple: #6e5ca8;
  --c-purple-light: #8e7bc4;
  --c-teal: #18a5c9;
  --grad: linear-gradient(135deg, #7c5cad 0%, #4a6fbf 45%, #1b75bc 100%);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 173, 0.12), rgba(27, 117, 188, 0.12));
  --wa: #25d366;
  --wa-dark: #1da851;
  --radius: 14px;
  --radius-lg: 22px;
  --shadow: 0 6px 24px rgba(20, 30, 70, 0.08);
  --shadow-lg: 0 14px 44px rgba(20, 30, 70, 0.14);
  --header-h: 72px;

  /* light theme (default) */
  --bg: #ffffff;
  --bg-2: #f4f5fb;
  --surface: #ffffff;
  --text: #20263b;
  --text-2: #5a6178;
  --border: #e4e6f0;
  --header-bg: rgba(255, 255, 255, 0.86);
  --hero-glow-1: rgba(255, 255, 255, 0.14);
  --hero-glow-2: rgba(24, 165, 201, 0.25);
}

[data-theme="dark"] {
  --bg: #0e1122;
  --bg-2: #141833;
  --surface: #181d3a;
  --text: #edeffa;
  --text-2: #a9b0cc;
  --border: #272d52;
  --header-bg: rgba(14, 17, 34, 0.86);
  --shadow: 0 6px 24px rgba(0, 0, 0, 0.35);
  --shadow-lg: 0 14px 44px rgba(0, 0, 0, 0.45);
  --grad-soft: linear-gradient(135deg, rgba(124, 92, 173, 0.2), rgba(27, 117, 188, 0.2));
}

/* ---------- Base ---------- */
* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  font-family: "Cairo", "Segoe UI", Tahoma, sans-serif;
  font-size: 1.02rem;
  line-height: 1.8;
  color: var(--text);
  background: var(--bg);
  transition: background 0.3s ease, color 0.3s ease;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--c-blue); text-decoration: none; }
a:hover { color: var(--c-purple); }
ul { list-style: none; }
h1, h2, h3, h4 { line-height: 1.4; font-weight: 800; }

.container { width: min(1160px, 92%); margin-inline: auto; }

.skip-link {
  position: absolute; inset-inline-start: -999px; top: 8px;
  background: var(--c-blue); color: #fff; padding: 8px 16px; border-radius: 8px; z-index: 200;
}
.skip-link:focus { inset-inline-start: 8px; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 12px 26px; border-radius: 999px; font-weight: 700; font-size: 1rem;
  font-family: inherit; border: 0; cursor: pointer; transition: all 0.25s ease;
  line-height: 1.5;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-primary { background: var(--grad); color: #fff; box-shadow: 0 6px 18px rgba(27, 117, 188, 0.35); }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 10px 26px rgba(27, 117, 188, 0.45); color: #fff; }
.btn-wa { background: var(--wa); color: #fff; box-shadow: 0 6px 18px rgba(37, 211, 102, 0.35); }
.btn-wa:hover { background: var(--wa-dark); transform: translateY(-2px); color: #fff; }
.btn-ghost { background: transparent; color: var(--text); border: 2px solid var(--border); }
.btn-ghost:hover { border-color: var(--c-blue); color: var(--c-blue); }
.hero .btn-ghost { color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.hero .btn-ghost:hover { background: rgba(255, 255, 255, 0.12); color: #fff; border-color: #fff; }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100; height: var(--header-h);
  background: var(--header-bg); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 18px; height: 100%; }

.brand { display: flex; align-items: center; gap: 10px; margin-inline-end: auto; }
.brand img { width: 46px; height: 46px; }
.brand-name { display: flex; flex-direction: column; line-height: 1.25; }
.brand-name strong { font-size: 1.06rem; font-weight: 800; color: var(--text); }
.brand-name small { font-size: 0.7rem; color: var(--text-2); font-weight: 600; letter-spacing: 0.02em; }

.nav-links { display: flex; align-items: center; gap: 4px; }
.nav-links a {
  padding: 8px 14px; border-radius: 10px; color: var(--text); font-weight: 700; font-size: 0.97rem;
}
.nav-links a:hover { color: var(--c-blue); background: var(--grad-soft); }
.nav-links a.active { color: var(--c-blue); background: var(--grad-soft); }

.header-actions { display: flex; align-items: center; gap: 8px; }

.icon-btn {
  width: 42px; height: 42px; border-radius: 12px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: all 0.2s;
}
.icon-btn:hover { border-color: var(--c-blue); color: var(--c-blue); }
.icon-btn svg { width: 20px; height: 20px; }

.lang-switch {
  font-weight: 800; font-size: 0.85rem; width: auto; padding-inline: 12px;
  text-decoration: none; color: var(--text);
}

[data-theme="light"] .icon-moon { display: block; }
[data-theme="light"] .icon-sun { display: none; }
[data-theme="dark"] .icon-moon { display: none; }
[data-theme="dark"] .icon-sun { display: block; }

.header-wa { display: inline-flex; padding: 10px 20px; font-size: 0.93rem; }

.nav-toggle { display: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: var(--grad);
  padding: clamp(70px, 10vw, 130px) 0;
}
.hero::before, .hero::after {
  content: ""; position: absolute; border-radius: 50%; pointer-events: none;
}
.hero::before { width: 480px; height: 480px; background: radial-gradient(circle, var(--hero-glow-2), transparent 65%); top: -160px; inset-inline-end: -120px; }
.hero::after { width: 420px; height: 420px; background: radial-gradient(circle, var(--hero-glow-1), transparent 65%); bottom: -180px; inset-inline-start: -100px; }

.hero-inner { position: relative; z-index: 1; max-width: 780px; }
.hero h1 { font-size: clamp(1.9rem, 4.6vw, 3.1rem); font-weight: 800; margin-bottom: 18px; }
.hero p.lead { font-size: clamp(1.02rem, 2vw, 1.22rem); opacity: 0.94; margin-bottom: 30px; max-width: 660px; }
.hero-cta { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 26px; }
.trust-badge {
  display: inline-flex; align-items: center; gap: 8px; font-size: 0.92rem; font-weight: 700;
  background: rgba(255, 255, 255, 0.14); border: 1px solid rgba(255, 255, 255, 0.25);
  padding: 7px 16px; border-radius: 999px;
}
.trust-badge svg { width: 17px; height: 17px; }

/* Small page hero */
.page-hero { padding: clamp(48px, 7vw, 84px) 0; }
.page-hero h1 { font-size: clamp(1.7rem, 3.6vw, 2.5rem); }
.page-hero p.lead { margin-bottom: 0; }

/* ---------- Sections ---------- */
.section { padding: clamp(56px, 8vw, 96px) 0; }
.section-alt { background: var(--bg-2); }

.section-head { max-width: 720px; margin: 0 auto 44px; text-align: center; }
.eyebrow {
  display: inline-block; font-size: 0.85rem; font-weight: 800; color: var(--c-blue);
  background: var(--grad-soft); padding: 5px 16px; border-radius: 999px; margin-bottom: 12px;
}
.section-head h2 { font-size: clamp(1.5rem, 3vw, 2.1rem); margin-bottom: 12px; }
.section-head p { color: var(--text-2); }

/* ---------- Cards ---------- */
.grid { display: grid; gap: 22px; }
.grid-3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid-4 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.grid-2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }

.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 30px 26px; box-shadow: var(--shadow); transition: transform 0.25s, box-shadow 0.25s;
}
.card:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.card h3 { font-size: 1.15rem; margin: 16px 0 10px; }
.card p { color: var(--text-2); font-size: 0.97rem; }
.card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 14px; font-weight: 700; font-size: 0.94rem; }

.icon-circle {
  width: 58px; height: 58px; border-radius: 16px; background: var(--grad);
  display: flex; align-items: center; justify-content: center; color: #fff;
}
.icon-circle svg { width: 28px; height: 28px; }

/* ---------- Steps ---------- */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 8px; }
.step .num {
  width: 46px; height: 46px; border-radius: 50%; background: var(--grad); color: #fff;
  font-weight: 800; font-size: 1.15rem; display: flex; align-items: center; justify-content: center;
  margin-bottom: 14px;
}
.step h3 { font-size: 1.1rem; margin-bottom: 8px; }
.step p { color: var(--text-2); font-size: 0.96rem; }

/* ---------- CTA band ---------- */
.cta-band {
  background: var(--grad); border-radius: var(--radius-lg); color: #fff;
  padding: clamp(36px, 5vw, 56px); text-align: center; position: relative; overflow: hidden;
}
.cta-band::before {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.15), transparent 65%);
  top: -120px; inset-inline-end: -80px;
}
.cta-band h2 { font-size: clamp(1.4rem, 2.8vw, 1.9rem); margin-bottom: 10px; position: relative; }
.cta-band p { opacity: 0.93; margin-bottom: 24px; position: relative; }
.cta-band .hero-cta { justify-content: center; margin-bottom: 0; position: relative; }

/* ---------- Service detail blocks ---------- */
.service-block {
  display: grid; grid-template-columns: 100px 1fr; gap: 26px; align-items: start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: clamp(26px, 4vw, 40px); box-shadow: var(--shadow); margin-bottom: 26px;
}
.service-block .icon-circle { width: 76px; height: 76px; border-radius: 20px; }
.service-block .icon-circle svg { width: 38px; height: 38px; }
.service-block h2 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); margin-bottom: 10px; }
.service-block p { color: var(--text-2); margin-bottom: 14px; }
.service-block ul { display: grid; gap: 9px; margin-bottom: 20px; }
.service-block ul li { position: relative; padding-inline-start: 30px; color: var(--text-2); }
.service-block ul li::before {
  content: ""; position: absolute; inset-inline-start: 0; top: 8px;
  width: 18px; height: 18px; border-radius: 50%;
  background: var(--grad-soft);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231b75bc' stroke-width='3.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 13l4 4L19 7'/%3E%3C/svg%3E");
  background-size: 11px; background-position: center; background-repeat: no-repeat;
}

/* ---------- Team ---------- */
.team-card { text-align: center; }
.avatar {
  width: 96px; height: 96px; margin: 0 auto 6px; border-radius: 50%;
  background: var(--grad); padding: 4px;
}
.avatar-inner {
  width: 100%; height: 100%; border-radius: 50%; background: var(--bg-2);
  display: flex; align-items: center; justify-content: center; color: var(--c-purple);
}
.avatar-inner svg { width: 46px; height: 46px; }
.team-card h3 { margin-bottom: 2px; }
.team-card .role { color: var(--c-blue); font-weight: 700; font-size: 0.92rem; margin-bottom: 10px; }
.team-card p { font-size: 0.92rem; }

/* ---------- Feature list (about) ---------- */
.feature-list { display: grid; gap: 16px; }
.feature-list li {
  display: flex; gap: 14px; align-items: flex-start;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 18px 20px; box-shadow: var(--shadow);
}
.feature-list .fi {
  flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--grad);
  color: #fff; display: flex; align-items: center; justify-content: center;
}
.feature-list .fi svg { width: 21px; height: 21px; }
.feature-list h3 { font-size: 1.02rem; margin-bottom: 3px; }
.feature-list p { color: var(--text-2); font-size: 0.94rem; }

/* ---------- FAQ ---------- */
.faq-item {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius);
  margin-bottom: 14px; box-shadow: var(--shadow); overflow: hidden;
}
.faq-item summary {
  list-style: none; cursor: pointer; padding: 18px 22px; font-weight: 800; font-size: 1.02rem;
  display: flex; justify-content: space-between; align-items: center; gap: 14px;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+"; font-size: 1.5rem; font-weight: 600; color: var(--c-blue);
  transition: transform 0.25s; line-height: 1; flex: none;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item .faq-body { padding: 0 22px 20px; color: var(--text-2); }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px; align-items: start; }
.contact-info .card { margin-bottom: 16px; display: flex; gap: 16px; align-items: center; padding: 20px 22px; }
.contact-info .card:hover { transform: none; }
.contact-info .icon-circle { width: 48px; height: 48px; border-radius: 13px; flex: none; }
.contact-info .icon-circle svg { width: 23px; height: 23px; }
.contact-info h3 { font-size: 0.98rem; margin: 0 0 2px; }
.contact-info p, .contact-info a { font-size: 0.95rem; color: var(--text-2); direction: ltr; unicode-bidi: embed; }
.contact-info a:hover { color: var(--c-blue); }

.form-card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: clamp(24px, 3.5vw, 38px); box-shadow: var(--shadow); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-field { display: flex; flex-direction: column; gap: 6px; }
.form-field.full { grid-column: 1 / -1; }
.form-field label { font-weight: 700; font-size: 0.93rem; }
.form-field input, .form-field select, .form-field textarea {
  font-family: inherit; font-size: 0.98rem; color: var(--text);
  background: var(--bg-2); border: 1.5px solid var(--border); border-radius: 11px;
  padding: 12px 15px; transition: border-color 0.2s; width: 100%;
}
.form-field textarea { min-height: 130px; resize: vertical; }
.form-field input:focus, .form-field select:focus, .form-field textarea:focus {
  outline: none; border-color: var(--c-blue);
}
.form-note { font-size: 0.88rem; color: var(--text-2); margin-top: 12px; }
.form-status { margin-top: 12px; font-weight: 700; font-size: 0.95rem; display: none; }
.form-status.show { display: block; }
.form-status.ok { color: var(--wa-dark); }
.form-status.err { color: #d05353; }

.map-wrap {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--border);
  box-shadow: var(--shadow); margin-top: 40px;
}
.map-wrap iframe { width: 100%; height: 380px; border: 0; display: block; filter: saturate(0.95); }
[data-theme="dark"] .map-wrap iframe { filter: invert(0.88) hue-rotate(180deg) saturate(0.8); }

/* ---------- Footer ---------- */
.site-footer { background: var(--bg-2); border-top: 1px solid var(--border); padding: 56px 0 0; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1.2fr; gap: 34px; padding-bottom: 40px; }
.footer-brand img { width: 52px; margin-bottom: 12px; }
.footer-brand p { color: var(--text-2); font-size: 0.93rem; max-width: 300px; }
.site-footer h3 { font-size: 1rem; margin-bottom: 14px; }
.site-footer ul { display: grid; gap: 8px; }
.site-footer ul a { color: var(--text-2); font-size: 0.94rem; }
.site-footer ul a:hover { color: var(--c-blue); }
.footer-contact li { display: flex; gap: 9px; align-items: center; color: var(--text-2); font-size: 0.94rem; }
.footer-contact svg { width: 17px; height: 17px; color: var(--c-blue); flex: none; }
.footer-contact a { color: var(--text-2); direction: ltr; unicode-bidi: embed; }
.footer-bottom {
  border-top: 1px solid var(--border); padding: 18px 0; display: flex; flex-wrap: wrap;
  justify-content: space-between; gap: 10px; color: var(--text-2); font-size: 0.88rem;
}

/* ---------- Floating WhatsApp ---------- */
.wa-float {
  position: fixed; bottom: 24px; inset-inline-end: 24px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; background: var(--wa); color: #fff;
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45); transition: transform 0.25s;
}
.wa-float:hover { transform: scale(1.08); color: #fff; }
.wa-float svg { width: 30px; height: 30px; }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 992px) {
  .nav-toggle { display: inline-flex; }
  .nav-links {
    position: fixed; top: var(--header-h); inset-inline: 0; z-index: 99;
    flex-direction: column; align-items: stretch; gap: 4px;
    background: var(--bg); border-bottom: 1px solid var(--border);
    padding: 14px 5%; box-shadow: var(--shadow-lg);
    transform: translateY(-12px); opacity: 0; visibility: hidden; transition: all 0.25s ease;
  }
  .nav-links.open { transform: none; opacity: 1; visibility: visible; }
  .nav-links a { padding: 12px 16px; }
  .header-wa { display: none; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}

@media (max-width: 560px) {
  .service-block { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr; }
  .brand-name small { display: none; }
}
