/* Saad Web — RTL/LTR — ألوان دقيقة (sRGB) ووضوح مرتفع */
:root {
  --heritage-green: #1a3328;
  --heritage-green-light: #2d4d3e;
  --cream-mist: #f6f3ea;
  --gold-heritage: #c9ae7a;
  --gold-heritage-soft: rgba(201, 174, 122, 0.38);
  --bg-deep: #040a08;
  --bg-card: rgba(16, 38, 30, 0.62);
  --bg-card-solid: #0d221a;
  --emerald: #186b52;
  --emerald-bright: #22a078;
  --gold: var(--gold-heritage);
  --gold-soft: var(--gold-heritage-soft);
  --text: #f0faf5;
  --text-muted: rgba(240, 250, 245, 0.78);
  --border: rgba(201, 174, 122, 0.34);
  /* مربع الشعار بارتفاع يقارب عمود الاسم + الشعار النصي (~1.2rem + 0.68rem × line-height) */
  --logo-tile-header: clamp(32px, 2.35rem, 40px);
  --logo-tile-footer: 72px;
  --radius-lg: 24px;
  --radius-md: 16px;
  --shadow-glow: 0 0 100px rgba(34, 160, 120, 0.18), 0 0 48px rgba(201, 174, 122, 0.07);
  --font-display: "IBM Plex Sans Arabic", "Tajawal", "Segoe UI", system-ui, sans-serif;
  --font-crest: "Cormorant Garamond", "Times New Roman", serif;
  --font-body: "Almarai", "IBM Plex Sans Arabic", "Segoe UI", sans-serif;
  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

/* علامة مائية خفيفة — صقر الشعار */
body.page-heritage::before {
  content: "";
  position: fixed;
  inset: -15%;
  z-index: 0;
  background: url("../brand/saad-logo.png") 52% 42% / min(72vw, 520px) no-repeat;
  opacity: 0.038;
  pointer-events: none;
  filter: saturate(0.92) contrast(1.02);
  animation: falcon-watermark-drift 120s ease-in-out infinite alternate;
}

@keyframes falcon-watermark-drift {
  0% {
    transform: translate(0, 0) rotate(-2deg);
  }
  100% {
    transform: translate(-2%, 1.5%) rotate(1deg);
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-deep);
  color: var(--text);
  line-height: 1.75;
  overflow-x: hidden;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: geometricPrecision;
  opacity: 0;
  transition: opacity 0.25s ease;
}

body.i18n-ready {
  opacity: 1;
}

.bg-mesh {
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 85% at 50% -25%, rgba(34, 160, 120, 0.34), transparent 58%),
    radial-gradient(ellipse 70% 55% at 100% 20%, rgba(201, 174, 122, 0.1), transparent 52%),
    radial-gradient(ellipse 55% 45% at 0% 85%, rgba(26, 51, 40, 0.52), transparent 48%),
    radial-gradient(ellipse 40% 30% at 80% 100%, rgba(246, 243, 234, 0.045), transparent 50%),
    var(--bg-deep);
  pointer-events: none;
}

.bg-grid {
  position: fixed;
  inset: 0;
  z-index: 0;
  opacity: 0.055;
  background-image:
    linear-gradient(rgba(201, 174, 122, 0.38) 1px, transparent 1px),
    linear-gradient(90deg, rgba(201, 174, 122, 0.38) 1px, transparent 1px);
  background-size: 48px 48px;
  pointer-events: none;
  mask-image: radial-gradient(ellipse 70% 70% at 50% 30%, black, transparent);
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem 4rem;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 1rem 0;
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  background: linear-gradient(180deg, rgba(6, 13, 10, 0.88), rgba(6, 13, 10, 0.72));
  border-bottom: 1px solid var(--border);
  transition: padding 0.35s var(--ease-out), background 0.35s, box-shadow 0.35s, border-color 0.35s;
}

.site-header.is-scrolled {
  padding: 0.55rem 0;
  background: rgba(8, 20, 16, 0.92);
  border-bottom-color: rgba(196, 165, 116, 0.35);
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.35);
}

.site-header__inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.header-tools {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.locale-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.locale-wrap label {
  font-size: 0.75rem;
  color: var(--text-muted);
  white-space: nowrap;
}

.locale-wrap select {
  padding: 0.45rem 0.65rem;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
  font-size: 0.85rem;
  cursor: pointer;
  min-width: 8rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  color: inherit;
}

.brand--crest {
  gap: 0.65rem;
  align-items: center;
}

.brand__logo-wrap {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: visible;
  width: var(--logo-tile-header);
  height: var(--logo-tile-header);
  border-radius: 11px;
  background: linear-gradient(168deg, rgba(26, 51, 40, 0.98) 0%, rgba(8, 18, 14, 0.99) 100%);
  border: 1px solid rgba(201, 174, 122, 0.38);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.07),
    0 4px 18px rgba(0, 0, 0, 0.42);
}

.brand__logo-ring {
  position: absolute;
  inset: -4px;
  border-radius: 14px;
  background: conic-gradient(from 210deg, transparent, rgba(201, 174, 122, 0.32), transparent 55%);
  animation: crest-ring-spin 14s linear infinite;
  opacity: 0.8;
  pointer-events: none;
}

@keyframes crest-ring-spin {
  to {
    transform: rotate(360deg);
  }
}

.brand__logo-img {
  position: relative;
  z-index: 1;
  width: calc(100% - 8px);
  height: calc(100% - 8px);
  max-width: calc(100% - 8px);
  max-height: calc(100% - 8px);
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  animation: crest-logo-in 1.15s var(--ease-out) both, crest-logo-glow 6s ease-in-out 1.2s infinite;
}

@keyframes crest-logo-in {
  from {
    opacity: 0;
    transform: scale(0.88) translateY(8px);
  }
  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes crest-logo-glow {
  0%,
  100% {
    filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35)) drop-shadow(0 0 14px rgba(34, 160, 120, 0.12));
  }
  50% {
    filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.4)) drop-shadow(0 0 20px rgba(201, 174, 122, 0.18));
  }
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.25;
}

.brand__name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: -0.02em;
}

.brand__tag {
  font-size: 0.68rem;
  color: var(--text-muted);
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.site-footer__crest {
  margin-bottom: 1rem;
  display: flex;
  justify-content: center;
}

.site-footer__logo {
  width: var(--logo-tile-footer);
  height: var(--logo-tile-footer);
  padding: 10px;
  object-fit: contain;
  object-position: center;
  border-radius: 16px;
  background: linear-gradient(168deg, rgba(26, 51, 40, 0.95), rgba(8, 18, 14, 0.98));
  border: 1px solid rgba(201, 174, 122, 0.32);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06), 0 6px 24px rgba(0, 0, 0, 0.35);
  opacity: 0.96;
  backface-visibility: hidden;
  transform: translateZ(0);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.site-nav a {
  color: var(--text-muted);
  text-decoration: none;
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  font-size: 0.92rem;
  transition: color 0.2s var(--ease-out), background 0.2s var(--ease-out);
}

.site-nav a:hover {
  color: var(--text);
  background: rgba(201, 174, 122, 0.1);
}

.nav-toggle {
  display: none;
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text);
  width: 44px;
  height: 44px;
  border-radius: 12px;
  cursor: pointer;
  font-size: 1.25rem;
}

@media (max-width: 900px) {
  .nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
  }
  .site-nav {
    position: fixed;
    top: 72px;
    flex-direction: column;
    align-items: stretch;
    padding: 1rem;
    background: var(--bg-card-solid);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    min-width: 200px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: opacity 0.25s, transform 0.25s, visibility 0.25s;
    z-index: 99;
  }
  html[dir="rtl"] .site-nav {
    left: 1rem;
    right: auto;
  }
  html[dir="ltr"] .site-nav {
    right: 1rem;
    left: auto;
  }
  .site-nav.is-open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
  }
}

.hero {
  padding: 4rem 0 5rem;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.hero__heritage-emblem {
  position: absolute;
  left: 50%;
  top: 42%;
  transform: translate(-50%, -50%);
  width: min(52vw, 300px);
  height: min(52vw, 300px);
  max-width: min(52vw, 300px);
  max-height: min(52vw, 300px);
  aspect-ratio: 1;
  pointer-events: none;
  z-index: 0;
  opacity: 0.12;
  border-radius: 22px;
  border: 1px solid rgba(201, 174, 122, 0.12);
  background: rgba(4, 10, 8, 0.25);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.hero__heritage-emblem-img {
  width: 100%;
  height: 100%;
  padding: 12px;
  object-fit: contain;
  object-position: center;
  image-rendering: auto;
  backface-visibility: hidden;
  transform: translateZ(0);
  filter: saturate(0.95) contrast(1.03) brightness(1.02);
  animation: hero-emblem-float 8s ease-in-out infinite;
}

.hero__heritage-shine {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    transparent 35%,
    rgba(255, 255, 255, 0.12) 50%,
    transparent 65%
  );
  background-size: 200% 100%;
  animation: hero-emblem-shine 5s ease-in-out infinite;
  mix-blend-mode: overlay;
}

@keyframes hero-emblem-float {
  0%,
  100% {
    transform: translateY(0) scale(1);
  }
  50% {
    transform: translateY(-8px) scale(1.02);
  }
}

@keyframes hero-emblem-shine {
  0% {
    background-position: 120% 0;
  }
  100% {
    background-position: -120% 0;
  }
}

.hero-orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.5;
  transition: transform 0.1s linear;
}

.hero-orb--1 {
  width: min(90vw, 420px);
  height: min(90vw, 420px);
  background: var(--emerald);
  top: -80px;
}

html[dir="rtl"] .hero-orb--1 {
  right: 10%;
  left: auto;
}
html[dir="ltr"] .hero-orb--1 {
  left: 10%;
  right: auto;
}

.hero-orb--2 {
  width: min(70vw, 300px);
  height: min(70vw, 300px);
  background: var(--gold);
  bottom: 10%;
  opacity: 0.2;
}

html[dir="rtl"] .hero-orb--2 {
  left: 5%;
  right: auto;
}
html[dir="ltr"] .hero-orb--2 {
  right: 5%;
  left: auto;
}

.hero__badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.4rem 1rem;
  border-radius: 999px;
  background: rgba(196, 165, 116, 0.14);
  border: 1px solid var(--border);
  font-size: 0.8rem;
  color: var(--gold);
  margin-bottom: 1.5rem;
  animation: fadeUp 0.8s var(--ease-out) both;
  position: relative;
  z-index: 1;
}

.hero__title {
  font-family: var(--font-crest), var(--font-display);
  font-weight: 700;
  font-size: clamp(2.15rem, 5.8vw, 3.65rem);
  line-height: 1.12;
  letter-spacing: 0.02em;
  margin-bottom: 1rem;
  background: linear-gradient(135deg, #fffef8 0%, #d8efe4 38%, var(--gold) 92%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: fadeUp 0.8s 0.1s var(--ease-out) both;
  position: relative;
  z-index: 1;
  text-shadow: 0 0 40px rgba(196, 165, 116, 0.15);
}

.hero__lead {
  max-width: 38rem;
  margin: 0 auto 2rem;
  color: var(--text-muted);
  font-size: 1.1rem;
  animation: fadeUp 0.8s 0.2s var(--ease-out) both;
  position: relative;
  z-index: 1;
}

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: center;
  animation: fadeUp 0.8s 0.3s var(--ease-out) both;
  position: relative;
  z-index: 1;
}

.hero .stats {
  position: relative;
  z-index: 1;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.75rem;
  border-radius: 999px;
  font-family: inherit;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: transform 0.2s var(--ease-out), box-shadow 0.2s;
}

.btn--primary {
  background: linear-gradient(135deg, var(--emerald-bright), var(--emerald));
  color: #fff;
  box-shadow: 0 8px 32px rgba(13, 122, 79, 0.45);
}

.btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(13, 122, 79, 0.55);
}

.btn--ghost {
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  border: 1px solid var(--border);
}

.btn--ghost:hover {
  background: rgba(212, 175, 55, 0.1);
  border-color: var(--gold-soft);
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(24px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.section {
  padding: 4rem 0;
}

.section__head {
  text-align: center;
  margin-bottom: 3rem;
}

.section__kicker {
  font-size: 0.8rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 0.5rem;
}

.section__title {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 3vw, 2.25rem);
  font-weight: 700;
}

.section__desc {
  max-width: 36rem;
  margin: 0.75rem auto 0;
  color: var(--text-muted);
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}

.card {
  position: relative;
  padding: 1.75rem;
  border-radius: var(--radius-lg);
  background: var(--bg-card);
  border: 1px solid var(--border);
  backdrop-filter: blur(12px);
  transition: transform 0.35s var(--ease-out), border-color 0.35s, box-shadow 0.35s;
  overflow: hidden;
}

.card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(145deg, rgba(212, 175, 55, 0.06), transparent 50%);
  pointer-events: none;
}

.card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.4);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.35);
}

.card__icon {
  width: 52px;
  height: 52px;
  border-radius: 14px;
  background: linear-gradient(145deg, rgba(13, 122, 79, 0.4), rgba(5, 40, 28, 0.8));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1rem;
  border: 1px solid var(--border);
}

.card h3 {
  font-family: var(--font-display);
  font-size: 1.15rem;
  margin-bottom: 0.5rem;
}

.card p {
  color: var(--text-muted);
  font-size: 0.95rem;
}

.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.stat {
  text-align: center;
  padding: 1.5rem;
  border-radius: var(--radius-md);
  background: rgba(12, 28, 22, 0.5);
  border: 1px solid var(--border);
}

.stat__num {
  font-family: var(--font-display);
  font-size: 2.25rem;
  font-weight: 800;
  background: linear-gradient(180deg, #fff, var(--emerald-bright));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.stat__label {
  font-size: 0.85rem;
  color: var(--text-muted);
  margin-top: 0.25rem;
}

.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease-out), transform 0.7s var(--ease-out);
}

.reveal--in {
  opacity: 1;
  transform: translateY(0);
}

.cta-strip {
  margin: 3rem 0;
  padding: 3rem 2rem;
  border-radius: var(--radius-lg);
  text-align: center;
  background: linear-gradient(135deg, rgba(13, 122, 79, 0.35), rgba(5, 20, 15, 0.9));
  border: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

.cta-strip::after {
  content: "";
  position: absolute;
  inset: -50%;
  background: radial-gradient(circle, rgba(212, 175, 55, 0.12), transparent 60%);
  pointer-events: none;
}

.cta-strip h2 {
  font-family: var(--font-display);
  font-size: 1.5rem;
  margin-bottom: 0.75rem;
  position: relative;
}

.cta-strip p {
  color: var(--text-muted);
  margin-bottom: 1.5rem;
  position: relative;
}

.site-footer {
  padding: 3rem 1.25rem;
  border-top: 1px solid var(--border);
  text-align: center;
  color: var(--text-muted);
  font-size: 0.88rem;
}

.site-footer a {
  color: var(--gold);
  text-decoration: none;
}

.site-footer code,
.section code {
  font-size: 0.85em;
  padding: 0.15rem 0.45rem;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border);
  direction: ltr;
  display: inline-block;
}

/* Support widget — RTL: left, LTR: right */
.support-fab {
  position: fixed;
  bottom: 1.5rem;
  z-index: 200;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  border: 2px solid var(--gold-soft);
  background: linear-gradient(145deg, var(--emerald-bright), #064428);
  color: #fff;
  font-size: 1.5rem;
  cursor: pointer;
  box-shadow: 0 12px 40px rgba(13, 122, 79, 0.5);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.25s var(--ease-out), box-shadow 0.25s;
}

html[dir="rtl"] .support-fab {
  left: 1.5rem;
  right: auto;
}
html[dir="ltr"] .support-fab {
  right: 1.5rem;
  left: auto;
}

.support-fab:hover {
  transform: scale(1.06);
  box-shadow: 0 16px 48px rgba(13, 122, 79, 0.65);
}

.support-panel {
  position: fixed;
  bottom: 5.5rem;
  z-index: 199;
  width: min(100vw - 2rem, 400px);
  max-height: min(70vh, 520px);
  display: flex;
  flex-direction: column;
  background: var(--bg-card-solid);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.55);
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(0.98);
  transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

html[dir="rtl"] .support-panel {
  left: 1.5rem;
  right: auto;
}
html[dir="ltr"] .support-panel {
  right: 1.5rem;
  left: auto;
}

.support-panel.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.support-panel__head {
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  background: linear-gradient(180deg, rgba(196, 165, 116, 0.1), transparent);
}

.support-panel__brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-width: 0;
}

.support-panel__logo {
  width: 40px;
  height: 40px;
  padding: 5px;
  object-fit: contain;
  object-position: center;
  flex-shrink: 0;
  border-radius: 10px;
  background: rgba(8, 20, 16, 0.9);
  border: 1px solid rgba(201, 174, 122, 0.28);
  backface-visibility: hidden;
  transform: translateZ(0);
}

.support-panel__head h3 {
  font-family: var(--font-display);
  font-size: 1.05rem;
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.support-close {
  background: transparent;
  border: none;
  color: var(--text-muted);
  cursor: pointer;
  font-size: 1.25rem;
  padding: 0.25rem;
  line-height: 1;
}

.support-config {
  padding: 0.75rem 1.25rem;
  font-size: 0.78rem;
  border-bottom: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.2);
}

.support-config label {
  display: block;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.support-config input {
  width: 100%;
  padding: 0.5rem 0.65rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-size: 0.8rem;
  margin-bottom: 0.5rem;
  direction: ltr;
  text-align: left;
}

.support-config button {
  font-size: 0.75rem;
  padding: 0.35rem 0.75rem;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: rgba(212, 175, 55, 0.15);
  color: var(--gold);
  cursor: pointer;
}

#support-messages {
  flex: 1;
  overflow-y: auto;
  padding: 1rem;
  min-height: 200px;
  max-height: 280px;
}

.support-msg {
  padding: 0.75rem 1rem;
  border-radius: 12px;
  margin-bottom: 0.75rem;
  font-size: 0.92rem;
  line-height: 1.55;
}

html[dir="rtl"] .support-msg--user {
  background: rgba(13, 122, 79, 0.35);
  margin-right: 2rem;
  margin-left: 0;
  border: 1px solid rgba(13, 122, 79, 0.4);
}
html[dir="ltr"] .support-msg--user {
  background: rgba(13, 122, 79, 0.35);
  margin-left: 2rem;
  margin-right: 0;
  border: 1px solid rgba(13, 122, 79, 0.4);
}

html[dir="rtl"] .support-msg--bot {
  background: rgba(255, 255, 255, 0.06);
  margin-left: 2rem;
  margin-right: 0;
  border: 1px solid var(--border);
}
html[dir="ltr"] .support-msg--bot {
  background: rgba(255, 255, 255, 0.06);
  margin-right: 2rem;
  margin-left: 0;
  border: 1px solid var(--border);
}

.support-msg--error {
  background: rgba(120, 30, 30, 0.35);
  border: 1px solid rgba(200, 80, 80, 0.4);
  font-size: 0.88rem;
}

.support-msg-small {
  font-size: 0.82rem;
  color: var(--text-muted);
}

.support-msg--typing {
  color: var(--text-muted);
  font-style: italic;
  font-size: 0.88rem;
}

.support-audio {
  width: 100%;
  margin-bottom: 0.75rem;
  border-radius: 8px;
}

.support-form {
  display: flex;
  gap: 0.5rem;
  padding: 1rem;
  border-top: 1px solid var(--border);
}

.support-form input[type="text"] {
  flex: 1;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  font-family: inherit;
}

.support-form button[type="submit"] {
  padding: 0.75rem 1.25rem;
  border-radius: 12px;
  border: none;
  background: var(--emerald-bright);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

@media (max-width: 480px) {
  html[dir="rtl"] .support-panel,
  html[dir="ltr"] .support-panel {
    left: 0.75rem;
    right: 0.75rem;
    width: auto;
  }
  .support-fab {
    bottom: 1rem;
  }
  html[dir="rtl"] .support-fab {
    left: 0.75rem;
  }
  html[dir="ltr"] .support-fab {
    right: 0.75rem;
  }
}

/* —— أقسام الوثائق / الفيديو / الأدوات —— */
.hero__actions--secondary {
  margin-top: 0.85rem;
}

.btn--sm {
  padding: 0.55rem 1.1rem;
  font-size: 0.88rem;
}

.section--hub {
  padding-top: 3.25rem;
  border-top: 1px solid rgba(196, 165, 116, 0.12);
}

.hub-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: center;
  margin-top: 1.25rem;
}

.section__cli,
.section__note {
  max-width: 44rem;
  margin: 2rem auto 0;
  text-align: center;
  font-size: 0.88rem;
  color: var(--text-muted);
  line-height: 1.75;
}

.section__cli code,
.section__note code {
  font-size: 0.82em;
}

.card__link {
  margin-top: 1rem;
  font-size: 0.86rem;
}

.card__link a {
  color: var(--gold);
  text-decoration: none;
}

.card__link a:hover {
  text-decoration: underline;
}

.inline-code {
  display: inline-block;
  margin-top: 0.35rem;
  font-size: 0.78rem;
}

/* صفحات الاستوديو / المركز */
.subpage-hero {
  text-align: center;
  padding: 2.5rem 0 1.5rem;
  max-width: 720px;
  margin: 0 auto;
}

.subpage-hero h1 {
  font-family: var(--font-crest), var(--font-display), serif;
  font-size: clamp(1.6rem, 4vw, 2.2rem);
  margin-bottom: 0.75rem;
}

.subpage-hero p {
  color: var(--text-muted);
  line-height: 1.75;
}

.studio-panel {
  max-width: 640px;
  margin: 0 auto 3rem;
  padding: 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  backdrop-filter: blur(12px);
}

.studio-field {
  margin-bottom: 1rem;
}

.studio-field label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.studio-field textarea,
.studio-field select {
  width: 100%;
  padding: 0.65rem 0.85rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(0, 0, 0, 0.25);
  color: var(--text);
  font-family: inherit;
  font-size: 0.95rem;
}

.studio-field textarea {
  min-height: 120px;
  resize: vertical;
}

.studio-log {
  margin-top: 1rem;
  padding: 1rem;
  border-radius: var(--radius-md);
  background: rgba(3, 8, 6, 0.85);
  border: 1px solid rgba(46, 230, 200, 0.15);
  font-family: ui-monospace, monospace;
  font-size: 0.72rem;
  line-height: 1.55;
  direction: ltr;
  text-align: left;
  max-height: 220px;
  overflow-y: auto;
  color: rgba(232, 244, 239, 0.85);
}

.studio-log .log-ok {
  color: var(--emerald-bright);
}

.studio-log .log-warn {
  color: #e6c82e;
}

.studio-status {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 0.75rem;
}

.doc-hub {
  max-width: 800px;
  margin: 0 auto 4rem;
  padding: 0 1.25rem;
}

.doc-hub-demo-title {
  font-family: var(--font-display);
  font-size: 1.2rem;
  margin: 2rem auto 0.5rem;
  text-align: center;
  color: var(--gold);
  max-width: 800px;
}

.doc-hub-demo-lead {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.9rem;
  max-width: 720px;
  margin: 0 auto 0.5rem;
  line-height: 1.65;
}

.doc-hub h2 {
  font-family: var(--font-display);
  font-size: 1.25rem;
  margin: 2rem 0 0.75rem;
  color: var(--gold);
}

.doc-hub p,
.doc-hub li {
  color: var(--text-muted);
  line-height: 1.8;
  font-size: 0.95rem;
}

.doc-hub ul {
  padding-inline-start: 1.25rem;
  margin: 0.5rem 0 1rem;
}

.hub-toplinks {
  display: flex;
  flex-wrap: wrap;
  gap: 0.65rem;
  justify-content: center;
  margin: 0 auto 2rem;
  max-width: 800px;
}

/* لوحة التجربة المباشرة — رقمنة / أرشفة / جنائي / خطة فيديو */
.experience-lab {
  max-width: 880px;
  margin: 1.5rem auto 0;
  padding: 1.25rem 1.25rem 1.5rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-glow);
}

.experience-lab__row {
  margin-bottom: 1rem;
}

.experience-lab__row label {
  display: block;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.35rem;
}

.experience-lab__row textarea {
  width: 100%;
  min-height: 120px;
  padding: 0.75rem 0.85rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(4, 10, 8, 0.65);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  resize: vertical;
}

.experience-lab__row input[type="file"] {
  width: 100%;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.experience-lab__row select {
  width: 100%;
  max-width: 320px;
  padding: 0.5rem 0.65rem;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: rgba(4, 10, 8, 0.65);
  color: var(--text);
}

.experience-lab__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0.75rem;
}

.experience-lab__status {
  font-size: 0.82rem;
  color: var(--emerald-bright);
  margin-bottom: 0.5rem;
}

.experience-lab__out {
  margin: 0;
  padding: 1rem;
  max-height: 340px;
  overflow: auto;
  font-size: 0.78rem;
  line-height: 1.45;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid rgba(201, 174, 122, 0.2);
  border-radius: var(--radius-md);
  color: var(--cream-mist);
  white-space: pre-wrap;
  word-break: break-word;
}
