/* ==========================================================================
   Jehati (جهاتي) - Official Website Stylesheet
   Pure vanilla CSS - Zero frameworks, zero build step
   Mobile-first, WCAG AA accessible, dark mode via prefers-color-scheme
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Typography / Self-hosted Web Fonts
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-medium.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-semibold.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-arabic-regular.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-arabic-medium.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans Arabic';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('../fonts/ibm-plex-sans-arabic-semibold.woff2') format('woff2');
}

/* --------------------------------------------------------------------------
   2. Design Tokens & Color Palette
   -------------------------------------------------------------------------- */
:root {
  /* Brand colors */
  --color-primary: #35685F;
  --color-primary-hover: #274F48;
  --color-primary-active: #1D3B36;
  --color-primary-light: #EDF5F3;
  --color-primary-subtle: #D8E8E4;
  --color-primary-tint: rgba(53, 104, 95, 0.08);

  /* Light mode neutrals (exceeds WCAG AA 4.5:1, typical > 7:1) */
  --color-bg: #FAFCFB;
  --color-surface: #FFFFFF;
  --color-surface-subtle: #F2F7F5;
  --color-surface-hover: #EBF2EF;
  --color-text: #121C1A;
  --color-text-muted: #445955;
  --color-border: #DCE6E3;
  --color-border-subtle: #E8EFECEE;

  /* Typography tokens */
  --font-en: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-ar: 'IBM Plex Sans Arabic', 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Tahoma, sans-serif;
  --font-current: var(--font-en);

  /* Elevation & Shadows */
  --shadow-sm: 0 2px 8px rgba(18, 28, 26, 0.04);
  --shadow-md: 0 8px 24px rgba(18, 28, 26, 0.06);
  --shadow-lg: 0 16px 40px rgba(18, 28, 26, 0.08);

  /* Radius */
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --radius-xl: 28px;
  --radius-full: 9999px;

  /* Layout */
  --container-max: 1120px;
  --container-reading: 780px;
  --header-height: 72px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --color-primary: #5EA396;
    --color-primary-hover: #75B5A9;
    --color-primary-active: #8EC8BD;
    --color-primary-light: #162B27;
    --color-primary-subtle: #233C37;
    --color-primary-tint: rgba(94, 163, 150, 0.12);

    --color-bg: #0D1615;
    --color-surface: #142220;
    --color-surface-subtle: #1B2B28;
    --color-surface-hover: #223633;
    --color-text: #EFF5F4;
    --color-text-muted: #A3BAB5;
    --color-border: #283D39;
    --color-border-subtle: #1E302D;

    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 8px 24px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.55);
  }
}

/* --------------------------------------------------------------------------
   3. Reset & Base Elements
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
}

html {
  font-size: 100%;
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  padding: 0;
  font-family: var(--font-current);
  background-color: var(--color-bg);
  color: var(--color-text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html[lang="ar"],
html[dir="rtl"] {
  --font-current: var(--font-ar);
  direction: rtl;
}

/* Skip to content link for accessibility */
.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 1000;
  padding: 12px 20px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  text-decoration: none;
  font-weight: 600;
  border-radius: var(--radius-sm);
  transition: top 0.2s ease;
}

html[dir="rtl"] .skip-link {
  left: auto;
  right: 16px;
}

.skip-link:focus {
  top: 16px;
  outline: 3px solid #FFFFFF;
}

/* Accessible focus styling */
:focus-visible {
  outline: 3px solid var(--color-primary);
  outline-offset: 3px;
}

img, svg {
  display: block;
  max-width: 100%;
  height: auto;
}

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  transition: color 0.15s ease, text-decoration-color 0.15s ease;
}

a:hover {
  color: var(--color-primary-hover);
  text-decoration-thickness: 2px;
}

h1, h2, h3, h4, h5, h6 {
  color: var(--color-text);
  line-height: 1.25;
  margin-top: 0;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 5vw, 3.25rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.25rem); letter-spacing: -0.015em; }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }
p { margin: 0 0 1.25rem 0; }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

.reading-container {
  width: 100%;
  max-width: var(--container-reading);
  margin-left: auto;
  margin-right: auto;
  padding-left: 20px;
  padding-right: 20px;
}

/* --------------------------------------------------------------------------
   4. Header & Navigation
   -------------------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--header-height);
  background-color: rgba(250, 252, 251, 0.85);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--color-border);
  display: flex;
  align-items: center;
}

@media (prefers-color-scheme: dark) {
  .site-header {
    background-color: rgba(13, 22, 21, 0.85);
  }
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--color-text);
  font-size: 1.35rem;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.brand-icon {
  width: 36px;
  height: 36px;
  border-radius: 9px;
  overflow: hidden;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.12);
}

.nav-wrap {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 20px;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  font-size: 0.95rem;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  transition: color 0.15s ease, background-color 0.15s ease;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--color-primary);
  background-color: var(--color-primary-tint);
}

/* Language switch link - Works 100% without JS */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-primary);
  background-color: var(--color-primary-light);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: all 0.2s ease;
}

.lang-switch:hover {
  background-color: var(--color-primary-subtle);
  color: var(--color-primary-hover);
  text-decoration: none;
}

/* Mobile navigation toggle (accessible, semantic) */
.mobile-nav-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--color-text);
  border-radius: var(--radius-sm);
}

@media (max-width: 768px) {
  .mobile-nav-toggle {
    display: block;
  }

  .nav-wrap {
    position: absolute;
    top: var(--header-height);
    left: 0;
    right: 0;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    flex-direction: column;
    padding: 20px;
    gap: 16px;
    display: none;
    box-shadow: var(--shadow-lg);
  }

  .nav-wrap.is-open {
    display: flex;
  }

  .nav-links {
    flex-direction: column;
    width: 100%;
    gap: 8px;
  }

  .nav-links li {
    width: 100%;
  }

  .nav-links a {
    display: block;
    padding: 10px 14px;
    font-size: 1.05rem;
  }

  .lang-switch {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }
}

/* --------------------------------------------------------------------------
   5. Hero Section
   -------------------------------------------------------------------------- */
.hero {
  padding: clamp(48px, 8vw, 84px) 0 40px;
  position: relative;
  overflow: hidden;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 48px;
  align-items: center;
}

@media (min-width: 900px) {
  .hero-grid {
    grid-template-columns: 1.15fr 0.85fr;
    gap: 64px;
  }
}

.hero-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.badge-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  font-size: 0.85rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  width: fit-content;
  border: 1px solid var(--color-border);
}

.hero-title {
  margin: 0;
  font-size: clamp(2.4rem, 5.5vw, 3.8rem);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.025em;
}

.hero-title .brand-accent {
  color: var(--color-primary);
}

.hero-tagline {
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  color: var(--color-primary);
  font-weight: 500;
  line-height: 1.4;
  margin: 0;
}

.hero-desc {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  color: var(--color-text-muted);
  line-height: 1.6;
  margin: 0;
  max-width: 580px;
}

/* Store Buttons & Badges */
.store-buttons-wrap {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-top: 8px;
}

.store-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
}

.store-badge-link {
  display: inline-block;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  border-radius: 8px;
}

.store-badge-link:hover {
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.store-badge-link img {
  height: 44px;
  width: auto;
}

.coming-soon-note {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.coming-soon-dot {
  width: 8px;
  height: 8px;
  background-color: var(--color-primary);
  border-radius: 50%;
  display: inline-block;
}

/* Phone Mockup Frame */
.hero-mockup {
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
}

.section-mockup {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  margin-top: 48px;
  text-align: center;
}

.phone-mockup {
  width: 100%;
  max-width: 290px;
  border-radius: 36px;
  border: 6px solid #1a2725;
  box-shadow: 0 20px 48px rgba(18, 28, 26, 0.16);
  overflow: hidden;
  background: var(--color-surface);
  line-height: 0;
  margin: 0 auto;
  transition: transform 0.3s ease;
}

@media (prefers-color-scheme: dark) {
  .phone-mockup {
    border-color: #243532;
    box-shadow: 0 24px 48px rgba(0, 0, 0, 0.6);
  }
}

.phone-mockup:hover {
  transform: translateY(-4px);
}

.phone-screen {
  width: 100%;
  height: auto;
  display: block;
}

.mockup-caption {
  font-size: 0.875rem;
  color: var(--color-text-muted);
  margin-top: 14px;
  text-align: center;
}

.section-subnote {
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 500;
  margin-top: 10px;
}

/* --------------------------------------------------------------------------
   6. Feature Sections & Cards (Chat Bubble Motifs)
   -------------------------------------------------------------------------- */
.section {
  padding: clamp(60px, 9vw, 96px) 0;
  border-top: 1px solid var(--color-border-subtle);
}

.section-header {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 52px;
}

.section-tag {
  color: var(--color-primary);
  font-size: 0.875rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 8px;
  display: block;
}

.section-header h2 {
  margin-bottom: 16px;
}

.section-header p {
  color: var(--color-text-muted);
  font-size: 1.125rem;
  margin: 0;
}

/* Grid Layouts */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

.grid-3 {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
}

/* Feature Cards with subtle chat-bubble shape */
.feature-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 32px 28px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: relative;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  box-shadow: var(--shadow-sm);
}

.feature-card:hover {
  transform: translateY(-3px);
  border-color: var(--color-primary-subtle);
  box-shadow: var(--shadow-md);
}

.card-header-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
}

.feature-pill-plus {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  line-height: 1;
}

/* Chat bubble motif badge */
.card-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background-color: var(--color-primary-light);
  color: var(--color-primary);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.card-icon svg {
  width: 22px;
  height: 22px;
  stroke: var(--color-primary);
}

.feature-card h3 {
  margin: 0;
  font-size: 1.25rem;
  color: var(--color-text);
}

.feature-card p {
  margin: 0;
  color: var(--color-text-muted);
  font-size: 0.975rem;
  line-height: 1.6;
}

/* Chat Bubble Interactive Visual Samples */
.chat-conversation-demo {
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 32px 24px;
  max-width: 720px;
  margin: 40px auto 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  align-items: flex-end; /* All bubbles sit on the right in LTR */
}

html[dir="rtl"] .chat-conversation-demo {
  align-items: flex-start; /* In RTL, start is the right side */
}

.chat-bubble {
  max-width: 82%;
  padding: 16px 20px;
  border-radius: 18px;
  font-size: 0.95rem;
  line-height: 1.5;
  position: relative;
  box-shadow: var(--shadow-sm);
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-bottom-right-radius: 4px;
}

html[dir="rtl"] .chat-bubble {
  border-bottom-right-radius: 4px;
  border-bottom-left-radius: 18px;
}

.bubble-meta {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 8px;
  font-size: 0.775rem;
  opacity: 0.85;
}

.chat-checklist {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.checklist-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.check-box {
  width: 18px;
  height: 18px;
  border: 1.5px solid var(--color-primary);
  border-radius: 4px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background-color: var(--color-surface);
}

.check-box.checked {
  background-color: var(--color-primary);
}

.check-box.checked svg {
  stroke: #FFFFFF;
}

/* --------------------------------------------------------------------------
   7. Jehati Plus Section
   -------------------------------------------------------------------------- */
.plus-banner {
  background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-primary-light) 100%);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: clamp(36px, 6vw, 60px) clamp(24px, 5vw, 56px);
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-md);
}

@media (prefers-color-scheme: dark) {
  .plus-banner {
    background: linear-gradient(135deg, var(--color-surface) 0%, var(--color-surface-subtle) 100%);
  }
}

.plus-content {
  max-width: 760px;
}

.plus-badge {
  display: inline-block;
  padding: 4px 12px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  margin-bottom: 16px;
  letter-spacing: 0.05em;
}

.plus-banner h2 {
  margin-bottom: 16px;
  font-size: clamp(1.8rem, 3.5vw, 2.4rem);
}

.plus-banner p {
  color: var(--color-text-muted);
  font-size: 1.075rem;
  margin-bottom: 20px;
  line-height: 1.6;
}

.plus-features-list {
  list-style: none;
  padding: 0;
  margin: 24px 0 32px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

@media (min-width: 600px) {
  .plus-features-list {
    grid-template-columns: repeat(2, 1fr);
  }
}

.plus-features-list li {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1rem;
  color: var(--color-text);
  font-weight: 500;
}

.plus-check-icon {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background-color: var(--color-primary);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.plus-guarantee-note {
  padding: 16px 20px;
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  font-size: 0.95rem;
  color: var(--color-text);
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   8. Reader / Legal Page Layouts (Privacy & Terms)
   -------------------------------------------------------------------------- */
.page-header {
  padding: clamp(48px, 7vw, 72px) 0 32px;
  text-align: center;
  border-bottom: 1px solid var(--color-border-subtle);
  margin-bottom: 40px;
}

.page-header h1 {
  margin-bottom: 12px;
}

.effective-date {
  color: var(--color-text-muted);
  font-size: 0.95rem;
  font-weight: 500;
}

.summary-callout {
  background-color: var(--color-primary-light);
  border: 1px solid var(--color-primary-subtle);
  border-left: 4px solid var(--color-primary);
  border-radius: var(--radius-md);
  padding: 24px 28px;
  margin-bottom: 44px;
}

html[dir="rtl"] .summary-callout {
  border-left: 1px solid var(--color-primary-subtle);
  border-right: 4px solid var(--color-primary);
}

.summary-callout h2 {
  font-size: 1.25rem;
  color: var(--color-primary);
  margin-bottom: 10px;
}

.summary-callout p:last-child {
  margin-bottom: 0;
}

.legal-content section {
  margin-bottom: 44px;
}

.legal-content h2 {
  font-size: 1.5rem;
  margin-top: 36px;
  margin-bottom: 16px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border-subtle);
}

.legal-content h3 {
  font-size: 1.2rem;
  margin-top: 24px;
  margin-bottom: 12px;
}

.legal-content ul, 
.legal-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}

html[dir="rtl"] .legal-content ul,
html[dir="rtl"] .legal-content ol {
  padding-left: 0;
  padding-right: 24px;
}

.legal-content li {
  margin-bottom: 10px;
  line-height: 1.6;
}

.legal-content strong {
  color: var(--color-text);
}

/* --------------------------------------------------------------------------
   9. Support & FAQ Page Layout
   -------------------------------------------------------------------------- */
.support-hero {
  text-align: center;
  max-width: 680px;
  margin: 0 auto 48px;
}

.email-cta-box {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-xl);
  padding: 36px 24px;
  text-align: center;
  box-shadow: var(--shadow-sm);
  margin-bottom: 48px;
}

.btn-primary-large {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background-color: var(--color-primary);
  color: #FFFFFF;
  font-size: 1.15rem;
  font-weight: 600;
  padding: 16px 36px;
  border-radius: var(--radius-full);
  text-decoration: none;
  box-shadow: 0 4px 14px rgba(53, 104, 95, 0.35);
  transition: all 0.2s ease;
}

.btn-primary-large:hover {
  background-color: var(--color-primary-hover);
  color: #FFFFFF;
  text-decoration: none;
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(53, 104, 95, 0.45);
}

.support-troubleshooting-card {
  background-color: var(--color-surface-subtle);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  margin-bottom: 48px;
}

.support-troubleshooting-card h3 {
  margin-bottom: 12px;
}

.support-troubleshooting-card ul {
  padding-left: 20px;
  margin-bottom: 14px;
}

html[dir="rtl"] .support-troubleshooting-card ul {
  padding-left: 0;
  padding-right: 20px;
}

.faq-section {
  margin-top: 40px;
}

.faq-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-top: 24px;
}

.faq-item {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  box-shadow: var(--shadow-sm);
}

.faq-item h3 {
  font-size: 1.15rem;
  margin-bottom: 10px;
  color: var(--color-text);
}

.faq-item p:last-child {
  margin-bottom: 0;
  color: var(--color-text-muted);
}

.response-note {
  text-align: center;
  font-size: 0.95rem;
  color: var(--color-text-muted);
  font-style: italic;
  margin-top: 36px;
}

/* --------------------------------------------------------------------------
   10. 404 Error Page
   -------------------------------------------------------------------------- */
.error-page-wrap {
  min-height: 60vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: 60px 20px;
}

.error-code {
  font-size: clamp(4rem, 12vw, 7rem);
  font-weight: 600;
  color: var(--color-primary);
  line-height: 1;
  margin-bottom: 16px;
}

.error-title {
  font-size: clamp(1.4rem, 3vw, 2rem);
  margin-bottom: 16px;
}

.error-links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  justify-content: center;
  margin-top: 28px;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background-color: var(--color-surface);
  color: var(--color-text);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  text-decoration: none;
  font-weight: 500;
  transition: all 0.2s ease;
  font-size: 0.95rem;
  box-shadow: var(--shadow-sm);
}

.btn-secondary:hover {
  background-color: var(--color-surface-hover);
  color: var(--color-primary);
  border-color: var(--color-primary-subtle);
  transform: translateY(-1px);
  text-decoration: none;
}

.section-cta-wrap {
  display: flex;
  justify-content: center;
  margin-top: 48px;
}

.plus-terms-link-wrap {
  display: flex;
  justify-content: flex-start;
  margin-top: 24px;
}

/* --------------------------------------------------------------------------
   11. Footer
   -------------------------------------------------------------------------- */
.site-footer {
  border-top: 1px solid var(--color-border);
  background-color: var(--color-surface);
  padding: 48px 0 36px;
  margin-top: 80px;
  font-size: 0.925rem;
}

.footer-inner {
  display: flex;
  flex-direction: column;
  gap: 28px;
}

@media (min-width: 768px) {
  .footer-inner {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.footer-brand-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 28px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links a {
  color: var(--color-text-muted);
  text-decoration: none;
  font-weight: 500;
  transition: color 0.15s ease;
}

.footer-links a:hover {
  color: var(--color-primary);
  text-decoration: underline;
}

.footer-copyright {
  color: var(--color-text-muted);
  font-size: 0.875rem;
  margin: 0;
}

.footer-copyright a {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 3px;
  transition: color 0.15s ease;
}

.footer-copyright a:hover {
  color: var(--color-primary);
}

/* --------------------------------------------------------------------------
   12. Utilities & Media Optimization
   -------------------------------------------------------------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/* --------------------------------------------------------------------------
   14. CSP-Compliant Helper Classes (404 and Support Pages)
   -------------------------------------------------------------------------- */
.error-desc {
  color: var(--color-text-muted);
  max-width: 480px;
  margin-bottom: 24px;
}

.error-ar-section {
  margin-top: 16px;
  margin-bottom: 32px;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
  width: 100%;
  max-width: 480px;
}

.error-ar-title {
  font-size: 1.5rem;
  margin-bottom: 8px;
}

.error-ar-desc {
  color: var(--color-text-muted);
  margin-bottom: 0;
}

.error-cta-btn {
  padding: 12px 28px;
  font-size: 1rem;
}

.support-intro-text {
  margin-bottom: 20px;
  font-size: 1.1rem;
  color: var(--color-text);
}

.support-sub-text {
  color: var(--color-text-muted);
  font-size: 0.95rem;
}

.support-warning-text {
  margin: 0;
  font-size: 0.9rem;
  color: var(--color-primary);
  font-weight: 500;
}

.faq-section-title {
  text-align: center;
  margin-bottom: 24px;
}

.faq-ordered-list {
  margin: 8px 0 0;
  padding-left: 20px;
}

html[dir="rtl"] .faq-ordered-list {
  padding-left: 0;
  padding-right: 20px;
}

/* --------------------------------------------------------------------------
   14. Features Page Layout & Comparison Table
   -------------------------------------------------------------------------- */
.features-page-header {
  text-align: center;
  margin-bottom: 32px;
}

.features-subline {
  font-size: 1.2rem;
  color: var(--color-text-muted);
  max-width: 680px;
  margin: 12px auto 0;
  line-height: 1.5;
}

.features-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 28px 0 48px;
}

.features-nav a {
  display: inline-block;
  padding: 6px 14px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-full);
  color: var(--color-text-muted);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.15s ease;
}

.features-nav a:hover {
  color: var(--color-primary);
  border-color: var(--color-primary-subtle);
  background: var(--color-surface-hover);
}

.feature-group {
  margin-bottom: 48px;
}

.feature-group h2 {
  font-size: 1.5rem;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--color-border);
  color: var(--color-text);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.feature-item-card {
  background-color: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 12px;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.feature-item-card:hover {
  border-color: var(--color-primary-subtle);
  box-shadow: var(--shadow-sm);
}

.feature-item-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.feature-item-title {
  font-size: 1.05rem;
  font-weight: 600;
  margin: 0;
  color: var(--color-text);
  line-height: 1.35;
}

.feature-item-desc {
  font-size: 0.925rem;
  color: var(--color-text-muted);
  margin: 0;
  line-height: 1.5;
}

.badge-tier {
  display: inline-flex;
  align-items: center;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 4px;
  line-height: 1.3;
  white-space: nowrap;
  flex-shrink: 0;
}

.badge-tier.tier-free {
  background: var(--color-bg);
  color: var(--color-text-muted);
  border: 1px solid var(--color-border);
}

.badge-tier.tier-plus {
  background: var(--color-primary-light);
  color: var(--color-primary);
  border: 1px solid var(--color-primary-subtle);
}

.features-table-wrap {
  margin: 64px 0 32px;
  width: 100%;
}

.features-table-title {
  font-size: 1.5rem;
  margin-bottom: 20px;
  text-align: center;
  color: var(--color-text);
}

.features-table {
  width: 100%;
  border-collapse: collapse;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  overflow: hidden;
  font-size: 0.95rem;
}

.features-table th,
.features-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--color-border);
  text-align: start;
}

.features-table thead th {
  background: var(--color-bg);
  font-weight: 600;
  color: var(--color-text);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.features-table thead th:nth-child(2),
.features-table thead th:nth-child(3),
.features-table tbody td:nth-child(2),
.features-table tbody td:nth-child(3) {
  text-align: center;
}

.features-table tbody th {
  font-weight: 500;
  color: var(--color-text);
}

.features-table tbody tr:last-child th,
.features-table tbody tr:last-child td {
  border-bottom: none;
}

.features-table tbody tr:hover {
  background: var(--color-surface-hover);
}

.features-closing-note {
  margin: 32px auto 64px;
  max-width: 760px;
  padding: 20px 24px;
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  text-align: center;
  font-size: 1rem;
  line-height: 1.6;
  color: var(--color-text-muted);
}

@media (max-width: 600px) {
  .features-grid {
    grid-template-columns: 1fr;
  }
  .features-table th,
  .features-table td {
    padding: 10px 12px;
    font-size: 0.875rem;
  }
  .features-subline {
    font-size: 1.05rem;
  }
}
