/* ============================================================================
   EMBASSY OF PALESTINE · DOHA
   Strict palette:
     Gradient:       #0f5b73 → #1581a3
     Cards/buttons:  #093442
     Text:           white on dark, dark on light
   System fonts · no decorative overlays
   ============================================================================ */

:root {
  --teal-dark:  #093442;
  --teal-mid:   #0f5b73;
  --teal-light: #1581a3;

  --ink:        #093442;
  --ink-soft:   #4a5b63;
  --hairline:   rgba(9, 52, 66, .12);
  --surface:    #ffffff;
  --surface-alt:#f4f6f7;

  --success: #2f6f3d;
  --warning: #9c6b15;
  --danger:  #9c3633;

  --font-body: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-arabic: system-ui, -apple-system, "Segoe UI Arabic", "Geeza Pro",
                 Tahoma, Arial, sans-serif;

  --container: 1220px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --shadow-sm: 0 1px 3px rgba(9,52,66,.08);
  --shadow:    0 10px 30px -8px rgba(9,52,66,.22);
  --shadow-lg: 0 20px 50px -15px rgba(9,52,66,.30);

  --ease: cubic-bezier(.2, .8, .2, 1);
  --dur: .3s;
}

html[dir="rtl"] { --font-body: var(--font-arabic); }

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  font-family: var(--font-body);
  font-size: 16px; line-height: 1.6;
  color: var(--ink); background: var(--surface);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
button { font: inherit; cursor: pointer; background: none; border: 0; color: inherit; }
a { color: var(--teal-mid); text-decoration: none; transition: color var(--dur) var(--ease); }
a:hover { color: var(--teal-light); }

h1, h2, h3, h4 {
  font-family: var(--font-body);
  font-weight: 600; line-height: 1.25;
  color: var(--ink); letter-spacing: -.01em;
}
h1 em, h2 em { font-style: normal; color: var(--teal-light); }

.muted { color: var(--ink-soft); }
.overline {
  display: inline-flex; align-items: center; gap: .5rem;
  text-transform: uppercase; font-size: .72rem;
  letter-spacing: .18em; font-weight: 600; color: var(--teal-mid);
}
html[dir="rtl"] .overline { letter-spacing: 0; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 clamp(1rem, 4vw, 2.5rem); }

.sr-only {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -40px; left: 0;
  background: var(--teal-dark); color: #fff; padding: .6rem 1rem; z-index: 1000;
  transition: top .2s;
}
.skip-link:focus { top: 0; color: #fff; }

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* TOPBAR */
.topbar { background: var(--teal-dark); color: rgba(255,255,255,.85); font-size: .82rem; }
.topbar__inner { display: flex; align-items: center; gap: 1rem; padding: .55rem 0; flex-wrap: wrap; }
.topbar__dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; flex-shrink: 0; }
.topbar__text { flex: 1; min-width: 0; }
.topbar__right { display: flex; align-items: center; gap: .6rem; }
.topbar__right a { color: rgba(255,255,255,.8); padding: 0 .2rem; }
.topbar__right a:hover, .topbar__right .lang.is-active { color: #fff; }
.topbar__right .divider { opacity: .4; }

/* NAV */
.nav { position: sticky; top: 0; z-index: 90; background: #fff; border-bottom: 1px solid var(--hairline); }
.nav__inner { display: flex; align-items: center; justify-content: space-between; gap: 2rem; min-height: 76px; }
.brand { display: inline-flex; align-items: center; gap: .75rem; color: var(--ink); }
.brand__crest { width: 44px; height: 44px; flex-shrink: 0; }
.brand__crest--lg { width: 64px; height: 64px; }

/* Logo image — sized by whatever parent it's dropped into
   (.brand__crest, .chat-panel__avatar, .home-chat__avatar, etc.). */
.crest-img {
  display: inline-block;
  width: 100%; height: 100%;
  line-height: 0;
}
.crest-img img {
  width: 100%; height: 100%;
  object-fit: contain;
  display: block;
}
.brand__text { display: flex; flex-direction: column; line-height: 1.1; }
.brand__line1 { font-weight: 600; font-size: 1.05rem; }
.brand__line2 {
  font-size: .7rem; text-transform: uppercase;
  letter-spacing: .18em; color: var(--ink-soft); font-weight: 500;
}
html[dir="rtl"] .brand__line2 { letter-spacing: 0; }

.nav__menu { display: flex; align-items: center; gap: 1.6rem; }
.nav__menu > a, .nav__dropdown > button {
  font-weight: 500; font-size: .95rem; padding: .4rem 0;
  color: var(--ink); position: relative;
  transition: color var(--dur) var(--ease);
}
.nav__menu > a:hover, .nav__dropdown > button:hover { color: var(--teal-mid); }
.nav__menu > a::after {
  content: ""; position: absolute;
  left: 0; bottom: -2px; height: 2px; width: 0;
  background: var(--teal-mid); transition: width var(--dur) var(--ease);
}
.nav__menu > a:hover::after { width: 100%; }
html[dir="rtl"] .nav__menu > a::after { left: auto; right: 0; }

.nav__ai .dot {
  display: inline-block; width: 8px; height: 8px; border-radius: 50%;
  background: var(--teal-light); margin-inline-end: .4rem;
}

.nav__dropdown { position: relative; }
.nav__dropdown > button { display: inline-flex; align-items: center; gap: .4rem; }
.nav__dropdown > button svg { width: 10px; height: 6px; }
.nav__dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 0;
  background: #fff; border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: .5rem; min-width: 260px;
  box-shadow: var(--shadow);
  opacity: 0; visibility: hidden; transform: translateY(-4px);
  transition: all var(--dur) var(--ease); z-index: 100;
}
html[dir="rtl"] .nav__dropdown-menu { left: auto; right: 0; }
.nav__dropdown--right .nav__dropdown-menu { left: auto; right: 0; }
html[dir="rtl"] .nav__dropdown--right .nav__dropdown-menu { right: auto; left: 0; }
.nav__dropdown:hover .nav__dropdown-menu,
.nav__dropdown:focus-within .nav__dropdown-menu {
  opacity: 1; visibility: visible; transform: translateY(0);
}
.nav__dropdown-menu a {
  display: block; padding: .65rem .85rem;
  border-radius: var(--radius-sm); color: var(--ink);
  transition: all var(--dur) var(--ease);
}
.nav__dropdown-menu a:hover { background: var(--surface-alt); color: var(--teal-mid); }

.nav__cta { margin-inline-start: .5rem; }
/* The nav CTA must stay readable: dark teal bg, white text, always. */
.nav__menu > a.nav__cta,
.nav__cta { background: var(--teal-dark); color: #fff; }
.nav__menu > a.nav__cta:hover,
.nav__cta:hover { background: var(--teal-mid); color: #fff; }
.nav__menu > a.nav__cta::after { display: none; }   /* no underline animation on the pill */
.nav__auth { font-weight: 600; }
.nav__user { display: inline-flex; align-items: center; gap: .5rem; font-weight: 500; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal-dark); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: .85rem;
}

.nav__toggle {
  display: none;
  width: 44px; height: 44px;
  flex-direction: column; justify-content: center; align-items: center; gap: 5px;
}
.nav__toggle span {
  display: block; width: 22px; height: 2px; background: var(--ink);
  transition: transform var(--dur) var(--ease), opacity var(--dur);
}
.nav__toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav__toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav__toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* BUTTONS */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
  padding: .75rem 1.4rem; border-radius: var(--radius);
  font-weight: 600; font-size: .95rem;
  transition: all var(--dur) var(--ease);
  border: 1px solid transparent; white-space: nowrap;
}
.btn svg { width: 18px; height: 18px; }
.btn--cta { background: var(--teal-dark); color: #fff; }
.btn--cta:hover {
  background: var(--teal-mid); color: #fff;
  transform: translateY(-1px); box-shadow: var(--shadow-sm);
}
.btn--ghost { background: transparent; border-color: var(--teal-dark); color: var(--teal-dark); }
.btn--ghost:hover { background: var(--teal-dark); color: #fff; }
.btn--on-dark { border-color: rgba(255,255,255,.5); color: #fff; }
.btn--on-dark:hover { background: #fff; color: var(--teal-dark); border-color: #fff; }
.btn--full { width: 100%; }
.btn--sm { padding: .45rem .9rem; font-size: .85rem; }
.btn--danger { background: transparent; color: var(--danger); border-color: rgba(156,54,51,.3); }
.btn--danger:hover { background: var(--danger); color: #fff; }
.link-btn { color: var(--teal-mid); text-decoration: underline; text-underline-offset: 3px; }
.link-arrow {
  color: var(--teal-mid); font-weight: 600;
  display: inline-flex; align-items: center; gap: .4rem;
}
.link-arrow:hover { gap: .6rem; }

/* FLASH */
.flashes { margin-top: 1rem; display: flex; flex-direction: column; gap: .5rem; }
.flash {
  padding: .85rem 1.2rem; border-radius: var(--radius);
  border-inline-start: 4px solid; background: #fff;
  box-shadow: var(--shadow-sm);
}
.flash--success { border-color: var(--success); }
.flash--info    { border-color: var(--teal-light); }
.flash--warning { border-color: var(--warning); }
.flash--danger, .flash--error { border-color: var(--danger); }

/* HERO — clean gradient, no grid, no glow */
.hero {
  background: linear-gradient(135deg, var(--teal-mid) 0%, var(--teal-light) 100%);
  color: #fff;
  padding: clamp(4rem, 10vw, 7rem) 0 clamp(4rem, 10vw, 6rem);
}
.hero__inner { max-width: 860px; margin: 0 auto; text-align: center; }
.hero__eyebrow {
  display: inline-flex; align-items: center; gap: .5rem;
  font-size: .75rem; letter-spacing: .2em; text-transform: uppercase;
  font-weight: 600; padding: .4rem .9rem;
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px; margin-bottom: 2rem; color: #fff;
}
html[dir="rtl"] .hero__eyebrow { letter-spacing: 0; }
.eyebrow-dot { width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.hero__title {
  font-size: clamp(2.2rem, 5.5vw, 4rem);
  font-weight: 700; line-height: 1.15;
  margin: 0 auto 1.5rem; color: #fff;
  max-width: 18ch;
}
.hero__title em { color: #fff; font-style: normal; }
.hero__lede {
  font-size: clamp(1rem, 1.4vw, 1.15rem);
  max-width: 640px; margin: 0 auto 2.5rem;
  color: rgba(255,255,255,.9);
}
.hero__actions {
  display: flex; flex-wrap: wrap; gap: 1rem;
  margin-bottom: 0;
  justify-content: center;
}
/* All CTAs use dark #093442 bg with white text per spec */
.hero__actions .btn--cta { background: var(--teal-dark); color: #fff; }
.hero__actions .btn--cta:hover { background: #fff; color: var(--teal-dark); }
.hero__actions .btn--ghost { border-color: #fff; color: #fff; }
.hero__actions .btn--ghost:hover { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }

.hero__meta {
  display: grid; gap: 1.5rem 3rem;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  padding-top: 2rem;
  border-top: 1px solid rgba(255,255,255,.2);
  text-align: start;
}
.hero__meta dt {
  font-size: .72rem; letter-spacing: .18em; text-transform: uppercase;
  color: rgba(255,255,255,.7); margin-bottom: .35rem; font-weight: 600;
}
html[dir="rtl"] .hero__meta dt { letter-spacing: 0; }
.hero__meta dd { font-size: 1rem; color: #fff; }
.hero__meta a { color: #fff; border-bottom: 1px solid rgba(255,255,255,.4); }

/* SECTIONS */
.section { padding: clamp(4rem, 8vw, 6rem) 0; }
.section--alt { background: var(--surface-alt); }
.section__head { margin-bottom: 3rem; max-width: 720px; }
.section__head--split {
  display: flex; justify-content: space-between; align-items: end;
  max-width: none; gap: 2rem; flex-wrap: wrap;
}
.section__head h2 { font-size: clamp(1.7rem, 3.4vw, 2.6rem); margin-top: .6rem; }

/* Simplified home variants */
.hero--simple {
  padding: clamp(4rem, 9vw, 6rem) 0 clamp(3.5rem, 7vw, 5rem);
}
.hero--simple .hero__title { margin-bottom: 1.25rem; }
.hero--simple .hero__lede { margin-bottom: 0; max-width: 720px; font-size: clamp(1rem, 1.5vw, 1.2rem); }

.section--missions {
  padding: clamp(2.5rem, 5vw, 3.5rem) 0 clamp(2.5rem, 5vw, 3.5rem);
}
.section__title-xl {
  font-size: clamp(2.2rem, 5vw, 3.5rem);
  font-weight: 700;
  margin: 0 0 2rem;
  color: var(--ink);
  line-height: 1.1;
}

/* ═══ AMBASSADOR PAGE ════════════════════════════════════════════════ */
.ambassador-hero {
  background: linear-gradient(135deg, var(--teal-mid) 0%, var(--teal-light) 100%);
  color: #fff;
  padding: 3rem 0 4rem;
}
.ambassador-hero__inner {
  text-align: center;
}
.ambassador-hero .breadcrumb {
  justify-content: center;
  margin-bottom: 2.5rem;
  color: rgba(255,255,255,.7);
}
.ambassador-hero .breadcrumb a { color: rgba(255,255,255,.9); }
.ambassador-hero .breadcrumb a:hover { color: #fff; }
.ambassador-portrait {
  width: clamp(180px, 22vw, 240px);
  height: clamp(180px, 22vw, 240px);
  margin: 0 auto 1.75rem;
  border-radius: 50%;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 18px 48px -12px rgba(9,52,66,.5),
              0 0 0 6px rgba(255,255,255,.15),
              0 0 0 7px rgba(255,255,255,.3);
  position: relative;
}
.ambassador-portrait img {
  width: 100%; height: 100%;
  object-fit: cover;
  object-position: center top;
}
.ambassador-hero__overline {
  color: #fff;
  display: inline-flex;
  margin-bottom: 1rem;
}
.ambassador-hero__title {
  font-size: clamp(1.6rem, 3.8vw, 2.6rem);
  color: #fff;
  font-weight: 700;
  line-height: 1.25;
  max-width: 28ch;
  margin: 0 auto;
}
.ambassador-hero__salutation {
  color: rgba(255,255,255,.9);
  font-size: 1.05rem;
  font-style: italic;
  margin: 1.25rem auto 0;
  max-width: 48ch;
}
html[dir="rtl"] .ambassador-hero__salutation { font-style: normal; }

.ambassador-message {
  padding-top: clamp(3rem, 6vw, 5rem);
  padding-bottom: clamp(4rem, 8vw, 6rem);
}

.letter {
  max-width: 720px;
  margin: 0 auto;
  background: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3.5rem);
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--hairline);
  color: var(--ink);
  font-size: 1.05rem;
  line-height: 1.85;
}
.letter__block + .letter__block { margin-top: 1rem; }
.letter__block p { margin-bottom: 1.25rem; }
.letter__block p:last-child { margin-bottom: 0; }
.letter__heading {
  font-size: 1.1rem;
  color: var(--teal-dark);
  margin-bottom: .75rem;
}
.letter__block--signoff {
  margin-top: 2rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--hairline);
  font-size: 1rem;
  line-height: 1.5;
}
.letter__block--signoff p { margin-bottom: .3rem; }
.letter__block--signoff p:first-child strong {
  font-size: 1.1rem;
  color: var(--teal-dark);
}
.ai-block { color: #fff; }
.ai-block__head {
  max-width: 860px; margin: 0 auto 2.5rem;
  text-align: center;
}
.ai-block__head .overline { color: #fff; justify-content: center; }
.ai-block__head h2 {
  color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin: .6rem 0 0;
}
.ai-block__head h2 em { color: #fff; font-style: normal; }

.ai-block__grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr;
  gap: 1.5rem;
  align-items: stretch;
}

/* ─── Interactive chatbot ─── */
.home-chat {
  background: #fff;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  display: flex; flex-direction: column;
  min-height: 440px;
}
.home-chat__head {
  display: flex; align-items: center; gap: .85rem;
  padding: 1rem 1.25rem;
  background: var(--teal-dark); color: #fff;
}
.home-chat__avatar {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 50%;
  padding: 3px;
  flex-shrink: 0;
}
.home-chat__head strong { display: block; font-size: .98rem; color: #fff; }
.home-chat__head small { font-size: .78rem; color: rgba(255,255,255,.7); }
.home-chat__messages {
  flex: 1; min-height: 260px;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex; flex-direction: column; gap: .8rem;
  background: var(--surface-alt);
}
.home-chat__form {
  display: flex; gap: .5rem;
  padding: .85rem 1rem;
  border-top: 1px solid var(--hairline);
  background: #fff;
}
.home-chat__form input {
  flex: 1;
  padding: .75rem 1rem;
  border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface-alt);
  font: inherit; color: var(--ink);
  transition: all var(--dur) var(--ease);
}
.home-chat__form input:focus {
  outline: none; border-color: var(--teal-light); background: #fff;
  box-shadow: 0 0 0 3px rgba(21,129,163,.15);
}
.home-chat__form button {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal-dark); color: #fff;
  display: grid; place-items: center;
  transition: all var(--dur) var(--ease);
}
.home-chat__form button:hover { background: var(--teal-mid); }
.home-chat__form button svg { width: 20px; height: 20px; }
html[dir="rtl"] .home-chat__form button svg { transform: scaleX(-1); }

/* ─── Frequent queries panel ─── */
.frequent-queries-panel {
  background: var(--teal-dark);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 1.5rem;
  display: flex; flex-direction: column;
  box-shadow: var(--shadow);
}
.frequent-queries-panel h3 {
  color: #fff; font-size: 1rem; font-weight: 600;
  margin-bottom: 1rem;
  text-transform: uppercase; letter-spacing: .14em;
}
html[dir="rtl"] .frequent-queries-panel h3 { letter-spacing: 0; }

.frequent-queries {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column;
  gap: .5rem;
  overflow-y: auto;
  max-height: 420px;
}
.frequent-queries__item {
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
  gap: .75rem;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  color: #fff;
  text-align: start;
  padding: .7rem .9rem;
  border-radius: var(--radius);
  font: inherit; font-size: .88rem; font-weight: 500;
  cursor: pointer; line-height: 1.4;
  transition: all var(--dur) var(--ease);
}
.frequent-queries__item:hover {
  background: #fff; color: var(--teal-dark);
  border-color: #fff;
}
.frequent-queries__q { flex: 1; }
.frequent-queries__arrow {
  flex-shrink: 0;
  width: 24px; height: 24px; border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: grid; place-items: center;
  font-size: .85rem;
  transition: all var(--dur) var(--ease);
}
html[dir="rtl"] .frequent-queries__arrow { transform: scaleX(-1); }
.frequent-queries__item:hover .frequent-queries__arrow {
  background: var(--teal-dark); color: #fff;
}

/* ═══ Photo slider (bottom block) ══════════════════════════════════════ */
.section--gallery-slider { padding-bottom: clamp(4rem, 7vw, 5rem); background: #fff; }
.photo-slider {
  position: relative;
  margin-top: 1rem;
}
.photo-slider__track {
  display: flex; gap: 1.25rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem) 1.5rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.photo-slider__track::-webkit-scrollbar { display: none; }
.photo-slider__item {
  flex: 0 0 clamp(280px, 38vw, 480px);
  scroll-snap-align: start;
  margin: 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow);
  position: relative;
  aspect-ratio: 4 / 3;
}
.photo-slider__item img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 6s ease-out;
}
.photo-slider__item:hover img { transform: scale(1.05); }
.photo-slider__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.25rem 1.5rem;
  color: #fff;
  background: linear-gradient(transparent 0%, rgba(9,52,66,.85) 90%);
  font-weight: 500; font-size: .95rem;
}
.photo-slider__nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--teal-dark); color: #fff;
  font-size: 1.6rem; line-height: 1;
  display: grid; place-items: center;
  z-index: 5;
  box-shadow: var(--shadow);
  transition: all var(--dur) var(--ease);
}
.photo-slider__nav:hover { background: var(--teal-mid); transform: translateY(-50%) scale(1.08); }
.photo-slider__nav--prev { left: 1rem; }
.photo-slider__nav--next { right: 1rem; }
html[dir="rtl"] .photo-slider__nav--prev { left: auto; right: 1rem; }
html[dir="rtl"] .photo-slider__nav--next { right: auto; left: 1rem; }

/* Typing indicator inside home-chat */
.home-chat__messages .typing-dots span { background: var(--ink-soft); }

/* Citation pill inside home-chat */
.home-chat__messages .cite-ref {
  display: inline-block;
  padding: 0 5px;
  background: var(--teal-dark);
  color: #fff;
  border-radius: 3px;
  font-size: .72rem;
  font-weight: 600;
  vertical-align: super;
  margin: 0 2px;
}

/* CARDS */
.cards {
  display: grid; gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.cards--missions { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }

.card {
  position: relative; background: var(--teal-dark);
  border-radius: var(--radius-lg); padding: 2rem; color: #fff;
  display: flex; flex-direction: column;
  transition: transform var(--dur) var(--ease), box-shadow var(--dur) var(--ease);
  overflow: hidden;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); color: #fff; }
.card__number { font-size: 2rem; font-weight: 700; color: rgba(255,255,255,.4); line-height: 1; margin-bottom: 1rem; }
.card h3 { font-size: 1.3rem; margin-bottom: .6rem; color: #fff; }
.card p { color: rgba(255,255,255,.8); flex-grow: 1; }
.card__arrow {
  display: inline-flex; margin-top: 1.5rem;
  width: 36px; height: 36px; border-radius: 50%;
  background: rgba(255,255,255,.12); color: #fff;
  align-items: center; justify-content: center;
  transition: all var(--dur) var(--ease); font-size: 1.1rem;
}
html[dir="rtl"] .card__arrow { transform: scaleX(-1); }
.card:hover .card__arrow { background: #fff; color: var(--teal-dark); transform: translateX(4px); }
html[dir="rtl"] .card:hover .card__arrow { transform: scaleX(-1) translateX(4px); }

.card--consular { background: linear-gradient(135deg, var(--teal-mid), var(--teal-light)); }

/* AI SHOWCASE */
.section--ai { background: linear-gradient(135deg, var(--teal-mid), var(--teal-light)); color: #fff; }
.ai-showcase {
  display: grid; gap: 4rem;
  grid-template-columns: 1.1fr 1fr; align-items: center;
}
.ai-showcase__copy .overline { color: #fff; }
.ai-showcase h2 {
  color: #fff; font-size: clamp(1.7rem, 3.2vw, 2.4rem);
  margin: .6rem 0 1.5rem;
}
.ai-showcase h2 em { color: #fff; font-style: normal; }
.ai-showcase p {
  color: rgba(255,255,255,.88); font-size: 1.05rem;
  margin-bottom: 1.8rem; max-width: 520px;
}
.ai-features { list-style: none; padding: 0; margin: 0 0 2rem; display: grid; gap: .75rem; }
.ai-features li { display: flex; align-items: center; gap: .75rem; color: rgba(255,255,255,.92); }
.tick {
  width: 22px; height: 22px; border-radius: 50%;
  background: #fff; color: var(--teal-dark);
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 700; flex-shrink: 0;
}

.chat-demo {
  background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg); padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
}
.chat-demo__bubble { padding: .9rem 1.1rem; border-radius: var(--radius); max-width: 85%; }
.chat-demo__bubble--user { background: rgba(255,255,255,.2); color: #fff; align-self: flex-end; }
.chat-demo__bubble--bot { background: #fff; color: var(--ink); align-self: flex-start; }
.cite {
  display: inline-block; padding: 1px 6px;
  background: var(--teal-dark); color: #fff;
  border-radius: 4px; font-size: .75rem; font-weight: 600;
  margin-inline-start: .25rem;
}
.chat-demo__source {
  font-size: .78rem; color: var(--ink-soft);
  padding-top: .5rem; margin-top: .5rem;
  border-top: 1px solid var(--hairline);
}

/* PAGE HERO */
.page-hero {
  background: linear-gradient(135deg, var(--teal-mid) 0%, var(--teal-light) 100%);
  color: #fff; padding: 3.5rem 0 4rem;
}
.page-hero__title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  color: #fff; max-width: 820px;
  margin: 1rem 0; font-weight: 700;
}
.page-hero__title em { color: #fff; font-style: normal; }
.page-hero__lede { font-size: 1.05rem; max-width: 660px; color: rgba(255,255,255,.9); }
.page-hero__actions { margin-top: 2rem; display: flex; gap: 1rem; flex-wrap: wrap; }
.page-hero__actions .btn--cta { background: #fff; color: var(--teal-dark); }
.page-hero__actions .btn--cta:hover { background: var(--teal-dark); color: #fff; }

.breadcrumb {
  display: flex; align-items: center; gap: .6rem;
  font-size: .85rem; color: rgba(255,255,255,.7);
}
.breadcrumb a { color: rgba(255,255,255,.9); }
.breadcrumb a:hover { color: #fff; }

.service-hero { display: flex; gap: 1.5rem; align-items: start; margin-top: 1rem; }
.service-hero__icon {
  width: 60px; height: 60px; flex-shrink: 0;
  background: rgba(255,255,255,.15); border-radius: var(--radius);
  display: grid; place-items: center; color: #fff;
}

/* CONTENT BLOCKS */
.page__body { padding-top: 4rem; padding-bottom: 6rem; max-width: 820px; }
.block { margin-bottom: 3rem; }
.block h2 {
  font-size: 1.6rem; margin-bottom: 1rem;
  padding-bottom: .8rem; border-bottom: 1px solid var(--hairline);
}
.prose { font-size: 1.02rem; line-height: 1.7; color: var(--ink); }
.prose p { margin-bottom: 1rem; }

.block--refs ul { list-style: none; padding: 0; display: grid; gap: .5rem; }
.block--refs li a {
  display: flex; justify-content: space-between; align-items: center;
  padding: 1rem 1.25rem; background: #fff;
  border: 1px solid var(--hairline); border-radius: var(--radius);
  transition: all var(--dur) var(--ease);
}
.block--refs li a:hover {
  border-color: var(--teal-light); transform: translateX(4px);
  box-shadow: var(--shadow-sm);
}
html[dir="rtl"] .block--refs li a:hover { transform: translateX(-4px); }

.block--callout {
  background: var(--surface-alt);
  border-inline-start: 3px solid var(--teal-light);
  padding: 1.5rem 2rem; border-radius: var(--radius);
}
.block--callout strong { display: block; margin-bottom: .5rem; color: var(--teal-dark); }

/* SERVICES */
.cards--services { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.card--service { padding: 2rem; }
.card__icon {
  width: 48px; height: 48px;
  background: rgba(255,255,255,.12); border-radius: var(--radius);
  display: grid; place-items: center; color: #fff;
  margin-bottom: 1rem;
}
.card__icon svg { width: 26px; height: 26px; }
.card__meta {
  display: flex; gap: 1rem; flex-wrap: wrap;
  padding-top: 1rem; margin-top: 1rem;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .82rem; color: rgba(255,255,255,.75);
}

.icon-svg { width: 100%; height: 100%; }
.icon-svg .ico { display: none; }
.icon--passport .ico-passport,
.icon--family .ico-family,
.icon--document .ico-document,
.icon--signature .ico-signature { display: block; }

.service-detail {
  display: grid; grid-template-columns: 1fr 320px;
  gap: 3rem; align-items: start;
}
.service-detail__aside { position: sticky; top: 100px; }
.info-card {
  background: #fff; border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 1.75rem;
  box-shadow: var(--shadow-sm);
}
.info-card h3 { font-size: 1.1rem; margin-bottom: 1rem; color: var(--teal-dark); }
.info-card dl { display: grid; gap: .85rem; margin-bottom: 1.25rem; }
.info-card dt {
  font-size: .72rem; letter-spacing: .14em; text-transform: uppercase;
  color: var(--ink-soft); font-weight: 600;
}
html[dir="rtl"] .info-card dt { letter-spacing: 0; }
.info-card dd { font-weight: 500; color: var(--ink); }

.procedure-list { list-style: none; padding: 0; counter-reset: step; }
.procedure-list li {
  position: relative;
  padding: 1rem 1rem 1rem 3.5rem; margin-bottom: .75rem;
  background: var(--surface-alt); border-radius: var(--radius);
  border-inline-start: 3px solid var(--teal-light);
}
html[dir="rtl"] .procedure-list li { padding: 1rem 3.5rem 1rem 1rem; }
.procedure-list li::before {
  counter-increment: step; content: counter(step);
  position: absolute; left: 1rem; top: 50%; transform: translateY(-50%);
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--teal-dark); color: #fff;
  display: grid; place-items: center; font-weight: 700;
}
html[dir="rtl"] .procedure-list li::before { left: auto; right: 1rem; }

.check-list { list-style: none; padding: 0; }
.check-list li {
  padding: .65rem 0 .65rem 2rem; position: relative;
  border-bottom: 1px solid var(--hairline);
}
html[dir="rtl"] .check-list li { padding: .65rem 2rem .65rem 0; }
.check-list li::before {
  content: "✓"; position: absolute;
  left: 0; top: .65rem;
  width: 22px; height: 22px; border-radius: 50%;
  background: var(--teal-dark); color: #fff;
  display: grid; place-items: center;
  font-size: .8rem; font-weight: 700;
}
html[dir="rtl"] .check-list li::before { left: auto; right: 0; }

/* SERVICES TEASER */
.services-teaser {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}
.services-teaser__item {
  background: #fff; padding: 1.25rem;
  border-radius: var(--radius); border: 1px solid var(--hairline);
  display: flex; align-items: center; gap: 1rem;
  color: var(--ink); transition: all var(--dur) var(--ease);
}
.services-teaser__item .card__icon {
  background: var(--surface-alt); color: var(--teal-dark);
  width: 44px; height: 44px; margin: 0;
}
.services-teaser__item .card__icon svg { width: 22px; height: 22px; }
.services-teaser__item:hover {
  border-color: var(--teal-light); transform: translateY(-2px);
  box-shadow: var(--shadow-sm);
}

/* CAROUSEL */
.carousel { position: relative; overflow: hidden; padding: 2rem 0; }
.carousel__track {
  display: flex; gap: 1.25rem;
  padding: 0 clamp(1rem, 4vw, 2.5rem);
  overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.carousel__track::-webkit-scrollbar { display: none; }
.carousel__item {
  flex: 0 0 clamp(280px, 40vw, 520px);
  scroll-snap-align: start; margin: 0;
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm); position: relative;
}
.carousel__item img { width: 100%; height: 340px; object-fit: cover; }
.carousel__item figcaption {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 1.5rem; color: #fff;
  background: linear-gradient(transparent, rgba(9,52,66,.85));
  font-weight: 500;
}
.carousel__nav { display: flex; gap: .5rem; justify-content: center; margin-top: 1.5rem; }
.carousel__nav button {
  width: 44px; height: 44px; border-radius: 50%;
  background: #fff; border: 1px solid var(--hairline);
  font-size: 1.4rem; color: var(--teal-dark);
  transition: all var(--dur) var(--ease);
}
.carousel__nav button:hover { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }

/* CHAT FAB + PANEL */
.chat-fab {
  position: fixed; z-index: 95;
  bottom: 24px; inset-inline-end: 24px;
  display: inline-flex; align-items: center; gap: .6rem;
  background: var(--teal-dark); color: #fff;
  padding: .75rem 1.1rem .75rem .85rem;
  border-radius: 999px; box-shadow: var(--shadow);
  transition: all var(--dur) var(--ease);
}
.chat-fab:hover { background: var(--teal-mid); transform: translateY(-2px); }
.chat-fab__icon { width: 26px; height: 26px; }
.chat-fab__label { font-weight: 600; font-size: .92rem; }
.chat-fab__pulse { display: none; }
.chat-fab.is-open .chat-fab__label { display: none; }

.chat-panel {
  position: fixed; z-index: 96;
  bottom: 24px; inset-inline-end: 24px;
  width: min(400px, calc(100vw - 48px));
  height: min(640px, calc(100vh - 48px));
  background: #fff; border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  display: flex; flex-direction: column; overflow: hidden;
  transform: translateY(20px) scale(.96); opacity: 0;
  transition: all var(--dur) var(--ease);
  pointer-events: none;
}
.chat-panel.is-open { transform: translateY(0) scale(1); opacity: 1; pointer-events: auto; }
.chat-panel[hidden] { display: flex; }

.chat-panel__header {
  padding: 1rem 1.25rem; background: var(--teal-dark); color: #fff;
  display: flex; justify-content: space-between; align-items: center;
}
.chat-panel__title { display: flex; align-items: center; gap: .75rem; }
.chat-panel__avatar {
  width: 40px; height: 40px;
  background: #fff;
  border-radius: 50%;
  padding: 3px;
  flex-shrink: 0;
}
.chat-panel__title h2 { font-size: 1rem; color: #fff; font-weight: 600; }
.chat-panel__title p { font-size: .75rem; color: rgba(255,255,255,.7); }
.chat-panel__close {
  color: #fff; font-size: 1.8rem; line-height: 1;
  width: 32px; height: 32px; border-radius: 50%;
  transition: background var(--dur);
}
.chat-panel__close:hover { background: rgba(255,255,255,.15); }

.chat-panel__messages {
  flex: 1; overflow-y: auto; padding: 1.25rem;
  display: flex; flex-direction: column; gap: 1rem;
  background: var(--surface-alt);
}

.chat-msg__bubble {
  max-width: 85%; padding: .75rem 1rem;
  border-radius: var(--radius);
  font-size: .92rem; line-height: 1.55;
  box-shadow: var(--shadow-sm);
}
.chat-msg--bot .chat-msg__bubble { background: #fff; color: var(--ink); align-self: flex-start; }
.chat-msg--user { display: flex; justify-content: flex-end; }
.chat-msg--user .chat-msg__bubble { background: var(--teal-dark); color: #fff; }
.chat-msg__sources {
  margin-top: .5rem; padding-top: .5rem;
  border-top: 1px dashed var(--hairline);
  font-size: .78rem; color: var(--ink-soft);
}
.chat-msg__sources ol { padding-inline-start: 1.2rem; margin: .3rem 0 0; }
.chat-msg__sources li { margin-bottom: .2rem; }

.chat-panel__suggestions { padding: 0 1.25rem; display: flex; gap: .4rem; flex-wrap: wrap; }
.chat-panel__suggestions button {
  background: #fff; border: 1px solid var(--hairline);
  padding: .4rem .8rem; border-radius: 999px;
  font-size: .78rem; color: var(--teal-mid);
  font-weight: 500; transition: all var(--dur) var(--ease);
}
.chat-panel__suggestions button:hover { background: var(--teal-dark); color: #fff; border-color: var(--teal-dark); }

.chat-panel__form {
  display: flex; gap: .5rem;
  padding: 1rem 1.25rem;
  border-top: 1px solid var(--hairline); background: #fff;
}
.chat-panel__form input {
  flex: 1; padding: .75rem 1rem; border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface-alt); font: inherit; color: var(--ink);
  transition: all var(--dur) var(--ease);
}
.chat-panel__form input:focus {
  outline: none; border-color: var(--teal-light); background: #fff;
  box-shadow: 0 0 0 3px rgba(21,129,163,.15);
}
.chat-panel__form button {
  width: 44px; height: 44px; border-radius: 50%;
  background: var(--teal-dark); color: #fff;
  display: grid; place-items: center; transition: all var(--dur);
}
.chat-panel__form button:hover { background: var(--teal-mid); }
.chat-panel__form button svg { width: 20px; height: 20px; }
html[dir="rtl"] .chat-panel__form button svg { transform: scaleX(-1); }

.typing-dots { display: inline-flex; gap: 4px; }
.typing-dots span {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--ink-soft); animation: dots 1.3s infinite;
}
.typing-dots span:nth-child(2) { animation-delay: .15s; }
.typing-dots span:nth-child(3) { animation-delay: .3s; }
@keyframes dots {
  0%,60%,100% { opacity: .3; transform: translateY(0); }
  30%         { opacity: 1;  transform: translateY(-3px); }
}

/* AI PAGE */
.ai-page__grid { display: grid; gap: 3rem; grid-template-columns: 1.3fr 1fr; align-items: start; }
.inline-chat {
  background: #fff; border: 1px solid var(--hairline);
  border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow-sm);
  min-height: 500px; display: flex; flex-direction: column;
}
.inline-chat__head {
  padding: 1.2rem 1.5rem; background: var(--surface-alt);
  border-bottom: 1px solid var(--hairline);
  display: flex; gap: 1rem; align-items: center;
}
.inline-chat__head .brand__crest { width: 48px; height: 48px; }
.inline-chat__head h2 { font-size: 1.1rem; font-weight: 600; color: var(--ink); }
.inline-chat__head p { font-size: .82rem; }
.inline-chat__messages {
  flex: 1; overflow-y: auto; padding: 1.5rem;
  display: flex; flex-direction: column; gap: 1rem;
  min-height: 340px;
}
.inline-chat__form {
  display: flex; gap: .5rem;
  padding: 1rem 1.5rem;
  border-top: 1px solid var(--hairline);
}
.inline-chat__form input {
  flex: 1; padding: .85rem 1.1rem; border-radius: 999px;
  border: 1px solid var(--hairline);
  background: var(--surface-alt); font: inherit; color: var(--ink);
}
.inline-chat__form input:focus { outline: none; border-color: var(--teal-light); background: #fff; }
.inline-chat__form button {
  width: 48px; height: 48px; border-radius: 50%;
  background: var(--teal-dark); color: #fff;
  display: grid; place-items: center;
}
.inline-chat__form button:hover { background: var(--teal-mid); }
html[dir="rtl"] .inline-chat__form button svg { transform: scaleX(-1); }

.ai-page__faq h2 { margin-bottom: 1.5rem; font-size: 1.4rem; }
.faq-list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.faq-list details {
  background: #fff; border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  transition: all var(--dur);
}
.faq-list details[open] { border-color: var(--teal-light); box-shadow: var(--shadow-sm); }
.faq-list summary {
  cursor: pointer; font-weight: 500; list-style: none;
  display: flex; align-items: flex-start; gap: .5rem;
}
.faq-list summary::-webkit-details-marker { display: none; }
.faq-list summary::after {
  content: "+"; margin-inline-start: auto;
  font-size: 1.4rem; line-height: 1;
  color: var(--teal-mid); transition: transform var(--dur);
}
.faq-list details[open] summary::after { transform: rotate(45deg); }
.faq-list p { margin: .75rem 0; color: var(--ink-soft); }

.pill {
  display: inline-block; padding: 2px 10px;
  border-radius: 999px; font-size: .72rem;
  background: var(--teal-dark); color: #fff;
  font-weight: 600; margin-inline-end: .3rem;
}

/* AUTH */
.auth-shell {
  min-height: calc(100vh - 200px);
  display: grid; place-items: center;
  padding: 3rem 1rem;
  background: linear-gradient(135deg, var(--teal-mid) 0%, var(--teal-light) 100%);
}
.auth-card {
  background: #fff; border-radius: var(--radius-lg);
  padding: clamp(2rem, 5vw, 3rem);
  width: 100%; max-width: 460px;
  box-shadow: var(--shadow-lg);
}
.auth-card--wide { max-width: 640px; }
.auth-card header { text-align: center; margin-bottom: 2rem; }
.auth-card .brand__crest { width: 56px; height: 56px; margin: 0 auto 1rem; }
.auth-card h1 { font-size: 1.6rem; margin-bottom: .3rem; color: var(--ink); }
.auth-card form { display: flex; flex-direction: column; gap: 1rem; }
.auth-card label {
  display: flex; flex-direction: column; gap: .35rem;
  font-size: .85rem; font-weight: 500; color: var(--ink);
}
.auth-card input:not([type=checkbox]),
.auth-card textarea, .auth-card select {
  padding: .75rem 1rem; border: 1px solid var(--hairline);
  border-radius: var(--radius); font: inherit;
  background: #fff; color: var(--ink);
  transition: all var(--dur);
}
.auth-card input:focus, .auth-card textarea:focus, .auth-card select:focus {
  outline: none; border-color: var(--teal-light);
  box-shadow: 0 0 0 3px rgba(21,129,163,.15);
}
.auth-card .checkbox { flex-direction: row; align-items: center; }
.auth-card .error { color: var(--danger); font-size: .8rem; }
.auth-card footer {
  text-align: center; margin-top: 2rem;
  padding-top: 1.5rem; border-top: 1px solid var(--hairline);
  color: var(--ink-soft); font-size: .9rem;
}
.resend-form { margin-top: 1rem; text-align: center; }

.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-grid .col-2 { grid-column: span 2; }
.form-grid label {
  display: flex; flex-direction: column; gap: .35rem;
  font-size: .85rem; font-weight: 500; color: var(--ink);
}
.form-grid input:not([type=checkbox]),
.form-grid textarea, .form-grid select {
  padding: .65rem .9rem; border: 1px solid var(--hairline);
  border-radius: var(--radius-sm); font: inherit;
  background: #fff; color: var(--ink);
}
.form-grid input:focus, .form-grid textarea:focus, .form-grid select:focus {
  outline: none; border-color: var(--teal-light);
}

/* UNDER CONSTRUCTION */
.under-construction {
  padding: 5rem 1rem;
  background: linear-gradient(135deg, var(--teal-mid) 0%, var(--teal-light) 100%);
  min-height: 70vh;
  display: grid; place-items: center; color: #fff;
}
.uc-card {
  max-width: 640px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.15);
  border-radius: var(--radius-lg);
  padding: 3rem; text-align: center; color: #fff;
}
.uc-card__deco { width: 100px; height: 100px; margin: 0 auto 1.5rem; color: #fff; }
.uc-card h1 { color: #fff; margin: 1rem 0 1.5rem; font-size: clamp(1.5rem, 3vw, 2.2rem); }
.uc-card h1 em { color: #fff; font-style: normal; }
.uc-card p { color: rgba(255,255,255,.9); margin-bottom: 2rem; font-size: 1.05rem; }
.uc-card__actions { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }
.uc-card .btn--cta { background: #fff; color: var(--teal-dark); }
.uc-card .btn--cta:hover { background: var(--teal-dark); color: #fff; }

/* CONTACT */
.contact-grid {
  display: grid; gap: 1.25rem;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

/* FOOTER */
.footer { margin-top: 4rem; background: var(--teal-dark); color: rgba(255,255,255,.8); }
.footer__weave { display: none; }
.footer__grid {
  display: grid; gap: 3rem;
  grid-template-columns: 1.5fr 1fr 1fr;
  padding: 4rem 0 3rem;
}
.footer__brand h3 { color: #fff; font-size: 1.1rem; margin: 1rem 0 .5rem; font-weight: 600; }
.footer h4 {
  color: #fff; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .18em;
  font-weight: 600; margin-bottom: 1rem;
}
html[dir="rtl"] .footer h4 { letter-spacing: 0; }
.footer__list { list-style: none; padding: 0; display: grid; gap: .5rem; }
.footer__list a { color: rgba(255,255,255,.8); }
.footer__list a:hover { color: #fff; }
.footer__bottom {
  border-top: 1px solid rgba(255,255,255,.15);
  padding: 1.5rem 0;
  display: flex; justify-content: space-between;
  font-size: .85rem; color: rgba(255,255,255,.6);
  flex-wrap: wrap; gap: 1rem;
}

/* ERRORS */
.error-page {
  min-height: 60vh; display: grid; place-items: center;
  padding: 4rem 1rem;
}
.error-page h1 { font-size: clamp(2rem, 5vw, 3rem); margin: 1rem 0; }
.error-page p { color: var(--ink-soft); margin-bottom: 2rem; max-width: 520px; }
.error-page .container { text-align: center; }

/* ADMIN */
.admin-shell { display: grid; grid-template-columns: 260px 1fr; min-height: calc(100vh - 76px); }
.admin-sidebar {
  background: var(--teal-dark); color: rgba(255,255,255,.85);
  padding: 1.5rem 1rem; position: sticky; top: 76px;
  height: calc(100vh - 76px); overflow-y: auto;
  display: flex; flex-direction: column;
}
.admin-sidebar__brand {
  display: flex; gap: .75rem; align-items: center;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid rgba(255,255,255,.15);
  margin-bottom: 1rem;
}
.admin-sidebar__brand svg,
.admin-sidebar__brand .crest-img {
  width: 42px; height: 42px; flex-shrink: 0;
  background: #fff; border-radius: 50%; padding: 3px;
}
.admin-sidebar__brand strong { display: block; color: #fff; font-size: .95rem; }
.admin-sidebar__brand small { font-size: .75rem; }
.admin-sidebar nav { display: flex; flex-direction: column; gap: .15rem; }
.admin-sidebar nav a {
  padding: .65rem .85rem;
  color: rgba(255,255,255,.75);
  border-radius: var(--radius-sm);
  font-size: .92rem; transition: all var(--dur);
}
.admin-sidebar nav a:hover { background: rgba(255,255,255,.08); color: #fff; }
.admin-sidebar nav a.is-active { background: var(--teal-mid); color: #fff; }
.admin-sidebar__foot {
  margin-top: auto; padding-top: 1.5rem;
  border-top: 1px solid rgba(255,255,255,.15);
}

.admin-main { padding: 2rem; background: var(--surface-alt); }
.admin-head {
  margin-bottom: 2rem;
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; flex-wrap: wrap;
}
.admin-head h1 { font-size: 1.6rem; font-weight: 700; color: var(--ink); }
.admin-head .muted { width: 100%; }

.stats {
  display: grid; gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  margin-bottom: 2rem;
}
.stat {
  background: #fff; padding: 1.25rem;
  border-radius: var(--radius);
  border: 1px solid var(--hairline);
  display: flex; flex-direction: column; gap: .25rem;
}
.stat__num { font-size: 1.8rem; font-weight: 700; color: var(--teal-dark); }
.stat__label {
  text-transform: uppercase; letter-spacing: .14em;
  font-size: .72rem; font-weight: 600; color: var(--ink-soft);
}

.admin-card {
  background: #fff; padding: 1.75rem;
  border-radius: var(--radius); border: 1px solid var(--hairline);
  margin-bottom: 1.5rem;
}
.admin-card h2 { font-size: 1.15rem; margin-bottom: 1rem; font-weight: 600; color: var(--ink); }

.admin-table { width: 100%; border-collapse: collapse; background: #fff; }
.admin-table th, .admin-table td {
  padding: .75rem; border-bottom: 1px solid var(--hairline);
  text-align: start; font-size: .9rem; color: var(--ink);
}
.admin-table th {
  background: var(--surface-alt); font-weight: 600; color: var(--ink);
  text-transform: uppercase; letter-spacing: .08em; font-size: .72rem;
}
.admin-table code {
  font-family: ui-monospace, monospace; font-size: .82em;
  background: var(--surface-alt); padding: 2px 6px; border-radius: 4px;
  color: var(--ink);
}

.inline-form { display: inline-block; margin-inline-start: .3rem; }

.block-edit {
  background: var(--surface-alt); border: 1px solid var(--hairline);
  border-radius: var(--radius); padding: 1rem 1.25rem;
  margin-bottom: .75rem;
}
.block-edit summary { cursor: pointer; font-weight: 500; color: var(--ink); }
.block-edit .form-grid { margin-top: 1rem; }

.hero-image-field {
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  background: var(--surface-alt);
}
.hero-image-field legend {
  padding: 0 .5rem;
  font-size: .75rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em;
  color: var(--ink-soft);
}
html[dir="rtl"] .hero-image-field legend { letter-spacing: 0; }
.hero-image-field__grid {
  display: grid; gap: 1rem;
  grid-template-columns: 180px 1fr;
  align-items: start;
}
.hero-image-field__preview {
  background: #fff;
  border-radius: var(--radius-sm);
  border: 1px solid var(--hairline);
  padding: .5rem;
  display: flex; flex-direction: column; align-items: center; gap: .4rem;
}
.hero-image-field__preview img {
  max-width: 100%;
  max-height: 140px;
  object-fit: contain;
  border-radius: var(--radius-sm);
}
.hero-image-field__preview small { word-break: break-all; text-align: center; }
.hero-image-field__empty {
  width: 100%; height: 120px;
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
  display: grid; place-items: center;
  color: var(--ink-soft); font-size: .85rem;
}
.hero-image-field__controls {
  display: flex; flex-direction: column; gap: .75rem;
}
@media (max-width: 640px) {
  .hero-image-field__grid { grid-template-columns: 1fr; }
}

.gallery-grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); }
.gallery-tile {
  background: #fff; border-radius: var(--radius);
  overflow: hidden; border: 1px solid var(--hairline);
}
.gallery-tile img { width: 100%; height: 140px; object-fit: cover; }
.gallery-tile figcaption { padding: .5rem .75rem; font-size: .85rem; color: var(--ink); }
.gallery-tile form { padding: 0 .75rem .75rem; }

/* RESPONSIVE */
@media (max-width: 980px) {
  .ai-showcase, .service-detail, .ai-page__grid, .footer__grid { grid-template-columns: 1fr; }
  .ai-block__grid { grid-template-columns: 1fr; }
  .frequent-queries { max-height: 360px; }
  .service-detail__aside { position: static; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-sidebar { position: static; height: auto; }
}
@media (max-width: 760px) {
  .nav__toggle { display: flex; }
  .nav__menu {
    position: fixed; top: 76px; left: 0; right: 0;
    background: #fff; padding: 1.5rem;
    flex-direction: column; align-items: stretch; gap: 1rem;
    box-shadow: var(--shadow);
    transform: translateY(-10px); opacity: 0; visibility: hidden;
    transition: all var(--dur);
  }
  .nav__menu.is-open { transform: translateY(0); opacity: 1; visibility: visible; }
  .nav__dropdown-menu {
    position: static; opacity: 1; visibility: visible; transform: none;
    box-shadow: none; border: 0; padding: 0 0 0 1rem;
  }
  html[dir="rtl"] .nav__dropdown-menu { padding: 0 1rem 0 0; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .col-2 { grid-column: span 1; }
  .chat-fab__label { display: none; }
  .chat-fab { padding: .85rem; }
  .chat-panel { inset: 0; width: 100vw; height: 100vh; border-radius: 0; }
}
@media print {
  .nav, .topbar, .footer, .chat-fab, .chat-panel { display: none !important; }
  body { background: #fff; }
}

/* ═══════════════════════════════════════════════════════════════════════
   APPOINTMENTS
   ═══════════════════════════════════════════════════════════════════════ */

/* Category picker cards reuse .cards + .card */
.cards--appointments { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }

/* Booking form — two-column layout (slots left, sticky details right) */
.booking-layout {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 2rem;
  align-items: start;
  max-width: 1180px;
  margin: 0 auto;
}

.booking-layout__slots,
.booking-panel {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1.75rem;
}

.booking-layout__head {
  display: flex; align-items: center; gap: .75rem;
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--hairline);
}
.booking-layout__head h2 {
  font-size: 1.15rem;
  color: var(--teal-dark);
  margin: 0;
}
.booking-layout__step-num {
  width: 28px; height: 28px;
  border-radius: 50%;
  background: var(--teal-dark); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: .9rem;
}

/* Sticky right panel — stays in view as the user scrolls through slots */
.booking-layout__details {
  position: sticky;
  top: 100px;          /* clears the sticky site nav (~76px) + a little breathing room */
}

.booking-panel__picked {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin-bottom: 1.25rem;
  border: 1px dashed var(--hairline);
}
.booking-panel__picked-empty {
  font-size: .92rem;
  color: var(--ink-soft);
  text-align: center;
}
.booking-panel__picked-filled {
  display: flex; flex-direction: column; gap: .2rem;
}
.booking-panel__picked-filled[hidden] { display: none; }
.booking-panel__picked-label {
  font-size: .7rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
}
html[dir="rtl"] .booking-panel__picked-label { letter-spacing: 0; }
.booking-panel__picked-filled strong {
  color: var(--teal-dark);
  font-size: 1rem;
}

/* When something IS picked, swap the dashed border for a solid teal tile */
.booking-panel:has([data-when]:not(:empty)) .booking-panel__picked {
  background: rgba(21, 129, 163, 0.08);
  border: 1px solid var(--teal-light);
  border-style: solid;
}

.booking-panel__fields {
  display: flex; flex-direction: column;
  gap: .85rem;
  margin-bottom: 1.25rem;
}
.booking-panel__fields label {
  display: flex; flex-direction: column; gap: .3rem;
  font-size: .85rem;
  font-weight: 500;
  color: var(--ink);
}
.booking-panel__fields input {
  padding: .6rem .85rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  font: inherit;
  background: #fff;
  color: var(--ink);
  transition: all var(--dur) var(--ease);
}
.booking-panel__fields input:focus {
  outline: none;
  border-color: var(--teal-light);
  box-shadow: 0 0 0 3px rgba(21,129,163,.15);
}

.booking-panel__submit {
  margin-top: .5rem;
}
.booking-panel__submit:disabled {
  opacity: .5;
  cursor: not-allowed;
}
.booking-panel__note {
  margin-top: .75rem;
  font-size: .82rem;
  text-align: center;
}

.day-slots { margin-bottom: 1.5rem; }
.day-slots:last-child { margin-bottom: 0; }
.day-slots__date {
  font-size: 1rem;
  color: var(--teal-dark);
  font-weight: 600;
  margin-bottom: .75rem;
  padding-bottom: .5rem;
  border-bottom: 1px dashed var(--hairline);
}
.day-slots__grid {
  display: grid; gap: .5rem;
  grid-template-columns: repeat(auto-fill, minmax(84px, 1fr));
}
.slot-chip { cursor: pointer; text-align: center; }
.slot-chip input { position: absolute; opacity: 0; width: 0; height: 0; }
.slot-chip span {
  display: block;
  padding: .6rem .4rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  background: #fff;
  font-weight: 500;
  font-size: .92rem;
  transition: all var(--dur) var(--ease);
}
.slot-chip:hover span {
  border-color: var(--teal-light);
  background: var(--surface-alt);
}
.slot-chip input:checked + span {
  background: var(--teal-dark); color: #fff;
  border-color: var(--teal-dark);
}
.slot-chip input:focus-visible + span {
  outline: 2px solid var(--teal-light);
  outline-offset: 2px;
}

/* Mobile / tablet: stack vertically, drop sticky */
@media (max-width: 900px) {
  .booking-layout { grid-template-columns: 1fr; gap: 1.25rem; }
  .booking-layout__details { position: static; }
}

/* Verify OTP booking summary */
.booking-summary {
  background: var(--surface-alt);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  margin: 0 0 1.5rem;
  font-size: .9rem;
}
.booking-summary dl {
  display: grid; grid-template-columns: max-content 1fr;
  gap: .35rem 1rem;
}
.booking-summary dt {
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}
html[dir="rtl"] .booking-summary dt { letter-spacing: 0; }

/* Confirmation page */
.confirmation {
  padding: clamp(3rem, 8vw, 5rem) 0;
  background: var(--surface-alt);
  min-height: 70vh;
}
.confirmation__inner {
  max-width: 680px; margin: 0 auto;
  text-align: center;
}
.confirmation__badge {
  width: 80px; height: 80px; border-radius: 50%;
  background: var(--teal-dark); color: #fff;
  margin: 0 auto 1.5rem;
  display: grid; place-items: center;
}
.confirmation__badge svg { width: 48px; height: 48px; }
.confirmation h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 1rem;
}
.confirmation__lede {
  color: var(--ink-soft);
  max-width: 520px;
  margin: 0 auto 2rem;
}
.confirmation__code {
  background: var(--teal-dark); color: #fff;
  padding: 1rem 1.5rem;
  border-radius: var(--radius);
  margin: 0 auto 2rem;
  display: inline-block;
}
.confirmation__code small {
  display: block;
  font-size: .72rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(255,255,255,.7);
  margin-bottom: .3rem;
}
.confirmation__code strong {
  font-size: 2rem;
  letter-spacing: .14em;
  font-family: ui-monospace, Menlo, monospace;
}
.confirmation__card {
  background: #fff;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-lg);
  padding: 1.75rem 2rem;
  text-align: start;
  margin-bottom: 2rem;
  box-shadow: var(--shadow-sm);
}
.confirmation__card dl {
  display: grid;
  grid-template-columns: max-content 1fr;
  gap: .75rem 1.5rem;
}
.confirmation__card dt {
  font-size: .72rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--ink-soft);
  font-weight: 600;
  padding-top: .15rem;
}
html[dir="rtl"] .confirmation__card dt { letter-spacing: 0; }
.confirmation__card dd { color: var(--ink); }
.confirmation__actions {
  display: flex; gap: 1rem; justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 2rem;
}
.confirmation__tip { text-align: start; }

@media print {
  .confirmation { background: #fff; padding: 1rem 0; }
  .confirmation__actions { display: none; }
}

/* ─── Admin appointments ─── */
.period-tabs {
  display: flex; align-items: center; gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}
.period-tabs__item {
  padding: .35rem .9rem;
  border-radius: 999px;
  background: var(--surface-alt);
  color: var(--ink);
  font-size: .88rem;
  font-weight: 500;
  border: 1px solid var(--hairline);
}
.period-tabs__item.is-active {
  background: var(--teal-dark); color: #fff; border-color: var(--teal-dark);
}
.period-range { margin-inline-start: auto; font-size: .85rem; }

.quick-actions { display: flex; gap: .75rem; flex-wrap: wrap; }

.util-bar {
  position: relative;
  background: var(--surface-alt);
  border-radius: 999px;
  height: 22px;
  width: 140px;
  overflow: hidden;
  border: 1px solid var(--hairline);
}
.util-bar__fill {
  height: 100%;
  background: linear-gradient(90deg, var(--teal-mid), var(--teal-light));
  border-radius: 999px;
}
.util-bar span {
  position: absolute;
  inset: 0;
  display: grid; place-items: center;
  font-size: .75rem; font-weight: 600;
  color: var(--ink);
}

.filters {
  display: flex; gap: 1rem; flex-wrap: wrap;
  align-items: end;
}
.filters label {
  display: flex; flex-direction: column; gap: .25rem;
  font-size: .82rem;
}
.filters select, .filters input {
  padding: .5rem .75rem;
  border: 1px solid var(--hairline);
  border-radius: var(--radius-sm);
  font: inherit; background: #fff; color: var(--ink);
  min-width: 160px;
}

.table-actions {
  display: flex; justify-content: space-between; align-items: center;
  margin-bottom: 1rem;
  gap: 1rem;
}

.weekday-picker {
  display: flex; flex-wrap: wrap; gap: .5rem 1rem;
  align-items: center;
  border: 1px solid var(--hairline);
  border-radius: var(--radius);
  padding: .75rem 1rem;
}
.weekday-picker label {
  display: inline-flex; align-items: center; gap: .35rem;
  font-size: .92rem;
}
.weekday-picker small { flex-basis: 100%; }

/* Status pills */
.pill--available { background: #e3efe5; color: #245a2e; }
.pill--held      { background: #fbe9c7; color: #6b4a12; }
.pill--booked    { background: #d9e8ef; color: #0f5b73; }
.pill--blocked   { background: #efe1e0; color: #7b2422; }
.pill--pending   { background: #fbe9c7; color: #6b4a12; }
.pill--confirmed { background: #d9e8ef; color: #0f5b73; }
.pill--cancelled { background: #efe1e0; color: #7b2422; }
.pill--completed { background: #d9e8e4; color: #1f5a4d; }

@media (max-width: 640px) {
  .period-range { margin-inline-start: 0; flex-basis: 100%; }
}
