/* =========================================
   Cloud Tec - Professional Landing Site
   Light Theme | Arabic (primary) + English
   ========================================= */

:root {
  --primary: #2563eb;
  --primary-dark: #1d4ed8;
  --primary-light: #60a5fa;
  --accent: #06b6d4;
  --accent-light: #22d3ee;
  --gradient: linear-gradient(135deg, #2563eb 0%, #06b6d4 100%);
  --gradient-soft: linear-gradient(135deg, #eff6ff 0%, #ecfeff 100%);
  --text: #0f172a;
  --text-muted: #475569;
  --text-light: #64748b;
  --bg: #ffffff;
  --bg-alt: #f8fafc;
  --bg-soft: #f1f5f9;
  --border: #e2e8f0;
  --border-light: #f1f5f9;
  --success: #10b981;
  --warning: #f59e0b;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow: 0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-md: 0 8px 24px rgba(15, 23, 42, 0.08);
  --shadow-lg: 0 20px 40px rgba(15, 23, 42, 0.1);
  --radius-sm: 8px;
  --radius: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --transition: all 0.3s ease;
  --container: 1200px;
  --font-ar: 'Cairo', 'Tajawal', system-ui, sans-serif;
  --font-en: 'Inter', system-ui, sans-serif;
}

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

html { scroll-behavior: smooth; scroll-padding-top: 90px; }

body {
  font-family: var(--font-ar);
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  font-size: 16px;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

html[lang="en"] body { font-family: var(--font-en); line-height: 1.6; }

a { color: inherit; text-decoration: none; transition: var(--transition); }
img { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; border: none; background: none; }
ul { list-style: none; }

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ---------- Language-aware visibility ---------- */
.lang-ar, .lang-en { display: none; }
html[lang="ar"] .lang-ar { display: inline; }
html[lang="en"] .lang-en { display: inline; }
html[lang="ar"] .lang-ar-block { display: block; }
html[lang="en"] .lang-en-block { display: block; }
html[lang="ar"] .lang-ar-flex { display: flex; }
html[lang="en"] .lang-en-flex { display: flex; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 15px;
  transition: var(--transition);
  white-space: nowrap;
  cursor: pointer;
}
.btn-primary {
  background: var(--gradient);
  color: #fff;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 12px 28px rgba(37, 99, 235, 0.4); }
.btn-outline {
  border: 2px solid var(--border);
  color: var(--text);
  background: #fff;
}
.btn-outline:hover { border-color: var(--primary); color: var(--primary); }
.btn-ghost { color: var(--text); padding: 10px 18px; }
.btn-ghost:hover { color: var(--primary); }
.btn-lg { padding: 16px 36px; font-size: 16px; }

/* ---------- Header ---------- */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.85);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--border-light);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 14px 0;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 20px;
  color: var(--text);
}
.logo img { height: 48px; width: auto; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav a {
  padding: 10px 16px;
  font-weight: 600;
  font-size: 15px;
  color: var(--text-muted);
  border-radius: 10px;
}
.nav a:hover, .nav a.active { color: var(--primary); background: var(--bg-soft); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.lang-toggle {
  display: none;
}

.menu-toggle {
  display: none;
  width: 42px; height: 42px;
  border-radius: 10px;
  background: var(--bg-soft);
  align-items: center;
  justify-content: center;
  color: var(--text);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: 80px 0 100px;
  background: var(--gradient-soft);
  overflow: hidden;
}
.hero::before, .hero::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  z-index: 0;
}
.hero::before { width: 380px; height: 380px; background: #bfdbfe; top: -100px; inset-inline-start: -120px; }
.hero::after { width: 320px; height: 320px; background: #a5f3fc; bottom: -80px; inset-inline-end: -80px; }
.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: center;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 14px;
  background: #fff;
  border: 1px solid var(--border);
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}
.eyebrow::before {
  content: '';
  width: 8px; height: 8px;
  background: var(--success);
  border-radius: 50%;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.2);
}
.hero h1 {
  font-size: clamp(32px, 4.5vw, 54px);
  line-height: 1.2;
  font-weight: 800;
  margin-bottom: 20px;
  letter-spacing: -0.02em;
}
.hero h1 .grad {
  background: var(--gradient);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.hero p.lead {
  font-size: 18px;
  color: var(--text-muted);
  margin-bottom: 32px;
  max-width: 560px;
}
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; margin-bottom: 40px; }
.hero-stats {
  display: flex;
  gap: 36px;
  flex-wrap: wrap;
  padding-top: 30px;
  border-top: 1px solid var(--border);
}
.hero-stats div strong {
  display: block;
  font-size: 28px;
  font-weight: 800;
  color: var(--text);
}
.hero-stats div span { font-size: 14px; color: var(--text-light); }

.hero-visual {
  position: relative;
  height: 460px;
}
.hero-card {
  position: absolute;
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  padding: 22px;
  border: 1px solid var(--border-light);
}
.hero-card-1 { top: 0; inset-inline-start: 0; width: 280px; }
.hero-card-2 { top: 120px; inset-inline-end: 20px; width: 260px; }
.hero-card-3 { bottom: 0; inset-inline-start: 60px; width: 300px; }

.mini-bars { display: flex; align-items: flex-end; gap: 6px; height: 70px; margin-top: 14px; }
.mini-bars i { flex: 1; background: var(--gradient); border-radius: 4px; display: block; }
.mini-bars i:nth-child(1) { height: 40%; }
.mini-bars i:nth-child(2) { height: 70%; }
.mini-bars i:nth-child(3) { height: 55%; }
.mini-bars i:nth-child(4) { height: 90%; }
.mini-bars i:nth-child(5) { height: 65%; }
.mini-bars i:nth-child(6) { height: 80%; }

.badge-icon {
  width: 44px; height: 44px;
  border-radius: 12px;
  background: var(--gradient-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  margin-bottom: 10px;
}

/* ---------- Sections ---------- */
section { padding: 90px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 60px; }
.section-tag {
  display: inline-block;
  padding: 6px 14px;
  background: var(--gradient-soft);
  color: var(--primary);
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 16px;
}
.section-head h2 {
  font-size: clamp(28px, 3.5vw, 42px);
  font-weight: 800;
  line-height: 1.25;
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}
.section-head p { color: var(--text-muted); font-size: 17px; }

/* ---------- Clients strip ---------- */
.clients {
  padding: 50px 0;
  background: var(--bg-alt);
  border-block: 1px solid var(--border-light);
}
.clients-title {
  text-align: center;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 24px;
  text-transform: uppercase;
  letter-spacing: 2px;
}
.clients-grid {
  display: flex;
  justify-content: space-around;
  align-items: center;
  flex-wrap: wrap;
  gap: 32px;
}
.client-logo {
  font-weight: 800;
  color: var(--text-light);
  font-size: 20px;
  opacity: 0.7;
  letter-spacing: 1px;
  transition: var(--transition);
}
.client-logo:hover { opacity: 1; color: var(--primary); }

/* ---------- Services ---------- */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.service-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  transition: var(--transition);
  position: relative;
  overflow: hidden;
}
.service-card::before {
  content: '';
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: var(--gradient);
  transform: scaleX(0);
  transform-origin: inset-inline-start;
  transition: transform 0.4s ease;
}
.service-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); border-color: transparent; }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
  width: 58px; height: 58px;
  border-radius: 16px;
  background: var(--gradient-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 26px;
  margin-bottom: 20px;
}
.service-card h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.service-card p { color: var(--text-muted); font-size: 15px; margin-bottom: 18px; }
.service-card a {
  font-weight: 700;
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
}

/* ---------- Features ---------- */
.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: center;
}
.features-visual {
  background: var(--gradient-soft);
  border-radius: var(--radius-xl);
  padding: 40px;
  position: relative;
  min-height: 420px;
}
.features-visual .widget {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px 20px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 14px;
}
.features-visual .widget i {
  width: 40px; height: 40px;
  border-radius: 10px;
  background: var(--gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}
.features-visual .widget strong { display: block; font-size: 15px; }
.features-visual .widget span { font-size: 13px; color: var(--text-light); }

.feature-item { display: flex; gap: 16px; margin-bottom: 24px; }
.feature-item .check {
  flex-shrink: 0;
  width: 36px; height: 36px;
  border-radius: 10px;
  background: var(--gradient-soft);
  color: var(--primary);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  font-weight: 800;
}
.feature-item h4 { font-size: 17px; font-weight: 800; margin-bottom: 4px; }
.feature-item p { color: var(--text-muted); font-size: 15px; }

/* ---------- Portfolio ---------- */
.portfolio-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
  margin-bottom: 40px;
}
.portfolio-filters button {
  padding: 9px 20px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #fff;
  color: var(--text-muted);
  font-weight: 700;
  font-size: 14px;
  transition: var(--transition);
}
.portfolio-filters button.active,
.portfolio-filters button:hover {
  background: var(--gradient);
  color: #fff;
  border-color: transparent;
}
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}
.work-card {
  background: #fff;
  border-radius: var(--radius-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: var(--transition);
}
.work-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-md); }
.work-thumb {
  height: 220px;
  background: var(--gradient);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 46px;
  font-weight: 800;
  overflow: hidden;
}
.work-thumb::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 30%, rgba(255,255,255,0.2), transparent 50%),
    radial-gradient(circle at 80% 70%, rgba(255,255,255,0.15), transparent 50%);
}
.work-thumb span { position: relative; z-index: 1; letter-spacing: -0.02em; }
.work-thumb.g2 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.work-thumb.g3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.work-thumb.g4 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.work-thumb.g5 { background: linear-gradient(135deg, #6366f1, #8b5cf6); }
.work-thumb.g6 { background: linear-gradient(135deg, #f43f5e, #fb7185); }
.work-info { padding: 22px 24px; }
.work-info .tag { font-size: 12px; color: var(--primary); font-weight: 700; text-transform: uppercase; letter-spacing: 1px; }
.work-info h3 { font-size: 19px; font-weight: 800; margin: 6px 0; }
.work-info p { color: var(--text-muted); font-size: 14px; }

/* ---------- Process ---------- */
.process-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 24px;
}
.process-step {
  text-align: center;
  padding: 32px 20px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  position: relative;
}
.step-num {
  width: 54px; height: 54px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  font-weight: 800;
  font-size: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  box-shadow: 0 8px 20px rgba(37, 99, 235, 0.3);
}
.process-step h4 { font-size: 17px; font-weight: 800; margin-bottom: 8px; }
.process-step p { color: var(--text-muted); font-size: 14px; }

/* ---------- Stats ---------- */
.stats {
  background: var(--gradient);
  color: #fff;
  padding: 70px 0;
  position: relative;
  overflow: hidden;
}
.stats::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 50%, rgba(255,255,255,0.15), transparent 50%);
}
.stats-grid {
  position: relative;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 30px;
  text-align: center;
}
.stats-grid strong {
  display: block;
  font-size: 46px;
  font-weight: 800;
  margin-bottom: 6px;
}
.stats-grid span { font-size: 15px; opacity: 0.9; }

/* ---------- Pricing ---------- */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
  align-items: stretch;
}
.price-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px 30px;
  transition: var(--transition);
  display: flex;
  flex-direction: column;
}
.price-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.price-card.featured {
  background: linear-gradient(180deg, #eff6ff 0%, #fff 100%);
  border-color: var(--primary-light);
  position: relative;
  box-shadow: var(--shadow-md);
}
.price-card.featured::before {
  content: attr(data-label);
  position: absolute;
  top: -14px;
  inset-inline-start: 50%;
  transform: translateX(-50%);
  background: var(--gradient);
  color: #fff;
  padding: 6px 18px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}
.price-name { font-size: 18px; font-weight: 800; color: var(--primary); margin-bottom: 8px; }
.price-val { font-size: 44px; font-weight: 800; letter-spacing: -0.02em; }
.price-val small { font-size: 16px; color: var(--text-light); font-weight: 600; }
.price-desc { color: var(--text-muted); font-size: 14px; margin: 10px 0 22px; min-height: 42px; }
.price-card ul { flex: 1; margin-bottom: 24px; }
.price-card ul li {
  padding: 9px 0;
  color: var(--text-muted);
  font-size: 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-bottom: 1px dashed var(--border);
}
.price-card ul li:last-child { border-bottom: none; }
.price-card ul li::before {
  content: '✓';
  color: var(--success);
  font-weight: 800;
  width: 18px; height: 18px;
  background: #d1fae5;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
}
.price-card .btn { justify-content: center; }

/* ---------- Testimonials ---------- */
.testimonials-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}
.testimonial {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 30px;
  position: relative;
}
.testimonial::before {
  content: '"';
  position: absolute;
  top: 14px;
  inset-inline-end: 24px;
  font-size: 74px;
  color: var(--primary-light);
  opacity: 0.25;
  font-family: serif;
  line-height: 1;
}
.testimonial p { color: var(--text-muted); margin-bottom: 22px; font-size: 15px; }
.stars { color: #f59e0b; margin-bottom: 14px; letter-spacing: 2px; font-size: 15px; }
.person { display: flex; align-items: center; gap: 12px; }
.avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--gradient);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  flex-shrink: 0;
}
.person strong { display: block; font-size: 15px; }
.person span { font-size: 13px; color: var(--text-light); }

/* ---------- FAQ ---------- */
.faq-wrap { max-width: 820px; margin: 0 auto; }
.faq-item {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 12px;
  overflow: hidden;
  transition: var(--transition);
}
.faq-item:hover { border-color: var(--primary-light); }
.faq-q {
  width: 100%;
  padding: 20px 24px;
  text-align: start;
  font-weight: 700;
  font-size: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  color: var(--text);
}
.faq-q::after {
  content: '+';
  font-size: 22px;
  color: var(--primary);
  font-weight: 400;
  transition: transform 0.3s ease;
  flex-shrink: 0;
}
.faq-item.open .faq-q::after { transform: rotate(45deg); }
.faq-a {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s ease, padding 0.3s ease;
  color: var(--text-muted);
  padding: 0 24px;
  font-size: 15px;
}
.faq-item.open .faq-a { max-height: 400px; padding: 0 24px 22px; }

/* ---------- CTA ---------- */
.cta {
  padding: 70px 0;
  background: var(--gradient-soft);
}
.cta-box {
  background: var(--gradient);
  color: #fff;
  border-radius: var(--radius-xl);
  padding: 60px 50px;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.cta-box::before, .cta-box::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.1);
}
.cta-box::before { width: 200px; height: 200px; top: -80px; inset-inline-start: -60px; }
.cta-box::after { width: 280px; height: 280px; bottom: -120px; inset-inline-end: -100px; }
.cta-box h2 {
  font-size: clamp(26px, 3.5vw, 38px);
  font-weight: 800;
  margin-bottom: 14px;
  position: relative;
}
.cta-box p {
  font-size: 17px;
  opacity: 0.92;
  margin-bottom: 30px;
  position: relative;
  max-width: 600px;
  margin-inline: auto;
  margin-bottom: 30px;
}
.cta-box .btn {
  position: relative;
  background: #fff;
  color: var(--primary);
  box-shadow: 0 8px 20px rgba(0,0,0,0.1);
}
.cta-box .btn:hover { transform: translateY(-2px); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  padding: 70px 0 60px;
  background: var(--gradient-soft);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  top: -100px; inset-inline-start: -100px;
  width: 300px; height: 300px;
  background: #bfdbfe;
  border-radius: 50%;
  filter: blur(70px);
  opacity: 0.5;
}
.page-hero .breadcrumb {
  position: relative;
  color: var(--text-light);
  font-size: 14px;
  margin-bottom: 14px;
}
.page-hero .breadcrumb a { color: var(--primary); }
.page-hero h1 {
  position: relative;
  font-size: clamp(30px, 4vw, 46px);
  font-weight: 800;
  margin-bottom: 14px;
  letter-spacing: -0.01em;
}
.page-hero p {
  position: relative;
  font-size: 17px;
  color: var(--text-muted);
  max-width: 680px;
  margin: 0 auto;
}

/* ---------- Contact form ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  gap: 50px;
  align-items: start;
}
.contact-info h3 { font-size: 22px; font-weight: 800; margin-bottom: 12px; }
.contact-info p { color: var(--text-muted); margin-bottom: 28px; }
.contact-detail {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  margin-bottom: 14px;
}
.contact-detail i {
  width: 46px; height: 46px;
  background: var(--gradient-soft);
  color: var(--primary);
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
}
.contact-detail strong { display: block; font-size: 15px; margin-bottom: 2px; }
.contact-detail span { font-size: 14px; color: var(--text-muted); }

.form-box {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 36px;
  box-shadow: var(--shadow-sm);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-weight: 700; font-size: 14px; margin-bottom: 8px; }
.field input, .field textarea, .field select {
  width: 100%;
  padding: 13px 16px;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 15px;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: var(--transition);
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.1);
}
.field textarea { resize: vertical; min-height: 130px; }

/* ---------- Blog ---------- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 28px;
}
.blog-card {
  background: #fff;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: var(--transition);
}
.blog-card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); }
.blog-thumb {
  height: 180px;
  background: var(--gradient);
  position: relative;
}
.blog-thumb.g2 { background: linear-gradient(135deg, #8b5cf6, #ec4899); }
.blog-thumb.g3 { background: linear-gradient(135deg, #f59e0b, #ef4444); }
.blog-thumb.g4 { background: linear-gradient(135deg, #10b981, #06b6d4); }
.blog-thumb.g5 { background: linear-gradient(135deg, #6366f1, #06b6d4); }
.blog-thumb.g6 { background: linear-gradient(135deg, #f43f5e, #f59e0b); }
.blog-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 70% 30%, rgba(255,255,255,0.2), transparent 50%);
}
.blog-body { padding: 24px 26px 28px; }
.blog-meta { font-size: 13px; color: var(--text-light); margin-bottom: 8px; }
.blog-meta .cat { color: var(--primary); font-weight: 700; }
.blog-body h3 { font-size: 19px; font-weight: 800; line-height: 1.35; margin-bottom: 10px; }
.blog-body p { color: var(--text-muted); font-size: 14px; margin-bottom: 14px; }
.blog-body a { font-weight: 700; color: var(--primary); font-size: 14px; }

/* ---------- Legal pages (terms/privacy) ---------- */
.legal-content {
  max-width: 860px;
  margin: 0 auto;
  background: #fff;
  padding: 50px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}
.legal-content h2 { font-size: 22px; font-weight: 800; margin: 34px 0 12px; color: var(--primary); }
.legal-content h2:first-child { margin-top: 0; }
.legal-content p { color: var(--text-muted); margin-bottom: 14px; }
.legal-content ul { margin: 14px 0 14px 20px; }
.legal-content ul li { color: var(--text-muted); padding: 4px 0; list-style: disc; list-style-position: inside; }

/* ---------- Footer ---------- */
.footer {
  background: #0f172a;
  color: #cbd5e1;
  padding: 70px 0 0;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr 1.2fr;
  gap: 40px;
  padding-bottom: 50px;
  border-bottom: 1px solid #1e293b;
}
.footer-brand .logo { color: #fff; margin-bottom: 16px; }
.footer-brand .logo-text span { color: var(--accent-light); }
.footer-brand p { font-size: 14px; color: #94a3b8; margin-bottom: 20px; max-width: 360px; }
.social { display: flex; gap: 10px; }
.social a {
  width: 38px; height: 38px;
  border-radius: 10px;
  background: #1e293b;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #cbd5e1;
  font-size: 15px;
  transition: var(--transition);
}
.social a:hover { background: var(--primary); color: #fff; transform: translateY(-2px); }

.footer h4 { color: #fff; font-size: 15px; font-weight: 800; margin-bottom: 18px; }
.footer ul li { margin-bottom: 10px; }
.footer ul a { font-size: 14px; color: #94a3b8; }
.footer ul a:hover { color: #fff; padding-inline-start: 4px; }

.newsletter-form {
  display: flex;
  gap: 8px;
  background: #1e293b;
  border-radius: 999px;
  padding: 5px;
}
.newsletter-form input {
  flex: 1;
  background: transparent;
  border: none;
  color: #fff;
  padding: 10px 16px;
  font-size: 14px;
  outline: none;
  font-family: inherit;
}
.newsletter-form input::placeholder { color: #64748b; }
.newsletter-form button {
  background: var(--gradient);
  color: #fff;
  padding: 10px 18px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 14px;
}

.footer-bottom {
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 13px;
  color: #64748b;
}
.footer-bottom a:hover { color: #fff; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .hero-inner, .features-grid, .contact-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { height: 380px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 30px; }
  .footer-brand { grid-column: 1 / -1; }
}

@media (max-width: 760px) {
  section { padding: 60px 0; }
  .hero { padding: 50px 0 70px; }
  .nav, .header-actions .btn { display: none; }
  .menu-toggle { display: inline-flex; }
  .nav.open {
    display: flex;
    position: absolute;
    top: 72px;
    inset-inline: 16px;
    background: #fff;
    flex-direction: column;
    gap: 4px;
    padding: 12px;
    border-radius: var(--radius);
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border);
  }
  .nav.open a { width: 100%; }
  .hero-stats { gap: 22px; }
  .form-row { grid-template-columns: 1fr; }
  .cta-box { padding: 40px 24px; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .legal-content { padding: 30px 22px; }
  .hero-visual { display: none; }
}

@media (max-width: 480px) {
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }
}

/* ---------- RTL tweaks ---------- */
html[lang="ar"] .mini-bars { direction: ltr; }
html[lang="en"] body { text-align: left; }
