: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: 2rem;
  --space-lg: 1.5rem;
  --space-xl: 2.5rem;
  --font-ar: 'Noto Naskh Arabic', Georgia, serif;
  --font-en: 'Inter', system-ui, sans-serif;
  --hero-banner-bg: #043f3a;
}

*,
*::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: #ffffff;
  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;
  flex-shrink: 0;
}

.brand--lockup {
  text-decoration: none;
}

.brand--lockup:hover {
  text-decoration: none;
}

.brand-lockup-wrap {
  display: block;
  line-height: 0;
  flex-shrink: 1;
  min-width: 0;
}

.brand-lockup {
  display: block;
  height: 64px;
  width: auto;
  max-width: min(340px, 58vw);
  object-fit: contain;
}

.brand-logo-wrap {
  display: block;
  flex-shrink: 0;
  line-height: 0;
}

.brand-logo {
  display: block;
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.brand-text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand-text > span:first-child {
  color: var(--brand-600);
  font-weight: 700;
}

.brand-text small {
  display: block;
  font-size: 0.75rem;
  font-weight: 400;
  color: var(--brand-700);
  opacity: 0.85;
}

.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);
}

.header-end {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  flex-shrink: 0;
}

.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;
  grid-template-areas: 'content visual';
  gap: var(--space-lg);
  align-items: center;
}

.hero-content {
  grid-area: content;
  min-width: 0;
}

.hero-visual {
  grid-area: visual;
  display: flex;
  justify-content: center;
  align-items: center;
}

/* LTR: text left, image right — RTL: text right, image left (auto-mirrored) */

.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);
}

/* Full-width banner hero (index2.html) */
.hero-banner {
  color: #fff;
  background: #06413c;
  min-height: 600px;
  display: flex;
  align-items: center;
}

.hero-banner__layout {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'content art';
  align-items: center;
  gap: var(--space-lg);
  width: 100%;
  min-height: 600px;
  padding-inline: clamp(var(--space-md), 3vw, var(--space-xl));
}

html[dir='ltr'] .hero-banner__layout {
  direction: ltr;
  grid-template-areas: 'content art';
}

html[dir='rtl'] .hero-banner__layout {
  direction: rtl;
  grid-template-areas: 'content art';
}

.hero-banner__content {
  grid-area: content;
  max-width: min(560px, 100%);
  padding-block: var(--space-lg);
  padding-inline: clamp(var(--space-md), 2.5vw, var(--space-xl));
}

html[dir='ltr'] .hero-banner__content {
  padding-inline-start: clamp(var(--space-lg), 4vw, var(--space-xl));
  padding-inline-end: var(--space-md);
}

html[dir='rtl'] .hero-banner__content {
  padding-inline-end: clamp(var(--space-lg), 4vw, var(--space-xl));
  padding-inline-start: var(--space-md);
}

.hero-banner__art {
  grid-area: art;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  line-height: 0;
}

html[dir='rtl'] .hero-banner__art {
  justify-content: flex-start;
}

html[dir='rtl'] .hero-banner__art-img {
  transform: scaleX(-1);
}

.hero-banner__art-img {
  display: block;
  height: 600px;
  width: auto;
  max-width: min(900px, 50vw);
  object-fit: contain;
  border: none;
  outline: none;
  background: #06413c;
  vertical-align: top;
}

.hero-banner__content h1 {
  font-size: clamp(1.5rem, 3.2vw, 2.5rem);
  line-height: 1.25;
  margin: 0 0 var(--space-md);
}

.hero-banner__content p {
  font-size: clamp(0.95rem, 1.5vw, 1.05rem);
  color: rgba(255, 255, 255, 0.92);
  margin: 0 0 var(--space-lg);
}

.hero-banner .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);
  background: linear-gradient(180deg, rgba(17, 122, 101, 0.12) 0%, rgba(17, 122, 101, 0.05) 100%);
  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-num {
  font-weight: 700;
  unicode-bidi: isolate;
}

.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);
}

/* Contact */
.contact-layout {
  display: grid;
  grid-template-columns: 1fr 1.1fr;
  gap: var(--space-xl);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: var(--space-md);
}

.contact-card,
.contact-form-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: calc(var(--radius) + 4px);
  padding: var(--space-lg);
  box-shadow: var(--shadow);
}

.contact-card h2,
.contact-form-card h2 {
  margin: 0 0 var(--space-xs);
  font-size: 1.1rem;
}

.contact-card p {
  margin: 0 0 var(--space-sm);
  color: var(--muted);
  font-size: 0.95rem;
}

.contact-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.contact-link:hover {
  text-decoration: underline;
}

.textarea {
  resize: vertical;
  min-height: 120px;
}

/* Legal / policy */
.policy-updated {
  margin: var(--space-sm) auto 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.legal-content {
  max-width: 720px;
  margin: 0 auto;
}

.legal-section {
  margin-bottom: var(--space-xl);
}

.legal-section h2 {
  margin: 0 0 var(--space-md);
  font-size: 1.35rem;
}

.legal-section h3 {
  margin: var(--space-md) 0 var(--space-xs);
  font-size: 1.05rem;
}

.legal-section p {
  margin: 0 0 var(--space-sm);
  color: var(--text);
  line-height: 1.7;
}

.legal-contact {
  text-align: center;
  padding-top: var(--space-lg);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.legal-contact a {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
  margin-inline-start: 0.35rem;
}

.legal-contact a:hover {
  text-decoration: underline;
}

@media (max-width: 768px) {
  .contact-layout {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 960px) {
  .hero-banner {
    min-height: auto;
  }

  .hero-banner__layout {
    grid-template-columns: 1fr;
    grid-template-areas:
      'content'
      'art';
    min-height: auto;
    gap: var(--space-md);
    padding-block: var(--space-lg);
  }

  html[dir='ltr'] .hero-banner__layout,
  html[dir='rtl'] .hero-banner__layout {
    grid-template-areas:
      'content'
      'art';
  }

  html[dir='ltr'] .hero-banner__content,
  html[dir='rtl'] .hero-banner__content {
    padding-inline: var(--space-md);
    max-width: 100%;
    text-align: start;
  }

  html[dir='ltr'] .hero-banner__content .hero-actions,
  html[dir='rtl'] .hero-banner__content .hero-actions {
    justify-content: flex-start;
  }

  body.lang-en .hero-banner__content h1 {
    font-size: clamp(1.35rem, 5.2vw, 1.9rem);
    line-height: 1.3;
  }

  body.lang-en .hero-banner__content p {
    font-size: 0.95rem;
    line-height: 1.55;
  }

  .hero-banner__art {
    justify-content: center;
  }

  html[dir='rtl'] .hero-banner__art {
    justify-content: center;
  }

  .hero-banner__art-img {
    height: auto;
    max-height: min(280px, 55vw);
    max-width: 100%;
    width: auto;
  }
}

@media (max-width: 768px) {
  .container {
    width: min(1120px, 94vw);
  }

  .hero-grid {
    grid-template-columns: 1fr;
    grid-template-areas:
      'visual'
      'content';
    text-align: center;
  }

  .hero-content p {
    margin-inline: auto;
  }

  .hero-actions {
    justify-content: center;
  }

  .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: nowrap;
    align-items: center;
    gap: 0.65rem;
    padding-block: 0.55rem;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    padding-block: 0.1rem;
  }

  .brand-lockup-wrap {
    max-width: 100%;
  }

  .brand-lockup {
    height: 44px;
    max-width: min(240px, calc(100vw - 7.5rem));
    width: auto;
    object-fit: contain;
    object-position: start center;
  }

  .header-end {
    flex: 0 0 auto;
    gap: 0.4rem;
    margin-inline-start: auto;
    padding-inline-start: 0.25rem;
  }

  .nav-toggle {
    padding: 0.2rem 0.35rem;
    line-height: 1;
  }

  .header-actions .btn-ghost,
  .header-actions .btn-signup-header {
    display: none;
  }

  .header-actions .btn {
    padding: 0.55rem 0.85rem;
    font-size: 0.9rem;
  }

  .lang-toggle {
    padding: 0.35rem 0.55rem;
    font-size: 0.85rem;
  }
}

@media (max-width: 380px) {
  .header-inner {
    gap: 0.5rem;
    padding-block: 0.5rem;
  }

  .brand-lockup {
    height: 38px;
    max-width: min(200px, calc(100vw - 6.5rem));
  }

  body.lang-en .hero-banner__content h1 {
    font-size: 1.25rem;
  }
}
