@charset "UTF-8";
/* ==========================================================================
   Zahra Sheikhi — Front-end design system
   A single, token-driven stylesheet for every public page.
   Replaces style.css + custom.css on /front-pages (admin + auth still use those).

   1.  Fonts
   2.  Tokens
   3.  Base & layout
   4.  Utilities
   5.  Buttons, chips & pills
   6.  Header / navigation
   7.  Hero
   8.  Section heads
   9.  Post cards
   10. Sidebar widgets
   11. Filter bar
   12. Pagination
   13. Article (single post)
   14. Gallery + lightbox
   15. Video page
   16. Books
   17. Articles list
   18. About
   19. Contact
   20. Newsletter
   21. Footer & back-to-top
   22. 404
   23. Preloader & motion
   24. Responsive
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. Fonts
   -------------------------------------------------------------------------- */
@font-face {
  font-family: 'Shabnam';
  src: url('font/Shabnam-Thin.woff2') format('woff2'), url('font/Shabnam-Thin.woff') format('woff');
  font-weight: 100;
  font-display: swap;
}
@font-face {
  font-family: 'Shabnam';
  src: url('font/Shabnam-Light.woff2') format('woff2'), url('font/Shabnam-Light.woff') format('woff');
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: 'Shabnam';
  src: url('font/Shabnam.woff2') format('woff2'), url('font/Shabnam.woff') format('woff');
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: 'Shabnam';
  src: url('font/Shabnam-Medium.woff2') format('woff2'), url('font/Shabnam-Medium.woff') format('woff');
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: 'Shabnam';
  src: url('font/Shabnam-Bold.woff2') format('woff2'), url('font/Shabnam-Bold.woff') format('woff');
  font-weight: 700;
  font-display: swap;
}

/* --------------------------------------------------------------------------
   2. Tokens
   -------------------------------------------------------------------------- */
:root {
  /* brand ramp, anchored on the original #405189 */
  --brand-50:  #eef1f8;
  --brand-100: #dfe5f2;
  --brand-200: #c2cde6;
  --brand-300: #9aabd2;
  --brand-400: #7285b8;
  --brand-500: #55689e;
  --brand-600: #405189;
  --brand-700: #35426e;
  --brand-800: #283252;
  --brand-900: #1a2138;

  /* supporting accent, used sparingly for eyebrows and highlights */
  --accent-400: #29a99a;
  --accent-500: #158a7d;
  --accent-soft: #e4f4f1;

  /* surfaces */
  --bg: #f6f7fb;
  --bg-alt: #eef1f7;
  --surface: #ffffff;
  --surface-2: #f4f6fb;
  --surface-3: #eaeef6;
  --border: #e3e8f1;
  --border-strong: #cfd7e6;
  --overlay: rgba(16, 20, 32, .55);

  /* ink */
  --text: #10131c;
  --text-2: #3f4757;
  --muted: #6d7688;
  --on-brand: #ffffff;

  /* interactive */
  --link: var(--brand-600);
  --ring: rgba(64, 81, 137, .35);

  /* geometry */
  --r-xs: 8px;
  --r-sm: 12px;
  --r-md: 16px;
  --r-lg: 22px;
  --r-xl: 28px;
  --r-pill: 999px;

  /* elevation — soft and layered, never a single hard drop */
  --sh-1: 0 1px 2px rgba(16, 20, 32, .04), 0 1px 3px rgba(16, 20, 32, .05);
  --sh-2: 0 2px 4px rgba(16, 20, 32, .04), 0 8px 20px -6px rgba(16, 20, 32, .10);
  --sh-3: 0 4px 8px rgba(16, 20, 32, .05), 0 18px 40px -12px rgba(16, 20, 32, .16);
  --sh-4: 0 8px 16px rgba(16, 20, 32, .06), 0 32px 64px -20px rgba(16, 20, 32, .22);
  --sh-brand: 0 10px 30px -10px rgba(64, 81, 137, .55);

  /* motion */
  --ease: cubic-bezier(.22, .72, .3, 1);
  --t-fast: .16s;
  --t: .28s;
  --t-slow: .5s;

  /* Swiper's own theming hooks — its default is #007aff */
  --swiper-theme-color: var(--brand-600);
  --swiper-navigation-color: currentColor;
  --swiper-pagination-color: var(--brand-600);

  /* decorative backdrop */
  --dot: rgba(64, 81, 137, .16);
  --glow-a: rgba(64, 81, 137, .13);
  --glow-b: rgba(21, 138, 125, .10);

  /* rhythm */
  --gutter: clamp(1rem, 3.2vw, 2rem);
  --shell: 1300px;
  --header-h: 78px;
  --section-y: clamp(3rem, 6vw, 5.5rem);
}

[data-theme="dark"],
body.dark {
  --bg: #0b0d13;
  --bg-alt: #10131b;
  --surface: #14171f;
  --surface-2: #1a1e28;
  --surface-3: #222735;
  --border: #262c3a;
  --border-strong: #333b4d;
  --overlay: rgba(4, 6, 12, .7);

  --text: #eef1f7;
  --text-2: #bac2d1;
  --muted: #838d9f;

  --brand-600: #8296d8;
  --brand-500: #93a5e0;
  --brand-700: #6d81c6;
  --brand-50: #1b2033;
  --brand-100: #222a41;
  --accent-soft: #122b2a;

  --link: var(--brand-500);
  --ring: rgba(130, 150, 216, .4);

  --dot: rgba(146, 165, 224, .13);
  --glow-a: rgba(90, 110, 180, .16);
  --glow-b: rgba(21, 138, 125, .12);

  --sh-1: 0 1px 2px rgba(0, 0, 0, .4);
  --sh-2: 0 2px 4px rgba(0, 0, 0, .35), 0 8px 20px -6px rgba(0, 0, 0, .5);
  --sh-3: 0 4px 8px rgba(0, 0, 0, .35), 0 18px 40px -12px rgba(0, 0, 0, .6);
  --sh-4: 0 8px 16px rgba(0, 0, 0, .4), 0 32px 64px -20px rgba(0, 0, 0, .7);
  --sh-brand: 0 10px 30px -12px rgba(130, 150, 216, .5);
}

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

* {
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 24px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Shabnam', system-ui, -apple-system, 'Segoe UI', sans-serif;
  font-size: 16px;
  line-height: 1.85;
  font-weight: 400;
  background-color: var(--bg);
  color: var(--text-2);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}

/* Decorative backdrop: a fine dot grid plus two soft brand glows, painted once
   behind everything. Fixed so it doesn't repaint on scroll, masked so it fades
   out before it reaches the footer. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    radial-gradient(var(--dot) 1px, transparent 1px);
  background-size: 24px 24px;
  background-position: 12px 12px;
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 92%);
  mask-image: linear-gradient(to bottom, #000 0%, #000 55%, transparent 92%);
}

.backdrop::before,
.backdrop::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  filter: blur(10px);
}

.backdrop::before {
  inset-inline-end: -12vw;
  top: -18vh;
  width: 58vw;
  height: 58vw;
  background: radial-gradient(circle, var(--glow-a) 0%, transparent 62%);
}

.backdrop::after {
  inset-inline-start: -16vw;
  top: 28vh;
  width: 46vw;
  height: 46vw;
  background: radial-gradient(circle, var(--glow-b) 0%, transparent 65%);
}

h1, h2, h3, h4, h5, h6 {
  font-family: inherit;
  color: var(--text);
  font-weight: 700;
  line-height: 1.35;
  letter-spacing: -.01em;
}

h1 { font-size: clamp(2rem, 1.4rem + 2.6vw, 3.25rem); line-height: 1.22; }
h2 { font-size: clamp(1.6rem, 1.2rem + 1.7vw, 2.4rem); line-height: 1.26; }
h3 { font-size: clamp(1.35rem, 1.1rem + 1.1vw, 1.85rem); }
h4 { font-size: clamp(1.2rem, 1.05rem + .7vw, 1.5rem); }
h5 { font-size: 1.15rem; }
h6 { font-size: 1rem; }

p { margin: 0 0 1rem; }
p:last-child { margin-bottom: 0; }

a {
  color: inherit;
  text-decoration: none;
  transition: color var(--t-fast) var(--ease);
}

/* Bootstrap's reboot paints every bare link #0d6efd on hover via `a:hover`.
   That selector (0,1,1) outranks a plain component class (0,1,0), so the reset
   has to match it here. Any component that sets its own link colour must also
   declare a `:hover` — that lifts it to (0,2,0) and back above this rule. */
a:hover,
a:focus {
  color: inherit;
}

ul, ol { list-style: none; }

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

button, input, textarea, select {
  font: inherit;
  color: inherit;
}

button { background: none; border: 0; cursor: pointer; }

:focus-visible {
  outline: 2px solid var(--brand-600);
  outline-offset: 3px;
  border-radius: 4px;
}

::selection {
  background: var(--brand-600);
  color: #fff;
}

hr {
  border: 0;
  border-top: 1px solid var(--border);
  opacity: 1;
  margin: 2rem 0;
}

/* Bootstrap's grid stays; the container is re-tuned. */
.container,
.container-fluid {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.row { --bs-gutter-x: 1.75rem; }

.main {
  min-height: 60vh;
  padding-top: var(--header-h);
}

.section {
  padding-block: var(--section-y);
}

.section--tight { padding-block: clamp(2rem, 4vw, 3.25rem); }

.section--alt {
  background: var(--bg-alt);
  transition: background-color var(--t) var(--ease);
}

/* Sticky rails replace the old jQuery sticky-sidebar plugin. */
.side-sidebar > .theiaStickySidebar {
  position: sticky;
  top: calc(var(--header-h) + 24px);
}

/* --------------------------------------------------------------------------
   4. Utilities
   -------------------------------------------------------------------------- */
.u-stack > * + * { margin-top: 1rem; }
.u-muted { color: var(--muted); }
.u-center { text-align: center; }
.text-muted { color: var(--muted) !important; }
.lead { font-size: 1.075rem; color: var(--text-2); }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--brand-600);
  text-transform: none;
}

.eyebrow::before {
  content: '';
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
}

.clamp-2 {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.clamp-3 {
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Empty states */
.empty-state {
  text-align: center;
  padding: clamp(2.5rem, 6vw, 4rem) 1.5rem;
  background: var(--surface);
  border: 1px dashed var(--border-strong);
  border-radius: var(--r-lg);
  color: var(--muted);
}

.empty-state__icon {
  width: 60px;
  height: 60px;
  display: grid;
  place-items: center;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--brand-600);
  font-size: 1.5rem;
}

.empty-state h5 { margin-bottom: .35rem; }

.alert {
  border-radius: var(--r-md);
  border: 1px solid var(--border);
  background: var(--surface);
  padding: 1rem 1.25rem;
  color: var(--text-2);
}

.alert-info,
.alert-success {
  background: var(--surface);
  border-color: var(--border);
}

/* legacy spacing helpers still referenced by a few templates */
.mt-130 { margin-top: 130px; }
.mt-90  { margin-top: 90px; }
.mt-50  { margin-top: 50px; }
.mt-30  { margin-top: 30px; }
.mb-50  { margin-bottom: 50px; }
.mb-40  { margin-bottom: 40px; }
.mb-30  { margin-bottom: 30px; }
.m-top  { margin-top: 120px; }
.display-none  { display: none !important; }
.display-block { display: block !important; }
.is-hidden     { display: none !important; }

/* --------------------------------------------------------------------------
   5. Buttons, chips & pills
   -------------------------------------------------------------------------- */
.btn-custom,
.btn-solid {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .75rem 1.55rem;
  border-radius: var(--r-pill);
  background: var(--brand-600);
  color: var(--on-brand);
  border: 1px solid transparent;
  font-weight: 600;
  font-size: .95rem;
  line-height: 1.4;
  cursor: pointer;
  white-space: nowrap;
  box-shadow: var(--sh-brand);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease), color var(--t) var(--ease);
}

.btn-custom:hover,
.btn-solid:hover,
.btn-custom:focus-visible {
  background: var(--brand-700);
  color: var(--on-brand);
  transform: translateY(-2px);
  box-shadow: 0 16px 34px -12px rgba(64, 81, 137, .65);
}

[data-theme="dark"] .btn-custom,
body.dark .btn-custom,
[data-theme="dark"] .btn-solid,
body.dark .btn-solid { color: #0b0d13; }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  padding: .7rem 1.4rem;
  border-radius: var(--r-pill);
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border-strong);
  font-weight: 600;
  font-size: .93rem;
  transition: all var(--t) var(--ease);
}

.btn-ghost:hover {
  border-color: var(--brand-600);
  color: var(--brand-600);
  transform: translateY(-2px);
  box-shadow: var(--sh-2);
}

.btn-icon {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--text-2);
  border: 1px solid var(--border);
  transition: all var(--t) var(--ease);
}

.btn-icon:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  transform: translateY(-2px);
}

/* Category chip — soft tint rather than the old solid blue block */
.category {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .32rem .8rem;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-600);
  border: 1px solid var(--brand-100);
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.6;
  white-space: nowrap;
  transition: all var(--t) var(--ease);
}

a.category:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

.category--solid {
  background: rgba(255, 255, 255, .16);
  border-color: rgba(255, 255, 255, .28);
  color: #fff;
  backdrop-filter: blur(8px);
}

/* Small meta rows */
.meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .45rem .75rem;
  font-size: .82rem;
  color: var(--muted);
  list-style: none;
}

.meta__item {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

.meta__item + .meta__item::before {
  content: '';
  width: 3px;
  height: 3px;
  border-radius: 50%;
  background: currentColor;
  opacity: .55;
}

.meta__avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--border);
}

.meta a:hover { color: var(--brand-600); }

/* Social */
.social {
  display: flex;
  align-items: center;
  gap: .5rem;
  list-style: none;
}

.social__link {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .9rem;
  transition: all var(--t) var(--ease);
}

.social__link:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  transform: translateY(-3px);
}

/* --------------------------------------------------------------------------
   6. Header / navigation
   -------------------------------------------------------------------------- */
.header {
  position: fixed;
  inset-inline: 0;
  top: 0;
  z-index: 1000;
  height: var(--header-h);
  display: flex;
  align-items: center;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(18px);
  -webkit-backdrop-filter: saturate(180%) blur(18px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t) var(--ease), box-shadow var(--t) var(--ease),
              background-color var(--t) var(--ease);
}

@supports not (background: color-mix(in srgb, red 50%, blue)) {
  .header { background: var(--surface); }
}

.header.is-stuck {
  border-bottom-color: var(--border);
  box-shadow: var(--sh-2);
}

.header__main {
  display: flex;
  align-items: center;
  gap: 1rem;
  width: 100%;
}

/* Brand lockup */
.brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  flex-shrink: 0;
}

.brand__mark {
  width: 42px;
  height: 42px;
  flex: 0 0 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  background: linear-gradient(140deg, var(--brand-500), var(--brand-700));
  color: #fff;
  font-weight: 700;
  font-size: 1.05rem;
  letter-spacing: -.02em;
  box-shadow: var(--sh-brand);
}

.brand__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.brand__name {
  font-size: 1.12rem;
  font-weight: 700;
  color: var(--text);
}

.brand__role {
  font-size: .72rem;
  font-weight: 500;
  color: var(--muted);
}

/* Primary nav */
.header__navbar {
  flex: 1 1 auto;
  display: flex;
  justify-content: center;
  min-width: 0;
}

.nav-list {
  display: flex;
  align-items: center;
  gap: .15rem;
  list-style: none;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: center;
  padding: .5rem .85rem;
  border-radius: var(--r-pill);
  font-size: .93rem;
  font-weight: 500;
  color: var(--text-2);
  white-space: nowrap;
  transition: color var(--t-fast) var(--ease), background-color var(--t-fast) var(--ease);
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: .18rem;
  inset-inline-start: 50%;
  transform: translateX(50%);
  width: 0;
  height: 2px;
  border-radius: 2px;
  background: var(--brand-600);
  transition: width var(--t) var(--ease);
}

.nav-link:hover {
  color: var(--text);
  background: var(--surface-2);
}

.nav-link.active {
  color: var(--brand-600);
  font-weight: 700;
}

[dir="ltr"] .nav-link::after { transform: translateX(-50%); }

.nav-link.active::after { width: 18px; }

/* Header actions */
.header__action-items {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-shrink: 0;
  margin-inline-start: auto;
}

.header .social { gap: .25rem; }

.header .social__link {
  width: 34px;
  height: 34px;
  background: transparent;
  border-color: transparent;
  color: var(--muted);
}

.header .social__link:hover {
  background: var(--brand-50);
  border-color: var(--brand-100);
  color: var(--brand-600);
  transform: none;
}

/* Theme toggle */
/* Track and knob are driven by these four numbers, so the knob's travel is
   derived rather than hardcoded and it lands flush at both ends. */
.theme-switch {
  display: inline-flex;
  --sw-w: 62px;
  --sw-h: 32px;
  --sw-knob: 24px;
  --sw-gap: 3px;
  --sw-travel: calc(var(--sw-w) - var(--sw-knob) - (2 * var(--sw-gap)));
}

.theme-switch__label {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: var(--sw-w);
  height: var(--sw-h);
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  cursor: pointer;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.theme-switch__checkbox {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  cursor: pointer;
  z-index: 2;
}

.theme-switch__slider {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  height: 100%;
  padding-inline: 8px;
  font-size: .7rem;
  color: var(--muted);
}

.theme-switch__slider::before {
  content: '';
  position: absolute;
  top: 50%;
  inset-inline-start: var(--sw-gap);
  width: var(--sw-knob);
  height: var(--sw-knob);
  border-radius: 50%;
  background: var(--surface);
  box-shadow: var(--sh-1);
  /* `transform` rather than the individual `translate` property: the latter is
     unreliable on pseudo-elements in some engines. */
  transform: translate(0, -50%);
  transition: transform var(--t) var(--ease), background-color var(--t) var(--ease);
}

/* transforms are not direction-aware, so the sign flips per writing mode */
.theme-switch__checkbox:checked + .theme-switch__slider::before {
  transform: translate(calc(-1 * var(--sw-travel)), -50%);
}

[dir="ltr"] .theme-switch__checkbox:checked + .theme-switch__slider::before {
  transform: translate(var(--sw-travel), -50%);
}

.theme-switch__icon { position: relative; z-index: 1; line-height: 1; }
.theme-switch__icon--light { color: #e0a336; }
.theme-switch__icon--dark { color: var(--brand-400); }

/* Mobile drawer trigger */
.navbar-toggler {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  position: relative;
}

.navbar-toggler__icon,
.navbar-toggler__icon::before,
.navbar-toggler__icon::after {
  position: absolute;
  inset-inline: 12px;
  height: 2px;
  border-radius: 2px;
  background: var(--text);
  transition: transform var(--t) var(--ease), opacity var(--t-fast) var(--ease);
}

.navbar-toggler__icon { top: 50%; transform: translateY(-50%); }
.navbar-toggler__icon::before { content: ''; top: -6px; }
.navbar-toggler__icon::after { content: ''; top: 6px; }

.navbar-toggler[aria-expanded="true"] .navbar-toggler__icon { background: transparent; }
.navbar-toggler[aria-expanded="true"] .navbar-toggler__icon::before { top: 0; transform: rotate(45deg); }
.navbar-toggler[aria-expanded="true"] .navbar-toggler__icon::after { top: 0; transform: rotate(-45deg); }

/* Mobile drawer */
.nav-drawer {
  position: fixed;
  inset: 0;
  z-index: 1100;
  visibility: hidden;
  pointer-events: none;
}

.nav-drawer__scrim {
  position: absolute;
  inset: 0;
  background: var(--overlay);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}

.nav-drawer__panel {
  position: absolute;
  inset-block: 0;
  /* inline-start is the right edge in RTL — the drawer belongs on the same
     side as the toggle that opens it */
  inset-inline-start: 0;
  width: min(340px, 86vw);
  background: var(--surface);
  border-inline-end: 1px solid var(--border);
  box-shadow: var(--sh-4);
  padding: 1.5rem 1.35rem;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  overflow-y: auto;
  transform: translateX(100%);
  transition: transform var(--t-slow) var(--ease);
}

[dir="ltr"] .nav-drawer__panel { transform: translateX(-100%); }

.nav-drawer.is-open {
  visibility: visible;
  pointer-events: auto;
}

.nav-drawer.is-open .nav-drawer__scrim { opacity: 1; }
.nav-drawer.is-open .nav-drawer__panel { transform: translateX(0); }

.nav-drawer__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.nav-drawer__close {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text);
}

.nav-drawer__list {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  list-style: none;
}

.nav-drawer__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .8rem 1rem;
  border-radius: var(--r-sm);
  font-weight: 500;
  color: var(--text-2);
  transition: all var(--t-fast) var(--ease);
}

.nav-drawer__link:hover { background: var(--surface-2); color: var(--text); }

.nav-drawer__link.active {
  background: var(--brand-50);
  color: var(--brand-600);
  font-weight: 700;
}

.nav-drawer__link i { font-size: .8rem; opacity: .5; }

.nav-drawer__foot {
  margin-top: auto;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}

body.nav-open { overflow: hidden; }
/* --------------------------------------------------------------------------
   7. Hero — full-bleed stage with a story rail
   -------------------------------------------------------------------------- */
.hero {
  position: relative;
  width: 100%;
  /* header + hero fills exactly one screen, with sane floor and ceiling */
  height: clamp(540px, calc(100vh - var(--header-h)), 860px);
  background: var(--surface-3);
  isolation: isolate;
}

.hero .swiper,
.hero .swiper-wrapper { height: 100%; }

.hero-slide {
  position: relative;
  height: 100%;
  display: flex;
  align-items: flex-end;
  background-size: cover;
  background-position: center;
}

/* Slow drift on the active slide keeps a static photo from feeling dead. */
.hero-slide::before {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  background-size: cover;
  background-position: center;
  transform: scale(1);
  transition: transform 7s linear;
}

.swiper-slide-active .hero-slide::before { transform: scale(1.07); }

.hero-slide::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(6, 9, 17, .94) 0%, rgba(6, 9, 17, .74) 32%, rgba(6, 9, 17, .28) 62%, rgba(6, 9, 17, .45) 100%),
    linear-gradient(to left, rgba(6, 9, 17, .55) 0%, transparent 55%);
}

[dir="ltr"] .hero-slide::after {
  background:
    linear-gradient(to top, rgba(6, 9, 17, .94) 0%, rgba(6, 9, 17, .74) 32%, rgba(6, 9, 17, .28) 62%, rgba(6, 9, 17, .45) 100%),
    linear-gradient(to right, rgba(6, 9, 17, .55) 0%, transparent 55%);
}

.hero-slide__inner {
  position: relative;
  z-index: 1;
  width: 100%;
  padding-bottom: clamp(2rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: end;
}

.hero-slide__content { max-width: 44rem; color: #fff; }
.hero-slide__content > * + * { margin-top: 1rem; }

.hero-slide__title {
  font-size: clamp(1.75rem, 1.15rem + 2.4vw, 3.35rem);
  line-height: 1.25;
  font-weight: 700;
  color: #fff;
  text-wrap: balance;
}

.hero-slide__title a {
  color: #fff;
  background-image: linear-gradient(currentColor, currentColor);
  background-size: 0% 2px;
  background-repeat: no-repeat;
  background-position: 100% 100%;
  transition: background-size var(--t-slow) var(--ease);
}

.hero-slide__title a:hover { color: #fff; background-size: 100% 2px; }

.hero-slide__lead {
  color: rgba(255, 255, 255, .82);
  font-size: clamp(.95rem, .9rem + .3vw, 1.08rem);
  line-height: 1.95;
  max-width: 34rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.hero-slide__meta { color: rgba(255, 255, 255, .75); }
.hero-slide__meta .meta__avatar { border-color: rgba(255, 255, 255, .35); }
.hero-slide__meta a:hover { color: #fff; }

.hero-slide__cta { margin-top: 1.6rem !important; }

/* Story rail — the other headlines, stacked over the artwork */
.hero-rail {
  display: flex;
  flex-direction: column;
  gap: .35rem;
  padding: .6rem;
  border-radius: var(--r-lg);
  background: rgba(12, 16, 26, .48);
  backdrop-filter: blur(16px) saturate(150%);
  -webkit-backdrop-filter: blur(16px) saturate(150%);
  border: 1px solid rgba(255, 255, 255, .14);
}

.hero-rail__head {
  display: flex;
  align-items: center;
  gap: .5rem;
  padding: .5rem .7rem .65rem;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  color: rgba(255, 255, 255, .62);
  border-bottom: 1px solid rgba(255, 255, 255, .12);
  margin-bottom: .3rem;
}

.hero-rail__head::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-400);
  box-shadow: 0 0 0 4px rgba(41, 169, 154, .25);
}

.hero-rail__item {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: .7rem;
  width: 100%;
  padding: .7rem;
  border-radius: var(--r-sm);
  text-align: start;
  color: rgba(255, 255, 255, .8);
  transition: background-color var(--t) var(--ease), color var(--t) var(--ease);
}

.hero-rail__item:hover { background: rgba(255, 255, 255, .1); color: #fff; }

.hero-rail__item.is-active {
  background: rgba(255, 255, 255, .14);
  color: #fff;
}

.hero-rail__num {
  flex: 0 0 auto;
  font-size: .74rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .5);
  padding-top: .15rem;
}

.hero-rail__item.is-active .hero-rail__num { color: var(--accent-400); }

.hero-rail__title {
  font-size: .87rem;
  font-weight: 600;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* autoplay progress, pinned to the bottom edge of the stage */
.hero__progress {
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  z-index: 3;
  height: 3px;
  background: rgba(255, 255, 255, .16);
}

.hero__progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--brand-400), var(--accent-400));
  transition: width .1s linear;
}

/* Swiper chrome — bare chevrons, no chip and no Swiper blue. Swiper ships
   `.swiper-rtl .swiper-button-*` rules at (0,2,0) for both the glyph and the
   side offsets, so every override below has to name that variant too. */
.swiper-button-next,
.swiper-button-prev {
  width: auto;
  height: auto;
  margin-top: 0;
  transform: translateY(-50%);
  background: none;
  border: 0;
  color: rgba(255, 255, 255, .65);
  font-size: 2.25rem;
  line-height: 1;
  transition: color var(--t) var(--ease), transform var(--t) var(--ease),
              opacity var(--t) var(--ease);
}

.swiper-button-next::after,
.swiper-button-prev::after,
.swiper-rtl .swiper-button-next::after,
.swiper-rtl .swiper-button-prev::after { content: none; }

.swiper-button-next:hover,
.swiper-button-prev:hover { color: #fff; }

.swiper-button-prev,
.swiper-rtl .swiper-button-prev {
  inset-inline-start: clamp(.5rem, 2vw, 1.5rem);
  inset-inline-end: auto;
}

.swiper-button-next,
.swiper-rtl .swiper-button-next {
  inset-inline-end: clamp(.5rem, 2vw, 1.5rem);
  inset-inline-start: auto;
}

.swiper-button-prev:hover { transform: translate(4px, -50%); }
.swiper-button-next:hover { transform: translate(-4px, -50%); }

.swiper-button-disabled { opacity: .2; pointer-events: none; }

.swiper-pagination-bullet {
  width: 8px;
  height: 8px;
  background: var(--border-strong);
  opacity: 1;
  transition: all var(--t) var(--ease);
}

.swiper-pagination-bullet-active {
  width: 26px;
  border-radius: var(--r-pill);
  background: var(--brand-600);
}

@media (max-width: 1199.98px) {
  .hero-slide__inner { grid-template-columns: minmax(0, 1fr); }
  .hero-rail { display: none; }
}

@media (max-width: 767.98px) {
  .hero { height: clamp(460px, 78vh, 640px); }
  .hero-slide__lead { -webkit-line-clamp: 3; }
}

/* --------------------------------------------------------------------------
   8. Section heads
   -------------------------------------------------------------------------- */
.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.25rem;
  flex-wrap: wrap;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
  padding-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.section-head__title {
  position: relative;
  font-size: clamp(1.45rem, 1.15rem + 1.2vw, 2rem);
  font-weight: 700;
  color: var(--text);
  margin: .35rem 0 0;
}

.section-head__title::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  bottom: calc(-1.15rem - 1px);
  width: 54px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--brand-600), var(--brand-400));
  transition: width var(--t-slow) var(--ease);
}

.section-head:hover .section-head__title::after { width: 100px; }

.section-head__desc {
  color: var(--muted);
  font-size: .95rem;
  margin: .4rem 0 0;
  max-width: 60ch;
}

.section-head__link {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--brand-600);
}

.section-head__link:hover { color: var(--brand-700); }
.section-head__link i { transition: transform var(--t) var(--ease); }
.section-head__link:hover i { transform: translateX(-4px); }
[dir="ltr"] .section-head__link:hover i { transform: translateX(4px); }

/* Page hero — used by list pages */
.page-hero {
  position: relative;
  padding-block: clamp(2.5rem, 6vw, 4.5rem) clamp(1.75rem, 3vw, 2.5rem);
  overflow: hidden;
}

.page-hero::before {
  content: '';
  position: absolute;
  inset-inline-end: -10%;
  top: -60%;
  width: 55%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: radial-gradient(circle, var(--brand-100) 0%, transparent 68%);
  opacity: .8;
  pointer-events: none;
}

.page-hero__inner { position: relative; max-width: 760px; }

.breadcrumb-trail {
  display: flex;
  align-items: center;
  gap: .45rem;
  font-size: .85rem;
  color: var(--muted);
  margin-bottom: .9rem;
  list-style: none;
  flex-wrap: wrap;
}

.breadcrumb-trail a:hover { color: var(--brand-600); }
.breadcrumb-trail i { font-size: .65rem; opacity: .6; }

.page-hero__title { margin-bottom: .75rem; }
.page-hero__title span { color: var(--brand-600); }

.page-hero__desc {
  color: var(--muted);
  font-size: 1.02rem;
  max-width: 62ch;
}

.page-hero--center { text-align: center; }
.page-hero--center .page-hero__inner { margin-inline: auto; }
.page-hero--center .page-hero__desc { margin-inline: auto; }
.page-hero--center .breadcrumb-trail { justify-content: center; }

/* --------------------------------------------------------------------------
   9. Post cards
   -------------------------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(1.25rem, 2.4vw, 1.85rem);
}

.post-card {
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}

.post-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-200);
  box-shadow: var(--sh-3);
}

.post-card__image {
  position: relative;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--surface-3);
}

.post-card__image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.post-card:hover .post-card__image img { transform: scale(1.06); }

.post-card__image .category {
  position: absolute;
  inset-block-start: .85rem;
  inset-inline-start: .85rem;
  z-index: 2;
}

.post-card__content {
  display: flex;
  flex-direction: column;
  gap: .65rem;
  padding: 1.25rem;
  flex: 1;
}

.post-card__title {
  font-size: 1.08rem;
  line-height: 1.55;
  font-weight: 700;
  margin: 0;
}

.post-card__title-link {
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card:hover .post-card__title-link { color: var(--brand-600); }

.post-card__exerpt {
  font-size: .91rem;
  color: var(--muted);
  line-height: 1.85;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card__meta {
  margin-top: auto;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}

/* Featured variant — image left, copy right */
.post-card--wide {
  flex-direction: row;
  align-items: stretch;
}

.post-card--wide .post-card__image {
  flex: 0 0 42%;
  aspect-ratio: auto;
}

/* Topic tiles — a compact way into the category archives */
.topic-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: .85rem;
}

.topic-tile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: 1rem 1.15rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}

.topic-tile__name {
  font-size: .93rem;
  font-weight: 600;
  color: var(--text);
}

.topic-tile__count {
  flex-shrink: 0;
  font-size: .74rem;
  font-weight: 700;
  color: var(--brand-600);
  background: var(--brand-50);
  border-radius: var(--r-pill);
  padding: .15rem .55rem;
}

/* Media strip — square-ish tiles for videos and gallery teasers */
.media-strip {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(210px, 1fr));
  gap: 1rem;
}

.media-tile {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  border-radius: var(--r-md);
  overflow: hidden;
  background: var(--surface-3);
  border: 1px solid var(--border);
}

.media-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.media-tile:hover img { transform: scale(1.07); }

.media-tile__veil {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: .4rem;
  padding: .9rem 1rem;
  background: linear-gradient(to top, rgba(8, 11, 20, .88) 0%, rgba(8, 11, 20, .25) 55%, transparent 100%);
  color: #fff;
}

.media-tile__title {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.6;
  color: #fff;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.media-tile__play {
  position: absolute;
  top: 50%;
  inset-inline-start: 50%;
  transform: translate(50%, -50%);
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-size: 1.2rem;
  transition: all var(--t) var(--ease);
}

[dir="ltr"] .media-tile__play { transform: translate(-50%, -50%); }
[dir="ltr"] .media-tile:hover .media-tile__play { transform: translate(-50%, -50%) scale(1.08); }

.media-tile:hover .media-tile__play {
  background: var(--brand-600);
  border-color: var(--brand-600);
  transform: translate(50%, -50%) scale(1.08);
}

/* About teaser band */
.about-band {
  display: grid;
  grid-template-columns: minmax(0, 260px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3rem);
  align-items: center;
  padding: clamp(1.75rem, 4vw, 3rem);
  border-radius: var(--r-xl);
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: var(--sh-1);
}

.about-band__portrait {
  aspect-ratio: 1;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--sh-2);
}

.about-band__portrait img { width: 100%; height: 100%; object-fit: cover; }

.about-band__title { margin: .5rem 0 .75rem; }

.about-band__text {
  color: var(--muted);
  line-height: 2;
  margin-bottom: 1.5rem;
  max-width: 62ch;
}

.about-band__actions { display: flex; flex-wrap: wrap; gap: .75rem; }

/* Compact article rows */
.article-strip { display: grid; gap: .85rem; }

.article-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.25rem;
  border-radius: var(--r-md);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}

.article-row:hover {
  transform: translateX(-4px);
  border-color: var(--brand-200);
  box-shadow: var(--sh-2);
}

[dir="ltr"] .article-row:hover { transform: translateX(4px); }

.article-row__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 1.1rem;
}

.article-row__body { min-width: 0; flex: 1; }

.article-row__title {
  font-size: .97rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.65;
  margin: 0 0 .25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-row:hover .article-row__title { color: var(--brand-600); }

.article-row__meta {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem .9rem;
  font-size: .8rem;
  color: var(--muted);
}

.article-row__meta span { display: inline-flex; align-items: center; gap: .3rem; }
/* --------------------------------------------------------------------------
   10. Sidebar widgets
   -------------------------------------------------------------------------- */
.widget {
  position: relative;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  margin-bottom: 1.5rem;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease);
}

.widget:last-child { margin-bottom: 0; }

/* Header: a tinted icon chip beside the label, on a hairline */
.widget__title {
  display: flex;
  align-items: center;
  gap: .65rem;
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  padding-bottom: .9rem;
  margin-bottom: 1.15rem;
  border-bottom: 1px solid var(--border);
}

.widget__title i {
  flex: 0 0 30px;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: .85rem;
}

.widget__all {
  margin-inline-start: auto;
  font-size: .76rem;
  font-weight: 600;
  color: var(--muted);
}

.widget__all:hover { color: var(--brand-600); }

/* ---- author card: portrait-led, copy underneath ---------------------------- */
.widget--author { padding: 0; overflow: hidden; }

.widget__author-figure {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-3);
}

.widget__author-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 22%;
  transition: transform var(--t-slow) var(--ease);
}

.widget--author:hover .widget__author-figure img { transform: scale(1.05); }

.widget__author-figure::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 11, 20, .92) 0%, rgba(8, 11, 20, .35) 45%, transparent 75%);
}

.widget__author-id {
  position: absolute;
  inset-inline: 1.15rem;
  bottom: 1rem;
  z-index: 1;
  color: #fff;
}

.widget__author-name {
  font-size: 1.05rem;
  font-weight: 700;
  color: #fff;
  margin: 0 0 .15rem;
}

.widget__author-role {
  font-size: .78rem;
  color: rgba(255, 255, 255, .75);
  margin: 0;
}

.widget__author-body { padding: 1.25rem 1.4rem 1.4rem; }

.widget__author-bio {
  font-size: .86rem;
  line-height: 1.95;
  color: var(--muted);
  text-align: justify;
  margin-bottom: 1.15rem;
}

.widget__author-body .social { justify-content: center; }

/* ---- ranked list: numbered thumbnails ------------------------------------ */
/* The sidebar is ~280px wide, so the rank number rides on the thumbnail rather
   than taking a column of its own — that leaves the headline room to breathe. */
.rank-list { display: flex; flex-direction: column; gap: .35rem; list-style: none; }

.rank-list__item {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .55rem;
  border-radius: var(--r-sm);
  transition: background-color var(--t) var(--ease);
}

.rank-list__item:hover { background: var(--surface-2); }

.rank-list__figure {
  position: relative;
  flex: 0 0 52px;
  width: 52px;
  height: 52px;
}

.rank-list__thumb {
  width: 100%;
  height: 100%;
  border-radius: var(--r-sm);
  object-fit: cover;
  background: var(--surface-3);
}

.rank-list__num {
  position: absolute;
  bottom: -5px;
  inset-inline-start: -5px;
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  font-size: .7rem;
  font-weight: 700;
  line-height: 1;
  border: 2px solid var(--surface);
  transition: background-color var(--t) var(--ease), transform var(--t) var(--ease);
}

.rank-list__item:hover .rank-list__num { background: var(--brand-700); transform: scale(1.1); }

.rank-list__body { min-width: 0; flex: 1; }

.rank-list__title {
  font-size: .87rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 .25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color var(--t-fast) var(--ease);
}

.rank-list__item:hover .rank-list__title { color: var(--brand-600); }

.rank-list__date {
  font-size: .74rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}

/* ---- categories: share bars ---------------------------------------------- */
.cat-list { display: flex; flex-direction: column; gap: .15rem; list-style: none; }

.cat-list__item {
  display: block;
  padding: .55rem .6rem;
  border-radius: var(--r-sm);
}

.cat-list__row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  margin-bottom: .45rem;
}

.cat-list__name {
  font-size: .89rem;
  font-weight: 500;
  color: var(--text-2);
}

.cat-list__count {
  flex-shrink: 0;
  font-size: .76rem;
  font-weight: 700;
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}

/* width comes from modern.js, which scales each row against the largest count */
.cat-list__bar {
  height: 4px;
  border-radius: 4px;
  background: var(--surface-3);
  overflow: hidden;
}

.cat-list__bar span {
  display: block;
  height: 100%;
  width: var(--pct, 0%);
  border-radius: inherit;
  background: linear-gradient(90deg, var(--brand-400), var(--brand-600));
  transition: width .7s var(--ease);
}

/* ---- tags ----------------------------------------------------------------- */
.tag-cloud { display: flex; flex-wrap: wrap; gap: .45rem; list-style: none; }

.tag-chip {
  display: inline-flex;
  align-items: center;
  gap: .15rem;
  padding: .32rem .75rem;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .8rem;
  font-weight: 500;
  transition: all var(--t-fast) var(--ease);
}

.tag-chip::before { content: '#'; color: var(--brand-400); font-weight: 700; }

.tag-chip:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  transform: translateY(-2px);
}

.tag-chip:hover::before { color: rgba(255, 255, 255, .7); }

/* ---- book card ------------------------------------------------------------ */
.book-promo { display: flex; gap: 1rem; }

.book-promo__cover {
  flex: 0 0 88px;
  width: 88px;
  aspect-ratio: 3 / 4;
  border-radius: var(--r-sm);
  overflow: hidden;
  background: var(--surface-3);
  box-shadow: var(--sh-2);
}

.book-promo__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.book-promo:hover .book-promo__cover img { transform: scale(1.05); }

.book-promo__body { display: flex; flex-direction: column; min-width: 0; }

.book-promo__title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.6;
  margin: 0 0 .3rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-promo__author { font-size: .8rem; color: var(--muted); margin: 0 0 .9rem; }

.book-promo__link {
  margin-top: auto;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-600);
}

.book-promo__link:hover { color: var(--brand-700); }
.book-promo__link i { transition: transform var(--t) var(--ease); }
.book-promo__link:hover i { transform: translateX(-3px); }

/* ---- promo / media -------------------------------------------------------- */
.widget__media {
  display: block;
  border-radius: var(--r-md);
  overflow: hidden;
  position: relative;
  background: var(--surface-2);
}

.widget__media img {
  width: 100%;
  transition: transform var(--t-slow) var(--ease);
}

.widget__media:hover img { transform: scale(1.04); }

.widget__media--video::after {
  content: '\F4F4';
  font-family: 'bootstrap-icons';
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 3rem;
  color: #fff;
  background: rgba(10, 13, 22, .3);
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}

.widget__media--video:hover::after { opacity: 1; }

/* --------------------------------------------------------------------------
   11. Filter bar
   -------------------------------------------------------------------------- */
.filter-bar {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  padding: 1.35rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  box-shadow: var(--sh-1);
}

.search-field {
  position: relative;
  display: flex;
  align-items: center;
  max-width: 620px;
  width: 100%;
  margin-inline: auto;
}

.search-field__input {
  width: 100%;
  height: 52px;
  padding-inline: 3.4rem 1.25rem;
  border-radius: var(--r-pill);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: .95rem;
  transition: all var(--t) var(--ease);
}

.search-field__input::placeholder { color: var(--muted); }

.search-field__input:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px var(--ring);
}

.search-field__btn {
  position: absolute;
  inset-inline-start: 6px;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  transition: all var(--t) var(--ease);
}

.search-field__btn:hover { background: var(--brand-700); transform: scale(1.05); }

.chip-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.05rem;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .87rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--t) var(--ease);
}

.chip:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
  transform: translateY(-2px);
}

.chip.active,
.category-pill.active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
  box-shadow: var(--sh-brand);
}

/* legacy alias used by gallery/video/books pages */
.category-pill {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .55rem 1.1rem;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  border: 1px solid var(--border);
  color: var(--text-2);
  font-size: .87rem;
  font-weight: 500;
  white-space: nowrap;
  transition: all var(--t) var(--ease);
}

.category-pill:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
  transform: translateY(-2px);
}

.categories-wrapper {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}

/* --------------------------------------------------------------------------
   12. Pagination
   -------------------------------------------------------------------------- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: .4rem;
  list-style: none;
  padding: 2.5rem 0 .5rem;
}

.pagination__item {
  min-width: 42px;
  height: 42px;
  border-radius: var(--r-sm);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--t) var(--ease);
}

.pagination__link {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding-inline: .5rem;
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-2);
}

.pagination__item:hover {
  border-color: var(--brand-400);
  transform: translateY(-2px);
}

.pagination__item:hover .pagination__link { color: var(--brand-600); }

.pagination__item--active {
  background: var(--brand-600);
  border-color: var(--brand-600);
  box-shadow: var(--sh-brand);
}

.pagination__item--active .pagination__link,
.pagination__item--active:hover .pagination__link { color: #fff; }

.pagination__ellipsis {
  border-color: transparent;
  background: transparent;
  pointer-events: none;
}

.pagination__ellipsis .pagination__link { color: var(--muted); }

/* --------------------------------------------------------------------------
   13. Article (single post)
   -------------------------------------------------------------------------- */
.post-single {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  overflow: hidden;
  margin-bottom: 2rem;
}

.post-single__image,
.post-single__video,
.post-single__gallery {
  position: relative;
  background: var(--surface-3);
}

.post-single__image-img {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
}

.post-single__video video {
  width: 100%;
  max-height: 520px;
  object-fit: cover;
  display: block;
}

.post-gallery-slider { width: 100%; }

/* The gallery post carries its own slide styling — the home hero no longer
   shares these rules. */
.post-single__gallery .slider__item {
  position: relative;
  min-height: clamp(280px, 40vw, 480px);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.post-single__gallery .slider__item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8, 11, 20, .35), transparent 45%);
}

.post-single__gallery .swiper-pagination { bottom: 14px; }

.post-single__content {
  padding: clamp(1.5rem, 3vw, 2.5rem) clamp(1.25rem, 3vw, 2.5rem) 0;
}

.post-single__title {
  font-size: clamp(1.5rem, 1.15rem + 1.8vw, 2.35rem);
  line-height: 1.35;
  margin: 1rem 0;
}

.post-single__meta { margin-bottom: 0; }

.post-single__meta-img {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  object-fit: cover;
}

.post-single__body {
  padding: clamp(1.5rem, 3vw, 2.25rem) clamp(1.25rem, 3vw, 2.5rem);
  font-size: 1.03rem;
  line-height: 2.1;
  color: var(--text-2);
}

.post-single__body > * + * { margin-top: 1.15rem; }

.post-single__body h1,
.post-single__body h2,
.post-single__body h3,
.post-single__body h4,
.post-single__body h5,
.post-single__body h6 {
  margin-top: 2rem;
  margin-bottom: .85rem;
}

.post-single__body a { color: var(--link); text-decoration: underline; text-underline-offset: 3px; }
.post-single__body a:hover { color: var(--brand-700); }

.post-single__body img {
  border-radius: var(--r-md);
  margin-inline: auto;
}

.post-single__body ul,
.post-single__body ol {
  padding-inline-start: 1.35rem;
  list-style: revert;
}

.post-single__body li { margin-bottom: .5rem; }

.post-single__body blockquote {
  margin: 1.75rem 0;
  padding: 1.35rem 1.5rem;
  border-inline-start: 3px solid var(--brand-600);
  border-radius: var(--r-md);
  background: var(--surface-2);
  color: var(--text);
  font-size: 1.05rem;
}

.post-single__body table {
  width: 100%;
  border-collapse: collapse;
  font-size: .93rem;
}

.post-single__body th,
.post-single__body td {
  border: 1px solid var(--border);
  padding: .65rem .85rem;
}

.post-single__body th { background: var(--surface-2); color: var(--text); }

.post-single__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 1.35rem clamp(1.25rem, 3vw, 2.5rem);
  border-top: 1px solid var(--border);
  background: var(--surface-2);
}

/* Comment form */
.form-panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  padding: clamp(1.35rem, 3vw, 2.25rem);
  margin-bottom: 2rem;
}

.form-panel__title { margin-bottom: .4rem; }
.form-panel__desc { color: var(--muted); font-size: .92rem; margin-bottom: 1.5rem; }

.form-group { margin-bottom: 1rem; }

.field {
  width: 100%;
  padding: .85rem 1.1rem;
  border-radius: var(--r-md);
  border: 1px solid var(--border-strong);
  background: var(--surface-2);
  color: var(--text);
  font-size: .95rem;
  transition: all var(--t) var(--ease);
}

.field::placeholder { color: var(--muted); }

.field:focus {
  outline: none;
  background: var(--surface);
  border-color: var(--brand-400);
  box-shadow: 0 0 0 4px var(--ring);
}

textarea.field { resize: vertical; min-height: 140px; line-height: 1.9; }

.invalid-feedback { font-size: .82rem; color: #d64550; margin-top: .35rem; }

/* Sign-in / sign-up shell */
.auth-shell {
  max-width: 480px;
  margin-inline: auto;
  padding-block: clamp(1rem, 4vw, 3rem);
}

.auth-shell .form-panel { margin-bottom: 0; }

.auth-consent {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: .88rem;
  color: var(--muted);
  cursor: pointer;
}

.auth-consent input { width: 16px; height: 16px; accent-color: var(--brand-600); }
.auth-consent a { color: var(--brand-600); font-weight: 600; }

/* --------------------------------------------------------------------------
   14. Gallery + lightbox
   -------------------------------------------------------------------------- */
.gallery-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(270px, 1fr));
  gap: clamp(1rem, 2vw, 1.5rem);
}

.gallery-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}

.gallery-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-200);
  box-shadow: var(--sh-3);
}

.gallery-image-wrapper {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--surface-3);
}

.gallery-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.gallery-card:hover .gallery-image { transform: scale(1.07); }

.gallery-hover-overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(10, 13, 22, .75), rgba(10, 13, 22, .1));
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}

.gallery-card:hover .gallery-hover-overlay { opacity: 1; }

.gallery-expand {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(255, 255, 255, .35);
  color: #fff;
  font-size: 1.05rem;
  transform: translateY(10px);
  transition: all var(--t) var(--ease);
}

.gallery-card:hover .gallery-expand { transform: translateY(0); }
.gallery-expand:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }

.gallery-card-body { padding: 1rem 1.15rem 1.15rem; }

.gallery-card-title {
  font-size: .95rem;
  font-weight: 600;
  color: var(--text);
  line-height: 1.65;
  margin-bottom: .5rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.gallery-card-date {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .78rem;
  color: var(--muted);
  margin: 0;
}

/* Self-contained lightbox (replaces the jQuery-dependent Lightbox2 CDN build) */
.lb {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  background: rgba(8, 10, 16, .97);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility var(--t) var(--ease);
}

.lb.is-open { opacity: 1; visibility: visible; }

/* --- top bar --- */
.lb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(.7rem, 1.6vw, 1rem) clamp(.9rem, 2.5vw, 1.75rem);
}

.lb__count {
  display: inline-flex;
  align-items: baseline;
  gap: .35rem;
  font-size: .9rem;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, .45);
}

.lb__count b { color: #fff; font-size: 1.15rem; font-weight: 700; }

.lb__tools { display: flex; align-items: center; gap: .5rem; }

.lb__btn {
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .8);
  font-size: .9rem;
  transition: all var(--t) var(--ease);
}

.lb__btn:hover { background: #fff; border-color: #fff; color: #10131c; }
.lb__btn[hidden] { display: none; }

/* --- stage: the image always scales to fill the space it is given --- */
.lb__stage {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: stretch;
  gap: clamp(.5rem, 2vw, 1.25rem);
  min-height: 0;
  overflow: hidden;
  padding-inline: clamp(.6rem, 2vw, 1.5rem);
  padding-block: clamp(.4rem, 1.5vw, 1rem);
}

/* The grid row sizes the frame (align-items: stretch), and the image is pinned
   inside it — so the image's intrinsic size can never push the stage past its
   row, and the frame needs no percentage-height chain to have a height.
   The column is named explicitly: with a single image the nav buttons are
   [hidden] (display:none), and auto-placement would otherwise drop the frame
   into the `auto` column, which collapses to 0 because its only child is
   absolutely positioned. */
.lb__frame {
  grid-column: 2;
  position: relative;
  min-width: 0;
  min-height: 0;
}

.lb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: var(--r-sm);
  opacity: 1;
  transition: opacity var(--t) var(--ease);
}

.lb__spinner {
  inset-inline-start: 50%;
  top: 50%;
  transform: translate(50%, -50%);
}

[dir="ltr"] .lb__spinner { transform: translate(-50%, -50%); }

.lb.is-loading .lb__img { opacity: .35; }

.lb__spinner {
  position: absolute;
  z-index: 1;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(255, 255, 255, .22);
  border-top-color: #fff;
  animation: spin .8s linear infinite;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--t) var(--ease);
}

.lb.is-loading .lb__spinner { opacity: 1; }

.lb__nav {
  align-self: center;
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 1.15rem;
  transition: all var(--t) var(--ease);
}

.lb__nav:hover { background: #fff; color: #10131c; }
.lb__nav--prev { grid-column: 1; }
.lb__nav--next { grid-column: 3; }

/* --- foot: caption + thumbnail rail --- */
.lb__foot {
  padding: clamp(.75rem, 2vw, 1.1rem) clamp(.9rem, 2.5vw, 1.75rem) clamp(.9rem, 2vw, 1.35rem);
  display: grid;
  gap: .85rem;
  justify-items: center;
}

.lb__caption {
  text-align: center;
  color: rgba(255, 255, 255, .9);
  font-size: 1rem;
  font-weight: 500;
  line-height: 1.75;
  max-width: 70ch;
  margin: 0;
}

.lb__caption:empty { display: none; }

.lb__rail {
  display: flex;
  gap: .5rem;
  max-width: 100%;
  overflow-x: auto;
  padding: .2rem;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .25) transparent;
}

.lb__rail::-webkit-scrollbar { height: 5px; }
.lb__rail::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .22); border-radius: 5px; }
.lb__rail[hidden] { display: none; }

.lb__thumb {
  flex: 0 0 auto;
  width: 88px;
  height: 58px;
  border-radius: var(--r-xs);
  overflow: hidden;
  border: 2px solid transparent;
  opacity: .45;
  transition: opacity var(--t) var(--ease), border-color var(--t) var(--ease);
}

.lb__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb__thumb:hover { opacity: .8; }
.lb__thumb.is-active { opacity: 1; border-color: #fff; }

@media (max-width: 767.98px) {
  .lb__stage { grid-template-columns: minmax(0, 1fr); }
  .lb__frame { grid-column: 1; }
  .lb__nav {
    grid-column: 1;
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background: rgba(8, 10, 16, .6);
    backdrop-filter: blur(8px);
  }
  .lb__nav--prev { inset-inline-end: .4rem; }
  .lb__nav--next { inset-inline-start: .4rem; }
  .lb__caption { font-size: .88rem; }
  .lb__thumb { width: 64px; height: 44px; }
}

/* --------------------------------------------------------------------------
   15. Video page
   -------------------------------------------------------------------------- */
.video-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}

.video-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-200);
  box-shadow: var(--sh-3);
}

/* the whole poster is the play target, not a small button in the corner */
.video-card__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--surface-3);
  border: 0;
  padding: 0;
  cursor: pointer;
}

.video-card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.video-card:hover .video-card__media img { transform: scale(1.06); }

.video-card__scrim {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(6, 9, 16, .55), rgba(6, 9, 16, .05) 60%);
  transition: background-color var(--t) var(--ease);
}

/* centred by the grid — no padding nudge, which shifted it off-centre in RTL */
.video-card__play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  pointer-events: none;
}

.video-card__play i {
  display: grid;
  place-items: center;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  font-size: 1.7rem;
  line-height: 1;
  transition: background-color var(--t) var(--ease), border-color var(--t) var(--ease),
              transform var(--t) var(--ease);
}

.video-card:hover .video-card__play i,
.video-card__media:focus-visible .video-card__play i {
  background: var(--brand-600);
  border-color: var(--brand-600);
  transform: scale(1.1);
}

.video-card__duration {
  position: absolute;
  inset-block-end: .7rem;
  inset-inline-end: .7rem;
  padding: .15rem .5rem;
  border-radius: var(--r-xs);
  background: rgba(6, 9, 16, .75);
  color: #fff;
  font-size: .74rem;
  font-variant-numeric: tabular-nums;
}

.video-card__body {
  display: flex;
  flex-direction: column;
  gap: .6rem;
  padding: 1.1rem 1.25rem 1.35rem;
  flex: 1;
}

.video-title { font-size: 1.02rem; line-height: 1.6; margin: 0; }

.video-title-link {
  color: var(--text);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card:hover .video-title-link { color: var(--brand-600); }

.video-card__date {
  margin-top: auto;
  padding-top: .35rem;
  font-size: .78rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: .35rem;
}

/* ---- full-screen player ---------------------------------------------------- */
.vlb {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  background: rgba(8, 10, 16, .97);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--t) var(--ease), visibility var(--t) var(--ease);
}

.vlb.is-open { opacity: 1; visibility: visible; }

.vlb__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(.7rem, 1.6vw, 1rem) clamp(.9rem, 2.5vw, 1.75rem);
}

.vlb__title {
  color: #fff;
  font-size: clamp(.95rem, .9rem + .3vw, 1.1rem);
  font-weight: 600;
  line-height: 1.6;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.vlb__close {
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(255, 255, 255, .07);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .8);
  transition: all var(--t) var(--ease);
}

.vlb__close:hover { background: #fff; border-color: #fff; color: #10131c; }

.vlb__stage {
  min-height: 0;
  display: grid;
  place-items: center;
  padding: 0 clamp(.6rem, 2vw, 1.75rem) clamp(.9rem, 2.5vw, 1.75rem);
}

.vlb__frame {
  position: relative;
  width: min(100%, 1280px);
  aspect-ratio: 16 / 9;
  max-height: 100%;
  background: #000;
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 24px 70px -20px rgba(0, 0, 0, .8);
}

.vlb__frame video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
}

/* --------------------------------------------------------------------------
   16. Books
   -------------------------------------------------------------------------- */
.book-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  overflow: hidden;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}

.book-card:hover {
  transform: translateY(-5px);
  border-color: var(--brand-200);
  box-shadow: var(--sh-3);
}

.book-cover {
  position: relative;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: var(--surface-3);
}

.book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--t-slow) var(--ease);
}

.book-card:hover .book-cover img { transform: scale(1.05); }

.book-cover .overlay {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  background: linear-gradient(to top, rgba(10, 13, 22, .8), rgba(10, 13, 22, .1));
  opacity: 0;
  transition: opacity var(--t) var(--ease);
}

.book-card:hover .overlay { opacity: 1; }

.book-cover .overlay .btn-sm {
  padding: .5rem 1.15rem;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--brand-700);
  font-weight: 600;
  font-size: .85rem;
  border: 0;
}

.book-info { padding: 1rem 1.15rem 1.25rem; }

.book-title {
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  margin-bottom: .4rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.book-meta { font-size: .82rem; color: var(--muted); margin: 0; }

/* Bootstrap modal skin */
.modal-content {
  border: 1px solid var(--border);
  border-radius: var(--r-xl);
  background: var(--surface);
  color: var(--text-2);
  box-shadow: var(--sh-4);
}

.modal-header {
  display: flex;
  align-items: center;
  gap: 1rem;
  border-bottom: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
}

/* This is the LTR Bootstrap build: its `margin-left:auto` on the close button
   lands it against the title in RTL. Push it to the line end instead. */
.modal-header .btn-close {
  margin: 0;
  margin-inline-start: auto;
  flex: 0 0 auto;
}

.modal-title { margin-inline-end: 0; }

.modal-title { font-size: 1.1rem; font-weight: 700; color: var(--text); }
.modal-body { padding: 1.5rem; }
.modal-body img { border-radius: var(--r-md); }

.modal-header .btn-close {
  filter: none;
  opacity: .6;
}

[data-theme="dark"] .modal-header .btn-close,
body.dark .modal-header .btn-close { filter: invert(1) grayscale(1); }

.modal-body .btn {
  border-radius: var(--r-pill);
  padding: .6rem 1.35rem;
  font-weight: 600;
  font-size: .9rem;
  margin-inline-end: .5rem;
}

.modal-body .btn-primary {
  background: var(--brand-600);
  border-color: var(--brand-600);
}

.modal-body .btn-primary:hover { background: var(--brand-700); border-color: var(--brand-700); }

.modal-body .btn-outline-primary {
  color: var(--brand-600);
  border-color: var(--brand-600);
  background: transparent;
}

.modal-body .btn-outline-primary:hover { background: var(--brand-600); color: #fff; }

/* Bare video modal used by the promo widget */
.ads-modal {
  position: relative;
  background: #000;
  border: 0;
  overflow: hidden;
}

.ads-modal-dialog { max-width: min(1080px, 94vw); }

.ads-modal__video {
  display: block;
  width: 100%;
  max-height: 84vh;
  background: #000;
  object-fit: contain;
}

.ads-modal__close {
  position: absolute;
  top: 12px;
  inset-inline-end: 12px;
  z-index: 5;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: rgba(10, 13, 22, .65);
  border: 1px solid rgba(255, 255, 255, .45);
  color: #fff;
  font-size: .85rem;
  transition: all var(--t) var(--ease);
}

.ads-modal__close:hover { background: #fff; color: #10131c; transform: scale(1.06); }

/* --------------------------------------------------------------------------
   17. Articles list
   -------------------------------------------------------------------------- */
.article-card {
  display: block;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--r-lg);
  padding: clamp(1.25rem, 2.4vw, 1.75rem);
  margin-bottom: 1.25rem;
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}

.article-card:hover {
  transform: translateY(-3px);
  border-color: var(--brand-200);
  box-shadow: var(--sh-2);
}

.article-card__title {
  font-size: clamp(1.1rem, 1rem + .5vw, 1.35rem);
  line-height: 1.55;
  color: var(--text);
  margin: .75rem 0 .6rem;
}

.article-card__desc {
  font-size: .93rem;
  color: var(--muted);
  line-height: 1.95;
  margin-bottom: 1.15rem;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.article-meta-wrapper {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .6rem 1.35rem;
  padding-top: 1rem;
  border-top: 1px solid var(--border);
  font-size: .84rem;
  color: var(--muted);
}

.article-meta-wrapper > div {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
}

.article-meta-wrapper i { color: var(--brand-600); font-size: .9rem; }

.pdf-download-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .4rem 1rem;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  border: 1px solid var(--brand-100);
  color: var(--brand-600);
  font-size: .82rem;
  font-weight: 600;
  transition: all var(--t) var(--ease);
}

.pdf-download-btn:hover {
  background: var(--brand-600);
  border-color: var(--brand-600);
  color: #fff;
}

.pdf-download-btn:hover i { color: #fff; }

/* --------------------------------------------------------------------------
   18. About
   -------------------------------------------------------------------------- */
.about-hero {
  display: grid;
  grid-template-columns: minmax(0, 320px) minmax(0, 1fr);
  gap: clamp(1.5rem, 4vw, 3.5rem);
  align-items: center;
}

.about-hero__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-radius: var(--r-xl);
  overflow: hidden;
  box-shadow: var(--sh-3);
}

.about-hero__portrait img { width: 100%; height: 100%; object-fit: cover; }

.about-hero__portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(26, 33, 56, .35), transparent 45%);
}

.about-hero__role {
  color: var(--brand-600);
  font-weight: 600;
  font-size: 1.02rem;
  margin: .4rem 0 1.25rem;
}

.about-hero__text {
  color: var(--text-2);
  line-height: 2.05;
  text-align: justify;
  margin-bottom: 1rem;
}

.quote-card {
  position: relative;
  margin-top: 1.75rem;
  padding: 1.65rem 1.75rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  border-inline-start: 3px solid var(--brand-600);
}

.quote-card__icon {
  position: absolute;
  top: -14px;
  inset-inline-end: 1.5rem;
  font-size: 2.5rem;
  color: var(--brand-200);
  line-height: 1;
}

.quote-card__text {
  font-size: 1.05rem;
  line-height: 2;
  color: var(--text);
  margin: 0;
}

.feature-card {
  height: 100%;
  padding: 1.75rem 1.5rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: transform var(--t) var(--ease), box-shadow var(--t) var(--ease),
              border-color var(--t) var(--ease);
}

.feature-card:hover {
  transform: translateY(-4px);
  border-color: var(--brand-200);
  box-shadow: var(--sh-3);
}

.feature-card__icon {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: var(--r-md);
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 1.5rem;
  margin-bottom: 1.15rem;
}

.feature-card__title { font-size: 1.08rem; margin-bottom: .9rem; }

.feature-card__list { display: flex; flex-direction: column; gap: .6rem; }

.feature-card__list li {
  position: relative;
  padding-inline-start: 1.1rem;
  font-size: .89rem;
  color: var(--muted);
  line-height: 1.85;
}

.feature-card__list li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: .75em;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand-400);
}

.expertise-item {
  text-align: center;
  height: 100%;
  padding: 1.5rem 1rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--t) var(--ease);
}

.expertise-item:hover {
  transform: translateY(-4px);
  border-color: var(--brand-200);
  box-shadow: var(--sh-2);
}

.expertise-item__icon {
  width: 52px;
  height: 52px;
  margin: 0 auto 1rem;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 1.4rem;
}

.expertise-item h6 { margin-bottom: .45rem; }
.expertise-item p { font-size: .85rem; color: var(--muted); margin: 0; }

/* Timeline */
.timeline {
  position: relative;
  padding-inline-start: 1.75rem;
}

.timeline::before {
  content: '';
  position: absolute;
  inset-inline-start: 5px;
  top: .5rem;
  bottom: .5rem;
  width: 2px;
  border-radius: 2px;
  background: linear-gradient(to bottom, var(--brand-400), var(--border));
}

.timeline-item {
  position: relative;
  padding-bottom: 2rem;
}

.timeline-item:last-child { padding-bottom: 0; }

.timeline-item::before {
  content: '';
  position: absolute;
  inset-inline-start: calc(-1.75rem + 1px);
  top: .55rem;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--surface);
  border: 3px solid var(--brand-600);
  box-shadow: 0 0 0 4px var(--bg);
}

.timeline-date {
  display: inline-flex;
  padding: .2rem .7rem;
  border-radius: var(--r-pill);
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: .82rem;
  font-weight: 700;
  margin-bottom: .45rem;
}

.timeline-title { font-size: 1.02rem; margin-bottom: .3rem; }
.timeline-text { font-size: .89rem; color: var(--muted); margin: 0; }

/* --------------------------------------------------------------------------
   19. Contact
   -------------------------------------------------------------------------- */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
  gap: clamp(1.5rem, 3vw, 2.5rem);
  align-items: start;
}

.contact-info {
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.contact-info__item {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
  padding: 1.15rem 1.25rem;
  border-radius: var(--r-lg);
  background: var(--surface);
  border: 1px solid var(--border);
  transition: all var(--t) var(--ease);
}

.contact-info__item:hover { border-color: var(--brand-200); box-shadow: var(--sh-2); }

.contact-info__icon {
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--r-sm);
  background: var(--brand-50);
  color: var(--brand-600);
  font-size: 1.1rem;
}

.contact-info__label { font-size: .8rem; color: var(--muted); margin-bottom: .1rem; }
.contact-info__value { font-size: .95rem; font-weight: 600; color: var(--text); margin: 0; }

.contact__google-map {
  border-radius: var(--r-lg);
  overflow: hidden;
  border: 1px solid var(--border);
  aspect-ratio: 16 / 9;
}

.contact__google-map-iframe { width: 100%; height: 100%; border: 0; display: block; }

/* --------------------------------------------------------------------------
   20. Newsletter
   -------------------------------------------------------------------------- */
.newsletter {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 5vw, 4rem);
}

.newsletter__panel {
  position: relative;
  overflow: hidden;
  border-radius: var(--r-xl);
  padding: clamp(2rem, 5vw, 3.5rem);
  text-align: center;
  color: #fff;
  background:
    radial-gradient(120% 140% at 100% 0%, rgba(130, 150, 216, .45) 0%, transparent 55%),
    radial-gradient(110% 130% at 0% 100%, rgba(21, 138, 125, .35) 0%, transparent 55%),
    linear-gradient(135deg, var(--brand-800) 0%, var(--brand-900) 100%);
  box-shadow: var(--sh-3);
}

.newsletter__panel::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(255, 255, 255, .07) 1px, transparent 1px);
  background-size: 22px 22px;
  pointer-events: none;
}

.newsletter__inner { position: relative; z-index: 1; max-width: 640px; margin-inline: auto; }

.newsletter__title {
  color: #fff;
  font-size: clamp(1.3rem, 1.1rem + 1.2vw, 1.95rem);
  line-height: 1.45;
  margin-bottom: .75rem;
}

.newsletter__desc {
  color: rgba(255, 255, 255, .72);
  font-size: .98rem;
  margin-bottom: 1.85rem;
}

.newsletter__form {
  display: flex;
  gap: .5rem;
  padding: .4rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .1);
  border: 1px solid rgba(255, 255, 255, .18);
  backdrop-filter: blur(10px);
  max-width: 480px;
  margin: 0 auto 1.75rem;
}

.newsletter__input {
  flex: 1;
  min-width: 0;
  background: transparent;
  border: 0;
  padding-inline: 1.15rem;
  color: #fff;
  font-size: .93rem;
}

.newsletter__input::placeholder { color: rgba(255, 255, 255, .55); }
.newsletter__input:focus { outline: none; }

.newsletter__submit {
  flex-shrink: 0;
  padding: .7rem 1.5rem;
  border-radius: var(--r-pill);
  background: #fff;
  color: var(--brand-800);
  font-weight: 700;
  font-size: .9rem;
  transition: all var(--t) var(--ease);
}

.newsletter__submit:hover { background: var(--brand-100); transform: translateY(-1px); }

.newsletter__social {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .5rem;
  list-style: none;
}

.newsletter__social a {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .45rem 1rem;
  border-radius: var(--r-pill);
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .14);
  color: rgba(255, 255, 255, .8);
  font-size: .84rem;
  transition: all var(--t) var(--ease);
}

.newsletter__social a:hover {
  background: rgba(255, 255, 255, .18);
  color: #fff;
  transform: translateY(-2px);
}

/* --------------------------------------------------------------------------
   21. Footer & back-to-top
   -------------------------------------------------------------------------- */
.footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  padding-top: clamp(2.5rem, 5vw, 3.5rem);
  transition: background-color var(--t) var(--ease);
}

.footer__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) repeat(2, minmax(0, 1fr));
  gap: clamp(1.75rem, 4vw, 3.5rem);
  padding-bottom: clamp(2rem, 4vw, 3rem);
}

.footer__about { max-width: 42ch; }

.footer__about p {
  margin-top: 1rem;
  font-size: .9rem;
  line-height: 1.95;
  color: var(--muted);
}

.footer__heading {
  font-size: .92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 1.1rem;
}

.footer__links { display: flex; flex-direction: column; gap: .6rem; list-style: none; }

.footer__links a {
  font-size: .89rem;
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  gap: .45rem;
}

.footer__links a::before {
  content: '';
  width: 0;
  height: 1px;
  background: var(--brand-600);
  transition: width var(--t) var(--ease);
}

.footer__links a:hover { color: var(--brand-600); }
.footer__links a:hover::before { width: 12px; }

.footer__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding-block: 1.35rem;
  border-top: 1px solid var(--border);
}

.footer__copyright-text {
  font-size: .85rem;
  color: var(--muted);
  margin: 0;
}

.btn-back-top {
  position: fixed;
  inset-inline-end: 22px;
  bottom: 22px;
  z-index: 900;
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: all var(--t) var(--ease);
}

.btn-back-top.show { opacity: 1; visibility: visible; transform: translateY(0); }

.btn-back-top__link {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--brand-600);
  color: #fff;
  box-shadow: var(--sh-brand);
  transition: all var(--t) var(--ease);
}

.btn-back-top__link:hover { background: var(--brand-700); color: #fff; transform: translateY(-3px); }

/* --------------------------------------------------------------------------
   22. 404
   -------------------------------------------------------------------------- */
.page404 {
  display: grid;
  place-items: center;
  text-align: center;
  padding-block: clamp(3rem, 9vw, 7rem);
}

.page404__code {
  font-size: clamp(5rem, 4rem + 12vw, 11rem);
  font-weight: 700;
  line-height: 1;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--brand-500), var(--brand-800));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  margin-bottom: 1rem;
}

.page404__title { margin-bottom: .75rem; }
.page404__desc { color: var(--muted); max-width: 44ch; margin: 0 auto 2rem; }

.page404__actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: .75rem;
}

/* --------------------------------------------------------------------------
   23. Preloader & motion
   -------------------------------------------------------------------------- */
.loading {
  position: fixed;
  inset: 0;
  z-index: 3000;
  display: grid;
  place-items: center;
  background: var(--bg);
}

.loading__circle {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 3px solid var(--border-strong);
  border-top-color: var(--brand-600);
  animation: spin .8s linear infinite;
}

@keyframes spin { to { transform: rotate(360deg); } }

/* Content is visible by default; the scroll-in effect is opt-in and only
   applies once the head script has confirmed the reveal script will run.
   If anything goes wrong the page still shows every section. */
html.js-reveal .reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
}

/* `none`, not `translateY(0)`: any transform other than none makes the element
   a containing block for descendant position:fixed, which would size a nested
   modal against the card instead of the viewport. */
html.js-reveal .reveal.is-visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  html.js-reveal .reveal { opacity: 1; transform: none; }
}

/* --------------------------------------------------------------------------
   24. Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 1199.98px) {
  .header__navbar { display: none; }
  .navbar-toggler { display: block; }
  .header .social { display: none; }
}

@media (max-width: 991.98px) {
  :root { --header-h: 70px; }

  .about-band { grid-template-columns: 1fr; text-align: center; }
  .about-band__portrait { max-width: 220px; margin-inline: auto; }
  .about-band__text { margin-inline: auto; }
  .about-band__actions { justify-content: center; }

  .about-hero { grid-template-columns: 1fr; }
  .about-hero__portrait { max-width: 300px; margin-inline: auto; }
  .contact-grid { grid-template-columns: 1fr; }
  .footer__grid { grid-template-columns: 1fr 1fr; }
  .footer__about { grid-column: 1 / -1; max-width: none; }
  .side-sidebar > .theiaStickySidebar { position: static; }
  .side-sidebar { margin-top: 2.5rem; }
}

@media (max-width: 767.98px) {
  body { font-size: 15px; }

  .slider__item { min-height: 400px; }
  .post-card--wide { flex-direction: column; }
  .post-card--wide .post-card__image { flex: none; aspect-ratio: 16 / 10; }
  /* stacked head: keep the accent rule under the title instead of on the
     section's bottom border, where it would strike through the link */
  .section-head { align-items: flex-start; flex-direction: column; gap: .75rem; }
  .section-head__title { padding-bottom: .55rem; }
  .section-head__title::after { bottom: 0; }

  /* touch devices swipe the hero; the arrows only crowd the artwork */
  .hero-main .swiper-button-next,
  .hero-main .swiper-button-prev { display: none; }
  .brand__role { display: none; }
  .footer__grid { grid-template-columns: 1fr; }
  .footer__bar { justify-content: center; text-align: center; }
  .newsletter__form { flex-direction: column; border-radius: var(--r-lg); }
  .newsletter__input { padding: .75rem 1rem; text-align: center; }
  .newsletter__submit { width: 100%; }
  .post-single__footer { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 575.98px) {
  .gallery-container,
  .card-grid { grid-template-columns: 1fr; }
  .brand__name { font-size: 1rem; }
  .pagination__item { min-width: 38px; height: 38px; }
  .filter-bar { padding: 1rem; }
}
