/* ==========================================================================
   ترنج و پیچک — site.css
   Tokens → base → components → layout → pages. Logical properties only (RTL-first).

   Visual language: a painting school that borrows from Persian illumination (تذهیب).
   · ink = lapis (لاجورد)   · citron = gilt / toranj gold (زر)   · ivy = تاک / پیچک
   · vermilion = شنگرف      · rose and turquoise only appear as pigment dabs
   · motifs: gilt almond (toranj), tendril curl, pigment swatch strip, framed-print cards,
     gilt hairline frames (جدول), faint ogee lattice and paper grain.
   Legacy class names kept on purpose: .btn-citron is the primary button, .stripes is the lattice overlay.
   ========================================================================== */

:root {
  /* pigments */
  --ink: #15235a;
  --ink-2: #1c2c6d;
  --ink-3: #2c3f8c;
  --citron: #f2bf2f;
  --citron-600: #c99710;
  --citron-ink: #2b2000;
  --vermilion: #d03d25;
  --vermilion-600: #b0301a;
  --vermilion-text: #b0301a;
  --ivy: #2a7a58;
  --ivy-ink: #ffffff;
  --turquoise: #1b9aa3;
  --rose: #c24a7c;
  --lapis-light: #3e5bc4;
  --gilt-deep: #b9850a;

  /* paper */
  --paper: #f5f3ed;
  --surface: #fffdf9;
  --surface-2: #ece9df;
  --line: #ddd8ca;
  --text: #161b33;
  --muted: #5a6180;
  --focus: #2a4fd6;

  --radius-frame: 5px;
  --radius-sm: 6px;
  --radius: 10px;
  --radius-lg: 16px;
  --radius-btn: 10px;
  --shadow-sm: 0 1px 2px rgb(21 35 90 / .08), 0 1px 1px rgb(21 35 90 / .05);
  --shadow: 0 12px 30px -14px rgb(21 35 90 / .3);
  --shadow-lg: 0 28px 60px -26px rgb(21 35 90 / .48);
  --gilt-line: color-mix(in srgb, var(--citron-600) 52%, transparent);
  /* paint-chip strip and colour-wheel ring, reused by footer, cards and avatars */
  --swatches: linear-gradient(90deg, var(--citron) 0 16.66%, var(--vermilion) 0 33.33%, var(--rose) 0 50%, var(--lapis-light) 0 66.66%, var(--turquoise) 0 83.33%, var(--ivy) 0 100%);
  --pigment-wheel: conic-gradient(var(--citron), var(--vermilion), var(--rose), var(--lapis-light), var(--turquoise), var(--ivy), var(--citron));

  --header-h: 72px;
  --ease: cubic-bezier(.2, .7, .2, 1);

  --bs-body-font-family: Vazirmatn, system-ui, -apple-system, "Segoe UI", Tahoma, sans-serif;
  --bs-body-bg: var(--paper);
  --bs-body-color: var(--text);
  --bs-border-color: var(--line);
  --bs-link-color-rgb: 21, 35, 90;
  --bs-link-hover-color-rgb: 176, 48, 26;
  --bs-primary: #15235a;
  --bs-primary-rgb: 21, 35, 90;
  color-scheme: light;
}

[data-bs-theme="dark"] {
  --paper: #0b1130;
  --surface: #121a45;
  --surface-2: #1a2358;
  --line: #2a3570;
  --text: #eceffb;
  --muted: #a2abd2;
  --focus: #9db5ff;
  --ivy: #5cc79d;
  --ivy-ink: #052e1f;
  --vermilion-text: #ff8468;
  --gilt-deep: #f2bf2f;
  --shadow-sm: 0 1px 2px rgb(0 0 0 / .5);
  --shadow: 0 12px 32px -14px rgb(0 0 0 / .8);
  --shadow-lg: 0 30px 60px -24px rgb(0 0 0 / .9);
  --gilt-line: color-mix(in srgb, var(--citron) 38%, transparent);

  --bs-body-bg: var(--paper);
  --bs-body-color: var(--text);
  --bs-border-color: var(--line);
  --bs-link-color-rgb: 236, 239, 251;
  --bs-link-hover-color-rgb: 242, 191, 47;
  --bs-secondary-color: var(--muted);
  --bs-tertiary-bg: var(--surface-2);
  color-scheme: dark;
}

/* dark surfaces (lapis) keep a gilt focus ring so it never disappears into the blue */
.topbar, .hero, .page-hero, .section-dark, .site-footer, .vip-cta, .course-hero, .profile-hero, .mega-promo, .player-empty, .toast-x { --focus: var(--citron); }

/* ---------- base ---------- */
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }
body { background-color: var(--paper); background-image: url("../img/paper-grain.svg"); color: var(--text); font-family: var(--bs-body-font-family); line-height: 1.85; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
[data-bs-theme="dark"] body { background-image: none; }
h1, h2, h3, h4, h5, h6 { font-weight: 800; line-height: 1.5; }
a { text-underline-offset: .22em; }
img, svg, video { max-width: 100%; }
img { height: auto; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--citron); color: var(--citron-ink); }
main:focus { outline: none; }
.skip-link { position: absolute; inset-inline-start: 12px; top: -80px; z-index: 2000; background: var(--citron); color: var(--citron-ink); padding: .6rem 1rem; border-radius: 0 0 var(--radius-sm) var(--radius-sm); font-weight: 700; transition: top .2s; }
.skip-link:focus { top: 0; }
.text-muted, .text-body-secondary { color: var(--muted) !important; }
.visually-hidden-focusable:not(:focus):not(:focus-within) { position: absolute !important; }
[hidden] { display: none !important; }
[dir="ltr"] { unicode-bidi: plaintext; }
.ltr { direction: ltr; unicode-bidi: isolate; }

/* ---------- ornaments shared by sections ---------- */
/* pigment swatch strip: six paint chips side by side (footer top, auth card top) */
.footer-stripe, .swatch-strip { height: 8px; background: var(--swatches); }
/* faint ogee lattice over lapis sections */
.hero-stripes, .stripes { position: absolute; inset: 0; background: url("../img/pattern-toranj.svg"); pointer-events: none; }

/* ---------- buttons ---------- */
.btn { --bs-btn-border-radius: var(--radius-btn); --bs-btn-font-weight: 700; --bs-btn-padding-x: 1.25rem; font-weight: 700; border-radius: var(--radius-btn); transition: transform .18s var(--ease), box-shadow .18s var(--ease), background-color .18s, color .18s, border-color .18s; display: inline-flex; align-items: center; justify-content: center; gap: .5rem; }
.btn:active { transform: translateY(1px) scale(.99); }
.btn-lg { --bs-btn-padding-y: .75rem; --bs-btn-padding-x: 1.75rem; font-size: 1.05rem; }
.btn-sm { --bs-btn-padding-x: 1rem; }
.btn-citron { background: var(--citron); color: var(--citron-ink); border: 2px solid var(--citron); box-shadow: 0 8px 20px -10px rgb(201 151 16 / .85); }
.btn-citron:hover, .btn-citron:focus-visible { background: #f8cf5b; border-color: #f8cf5b; color: var(--citron-ink); transform: translateY(-2px); box-shadow: 0 14px 26px -12px rgb(201 151 16 / .95); }
.btn-ink { background: var(--ink); color: #fff; border: 2px solid var(--ink); }
.btn-ink:hover, .btn-ink:focus-visible { background: var(--vermilion); border-color: var(--vermilion); color: #fff; transform: translateY(-2px); }
[data-bs-theme="dark"] .btn-ink { background: var(--citron); border-color: var(--citron); color: var(--citron-ink); }
[data-bs-theme="dark"] .btn-ink:hover { background: #f8cf5b; border-color: #f8cf5b; color: var(--citron-ink); }
.btn-vermilion { background: var(--vermilion); color: #fff; border: 2px solid var(--vermilion); }
.btn-vermilion:hover { background: var(--vermilion-600); border-color: var(--vermilion-600); color: #fff; transform: translateY(-2px); }
.btn-outline-ink { border: 2px solid var(--ink); color: var(--ink); background: transparent; }
.btn-outline-ink:hover, .btn-outline-ink:focus-visible { background: var(--ink); color: #fff; }
[data-bs-theme="dark"] .btn-outline-ink { border-color: var(--text); color: var(--text); }
[data-bs-theme="dark"] .btn-outline-ink:hover { background: var(--text); color: var(--ink); }
.btn-ghost { background: transparent; border: 2px solid var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--text); color: var(--text); }
.btn-outline-light { border-width: 2px; }
.btn[disabled], .btn.disabled { opacity: .55; transform: none; box-shadow: none; }

.icon-btn { display: inline-grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 0; background: transparent; color: inherit; font-size: 1.25rem; position: relative; transition: background-color .18s, color .18s, transform .18s var(--ease); text-decoration: none; cursor: pointer; }
.icon-btn:hover { background: var(--surface-2); color: inherit; }
.icon-btn-sm { width: 32px; height: 32px; font-size: 1rem; }

/* theme toggle icons */
.theme-icon-dark { display: none; }
[data-bs-theme="dark"] .theme-icon-light { display: none; }
[data-bs-theme="dark"] .theme-icon-dark { display: inline; }

/* ---------- topbar ---------- */
.topbar { background: var(--ink); color: #c9d0ec; font-size: .82rem; }
.topbar a, .topbar span { color: inherit; text-decoration: none; }
.topbar a:hover { color: var(--citron); }
.topbar-row { display: flex; align-items: center; justify-content: space-between; min-height: 38px; gap: 1rem; }
.topbar-info, .topbar-links { display: flex; align-items: center; gap: 1.25rem; flex-wrap: wrap; }
.topbar i { margin-inline-end: .35rem; color: var(--citron); }
.topbar .icon-btn { color: #fff; }
.topbar .icon-btn:hover { background: rgb(255 255 255 / .1); }
.topbar .icon-btn i { margin: 0; color: inherit; }

/* ---------- header ---------- */
.site-header { position: sticky; top: 0; z-index: 1030; background: color-mix(in srgb, var(--surface) 96%, transparent); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.header-row { display: flex; align-items: center; gap: .75rem; min-height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: .65rem; color: var(--text); text-decoration: none; flex-shrink: 0; }
.brand:hover { color: var(--text); }
.brand img { border-radius: 10px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.3; }
.brand-text strong { font-weight: 900; font-size: 1.2rem; }
.brand-text small { color: var(--muted); font-size: .72rem; }

.main-nav { margin-inline-start: .5rem; flex: none; }
.nav-list { list-style: none; display: flex; align-items: center; gap: .1rem; margin: 0; padding: 0; }
.nav-item { position: relative; display: flex; align-items: center; }
.nav-link, .nav-caret { background: none; border: 0; color: var(--text); font-weight: 600; font-size: .95rem; display: inline-flex; white-space: nowrap; align-items: center; gap: .4rem; padding: .55rem .8rem; border-radius: var(--radius-btn); text-decoration: none; cursor: pointer; transition: background-color .18s, color .18s; }
.nav-link i:not(.caret) { color: var(--vermilion); font-size: 1.05rem; }
.nav-link:hover, .nav-caret:hover, .nav-item:focus-within > .nav-link, .nav-item.open > .nav-link { background: var(--surface-2); color: var(--text); }
.nav-link.active { background: var(--ink); color: #fff; }
.nav-link.active i:not(.caret) { color: var(--citron); }
[data-bs-theme="dark"] .nav-link.active { background: var(--citron); color: var(--citron-ink); }
[data-bs-theme="dark"] .nav-link.active i:not(.caret) { color: var(--citron-ink); }
.nav-caret { padding: .55rem .35rem; margin-inline-start: -.5rem; }
.caret { font-size: .7rem; transition: transform .2s var(--ease); }
.nav-item:hover > .nav-link .caret, .nav-item:hover > .nav-caret .caret, .nav-item.open .caret { transform: rotate(180deg); }

.drop, .mega { position: absolute; top: 100%; z-index: 20; background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: var(--radius); opacity: 0; visibility: hidden; transform: translateY(8px); transition: opacity .18s var(--ease), transform .18s var(--ease), visibility .18s; }
.drop { inset-inline-start: 0; min-width: 240px; list-style: none; margin: .35rem 0 0; padding: .5rem; }
.drop::before, .mega::before { content: ""; position: absolute; inset-inline: 0; top: -.5rem; height: .5rem; }
.drop a { display: flex; align-items: center; gap: .65rem; padding: .6rem .8rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 500; }
.drop a i { color: var(--vermilion); font-size: 1.1rem; }
.drop a:hover, .drop a:focus-visible { background: var(--surface-2); }
.has-drop:hover > .drop, .has-drop:focus-within > .drop, .has-drop.open > .drop,
.has-mega:hover > .mega, .has-mega:focus-within > .mega, .has-mega.open > .mega { opacity: 1; visibility: visible; transform: none; }

.has-mega { position: static; }
.mega { inset-inline: 0; margin: 0; border-radius: 0 0 var(--radius-lg) var(--radius-lg); border-top: 0; }
.mega::before { top: -28px; height: 28px; }
.mega-inner { display: grid; grid-template-columns: 230px 1fr 280px; gap: 2rem; padding-block: 1.75rem; }
.mega-title { font-size: .85rem; font-weight: 800; color: var(--muted); margin-bottom: .75rem; }
.mega-links { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.mega-links a { display: flex; gap: .6rem; align-items: center; padding: .55rem .7rem; border-radius: var(--radius-sm); color: var(--text); text-decoration: none; font-weight: 600; }
.mega-links a i { color: var(--vermilion); }
.mega-links a:hover { background: var(--surface-2); }
.mega-group-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem 1.5rem; }
.mega-group-title { display: flex; align-items: center; gap: .5rem; font-weight: 800; color: var(--text); text-decoration: none; margin-bottom: .35rem; }
.mega-group-title i { color: var(--vermilion); }
.mega-group-title small { margin-inline-start: auto; background: var(--surface-2); border-radius: 999px; padding: 0 .55rem; color: var(--muted); font-weight: 600; }
.mega-group ul { list-style: none; margin: 0; padding: 0; }
.mega-group li a { display: block; padding: .15rem 0; color: var(--muted); text-decoration: none; font-size: .9rem; }
.mega-group li a:hover { color: var(--vermilion-text); }
.mega-promo { background: var(--ink); color: #fff; border-radius: var(--radius); padding: 1.25rem; display: flex; flex-direction: column; gap: .5rem; align-items: flex-start; position: relative; overflow: hidden; }
.mega-promo::after { content: ""; position: absolute; inset-inline-end: -34px; bottom: -34px; width: 170px; height: 170px; background: url("../img/ornament-curl.svg") center / contain no-repeat; opacity: .3; pointer-events: none; }
.mega-promo p { color: #c9d0ec; font-size: .88rem; margin: 0; }
.promo-chip, .vip-chip { display: inline-flex; align-items: center; gap: .35rem; background: var(--citron); color: var(--citron-ink); border-radius: 999px; padding: .1rem .7rem; font-size: .75rem; font-weight: 800; }

/* ---------- header search ---------- */
.header-search { position: relative; flex: 1 1 260px; max-width: 420px; margin-inline-start: auto; display: none; align-items: center; }
@media (min-width: 992px) { .header-search { display: flex; } }
/* UI-001: on wide screens the search opens under the header (the menu needs the row); site.js then drops the menu icons and the tagline
   (.nav-tight) and finally switches to the drawer (.nav-compact) when the admin-editable menu still does not fit */
.search-toggle { display: none; }
@media (min-width: 992px) {
  .header-row { position: relative; }
  .header-row > * { flex-shrink: 0; }
  .search-toggle { display: inline-grid; margin-inline-start: auto; }
  .desktop-search { display: none; position: absolute; top: 100%; inset-inline: 0; max-width: none; margin: 0; padding: .75rem; background: var(--surface); border: 1px solid var(--line); border-top: 0; border-radius: 0 0 var(--radius) var(--radius); box-shadow: var(--shadow-lg); }
  .site-header.search-open .desktop-search { display: flex; }
  .desktop-search .header-search-icon { inset-inline-start: 1.75rem; }
  .desktop-search .voice-btn { inset-inline-end: 1.1rem; }
}
.site-header.nav-tight .nav-link i:not(.caret), .site-header.nav-tight .brand-text small { display: none !important; }
.site-header.nav-tight .nav-link { padding-inline: .55rem; font-size: .9rem; }
.site-header.nav-compact .main-nav { display: none !important; }
.site-header.nav-compact .mobile-menu-toggle { display: inline-grid !important; }
.header-search-icon { position: absolute; inset-inline-start: 1rem; color: var(--muted); pointer-events: none; }
.header-search-input { width: 100%; height: 44px; border: 2px solid var(--line); background: var(--surface-2); color: var(--text); border-radius: var(--radius-btn); padding-inline: 2.7rem 2.9rem; font-size: .92rem; transition: border-color .18s, background-color .18s, box-shadow .18s; }
.header-search-input::placeholder { color: var(--muted); }
.header-search-input:focus { outline: none; border-color: var(--ink); background: var(--surface); box-shadow: 0 0 0 4px rgb(242 191 47 / .5); }
[data-bs-theme="dark"] .header-search-input:focus { border-color: var(--citron); }
.voice-btn { position: absolute; inset-inline-end: .35rem; width: 34px; height: 34px; border-radius: 50%; border: 0; background: var(--ink); color: var(--citron); display: grid; place-items: center; cursor: pointer; transition: transform .18s var(--ease), background-color .18s; }
.voice-btn:hover { transform: scale(1.08); }
.voice-btn.is-listening { background: var(--vermilion); color: #fff; animation: pulse 1.1s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgb(208 61 37 / .55); } 70% { box-shadow: 0 0 0 12px rgb(208 61 37 / 0); } 100% { box-shadow: 0 0 0 0 rgb(208 61 37 / 0); } }
.suggest-box { position: absolute; top: calc(100% + .5rem); inset-inline: 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); z-index: 40; overflow: hidden; max-height: 70vh; overflow-y: auto; }
.suggest-item { display: flex; gap: .75rem; align-items: center; padding: .6rem .9rem; color: var(--text); text-decoration: none; }
.suggest-item:hover, .suggest-item.is-active { background: var(--surface-2); color: var(--text); }
.suggest-item img { width: 44px; height: 44px; object-fit: cover; border-radius: var(--radius-frame); background: var(--surface-2); }
.suggest-item small { color: var(--muted); display: block; line-height: 1.4; }
.suggest-type { margin-inline-start: auto; font-size: .7rem; font-weight: 800; color: var(--muted); background: var(--surface-2); border-radius: 999px; padding: .1rem .55rem; }
.suggest-empty { padding: .9rem; color: var(--muted); font-size: .9rem; }

/* ---------- user area ---------- */
.user-area { display: flex; align-items: center; gap: .35rem; margin-inline-start: auto; }
@media (min-width: 992px) { .user-area { margin-inline-start: 0; } }
.cart-btn { font-size: 1.3rem; }
.badge-dot { position: absolute; top: 2px; inset-inline-end: 0; min-width: 19px; height: 19px; padding-inline: 4px; background: var(--vermilion); color: #fff; border-radius: 999px; font-size: .68rem; font-weight: 800; display: grid; place-items: center; border: 2px solid var(--surface); }
.user-toggle { display: inline-flex; align-items: center; gap: .5rem; background: var(--surface-2); border: 2px solid transparent; border-radius: 999px; padding: 3px 4px; padding-inline-end: .5rem; color: var(--text); cursor: pointer; transition: border-color .18s; }
.user-toggle:hover, .user-toggle[aria-expanded="true"] { border-color: var(--ink); }
[data-bs-theme="dark"] .user-toggle:hover, [data-bs-theme="dark"] .user-toggle[aria-expanded="true"] { border-color: var(--citron); }
.user-name { font-weight: 700; font-size: .88rem; max-width: 120px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avatar { border-radius: 50%; object-fit: cover; background: var(--surface-2); border: 2px solid var(--citron); }
.user-menu { min-width: 270px; padding: .5rem; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow-lg); background: var(--surface); margin-top: .5rem !important; }
.user-menu-head { display: flex; gap: .75rem; align-items: center; padding: .6rem .6rem .8rem; border-bottom: 1px solid var(--line); margin-bottom: .4rem; }
.user-menu-head strong { display: block; }
.user-menu .dropdown-item { display: flex; align-items: center; gap: .7rem; border-radius: var(--radius-sm); padding: .5rem .7rem; font-weight: 500; color: var(--text); }
.user-menu .dropdown-item i { color: var(--vermilion); font-size: 1.05rem; width: 1.2rem; text-align: center; }
.user-menu .dropdown-item:hover { background: var(--surface-2); }
.user-menu .dropdown-item.text-danger i { color: inherit; }
.user-menu form { margin: 0; }

/* ---------- mobile menu ---------- */
.mobile-menu { width: min(88vw, 360px); background: var(--surface); }
.mobile-menu .offcanvas-header { border-bottom: 1px solid var(--line); }
.mobile-search { display: flex !important; max-width: none; margin: 0 0 1rem; }
.m-nav { list-style: none; margin: 0; padding: 0; display: grid; gap: .15rem; }
.m-link, .m-group > summary { display: flex; align-items: center; gap: .7rem; padding: .8rem .9rem; border-radius: var(--radius-sm); color: var(--text); font-weight: 700; text-decoration: none; cursor: pointer; list-style: none; }
.m-group > summary::-webkit-details-marker { display: none; }
.m-link i, .m-group > summary > i:first-child { color: var(--vermilion); font-size: 1.15rem; }
.m-group > summary .caret { margin-inline-start: auto; }
.m-group[open] > summary .caret { transform: rotate(180deg); }
.m-link:hover, .m-group > summary:hover { background: var(--surface-2); }
.m-group ul { list-style: none; margin: 0 0 .5rem; padding: 0 1rem 0 0; border-inline-start: 2px solid var(--line); margin-inline-start: 1.4rem; padding-inline: .5rem 0; }
.m-group ul a { display: flex; gap: .55rem; align-items: center; padding: .55rem .7rem; color: var(--text); text-decoration: none; border-radius: var(--radius-sm); font-weight: 500; }
.m-group ul a:hover { background: var(--surface-2); }
.m-group ul a i { color: var(--muted); }
.m-sub a { font-size: .9rem; color: var(--muted) !important; }
.m-extra { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); display: grid; gap: .25rem; }
.m-extra a, .m-extra button { display: flex; gap: .7rem; align-items: center; padding: .7rem .9rem; border: 0; background: none; color: var(--text); text-decoration: none; border-radius: var(--radius-sm); font-weight: 600; text-align: start; }
.m-extra a:hover, .m-extra button:hover { background: var(--surface-2); }
.m-extra i { color: var(--vermilion); }

/* ---------- hero slider: responsive, centered and search-safe ---------- */
.hero[hidden], [data-hero-fallback][hidden] { display: none !important; }
.hero {
  position: relative;
  z-index: 2;
  isolation: isolate;
  width: 100%;
  overflow: hidden;
  background: #0f1946;
  color: #fff;
  touch-action: pan-y pinch-zoom;
}
.hero-track {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  width: 100%;
  min-height: 500px;
  aspect-ratio: 12 / 5;
}
.hero-slide {
  grid-area: 1 / 1;
  position: relative;
  isolation: isolate;
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  min-height: 0;
  height: 100%;
  padding: clamp(2rem, 4.5vw, 4rem) 0 clamp(9rem, 11vw, 10rem);
  overflow: hidden;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .55s ease, visibility 0s linear .55s;
}
.hero-slide.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transition-delay: 0s;
}
.hero-media {
  position: absolute;
  z-index: -2;
  inset: 0;
  display: block;
  overflow: hidden;
  background: var(--ink-2);
  pointer-events: none;
}
.hero-slide.hero-image-failed {
  background: radial-gradient(700px 340px at 78% 18%, rgb(242 191 47 / .2), transparent 65%), var(--ink-2);
}
.hero-media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
}
.hero-shade {
  position: absolute;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgb(12 20 62 / .38) 0%, rgb(12 20 62 / .56) 48%, rgb(12 20 62 / .68) 100%),
    linear-gradient(0deg, rgb(12 20 62 / .28), transparent 42%);
}
.hero-slide.theme-light { color: #fff; }
.hero-slide.theme-dark { color: #161b33; }
.hero-slide.theme-dark .hero-shade {
  background:
    linear-gradient(90deg, rgb(245 243 237 / .20) 0%, rgb(245 243 237 / .42) 46%, rgb(245 243 237 / .66) 100%),
    linear-gradient(0deg, rgb(255 255 255 / .12), transparent 50%);
}
.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  min-height: 100%;
  text-align: center;
}
.hero-copy {
  width: 100%;
  max-width: min(820px, 100%);
  margin-inline: auto;
  text-align: center;
  text-wrap: pretty;
}
.hero-copy h1,
.hero-copy h2 {
  margin: 0 0 .9rem;
  font-size: clamp(2rem, 4.8vw, 4.25rem);
  font-weight: 950;
  line-height: 1.3;
  letter-spacing: -.035em;
  text-wrap: balance;
  overflow-wrap: anywhere;
  text-shadow: 0 4px 22px rgb(0 0 0 / .34);
}
.hero-copy p {
  max-width: 54ch;
  margin: 0 auto 1.5rem;
  font-size: clamp(1rem, 1.55vw, 1.22rem);
  line-height: 1.95;
  opacity: .97;
  text-shadow: 0 2px 12px rgb(0 0 0 / .32);
}
.hero-copy .hero-cta { min-height: 52px; padding-inline: clamp(1.4rem, 3vw, 2.1rem); }
.hero-slide.theme-dark .hero-copy {
  max-width: min(780px, calc(100% - 1rem));
  padding: clamp(1.25rem, 3vw, 2.35rem);
  border: 1px solid rgb(255 255 255 / .74);
  border-radius: clamp(20px, 2.5vw, 32px);
  background: linear-gradient(135deg, rgb(255 255 255 / .91), rgb(250 248 241 / .8));
  color: #161b33;
  box-shadow: 0 24px 64px rgb(12 20 62 / .2), inset 0 1px 0 rgb(255 255 255 / .8);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
}
.hero-slide.theme-dark .hero-copy h1,
.hero-slide.theme-dark .hero-copy h2,
.hero-slide.theme-dark .hero-copy p { color: #161b33; text-shadow: none; }
.hero-slide.is-active .hero-copy > * { animation: hero-rise .55s ease both; }
.hero-slide.is-active .hero-copy > :nth-child(2) { animation-delay: .08s; }
.hero-slide.is-active .hero-copy > :nth-child(3) { animation-delay: .16s; }
@keyframes hero-rise {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}
.hero-features {
  position: absolute;
  z-index: 2;
  inset-inline: 0;
  bottom: clamp(4.35rem, 6.5vw, 5.1rem);
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .7rem;
  width: min(900px, calc(100% - 2rem));
  pointer-events: none;
}
.hero-feature-card {
  display: flex;
  min-width: 0;
  min-height: 72px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: .35rem;
  padding: .7rem .8rem;
  border: 1px solid rgb(255 255 255 / .17);
  border-radius: 18px;
  background: rgb(12 20 62 / .57);
  color: #fff;
  text-align: center;
  box-shadow: 0 10px 28px rgb(0 0 0 / .12);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero-feature-card i { color: var(--citron); font-size: 1.25rem; line-height: 1; }
.hero-feature-card strong { font-size: .82rem; font-weight: 800; line-height: 1.45; }
.hero-controls {
  position: absolute;
  z-index: 4;
  inset: 0;
  display: block;
  width: 100%;
  margin: 0;
  padding: 0;
  pointer-events: none;
}
.hero-controls > *,
.hero-controls-end > * { pointer-events: auto; }
.hero-prev,
.hero-controls-end [data-hero-next] {
  position: absolute;
  top: 50%;
  z-index: 1;
  transform: translateY(-50%);
}
.hero-prev { inset-inline-start: clamp(.9rem, 3vw, 2.25rem); }
.hero-controls-end { display: contents; }
.hero-controls-end [data-hero-next] { inset-inline-end: clamp(.9rem, 3vw, 2.25rem); }
.hero-dots {
  position: absolute;
  left: 50%;
  bottom: max(.9rem, env(safe-area-inset-bottom));
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  max-width: min(48vw, 280px);
  margin: 0;
  padding: .55rem .75rem;
  overflow-x: auto;
  border: 1px solid rgb(255 255 255 / .2);
  border-radius: 999px;
  background: rgb(12 20 62 / .38);
  box-shadow: 0 8px 24px rgb(0 0 0 / .12);
  scrollbar-width: none;
  transform: translateX(-50%);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.hero-dots::-webkit-scrollbar { display: none; }
.hero-dot {
  flex: 0 0 10px;
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgb(255 255 255 / .62);
  cursor: pointer;
  transition: width .25s ease, background-color .25s ease, transform .25s ease;
}
.hero-dot:hover { transform: scale(1.12); }
.hero-dot.is-active { flex-basis: 30px; width: 30px; background: var(--citron); }
.hero-controls-end .hero-pause {
  position: absolute;
  inset-inline-start: clamp(.9rem, 3vw, 2.25rem);
  bottom: max(.9rem, env(safe-area-inset-bottom));
}
.hero-btn {
  display: grid;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgb(255 255 255 / .62);
  border-radius: 50%;
  background: rgb(12 20 62 / .46);
  color: #fff;
  box-shadow: 0 8px 24px rgb(0 0 0 / .16);
  cursor: pointer;
  transition: transform .18s var(--ease), background-color .18s ease, color .18s ease, border-color .18s ease;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}
.hero-btn:hover,
.hero-btn:focus-visible {
  transform: translateY(-2px);
  border-color: var(--citron);
  background: var(--citron);
  color: var(--citron-ink);
}
.hero-prev:hover,
.hero-controls-end [data-hero-next]:hover,
.hero-prev:focus-visible,
.hero-controls-end [data-hero-next]:focus-visible {
  transform: translateY(calc(-50% - 2px));
}

/* the front-page hero when no slide has an image: a manuscript title page —
   lapis field, a double gilt jadval frame, one drawn toranj medallion above the centred title */
.hero-fallback {
  display: flex; align-items: center; justify-content: center; min-height: 0; text-align: center;
  padding-block: clamp(2.5rem, 4.4vw, 3.75rem) clamp(2.75rem, 5vw, 4.25rem);
  color: #fff;
}
.hero-fallback-default {
  background:
    radial-gradient(600px 460px at 50% 22%, rgb(62 91 196 / .5), transparent 72%),
    linear-gradient(180deg, var(--ink), #101a4a);
}
.hero-fallback-default::before, .hero-fallback-default::after { content: ""; position: absolute; pointer-events: none; z-index: 0; }
.hero-fallback-default::after { inset: clamp(8px, 1.3vw, 16px); border: 1px solid rgb(242 191 47 / .4); border-radius: 3px; outline: 1px solid rgb(242 191 47 / .16); outline-offset: 4px; }
.hero-fallback-default::before { inset: clamp(5px, .9vw, 12px); z-index: 1;
  background:
    radial-gradient(circle at 0 0, var(--citron) 0 3px, transparent 3.6px) 0 0 / 11px 11px no-repeat,
    radial-gradient(circle at 100% 0, var(--citron) 0 3px, transparent 3.6px) 100% 0 / 11px 11px no-repeat,
    radial-gradient(circle at 0 100%, var(--citron) 0 3px, transparent 3.6px) 0 100% / 11px 11px no-repeat,
    radial-gradient(circle at 100% 100%, var(--citron) 0 3px, transparent 3.6px) 100% 100% / 11px 11px no-repeat; }
.hero-fallback .hero-stripes { -webkit-mask-image: radial-gradient(ellipse 75% 95% at 50% 30%, #000 0%, transparent 100%); mask-image: radial-gradient(ellipse 75% 95% at 50% 30%, #000 0%, transparent 100%); }
.hero-fallback-inner { position: relative; z-index: 2; display: flex; flex-direction: column; align-items: center; width: min(100% - 2rem, 920px); max-width: none; margin-inline: auto; text-align: center; }
.hero-art { display: block; width: clamp(190px, 21vw, 272px); height: auto; aspect-ratio: 1; margin: 0 auto .35rem; pointer-events: none; user-select: none; }
.hero-fallback h1 { width: 100%; max-width: 900px; margin: 0 auto .75rem; color: #fff; font-size: clamp(1.8rem, 4.2vw, 3.1rem); font-weight: 900; line-height: 1.55; text-wrap: balance; overflow-wrap: anywhere; text-shadow: 0 6px 28px rgb(6 10 40 / .45); }
.hero-fallback p { width: 100%; max-width: 62ch; margin: 0 auto; color: #d5dbf3; font-size: clamp(1rem, 1.5vw, 1.15rem); line-height: 2; text-wrap: pretty; }
.hero-kicker { display: inline-block; background: var(--citron); color: var(--citron-ink); font-weight: 800; border-radius: 999px; padding: .15rem .9rem; font-size: .85rem; margin-bottom: 1rem; }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .75rem; width: 100%; margin-top: 1.5rem; }
.hero-fallback .btn-outline-light { border-color: rgb(255 255 255 / .6); background: rgb(255 255 255 / .05); color: #fff; }
.hero-fallback .btn-outline-light:hover, .hero-fallback .btn-outline-light:focus-visible { background: var(--citron); border-color: var(--citron); color: var(--citron-ink); }
@media (max-width: 767.98px) {
  .hero-fallback { padding-block: 2.25rem 2.75rem; }
  .hero-art { width: clamp(150px, 44vw, 200px); }
  .hero-fallback h1 { font-size: clamp(1.7rem, 7vw, 2.4rem); line-height: 1.6; }
  .hero-fallback p { font-size: .98rem; }
}

/* slider chrome in the painting language: gilt hairlines, ten-pixel corners */
.hero-feature-card { border-color: rgb(242 191 47 / .3); border-radius: var(--radius); }
.hero-feature-card i { color: var(--citron); }
.hero-slide.theme-dark .hero-copy { border-radius: var(--radius-lg); }
/* the toast entrance still uses this one (the slider got its own hero-rise) */
@keyframes rise { from { opacity: 0; transform: translateY(18px); } to { opacity: 1; transform: none; } }

/* Header search stays above page content; the carousel controls sit at the hero's bottom edge. */
.site-header.search-open { z-index: 1100; }
.site-header.search-open .desktop-search { z-index: 1101; }
.site-header.search-open .suggest-box { z-index: 1102; }

@media (max-width: 991.98px) {
  .hero-track { aspect-ratio: 16 / 10; min-height: 520px; }
  .hero-slide { padding-block: 2.5rem 9rem; }
  .hero-copy { max-width: min(760px, 100%); }
  .hero-features { bottom: 4.4rem; width: min(900px, calc(100% - 2rem)); }
  .hero-feature-card { min-height: 66px; }
}
@media (max-width: 767.98px) {
  .hero-track { aspect-ratio: auto; min-height: clamp(560px, 145vw, 690px); }
  .hero-slide { padding: 2rem 0 11rem; }
  .hero-media img { object-position: center center; }
  /* Portrait slide images fill mobile; if only a wide desktop image exists, show all of it without cropping. */
  .hero-media.has-mobile-image img { object-fit: cover; }
  .hero-media.no-mobile-image img { object-fit: contain; background: #0f1946; }
  .hero-shade {
    background:
      linear-gradient(180deg, rgb(12 20 62 / .22) 0%, rgb(12 20 62 / .52) 42%, rgb(12 20 62 / .86) 100%),
      linear-gradient(90deg, rgb(12 20 62 / .2), rgb(12 20 62 / .2));
  }
  .hero-slide.theme-dark .hero-shade {
    background: linear-gradient(180deg, rgb(245 243 237 / .25) 0%, rgb(245 243 237 / .54) 45%, rgb(245 243 237 / .78) 100%);
  }
  .hero-copy { max-width: calc(100% - 1rem); }
  .hero-copy h1,
  .hero-copy h2 { margin-bottom: .75rem; font-size: clamp(1.75rem, 7vw, 2.55rem); line-height: 1.4; }
  .hero-copy p { max-width: 42ch; margin-bottom: 1.1rem; font-size: .96rem; line-height: 1.85; }
  .hero-copy .hero-cta { min-height: 48px; }
  .hero-slide.theme-dark .hero-copy { padding: 1.1rem; border-radius: 22px; }
  .hero-features {
    bottom: 4rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: .45rem;
    width: calc(100% - 1.5rem);
  }
  .hero-feature-card {
    min-height: 45px;
    flex-direction: row;
    justify-content: center;
    gap: .45rem;
    padding: .45rem .55rem;
    border-radius: 13px;
  }
  .hero-feature-card i { font-size: 1rem; }
  .hero-feature-card strong { font-size: .72rem; }
  .hero-btn { flex-basis: 40px; width: 40px; height: 40px; }
  .hero-dots { gap: .35rem; padding: .45rem .6rem; }
  .hero-dot { flex-basis: 8px; width: 8px; height: 8px; }
  .hero-dot.is-active { flex-basis: 24px; width: 24px; }
  .hero-controls-end .hero-pause { bottom: max(.8rem, env(safe-area-inset-bottom)); }
  .hero-dots { bottom: max(.8rem, env(safe-area-inset-bottom)); }
}

@media (max-width: 380px) {
  .hero-track { min-height: 590px; }
  .hero-btn { flex-basis: 36px; width: 36px; height: 36px; }
  .hero-dots { max-width: 46vw; }
  .hero-dot { flex-basis: 7px; width: 7px; height: 7px; }
  .hero-dot.is-active { flex-basis: 20px; width: 20px; }
  .hero-feature-card strong { font-size: .68rem; }
}
@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .hero-copy > *,
  .hero-btn,
  .hero-dot { animation: none !important; transition: none !important; }
}

/* On the site's light theme, make carousel controls feel like the light UI, not dark overlays. */
html[data-bs-theme="light"] .hero-controls .hero-btn {
  border-color: rgb(255 255 255 / .94);
  background: rgb(255 255 255 / .9);
  color: #161b33;
  box-shadow: 0 8px 26px rgb(21 35 90 / .2), inset 0 1px 0 rgb(255 255 255 / .95);
  backdrop-filter: blur(14px) saturate(1.2);
  -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
html[data-bs-theme="light"] .hero-controls .hero-btn:hover,
html[data-bs-theme="light"] .hero-controls .hero-btn:focus-visible {
  border-color: var(--citron);
  background: var(--citron);
  color: #161b33;
}
html[data-bs-theme="light"] .hero-controls .hero-dots {
  border-color: rgb(255 255 255 / .9);
  background: rgb(255 255 255 / .86);
  box-shadow: 0 8px 26px rgb(21 35 90 / .16), inset 0 1px 0 rgb(255 255 255 / .95);
}
html[data-bs-theme="light"] .hero-controls .hero-dot {
  background: rgb(21 35 90 / .36);
}
html[data-bs-theme="light"] .hero-controls .hero-dot.is-active {
  background: var(--gilt-deep);
}
html[data-bs-theme="light"] .hero-controls .hero-dot:focus-visible {
  outline: 2px solid #161b33;
  outline-offset: 3px;
}

/* ---------- badges / chips ---------- */
.badge-x { display: inline-flex; align-items: center; gap: .3rem; border-radius: 999px; padding: .1rem .65rem; font-size: .72rem; font-weight: 800; line-height: 1.7; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.badge-state { border: 1px solid transparent; }
.badge-free { background: var(--ivy); color: var(--ivy-ink); }
.badge-vip { background: var(--ink); color: var(--citron); }
.badge-deaf { background: #2a4fd6; color: #fff; }
.badge-state-preparing { background: #12767e; color: #fff; }
.badge-state-running { background: var(--ivy); color: var(--ivy-ink); }
.badge-state-finished { background: var(--surface-2); color: var(--text); }
.badge-state-unavailable { background: #b42318; color: #fff; }
.course-state-note { border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; margin-bottom: 1rem; background: var(--surface-2); }
.course-state-note p { margin: .25rem 0 0; font-size: .9rem; }
.badge-cat { background: var(--surface-2); color: var(--muted); box-shadow: none; }
.article-card-media .badge-cat { position: absolute; z-index: 1; top: .85rem; inset-inline-start: .85rem; background: var(--surface); color: var(--text); box-shadow: var(--shadow-sm); }
.chip { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid var(--line); background: var(--surface); border-radius: 999px; padding: .2rem .8rem; font-size: .85rem; color: var(--text); text-decoration: none; }
.chip:hover { border-color: var(--text); color: var(--text); }
.chip.is-active { background: var(--ink); color: #fff; border-color: var(--ink); }
[data-bs-theme="dark"] .chip.is-active { background: var(--citron); color: var(--citron-ink); border-color: var(--citron); }

/* ---------- cards: framed prints ---------- */
.course-card, .article-card, .podcast-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; display: flex; flex-direction: column; height: 100%; }
.course-card:hover, .article-card:hover, .podcast-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--gilt-line); }
/* the picture sits on a mat with a gilt hairline frame inside it, like a framed print */
.course-card-media, .article-card-media { position: relative; display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--surface-2); margin: .5rem .5rem 0; border-radius: var(--radius-frame); }
.course-card-media::after, .article-card-media::after { content: ""; position: absolute; inset: 6px; border: 1px solid rgb(255 244 214 / .72); border-radius: 2px; pointer-events: none; transition: inset .3s var(--ease), border-color .3s; }
.course-card:hover .course-card-media::after, .article-card:hover .article-card-media::after { inset: 8px; border-color: rgb(255 244 214 / .95); }
.course-card-media img, .article-card-media img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.course-card:hover .course-card-media img, .article-card:hover .article-card-media img { transform: scale(1.04); }
.course-badges { position: absolute; z-index: 1; top: .85rem; inset-inline-start: .85rem; display: flex; flex-wrap: wrap; gap: .35rem; }
.course-card-body, .article-card-body, .podcast-body { padding: 1rem 1.1rem .5rem; flex: 1; }
.course-meta, .article-meta { display: flex; align-items: center; gap: .5rem; font-size: .78rem; color: var(--muted); flex-wrap: wrap; }
.dot { width: 4px; height: 4px; border-radius: 50%; background: currentColor; opacity: .6; }
.course-title { font-size: 1.05rem; margin: .4rem 0; }
.course-title a, .article-card h3 a, .podcast-card h3 a { color: var(--text); text-decoration: none; }
.course-title a:hover { color: var(--vermilion-text); }
.course-teacher { font-size: .85rem; color: var(--muted); margin-bottom: .5rem; }
.course-stats { display: flex; gap: 1rem; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.course-card-foot { display: flex; justify-content: space-between; align-items: center; padding: .75rem 1.1rem 1rem; border-top: 1px dashed var(--line); margin-top: .75rem; }
.price { font-weight: 900; font-size: 1.02rem; }
.article-card h3 { font-size: 1.05rem; margin: .4rem 0; }
.podcast-card { flex-direction: row; align-items: stretch; }
.podcast-cover { position: relative; width: 120px; flex-shrink: 0; background: var(--ink); }
.podcast-cover img { width: 100%; height: 100%; object-fit: cover; }
.play-ring { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%); width: 44px; height: 44px; border-radius: 50%; background: var(--citron); color: var(--citron-ink); display: grid; place-items: center; box-shadow: var(--shadow); }

/* ---------- sections ---------- */
.section { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.section-alt { background: var(--surface); border-block: 1px solid var(--line); }
.section-dark { background: var(--ink); color: #fff; position: relative; overflow: hidden; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin-bottom: 1.75rem; flex-wrap: wrap; }
/* a gilt lozenge in a thin ring leads every section title, the way an illuminated manuscript marks a new heading */
.section-head h2 { font-size: clamp(1.4rem, 3vw, 2rem); margin: 0; position: relative; padding-inline-start: calc(.63em + 1.05rem); }
.section-head h2::before { content: ""; position: absolute; inset-inline-start: .35rem; top: 50%; width: .52em; height: .52em; transform: translateY(-50%) rotate(45deg); background: var(--citron); outline: 1.5px solid color-mix(in srgb, var(--text) 75%, transparent); outline-offset: 2px; }
.section-head p { margin: .25rem 0 0; color: var(--muted); }
.link-more { font-weight: 700; color: var(--text); text-decoration: none; display: inline-flex; gap: .4rem; align-items: center; }
.link-more:hover { color: var(--vermilion-text); }
.link-more i { transition: transform .2s var(--ease); }
.link-more:hover i { transform: translateX(-4px); }
.page-hero { background: var(--ink); color: #fff; position: relative; overflow: hidden; padding-block: clamp(2rem, 5vw, 3.5rem); isolation: isolate; }
.page-hero::before { content: ""; position: absolute; inset: 0; background: url("../img/pattern-toranj.svg"); z-index: -1; -webkit-mask-image: linear-gradient(to left, #000 0%, transparent 70%); mask-image: linear-gradient(to left, #000 0%, transparent 70%); }
.page-hero::after { content: ""; position: absolute; inset-inline-end: -30px; top: -70px; width: 330px; height: 330px; background: url("../img/ornament-curl.svg") center / contain no-repeat; opacity: .26; z-index: -1; }
.page-hero h1 { font-size: clamp(1.6rem, 4vw, 2.5rem); margin-bottom: .5rem; }
.page-hero p { color: #d0d7f1; margin: 0; max-width: 60ch; }
.breadcrumbs { display: flex; flex-wrap: wrap; gap: .4rem; list-style: none; padding: 0; margin: 0 0 1rem; font-size: .85rem; color: #b4bde0; }
.breadcrumbs a { color: inherit; text-decoration: none; }
.breadcrumbs a:hover { color: var(--citron); }
.breadcrumbs li + li::before { content: "/"; margin-inline-end: .4rem; opacity: .5; }

/* ---------- forms ---------- */
.form-control, .form-select { border: 2px solid var(--line); border-radius: var(--radius-sm); background-color: var(--surface); color: var(--text); padding: .6rem .9rem; transition: border-color .18s, box-shadow .18s; }
.form-control:focus, .form-select:focus { border-color: var(--ink); box-shadow: 0 0 0 4px rgb(242 191 47 / .45); background-color: var(--surface); color: var(--text); }
[data-bs-theme="dark"] .form-control:focus, [data-bs-theme="dark"] .form-select:focus { border-color: var(--citron); }
.form-label { font-weight: 700; font-size: .92rem; margin-bottom: .35rem; }
.form-text { color: var(--muted); }
.form-check-input:checked { background-color: var(--ink); border-color: var(--ink); }
[data-bs-theme="dark"] .form-check-input:checked { background-color: var(--citron); border-color: var(--citron); }
.form-check-input:focus { box-shadow: 0 0 0 4px rgb(242 191 47 / .45); border-color: var(--ink); }
textarea.form-control { min-height: 120px; }
.field-validation-error, .text-danger.small { font-size: .82rem; }
.input-validation-error { border-color: var(--vermilion) !important; }
.validation-summary-errors ul { margin: 0; padding-inline-start: 1.2rem; }
.auth-card { max-width: 480px; margin-inline: auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow), inset 0 0 0 7px var(--surface), inset 0 0 0 8px var(--gilt-line); padding: clamp(1.5rem, 4vw, 2.5rem); position: relative; overflow: hidden; }
.auth-card::before { content: ""; position: absolute; inset-inline: 0; top: 0; height: 6px; background: var(--swatches); }
.auth-wrap { min-height: 60vh; display: grid; align-items: center; padding-block: clamp(1.5rem, 5vw, 3.5rem); }
.external-signin { margin-top: 1.25rem; }
.external-signin-sep { display: flex; align-items: center; gap: .75rem; color: var(--muted); font-size: .85rem; margin-bottom: .75rem; }
.external-signin-sep::before, .external-signin-sep::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
/* Password fields: keep input text LTR and reserve space for the eye button. */
.password-field { position: relative; direction: ltr; }
.password-field .form-control { padding-inline-end: 3.1rem; }
.password-toggle {
  position: absolute;
  inset-inline-end: .35rem;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}
.password-toggle:hover { color: var(--text); background: var(--surface-2); }
.password-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; }
.strength-meter { height: 6px; border-radius: 999px; background: var(--surface-2); overflow: hidden; margin-top: .4rem; }
.strength-meter > span { display: block; height: 100%; width: 0; background: var(--vermilion); transition: width .25s var(--ease), background-color .25s; }

/* captcha */
.captcha-box { background: var(--surface-2); border: 1px dashed var(--line); border-radius: var(--radius); padding: .9rem; }
.captcha-row { display: flex; align-items: center; gap: .5rem; }
.captcha-img { flex: 1; min-height: 68px; border-radius: var(--radius-sm); background: #fff; display: grid; place-items: center; overflow: hidden; border: 1px solid var(--line); }
.captcha-img img { width: 100%; height: auto; max-height: 76px; display: block; }
.captcha-loading { color: #667085; font-size: .85rem; }

/* ---------- pager / alerts / empty / tables ---------- */
.pagination { --bs-pagination-border-radius: var(--radius-btn); gap: .3rem; }
.page-link { border-radius: var(--radius-btn) !important; border: 1px solid var(--line); min-width: 40px; text-align: center; color: var(--text); background: var(--surface); font-weight: 600; }
.page-link:hover { background: var(--surface-2); color: var(--text); }
.page-item.active .page-link { background: var(--ink); border-color: var(--ink); color: #fff; }
[data-bs-theme="dark"] .page-item.active .page-link { background: var(--citron); border-color: var(--citron); color: var(--citron-ink); }
.page-item.disabled .page-link { background: transparent; color: var(--muted); }
.alert { border-radius: var(--radius); border-width: 1px; }
.empty-state { text-align: center; padding: 3rem 1rem; border: 2px dashed var(--line); border-radius: var(--radius-lg); background: var(--surface); }
.empty-state i { font-size: 3rem; color: var(--muted); }
.empty-state h3 { font-size: 1.15rem; margin-top: .5rem; }
.empty-state p { color: var(--muted); margin: 0; }
.table { --bs-table-bg: transparent; --bs-table-color: var(--text); --bs-table-border-color: var(--line); --bs-table-striped-bg: var(--surface-2); vertical-align: middle; }
.table > thead { background: var(--surface-2); }
.table > thead th { font-size: .82rem; color: var(--muted); font-weight: 800; white-space: nowrap; }
.modal-content, .dropdown-menu, .offcanvas { background-color: var(--surface); color: var(--text); border-color: var(--line); }
.card { background: var(--surface); border-color: var(--line); border-radius: var(--radius); }

/* ---------- footer ---------- */
.site-footer { background: var(--ink); color: #c9d0ec; margin-top: clamp(2rem, 5vw, 4rem); position: relative; }
.footer-cta { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; flex-wrap: wrap; padding-block: 2.5rem; border-bottom: 1px solid var(--ink-3); }
.footer-cta > * { position: relative; }
.footer-cta h2 { color: #fff; font-size: clamp(1.3rem, 3vw, 1.9rem); margin: 0 0 .25rem; }
.footer-cta p { margin: 0; }
.footer-cta-actions { display: flex; gap: .6rem; flex-wrap: wrap; }
.footer-grid { display: grid; grid-template-columns: 1.6fr repeat(3, 1fr) 1.4fr; gap: 2rem; padding-block: 2.5rem; }
.footer-grid h3 { color: #fff; font-size: 1rem; margin-bottom: 1rem; position: relative; padding-inline-start: 1.1rem; }
.footer-grid h3::before { content: ""; position: absolute; inset-inline-start: .1rem; top: 50%; width: 7px; height: 7px; transform: translateY(-50%) rotate(45deg); background: var(--citron); }
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .5rem; }
.footer-grid a { color: #c9d0ec; text-decoration: none; }
.footer-grid a:hover { color: var(--citron); }
.footer-about .brand { color: #fff; margin-bottom: 1rem; }
.footer-about .brand-text small { color: #a9b3dc; }
.footer-about p { font-size: .92rem; }
.footer-contact li { display: flex; gap: .6rem; align-items: flex-start; font-size: .92rem; }
.footer-contact i { color: var(--citron); margin-top: .35rem; }
.footer-contact .btn { margin-top: 1rem; }
.footer-trust { display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; margin-block: 0 1.5rem; padding: 1rem 1.15rem; border: 1px solid var(--ink-3); border-radius: var(--radius); background: rgb(255 255 255 / .035); }
.footer-trust-copy { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.footer-trust-icon { display: grid; place-items: center; flex: none; width: 44px; height: 44px; border-radius: 8px; background: var(--ink-3); color: var(--citron); font-size: 1.35rem; }
.footer-trust-copy h3 { margin: 0 0 .2rem; color: #fff; font-size: .98rem; }
.footer-trust-copy p { margin: 0; color: #aab3c2; font-size: .84rem; }
.footer-trust-slot { display: grid; place-items: center; flex: none; min-width: 150px; min-height: 120px; padding: .5rem; border: 1px solid #e2e8f0; border-radius: 12px; background: #fff; color: #243142; }
.footer-trust-slot img { display: block; width: 112px !important; height: 112px !important; max-width: 100%; max-height: 112px; object-fit: contain; }
.footer-trust-slot a, .enamad-badge-link { display: inline-flex; align-items: center; justify-content: center; width: 100%; max-width: 100%; min-height: 104px; cursor: pointer; }
.footer-trust-placeholder { display: grid; justify-items: center; gap: .18rem; text-align: center; }
.footer-trust-placeholder > i { color: var(--ivy); font-size: 1.45rem; }
.footer-trust-placeholder strong { font-size: .78rem; }
.footer-trust-placeholder small { color: #667085; font-size: .65rem; }
.social-list { display: flex !important; gap: .5rem !important; flex-wrap: wrap; margin-top: 1rem !important; }
.social-list a { width: 40px; height: 40px; display: grid; place-items: center; border-radius: 50%; background: var(--ink-3); color: #fff; font-size: 1.1rem; transition: background-color .2s, color .2s, transform .2s var(--ease); }
.social-list a:hover { background: var(--citron); color: var(--citron-ink); transform: translateY(-3px); }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; padding-block: 1.25rem; border-top: 1px solid var(--ink-3); font-size: .85rem; }
.footer-bottom p { margin: 0; }
.footer-bottom .btn-ghost { color: #c9d0ec; border-color: var(--ink-3); }
.footer-bottom .btn-ghost:hover { color: #fff; border-color: #fff; }
@media (max-width: 991.98px) { .footer-grid { grid-template-columns: 1fr 1fr; } .footer-about, .footer-contact { grid-column: 1 / -1; } }
@media (max-width: 575.98px) { .footer-grid { grid-template-columns: 1fr; } .footer-trust { align-items: stretch; flex-direction: column; } .footer-trust-slot { align-self: center; width: min(100%, 180px); } }

/* ---------- floating bits ---------- */
.to-top { position: fixed; inset-inline-start: 1rem; bottom: 1rem; z-index: 1000; width: 46px; height: 46px; border-radius: 50%; border: 0; background: var(--ink); color: var(--citron); box-shadow: var(--shadow); display: grid; place-items: center; cursor: pointer; transition: transform .2s var(--ease); }
.to-top:hover { transform: translateY(-3px); }
.toast-stack { position: fixed; inset-inline-end: 1rem; bottom: 1rem; z-index: 1090; display: grid; gap: .5rem; width: min(92vw, 360px); }
.toast-x { background: var(--ink); color: #fff; border-radius: var(--radius); padding: .8rem 1rem; box-shadow: var(--shadow-lg); display: flex; gap: .6rem; align-items: flex-start; animation: rise .3s var(--ease) both; border-inline-start: 5px solid var(--citron); }
.toast-x.is-error { border-inline-start-color: var(--vermilion); }
.confirm-dialog { border: 0; border-radius: var(--radius-lg); padding: 1.5rem; max-width: min(92vw, 420px); background: var(--surface); color: var(--text); box-shadow: var(--shadow-lg); }
.confirm-dialog::backdrop { background: rgb(21 35 90 / .6); backdrop-filter: blur(3px); }
.confirm-dialog h3 { font-size: 1.1rem; }
.confirm-dialog .actions { display: flex; gap: .5rem; justify-content: flex-end; margin-top: 1.25rem; }
.progress-x { height: 8px; border-radius: 999px; background: var(--surface-2); overflow: hidden; }
.progress-x > span { display: block; height: 100%; background: linear-gradient(90deg, var(--ivy), var(--citron)); border-radius: inherit; transition: width .3s var(--ease); }

/* ---------- error pages ---------- */
.error-page { text-align: center; padding-block: clamp(3rem, 10vw, 6rem); }
.error-code { font-size: clamp(5rem, 18vw, 10rem); font-weight: 900; line-height: 1; background: linear-gradient(135deg, var(--ink) 35%, var(--vermilion)); -webkit-background-clip: text; background-clip: text; color: transparent; }
[data-bs-theme="dark"] .error-code { background: linear-gradient(135deg, var(--citron), var(--vermilion)); -webkit-background-clip: text; background-clip: text; }

/* ---------- header responsive ---------- */
@media (max-width: 1199.98px) { .nav-link { padding-inline: .6rem; font-size: .9rem; } .nav-link i:not(.caret) { display: none; } }
@media (max-width: 991.98px) { :root { --header-h: 62px; } .brand-text small { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .hero-slide.is-active .hero-media img { animation: none; }
}
@media print { .topbar, .site-header, .site-footer, .to-top, .toast-stack, .hero-controls { display: none !important; } body { background: #fff; color: #000; } }
