/* Promo banners, announcement bar and admin-replaceable images (see views/partials/banner-slot.ejs).
   Logical properties only, so the layout mirrors itself between Persian (rtl) and English (ltr). */

/* ---------- Banner slot ---------- */
.nv-banners { padding-block: 22px; }
.nv-banners + .nv-banners { padding-top: 0; }
.nv-banner-track { display: grid; }
.nv-banners.is-multi .nv-banner-track {
  grid-auto-flow: column; grid-auto-columns: 100%; overflow-x: auto; scroll-snap-type: x mandatory;
  scrollbar-width: none; overscroll-behavior-x: contain; border-radius: 14px;
}
.nv-banners.is-multi .nv-banner-track::-webkit-scrollbar { display: none; }
.nv-banner-track:focus-visible { outline: 3px solid var(--emerald, #0a7350); outline-offset: 3px; }
.nv-banner {
  position: relative; isolation: isolate; overflow: hidden; scroll-snap-align: start;
  display: flex; border-radius: 14px; background: var(--nv-bg, #0b261f); color: var(--nv-text, #fff);
  padding: clamp(22px, 4vw, 48px);
}
.nv-h-sm { min-height: 150px; }
.nv-h-md { min-height: 260px; }
.nv-h-lg { min-height: 380px; }
.nv-banner-media, .nv-banner-media img, .nv-banner-overlay { position: absolute; inset: 0; z-index: -1; }
.nv-banner-media img { width: 100%; height: 100%; display: block; }
.nv-fit-cover { object-fit: cover; }
.nv-fit-contain { object-fit: contain; }
.nv-banner-overlay { z-index: -1; pointer-events: none; }

/* content box placement: x = inline axis (start/center/end), y = block axis */
.nv-x-start { justify-content: flex-start; }
.nv-x-center { justify-content: center; }
.nv-x-end { justify-content: flex-end; }
.nv-y-top { align-items: flex-start; }
.nv-y-center { align-items: center; }
.nv-y-bottom { align-items: flex-end; }
.nv-banner-content { width: min(100%, var(--nv-width, 60%)); display: flex; flex-direction: column; gap: 10px; }
.nv-align-start .nv-banner-content { text-align: start; align-items: flex-start; }
.nv-align-center .nv-banner-content { text-align: center; align-items: center; }
.nv-align-end .nv-banner-content { text-align: end; align-items: flex-end; }

.nv-badge {
  display: inline-block; padding: 4px 12px; border-radius: 999px; font-size: 13px; font-weight: 700;
  background: color-mix(in srgb, var(--nv-text) 16%, transparent); border: 1px solid color-mix(in srgb, var(--nv-text) 35%, transparent);
}
.nv-title { margin: 0; color: inherit; line-height: 1.35; text-wrap: balance; font-weight: 800; }
.nv-subtitle, .nv-text { margin: 0; color: inherit; line-height: 1.9; text-wrap: pretty; }
.nv-subtitle { font-weight: 600; opacity: .95; }
.nv-text { opacity: .9; }
.nv-title.nv-s-sm { font-size: 20px; } .nv-title.nv-s-md { font-size: 26px; } .nv-title.nv-s-lg { font-size: clamp(26px, 3.4vw, 36px); } .nv-title.nv-s-xl { font-size: clamp(30px, 4.6vw, 48px); }
.nv-subtitle.nv-s-sm, .nv-text.nv-s-sm { font-size: 14px; } .nv-subtitle.nv-s-md, .nv-text.nv-s-md { font-size: 16px; }
.nv-subtitle.nv-s-lg, .nv-text.nv-s-lg { font-size: 19px; } .nv-subtitle.nv-s-xl, .nv-text.nv-s-xl { font-size: 22px; }

.nv-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.nv-align-center .nv-actions { justify-content: center; }
.nv-align-end .nv-actions { justify-content: flex-end; }
.nv-btn { min-height: 44px; }
.nv-btn-light { background: #fff; color: #0f2b25; border-color: #fff; }
.nv-btn-light:hover { background: #eef4f0; }
.nv-btn-outline { background: transparent; color: var(--nv-text); border: 1.5px solid currentColor; }
.nv-btn-outline:hover { background: color-mix(in srgb, var(--nv-text) 14%, transparent); }

.nv-banner-nav { display: flex; align-items: center; justify-content: center; gap: 12px; margin-top: 10px; }
.nv-nav-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--rule, #c7d4cd); background: var(--sheet, #fff);
  color: var(--ink, #0f2b25); font-size: 22px; cursor: pointer; touch-action: manipulation;
  transition: background-color var(--dur-1, 120ms) ease, border-color var(--dur-1, 120ms) ease;
}
.nv-nav-btn:hover { border-color: var(--emerald, #0a7350); background: var(--emerald-tint, #e2f1e9); }
.nv-nav-btn:focus-visible { outline: 3px solid var(--emerald, #0a7350); outline-offset: 2px; }
.nv-dots { display: inline-flex; gap: 6px; }
.nv-dots i { width: 8px; height: 8px; border-radius: 50%; background: var(--rule, #c7d4cd); transition: background-color var(--dur-2, 220ms) ease, width var(--dur-2, 220ms) ease; }
.nv-dots i.is-on { background: var(--emerald, #0a7350); width: 22px; border-radius: 4px; }

@media (max-width: 700px) {
  .nv-banners { padding-block: 16px; }
  .nv-banner { padding: 22px 18px; }
  .nv-banner-content { width: 100%; }
  .nv-h-md { min-height: 220px; } .nv-h-lg { min-height: 300px; }
  .nv-hide-m { display: none !important; }
  .nv-actions .nv-btn { flex: 1 1 auto; justify-content: center; }
}

/* ---------- Announcement bar ---------- */
.nv-announce { background: var(--nv-bg, #0b261f); color: var(--nv-text, #fff); font-size: 14px; }
.nv-announce[hidden] { display: none; }
.nv-announce-inner { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 42px; padding-block: 6px; }
.nv-announce p { margin: 0; line-height: 1.7; text-align: center; }
.nv-announce a { color: inherit; font-weight: 700; text-decoration: underline; text-underline-offset: 4px; white-space: nowrap; min-height: 44px; display: inline-flex; align-items: center; }
.nv-announce-close { margin-inline-start: auto; background: none; border: 0; color: inherit; font-size: 22px; width: 44px; height: 44px; cursor: pointer; opacity: .8; }
.nv-announce-close:hover, .nv-announce-close:focus-visible { opacity: 1; }
@media (max-width: 700px) { .nv-announce-inner { justify-content: space-between; } .nv-announce p { text-align: start; font-size: 13px; } }

/* ---------- Page headers with an admin-chosen picture ---------- */
.page-hero:has(> .page-hero-media) { position: relative; isolation: isolate; overflow: hidden; color: #fff; }
.page-hero-media { position: absolute; inset: 0; z-index: -2; }
.page-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.page-hero:has(> .page-hero-media)::before { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to bottom, rgb(6 26 21 / .62), rgb(6 26 21 / .78)); }
.is-public .page-hero:has(> .page-hero-media) h1, .is-public .page-hero:has(> .page-hero-media) h1 em, .is-public .page-hero:has(> .page-hero-media) p,
.is-public .page-hero:has(> .page-hero-media) .breadcrumb, .is-public .page-hero:has(> .page-hero-media) .breadcrumb a, .is-public .page-hero:has(> .page-hero-media) .breadcrumb span,
.is-public .page-hero:has(> .page-hero-media) .section-kicker { color: #fff !important; }

/* ---------- Home opening picture (replaces the drawing) ---------- */
.hero-art-image { width: 100%; height: 100%; min-height: 320px; object-fit: cover; border-radius: 14px; display: block; }

/* ---------- Fallback covers chosen by the admin ---------- */
.cover-fallback-img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ---------- Login side / error picture ---------- */
.auth-art-image { width: 100%; max-height: 320px; object-fit: cover; border-radius: 12px; margin-top: 18px; display: block; }
.error-art-image { width: min(220px, 60%); height: auto; margin-inline: auto; display: block; margin-bottom: 14px; border-radius: 12px; }

@media (prefers-reduced-motion: reduce) {
  .nv-banners.is-multi .nv-banner-track { scroll-behavior: auto; }
  .nv-dots i, .nv-nav-btn { transition: none; }
}

/* Unread support replies badge in the main navigation */
.nav-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; margin-inline-start: 4px; border-radius: 999px; background: var(--flame, #e8922a); color: #fff; font-size: 11.5px; font-weight: 800; vertical-align: 1px; }
