:root {
  --brand-500: #117a65;
  --brand-600: #0e6655;
  --brand-700: #0a5246;
  --sidebar-from: #0d4a40;
  --bg: #f4f7f6;
  --surface: #ffffff;
  --text: #1a2e2a;
  --muted: #5c6f6a;
  --border: rgba(17, 122, 101, 0.15);
  --radius: 12px;
  --shadow: 0 12px 32px rgba(10, 61, 52, 0.12);
  --space-xs: 0.35rem;
  --space-sm: 0.65rem;
  --space-md: 1rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --font-ar: 'Noto Naskh Arabic', Georgia, serif;
  --font-en: 'Inter', system-ui, sans-serif;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font-ar);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
}

body.lang-en {
  font-family: var(--font-en);
}

a {
  color: var(--brand-600);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

img {
  max-width: 100%;
}

.hidden {
  display: none !important;
}

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

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  padding: var(--space-sm) 0;
}

.brand {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  font-weight: 700;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-weight: 700;
}

.brand-text small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--muted);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-md);
}

.site-nav a {
  color: var(--muted);
  font-weight: 500;
  text-decoration: none;
  padding: var(--space-xs) var(--space-sm);
  border-radius: 8px;
}

.site-nav a:hover,
.site-nav a.active {
  color: var(--brand-600);
  background: rgba(17, 122, 101, 0.08);
  text-decoration: none;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
}

.lang-toggle {
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 8px;
  padding: 0.35rem 0.65rem;
  cursor: pointer;
  font-weight: 600;
  color: var(--brand-600);
}

.nav-toggle {
  display: none;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  cursor: pointer;
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.25rem;
  border-radius: var(--radius);
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  box-shadow: 0 6px 16px rgba(17, 122, 101, 0.35);
}

.btn-secondary {
  background: var(--surface);
  color: var(--brand-600);
  border: 1px solid var(--border);
}

.btn-ghost {
  background: transparent;
  color: var(--brand-600);
  border: 1px solid transparent;
}

/* Hero */
.hero {
  padding: var(--space-xl) 0 calc(var(--space-xl) + 1rem);
  background:
    radial-gradient(ellipse 80% 60% at 50% 0%, rgba(17, 122, 101, 0.2), transparent),
    linear-gradient(160deg, var(--sidebar-from) 0%, #0a3d34 55%, var(--brand-700) 100%);
  color: #fff;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-lg);
  align-items: center;
}

.hero-content {
  min-width: 0;
}

.hero-visual {
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-image {
  width: 100%;
  max-width: 520px;
  height: auto;
  border-radius: calc(var(--radius) + 8px);
  box-shadow: 0 24px 48px rgba(0, 0, 0, 0.28);
  object-fit: cover;
}

.hero h1 {
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  line-height: 1.25;
  margin: 0 0 var(--space-md);
}

.hero p {
  font-size: 1.05rem;
  color: rgba(255, 255, 255, 0.88);
  max-width: 52ch;
  margin: 0 0 var(--space-lg);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-sm);
}

.hero .btn-secondary {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.25);
}

/* Sections */
.section {
  padding: var(--space-xl) 0;
}

.section-title {
  text-align: center;
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin: 0 0 var(--space-sm);
}

.section-subtitle {
  text-align: center;
  color: var(--muted);
  max-width: 52ch;
  margin: 0 auto var(--space-lg);
}

/* Benefits grid */
.benefits-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
}

.benefit-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 2px);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
}

.benefit-icon {
  font-size: 1.75rem;
  margin-bottom: var(--space-sm);
}

.benefit-card h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1.05rem;
}

.benefit-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* Plans */
.plans-grid,
#pricingTeaser {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: var(--space-md);
  align-items: stretch;
}

.plan-card {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  gap: var(--space-sm);
}

.plan-card--highlighted {
  border-color: var(--brand-500);
  box-shadow: 0 16px 40px rgba(17, 122, 101, 0.2);
}

.plan-badge {
  position: absolute;
  top: -10px;
  inset-inline-start: var(--space-md);
  background: var(--brand-500);
  color: #fff;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
}

.plan-name {
  margin: 0;
  font-size: 1.25rem;
}

.plan-price {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--brand-700);
}

.plan-price--custom {
  font-size: 1.2rem;
}

.plan-price-unit {
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--muted);
}

.plan-limits {
  list-style: none;
  padding: 0;
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

.plan-limits li {
  margin-bottom: 0.25rem;
}

.plan-features {
  list-style: none;
  padding: 0;
  margin: var(--space-sm) 0;
  flex: 1;
  font-size: 0.9rem;
}

.plan-features li {
  display: flex;
  gap: 0.5rem;
  margin-bottom: 0.35rem;
}

.plan-features li.no {
  color: var(--muted);
  opacity: 0.65;
}

.plan-feat-icon {
  flex-shrink: 0;
  width: 1.1rem;
}

.plan-cta {
  margin-top: auto;
  width: 100%;
}

.offers-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-md);
}

.offer-card {
  background: var(--surface);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.offer-card h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
  color: var(--brand-600);
}

.offer-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--muted);
}

/* Features page */
.feature-section {
  margin-bottom: var(--space-xl);
}

.feature-section h2 {
  font-size: 1.35rem;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--border);
}

.feature-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: var(--space-md);
}

.feature-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
}

.feature-item h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
}

.feature-tier {
  font-size: 0.8rem;
  color: var(--brand-600);
  font-weight: 600;
}

/* FAQ */
.faq-list {
  max-width: 720px;
  margin: 0 auto;
}

.faq-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-md);
  margin-bottom: var(--space-sm);
}

.faq-item h3 {
  margin: 0 0 var(--space-xs);
  font-size: 1rem;
}

.faq-item p {
  margin: 0;
  color: var(--muted);
  font-size: 0.95rem;
}

/* CTA band */
.cta-band {
  background: linear-gradient(135deg, var(--brand-500), var(--brand-700));
  color: #fff;
  text-align: center;
  padding: var(--space-xl) var(--space-md);
  border-radius: calc(var(--radius) + 4px);
  margin: var(--space-xl) 0;
}

.cta-band h2 {
  margin: 0 0 var(--space-sm);
}

.cta-band p {
  margin: 0 0 var(--space-lg);
  color: rgba(255, 255, 255, 0.9);
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--brand-700);
  box-shadow: none;
}

/* Signup */
.signup-layout {
  padding: var(--space-xl) 0;
}

.signup-card {
  max-width: 520px;
  margin: 0 auto;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: var(--space-xl) var(--space-lg);
  box-shadow: var(--shadow);
}

.signup-card h1 {
  margin: 0 0 var(--space-xs);
  text-align: center;
}

.signup-card > p {
  text-align: center;
  color: var(--muted);
  margin: 0 0 var(--space-lg);
}

.plan-banner {
  background: rgba(17, 122, 101, 0.1);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: var(--space-sm) var(--space-md);
  margin-bottom: var(--space-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

.form-group {
  margin-bottom: var(--space-md);
}

.form-group label {
  display: block;
  font-weight: 600;
  margin-bottom: var(--space-xs);
  font-size: 0.9rem;
}

.input {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font: inherit;
  background: #fff;
}

.slug-row {
  display: flex;
  align-items: center;
  gap: var(--space-xs);
  flex-wrap: wrap;
}

.slug-prefix {
  font-size: 0.8rem;
  color: var(--muted);
  direction: ltr;
}

.form-divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: var(--space-lg) 0;
}

.hint-msg {
  font-size: 0.8rem;
  margin: var(--space-xs) 0 0;
  color: var(--muted);
}

.hint-msg.ok {
  color: var(--brand-600);
}

.hint-msg.warn {
  color: #b45309;
}

.error-msg {
  color: #b91c1c;
  font-size: 0.9rem;
  margin-top: var(--space-sm);
}

.success-msg {
  color: var(--brand-700);
  font-size: 0.95rem;
  line-height: 1.7;
  text-align: center;
}

.footer-link {
  text-align: center;
  margin-top: var(--space-md);
  font-size: 0.9rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  background: var(--sidebar-from);
  color: rgba(255, 255, 255, 0.85);
  padding: var(--space-xl) 0 var(--space-lg);
  margin-top: var(--space-xl);
}

.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: var(--space-lg);
  margin-bottom: var(--space-lg);
}

.footer-grid h4 {
  color: #fff;
  margin: 0 0 var(--space-sm);
  font-size: 0.95rem;
}

.footer-grid a {
  display: block;
  color: rgba(255, 255, 255, 0.75);
  margin-bottom: 0.35rem;
  text-decoration: none;
}

.footer-grid a:hover {
  color: #fff;
}

.footer-copy {
  text-align: center;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.55);
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: var(--space-md);
}

/* Page hero (inner pages) */
.page-hero {
  padding: var(--space-xl) 0 var(--space-lg);
  text-align: center;
}

.page-hero h1 {
  margin: 0 0 var(--space-sm);
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

.page-hero p {
  margin: 0 auto;
  max-width: 52ch;
  color: var(--muted);
}

@media (max-width: 768px) {
  .hero-grid {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .hero-content p {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .hero-visual {
    order: -1;
  }

  .hero-image {
    max-width: 360px;
  }

  .nav-toggle {
    display: block;
  }

  .site-nav {
    display: none;
    position: absolute;
    top: 100%;
    inset-inline: 0;
    flex-direction: column;
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md);
    box-shadow: var(--shadow);
  }

  .site-nav.open {
    display: flex;
  }

  .header-inner {
    position: relative;
    flex-wrap: wrap;
  }

  .header-actions .btn-ghost {
    display: none;
  }
}
