/* ═══════════════════════════════════════════════════════════════════
   Kohistani.com — Design System
   Travel with Kohistani
   ═══════════════════════════════════════════════════════════════════ */

/* ── 1. Custom properties ────────────────────────────────────────── */

:root {
  /* ── Brand palette (matches motion-graphics package) ── */
  --brand-blue:        #0F67B1;   /* primary: buttons, brand elements */
  --brand-blue-rgb:    15, 103, 177;
  --primary-hover:     #2B8FE6;   /* bright blue: hover/active/focus; links on dark */
  --brand-gold:        #F5B700;   /* accent: small highlights/badges only — use sparingly */
  --brand-gold-rgb:    245, 183, 0;
  --danger:            #E0202C;   /* subscribe / YouTube-style CTA only */
  --brand-green:       #4CAF50;
  --brand-green-rgb:   76, 175, 80;

  /* ── Light mode surfaces ── */
  --surface-body:      #F8FAFC;   /* page body — cool off-white */
  --surface-section:   #EFF3F7;  /* alternating section backgrounds (.bg-surface) */
  --surface-card:      #FFFFFF;
  --surface-nav:       rgba(255, 255, 255, 0.93);
  --surface-input:     #FFFFFF;
  --surface-alt:       #F0F1F3;
  --surface-form-card: #FFFFFF;   /* comment/form card bg — matches other page cards */
  --surface-textarea:  #F0F1F3;  /* textarea inset bg — slightly grey to show depth */
  --surface-footer:    #0A1622;   /* brand deep navy — consistent with dark identity */

  /* ── Hero tokens (light mode — brand-blue gradient) ── */
  --hero-bg:             linear-gradient(135deg, #0D1B2A 0%, #0F67B1 55%, #1a3a6c 100%);
  --hero-fade:           #1a3a6c;
  --hero-text:           #ffffff;
  --hero-text-muted:     rgba(255,255,255,.75);
  --hero-text-faint:     rgba(255,255,255,.52);
  --hero-pill-bg:        rgba(255,255,255,.12);
  --hero-pill-border:    rgba(255,255,255,.20);
  --hero-pill-text:      rgba(255,255,255,.92);
  --hero-badge-bg:       rgba(255,255,255,.14);
  --hero-badge-border:   rgba(255,255,255,.22);
  --hero-badge-text:     rgba(255,255,255,.88);
  --hero-dot:            rgba(255,255,255,.06);

  /* ── Light mode text ── */
  --text-primary:      #1B3A5C;   /* dark navy — clearly blue, not pure black */
  --text-secondary:    #4E6277;   /* mid-tone navy-gray */
  --text-tertiary:     #8A9BB0;   /* brand --text-muted; captions, labels */
  --text-on-dark:      #FFFFFF;
  --text-on-brand:     #FFFFFF;

  /* ── Light mode borders ── */
  --border:            #E2E8F0;
  --border-strong:     #CBD5E1;

  /* ── Shadows ── */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.05);
  --shadow-sm:  0 1px 4px rgba(0,0,0,.08);
  --shadow-md:  0 4px 12px rgba(0,0,0,.10);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.12);
  --shadow-xl:  0 16px 48px rgba(0,0,0,.14);

  /* ── Radius ── */
  --radius-sm:   0.375rem;
  --radius-md:   0.5rem;
  --radius-lg:   0.75rem;
  --radius-xl:   1rem;
  --radius-pill: 9999px;

  /* ── Layout ── */
  --nav-height:   64px;
  --content-max:  1200px;
  --transition:   0.18s ease;
}

[data-bs-theme="dark"] {
  /* ── Surfaces — brand navy (not GitHub-dark) ── */
  --surface-body:      #0A1622;   /* brand --bg: page background */
  --surface-section:   #0A1622;  /* same as body — cards at #0D1B2A provide the elevation */
  --surface-card:      #0D1B2A;   /* brand --surface: cards & sections */
  --surface-nav:       rgba(10, 22, 34, 0.96);
  --surface-input:     #14253A;
  --surface-alt:       rgba(255,255,255,0.04);   /* subtle navy-lift, temperature-neutral */
  --surface-form-card: #0D1B2A;  /* same as card — input provides contrast in dark */
  --surface-textarea:  #14253A;  /* textarea bg — same as --surface-input, lighter than card */
  --surface-footer:  #060D14;   /* deeper than page bg */

  /* ── Text ── */
  --text-primary:    #E2EAF0;   /* cool off-white — not pure white on dark navy */
  --text-secondary:  #8A9BB0;   /* brand --text-muted */
  --text-tertiary:   #5C6F84;

  /* ── Borders — opacity-based on navy ── */
  --border:          rgba(255,255,255,0.08);
  --border-strong:   rgba(255,255,255,0.16);

  /* ── Shadows — heavier on dark navy ── */
  --shadow-xs:  0 1px 2px rgba(0,0,0,.35);
  --shadow-sm:  0 1px 4px rgba(0,0,0,.45);
  --shadow-md:  0 4px 12px rgba(0,0,0,.55);
  --shadow-lg:  0 8px 32px rgba(0,0,0,.65);
  --shadow-xl:  0 16px 48px rgba(0,0,0,.75);

  /* brand-blue stays #0F67B1 — use --primary-hover (#2B8FE6) for text links on dark */

  /* ── Hero tokens — deep brand navy ── */
  --hero-bg:           linear-gradient(135deg, #060D14 0%, #0A1622 45%, #0D1B2A 100%);
  --hero-fade:         #0A1622;
  --hero-text:         #ffffff;
  --hero-text-muted:   rgba(255,255,255,.72);
  --hero-text-faint:   rgba(255,255,255,.48);
  --hero-pill-bg:      rgba(255,255,255,.16);
  --hero-pill-border:  rgba(255,255,255,.24);
  --hero-pill-text:    rgba(255,255,255,.90);
  --hero-badge-bg:     rgba(255,255,255,.12);
  --hero-badge-border: rgba(255,255,255,.20);
  --hero-badge-text:   rgba(255,255,255,.85);
  --hero-dot:          rgba(255,255,255,.055);
}

/* ── 2. Bootstrap token overrides ───────────────────────────────── */

:root,
[data-bs-theme="light"] {
  --bs-primary:              var(--brand-blue);
  --bs-primary-rgb:          var(--brand-blue-rgb);
  --bs-body-bg:              var(--surface-body);
  --bs-body-color:           var(--text-primary);
  --bs-secondary-color:      var(--text-secondary);
  --bs-border-color:         var(--border);
  --bs-card-bg:              var(--surface-card);
  --bs-card-border-color:    var(--border);
  --bs-link-color:           var(--brand-blue);
  --bs-link-hover-color:     var(--primary-hover);
  --bs-input-bg:             var(--surface-input);
  --bs-input-border-color:   var(--border-strong);
}

[data-bs-theme="dark"] {
  --bs-primary:              var(--brand-blue);
  --bs-primary-rgb:          var(--brand-blue-rgb);
  --bs-body-bg:              var(--surface-body);
  --bs-body-color:           var(--text-primary);
  --bs-secondary-color:      var(--text-secondary);
  --bs-border-color:         var(--border);
  --bs-card-bg:              var(--surface-card);
  --bs-card-border-color:    var(--border);
  --bs-link-color:           var(--primary-hover);   /* #2B8FE6 — bright blue readable on navy */
  --bs-link-hover-color:     #4BA8F0;
  --bs-input-bg:             var(--surface-input);
  --bs-input-border-color:   var(--border);
  --bs-dropdown-bg:          var(--surface-alt);
  --bs-dropdown-border-color:var(--border);
  --bs-dropdown-link-color:  var(--text-primary);
  --bs-dropdown-link-hover-bg: rgba(255,255,255,.05);
}

/* ── 3. Base & typography ────────────────────────────────────────── */

*,
*::before,
*::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  font-size: 1.0625rem;
  line-height: 1.78;
  color: var(--text-primary);
  background-color: var(--surface-body);
  transition: background-color var(--transition), color var(--transition);
}

/* Display / editorial headings */
.display-title,
.hero-title,
h1.trip-title,
.section-display {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.12;
}

h1, h2, h3 {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.25;
  color: var(--text-primary);
}

h4, h5, h6 {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  line-height: 1.35;
  color: var(--text-primary);
}

p { margin-bottom: 1rem; }

a {
  color: var(--bs-link-color);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--bs-link-hover-color); text-decoration: none; }

/* Persian / RTL text */
.text-fa,
[lang="fa"],
[dir="rtl"] {
  font-family: 'Vazirmatn', 'Tahoma', 'Arial', sans-serif;
  direction: rtl;
  text-align: right;
}

/* ── 4. Navbar ───────────────────────────────────────────────────── */

.site-navbar {
  height: var(--nav-height);
  background: var(--surface-nav);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--border);
  box-shadow: var(--shadow-xs);
  transition: background var(--transition), border-color var(--transition);
  padding-top: 0;
  padding-bottom: 0;
}

/* Brand / logo */
.navbar-brand {
  text-decoration: none;
  padding: 0;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}
.brand-logo {
  height: 32px;
  width: auto;
  display: block;
  flex-shrink: 0;
}
.auth-card-brand .brand-logo { height: 52px; }
.footer-brand .brand-logo    { height: 28px; }
.brand-text {
  font-family: 'Cormorant Garamond', 'Georgia', serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: var(--brand-blue);
  letter-spacing: -0.04em;
  line-height: 1;
  transition: color var(--transition);
}
[data-bs-theme="dark"] .brand-text {
  color: var(--primary-hover);
}
.navbar-brand:hover {
  text-decoration: none;
}
.navbar-brand:hover .brand-text {
  opacity: 0.85;
}

/* Nav links */
.site-navbar .nav-link {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary) !important;
  padding: 0.45rem 0.7rem !important;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background-color var(--transition);
  letter-spacing: 0.01em;
}
.site-navbar .nav-link:hover {
  color: var(--brand-blue) !important;
  background-color: rgba(var(--brand-blue-rgb), 0.07);
  text-decoration: none;
}
.site-navbar .nav-link.active {
  color: var(--brand-blue) !important;
  background-color: rgba(var(--brand-blue-rgb), 0.10);
  font-weight: 600;
}
[data-bs-theme="dark"] .site-navbar .nav-link:hover,
[data-bs-theme="dark"] .site-navbar .nav-link.active {
  color: var(--primary-hover) !important;
  background-color: rgba(255,255,255,.06);
}

/* Right-side controls */
.btn-nav {
  font-size: 0.8125rem;
  font-weight: 500;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-primary);
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.btn-nav:hover {
  background: rgba(var(--brand-blue-rgb), 0.08);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
[data-bs-theme="dark"] .btn-nav {
  color: var(--text-primary);
}
[data-bs-theme="dark"] .btn-nav:hover {
  background: rgba(43,143,230,.14);
  border-color: var(--primary-hover);
  color: var(--primary-hover);
}

/* Navbar toggler */
.navbar-toggler { border: 1px solid var(--border); }
.navbar-toggler:focus { box-shadow: none; }

/* ── Mobile drawer ──────────────────────────────────────────────── */

/* Body lock when drawer open */
body.mob-nav-open { overflow: hidden; }

/* Backdrop (hidden — full-page drawer covers everything) */
.mob-backdrop { display: none !important; }

/* Drawer panel — mobile only */
@media (min-width: 992px) {
  .mob-drawer,
  .mob-backdrop { display: none !important; }
}

.mob-drawer {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100dvh;
  background: var(--surface-card);
  z-index: 1050;
  display: flex;
  flex-direction: column;
  transform: translateX(-100%);
  transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  will-change: transform;
  overflow: hidden;
}
.mob-drawer--open {
  transform: translateX(0);
}

/* RTL: drawer slides in from the right */
[dir="rtl"] .mob-drawer {
  left: auto;
  right: 0;
  transform: translateX(100%);
}
[dir="rtl"] .mob-drawer--open {
  transform: translateX(0);
}

/* Drawer header */
.mob-drawer-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 1.5rem;
  border-bottom: 1px solid var(--border);
  min-height: var(--nav-height);
  flex-shrink: 0;
}
.mob-drawer-close {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1.2rem;
  padding: 0.4rem;
  cursor: pointer;
  border-radius: var(--radius-sm);
  line-height: 1;
  transition: color var(--transition), background var(--transition);
}
.mob-drawer-close:hover {
  color: var(--text-primary);
  background: rgba(var(--brand-blue-rgb), 0.08);
}

/* Nav links section */
.mob-drawer-nav {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
}

/* Individual drawer links */
.mob-drawer-link {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 1rem;
  border-radius: var(--radius-md);
  font-family: 'Inter', sans-serif;
  font-size: 1.05rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: background var(--transition), color var(--transition);
}
.mob-drawer-link i {
  font-size: 1.2rem;
  width: 1.5rem;
  text-align: center;
  color: var(--text-secondary);
  flex-shrink: 0;
  transition: color var(--transition);
}
.mob-drawer-link:hover {
  background: rgba(var(--brand-blue-rgb), 0.07);
  color: var(--brand-blue);
  text-decoration: none;
}
.mob-drawer-link:hover i { color: var(--brand-blue); }
.mob-drawer-link--active {
  background: rgba(var(--brand-blue-rgb), 0.10);
  color: var(--brand-blue);
  font-weight: 600;
}
.mob-drawer-link--active i { color: var(--brand-blue); }
.mob-drawer-link--danger { color: var(--danger); }
.mob-drawer-link--danger i { color: var(--danger); }
.mob-drawer-link--danger:hover { background: rgba(224,32,44,.08); color: var(--danger); }

[data-bs-theme="dark"] .mob-drawer-link:hover,
[data-bs-theme="dark"] .mob-drawer-link--active {
  color: var(--primary-hover);
}
[data-bs-theme="dark"] .mob-drawer-link:hover i,
[data-bs-theme="dark"] .mob-drawer-link--active i {
  color: var(--primary-hover);
}
[data-bs-theme="dark"] .mob-drawer-link--active {
  background: rgba(43,143,230,.12);
}

/* Drawer footer */
.mob-drawer-foot {
  border-top: 1px solid var(--border);
  padding: 1.25rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  flex-shrink: 0;
}
/* ── Mobile drawer user row ──────────────────────────────────────── */
.mob-user-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem .75rem;
  border-radius: .5rem;
  background: var(--surface-alt);
}
.mob-user-row-info {
  display: flex;
  align-items: center;
  gap: .6rem;
  position: relative;
  min-width: 0;
}
.mob-user-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-size: .8rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.mob-user-name {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.nav-notif-badge--user {
  position: static;
  flex-shrink: 0;
}
.mob-user-menu-btn {
  background: none;
  border: none;
  color: var(--text-secondary);
  font-size: 1rem;
  padding: .3rem .45rem;
  border-radius: .35rem;
  cursor: pointer;
  flex-shrink: 0;
  transition: background var(--transition), color var(--transition);
}
.mob-user-menu-btn:hover {
  background: var(--border);
  color: var(--text-primary);
}
.mob-user-menu {
  border-radius: .45rem;
  overflow: hidden;
  border: 1px solid var(--border);
}
.mob-user-menu-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem .875rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: .875rem;
  font-weight: 500;
  transition: background var(--transition);
}
.mob-user-menu-item + .mob-user-menu-item { border-top: 1px solid var(--border); }
.mob-user-menu-item:hover { background: var(--surface-alt); }
.mob-user-menu-item i { font-size: 1rem; color: var(--text-secondary); width: 1.1rem; text-align: center; flex-shrink: 0; }
.mob-user-menu-item--danger,
.mob-user-menu-item--danger i { color: var(--danger) !important; }
.mob-user-menu-item--danger:hover { background: rgba(224,32,44,.06); }
/* ───────────────────────────────────────────────────────────────── */

.mob-drawer-controls {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.25rem;
}

/* ── Navbar search ───────────────────────────────────────────────── */

.nav-search {
  position: relative;
  flex: 1;
  max-width: 420px;
}
.nav-search-wrap {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  height: 36px;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0 0.9rem;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.nav-search-wrap:focus-within,
.nav-search-wrap.is-focused {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(15,103,177,.12);
}
.nav-search-icon {
  color: var(--text-secondary);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.nav-search-input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-family: 'Inter', sans-serif;
  outline: none;
  width: 100%;
  min-width: 0;
  -webkit-appearance: none;
}
.nav-search-input::placeholder { color: var(--text-tertiary); }
.nav-search-input::-webkit-search-cancel-button { -webkit-appearance: none; }

.nav-search-dropdown {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: 0 12px 32px rgba(0,0,0,.22);
  z-index: 1100;
  overflow: hidden;
  min-width: 340px;
  padding: 4px 0;
}

/* "Search for…" row — sits above a divider */
.nav-search-item:first-child {
  margin-bottom: 4px;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--border);
}

/* Each row */
.nav-search-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  padding: 0.5rem 1rem;
  cursor: pointer;
  color: var(--text-primary);
  transition: background var(--transition);
  text-decoration: none;
}
.nav-search-item:hover,
.nav-search-item--active { background: var(--surface-alt); }

/* Thumbnail box — fixed 16:9 at 62×35 px */
.nav-search-thumb {
  flex-shrink: 0;
  width: 62px;
  height: 35px;
  border-radius: 5px;
  overflow: hidden;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 1rem;
}
/* Raw "Search" row: no box background, just the icon */
.nav-search-thumb--raw {
  background: transparent;
  font-size: 1.15rem;
  color: var(--text-secondary);
}
/* Country flag: no box background needed — emoji fills it */
.nav-search-thumb:has(.nav-search-thumb-flag) {
  background: transparent;
}
.nav-search-thumb-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-search-thumb-flag {
  font-size: 1.6rem;
  line-height: 1;
  user-select: none;
}

/* Title — truncated, slightly larger for readability */
.nav-search-item-title {
  flex: 1;
  min-width: 0;
  font-size: 0.855rem;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Type badge — right side pill */
.nav-search-type-badge {
  flex-shrink: 0;
  font-size: 0.685rem;
  font-weight: 500;
  letter-spacing: 0.02em;
  color: var(--text-tertiary);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  padding: 2px 8px;
  border-radius: 999px;
  white-space: nowrap;
}
.nav-search-item--active .nav-search-type-badge,
.nav-search-item:hover .nav-search-type-badge {
  background: var(--surface-card);
}

/* Mobile search icon button */
.nav-search-icon-btn {
  width: 34px;
  height: 34px;
  padding: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Drawer search */
.mob-drawer-search {
  position: relative;
  padding: 0.875rem 1.25rem 0.25rem;
  flex-shrink: 0;
}
.mob-drawer-search .nav-search-wrap {
  border-radius: var(--radius-md);
  height: 42px;
}
.mob-drawer-search .nav-search-input { font-size: 0.9375rem; }
.nav-search-dropdown--drawer {
  position: static;
  box-shadow: none;
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  margin-top: -1px;
}

/* Dropdown menus */
.dropdown-menu {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-md);
  padding: 0.375rem;
  font-size: 0.875rem;
}
.dropdown-item {
  border-radius: var(--radius-sm);
  padding: 0.45rem 0.75rem;
  color: var(--text-primary);
  font-weight: 500;
  transition: background var(--transition);
}
.dropdown-item:hover, .dropdown-item:focus {
  background: rgba(var(--brand-blue-rgb), 0.08);
  color: var(--brand-blue);
}
[data-bs-theme="dark"] .dropdown-item:hover {
  background: rgba(43,143,230,.10);
  color: var(--primary-hover);
}
.dropdown-divider { border-color: var(--border); margin: 0.25rem 0; }

/* ── 5. Hero ─────────────────────────────────────────────────────── */

.site-hero {
  position: relative;
  min-height: 52svh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background-color: #0a1628;
}

.site-hero .hero-bg {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1.03);
  transition: transform 8s ease;
}
.site-hero:hover .hero-bg { transform: scale(1.0); }

.site-hero .hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(10,22,40,.20)  0%,
    rgba(10,22,40,.55) 40%,
    rgba(10,22,40,.80) 100%
  );
}

.site-hero .hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem 1rem;
  max-width: 800px;
  width: 100%;
}

.hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(3.5rem, 10vw, 6.5rem);
  font-weight: 700;
  color: #ffffff;
  line-height: 1.0;
  letter-spacing: -0.03em;
  margin-bottom: 0.75rem;
}

.hero-tagline {
  font-family: 'Inter', sans-serif;
  font-size: clamp(1.05rem, 2.5vw, 1.25rem);
  font-weight: 500;
  color: var(--brand-gold);
  letter-spacing: 0.01em;
  margin-bottom: 1rem;
}

.hero-subtitle {
  font-size: clamp(0.9375rem, 2vw, 1.0625rem);
  color: rgba(255,255,255,.70);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}

.hero-stats {
  display: flex;
  justify-content: center;
  gap: 2rem;
  margin-top: 2.5rem;
  flex-wrap: wrap;
}
.hero-stat {
  text-align: center;
  color: rgba(255,255,255,.75);
  font-size: 0.8125rem;
  font-weight: 500;
  letter-spacing: 0.03em;
}
.hero-stat strong {
  display: block;
  font-size: 1.4rem;
  font-weight: 700;
  color: #fff;
  font-family: 'Cormorant Garamond', Georgia, serif;
  line-height: 1;
  margin-bottom: 0.2rem;
}

/* Gradient-only hero (before real photo is set) */
.site-hero.hero-gradient .hero-bg {
  background: linear-gradient(135deg,
    #061428 0%,
    #0d2d5a 30%,
    #0F67B1 65%,
    #0a3d6e 100%
  );
  transform: none;
}

/* ── 6. Section utilities ─────────────────────────────────────────── */

.section { padding: 5rem 0; }
.section-sm { padding: 3rem 0; }
.section-lg { padding: 7rem 0; }

.section-header { margin-bottom: 2.5rem; }
.section-label {
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--brand-blue);
  display: block;
  margin-bottom: 0.5rem;
}
[data-bs-theme="dark"] .section-label { color: var(--primary-hover); }

.section-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
  letter-spacing: -0.02em;
  margin-bottom: 0.75rem;
}

.section-desc {
  color: var(--text-secondary);
  font-size: 1.0625rem;
  max-width: 540px;
  line-height: 1.65;
}

/* ── Channel page ────────────────────────────────────────────────── */

.ch-main { padding-bottom: 3rem; }

/* Banner */
.ch-banner {
  height: 160px;
  background: linear-gradient(135deg, #0a1628 0%, #0F67B1 60%, #0a2444 100%);
  overflow: hidden;
}
@media (min-width: 768px) { .ch-banner { height: 200px; } }

/* Info row */
.ch-info {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
}
.ch-info-inner {
  display: flex;
  align-items: flex-start;
  gap: 1.5rem;
  padding: 1.25rem 1.5rem 1rem;
  max-width: 1280px;
  margin: 0 auto;
}
.ch-avatar-wrap {
  flex-shrink: 0;
  width: 136px;
  height: 136px;
  border-radius: 50%;
  background: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 4px solid var(--surface-body);
  margin-top: -68px;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
}
.ch-avatar-img { width: 90px; height: 90px; object-fit: contain; }
.ch-details {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  padding-top: 0.15rem;
}
.ch-name {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 0;
  color: var(--text-primary);
  line-height: 1.25;
}
.ch-name-fa {
  font-size: 0.9em;
  font-weight: 500;
  opacity: 0.7;
}
.ch-handle-meta {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.ch-meta-sep { opacity: 0.4; }
.ch-subscribe-btn {
  background: var(--text-primary);
  color: var(--surface-body);
  border: none;
  border-radius: var(--radius-pill);
  padding: 0.45rem 1.25rem;
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  white-space: nowrap;
  transition: opacity 0.15s;
}
.ch-subscribe-btn:hover { opacity: 0.85; color: var(--surface-body); }
.ch-actions { margin-top: 0.1rem; }

/* About inline (inside ch-details column) */
.ch-about-inline {
  display: flex;
  align-items: baseline;
  gap: 0.25rem;
}
.ch-about-preview {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
  flex: 1;
  min-width: 0;
}
.ch-about-more {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
}
.ch-about-more:hover { text-decoration: underline; }

/* Links row */
.ch-links-row { margin: 0; }
.ch-links-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  color: var(--brand-blue);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
}
.ch-links-btn:hover { text-decoration: underline; }
@media (max-width: 600px) {
  .ch-info-inner { flex-wrap: wrap; }
  .ch-avatar-wrap { width: 96px; height: 96px; margin-top: -48px; }
  .ch-avatar-img  { width: 64px; height: 64px; }
  .ch-name        { font-size: 1.2rem; }
}

/* About modal */
.ch-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.6);
  z-index: 1050;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}
.ch-modal {
  background: var(--surface-card);
  border-radius: 14px;
  width: 100%;
  max-width: 540px;
  max-height: 85vh;
  overflow-y: auto;
  box-shadow: 0 8px 40px rgba(0,0,0,.35);
  transform: translateY(0);
  transition: transform 0.2s ease;
}
.ch-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem 1.25rem 0.75rem;
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  background: var(--surface-card);
  border-radius: 14px 14px 0 0;
}
.ch-modal-channel-name {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
}
.ch-modal-close {
  background: none;
  border: none;
  padding: 0.35rem;
  cursor: pointer;
  color: var(--text-secondary);
  border-radius: 50%;
  line-height: 1;
  transition: background var(--transition);
}
.ch-modal-close:hover { background: var(--surface-alt); color: var(--text-primary); }
.ch-modal-body {
  padding: 1.25rem;
  font-size: 0.9rem;
  color: var(--text-primary);
  line-height: 1.7;
}
.ch-modal-body p { margin: 0 0 0.75rem; }
.ch-modal-section-title {
  font-size: 0.875rem;
  font-weight: 700;
  margin: 1rem 0 0.6rem;
  color: var(--text-primary);
}
.ch-modal-section-title:first-child { margin-top: 0; }

/* Links section */
.ch-modal-links { display: flex; flex-direction: column; gap: 0.75rem; }
.ch-modal-link {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  text-decoration: none;
  color: var(--text-primary);
}
.ch-modal-link:hover .ch-modal-link-label { text-decoration: underline; }
.ch-modal-link-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  color: var(--text-primary);
}
.ch-modal-link-icon--fb { background: #1877f2; color: #fff; }
.ch-modal-link-icon--ig { background: radial-gradient(circle at 30% 107%, #fdf497 0%, #fdf497 5%, #fd5949 45%, #d6249f 60%, #285AEB 90%); color: #fff; }
.ch-modal-link-icon--tt { background: #010101; color: #fff; }
.ch-modal-link-text { display: flex; flex-direction: column; }
.ch-modal-link-label { font-size: 0.875rem; font-weight: 600; color: var(--text-primary); }
.ch-modal-link-url   { font-size: 0.775rem; color: var(--text-secondary); }

/* More info section */
.ch-modal-more-info { display: flex; flex-direction: column; gap: 0.6rem; }
.ch-modal-info-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
}
.ch-modal-info-icon {
  font-size: 1.1rem;
  color: var(--text-secondary);
  width: 20px;
  flex-shrink: 0;
}

/* Sort tabs (inside Videos tab) */
.yt-sort-tabs {
  display: flex;
  gap: 0.5rem;
  padding: 0.75rem 1.5rem;
  flex-wrap: wrap;
}
.yt-sort-tab {
  display: inline-flex;
  align-items: center;
  padding: 0.35rem 1rem;
  border-radius: 8px;
  font-size: 0.8125rem;
  font-weight: 600;
  text-decoration: none;
  background: var(--surface-alt);
  color: var(--text-primary);
  border: none;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
}
.yt-sort-tab:hover  { background: var(--border-strong); color: var(--text-primary); }
.yt-sort-tab.active { background: var(--text-primary);  color: var(--surface-body); }

/* Tab bar */
.ch-tabs {
  border-bottom: 1px solid var(--border);
  background: var(--surface-card);
  position: sticky;
  top: var(--nav-height);
  z-index: 90;
  /* No overflow here — keeps the suggest dropdown unclipped */
}
.ch-tabs-inner {
  display: flex;
  align-items: stretch;
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 0.5rem 0 1.5rem;
}
/* Scrollable tab links — overflow lives here, not on .ch-tabs */
.ch-tabs-scroll {
  display: flex;
  align-items: stretch;
  /* No flex:1 — lets it size to content so search sits right after Posts */
  overflow-x: auto;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.ch-tabs-scroll::-webkit-scrollbar { display: none; }
.ch-tab {
  display: inline-flex;
  align-items: center;
  padding: 0 1rem;
  height: 48px;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-secondary);
  text-decoration: none;
  border-bottom: 3px solid transparent;
  white-space: nowrap;
  transition: color var(--transition), border-color var(--transition);
  margin-bottom: -1px;
}
.ch-tab:hover { color: var(--text-primary); }
.ch-tab.active {
  color: var(--text-primary);
  border-bottom-color: var(--text-primary);
}

/* Tab bar inline search */
.ch-tab-search-inline {
  display: flex;
  align-items: center;
  padding: 0 0.5rem;
  position: relative;
}
.ch-tab-search-inline-wrap {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  height: 32px;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--surface-alt);
  padding: 0 0.6rem;
  transition: border-color var(--transition);
}
.ch-tab-search-inline-wrap:focus-within { border-color: var(--brand-blue); }
.ch-tab-search-inline-icon {
  color: var(--text-secondary);
  font-size: 0.8rem;
  flex-shrink: 0;
}
.ch-tab-search-inline-input {
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-size: 0.8125rem;
  outline: none;
  width: 240px;
  -webkit-appearance: none;
}
.ch-tab-search-inline-input::placeholder { color: var(--text-tertiary); }
.ch-tab-search-inline-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Suggestions dropdown */
.ch-tab-suggest-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 100%;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 6px;
  box-shadow: 0 6px 24px rgba(0,0,0,.22);
  z-index: 200;
  overflow: hidden;
}
.ch-tab-suggest-item {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  cursor: pointer;
  font-size: 0.875rem;
  color: var(--text-primary);
  transition: background var(--transition);
}
.ch-tab-suggest-item:hover,
.ch-tab-suggest-item--active { background: var(--surface-alt); }
.ch-tab-suggest-icon { color: var(--text-secondary); font-size: 0.75rem; flex-shrink: 0; }

/* Responsive */
@media (max-width: 900px)  { .ch-tab-search-inline-input { width: 160px; } }
@media (max-width: 600px)  { .ch-tab-search-inline-input { width: 100px; } }
@media (max-width: 420px)  { .ch-tab-search-inline-input { width: 70px; } }

/* Content area (Home / Playlists / Posts) */
.ch-content {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 1.5rem;
}
.ch-videos-outer {
  max-width: 1280px;
  margin: 0 auto;
}

.ch-section-title {
  font-size: 1.0625rem;
  font-weight: 600;
  padding: 1.5rem 0 0.75rem;
  margin: 0;
  color: var(--text-primary);
}

/* Shelf */
.yt-shelf {
  padding: 1.5rem 0 0.5rem;
}
.yt-shelf-title {
  font-size: 1.0625rem;
  font-weight: 600;
  margin: 0 0 1rem;
  color: var(--text-primary);
}
.yt-shelf-outer {
  overflow-x: auto;
  scrollbar-width: thin;
  padding-bottom: 0.5rem;
}
.yt-shelf-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0.5rem;
  min-width: 0;
}
/* On wide screens show more shelf cards; below 860px switch to fixed-width horizontal scroll */
@media (min-width: 1280px) { .yt-shelf-row { grid-template-columns: repeat(4, 1fr); } }
@media (max-width: 860px)  { .yt-shelf-row { grid-template-columns: repeat(4, 240px); } }
@media (max-width: 600px)  { .yt-shelf-row { grid-template-columns: repeat(2, 200px); } }
.yt-shelf-more {
  margin-top: 1rem;
  display: flex;
  justify-content: flex-start;
}

/* Playlist grid */
.ch-playlist-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding: 1rem 0;
}
.ch-playlist-grid--lg {
  padding-top: 0;
}
/* ch-content constrains to 1280px so 4 columns is the max on Home */
@media (max-width: 900px)  { .ch-playlist-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px)  { .ch-playlist-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 400px)  { .ch-playlist-grid { grid-template-columns: 1fr; } }
/* Full-width Playlists tab on large screens: same 5-col as Videos grid */
@media (min-width: 1600px) { .ch-playlist-grid--lg { grid-template-columns: repeat(5, 1fr); } }

.ch-pl-card {
  display: flex;
  flex-direction: column;
  /* Grid item: 1fr === minmax(auto,1fr), whose `auto` floor is this card's
     min-content width. The nowrap .ch-pl-tagline gives each card a different
     min-content, so without this the 1fr columns end up UNEQUAL widths and the
     16:9 thumbnails (height derived from width) render at different heights.
     min-width:0 collapses the floor to 0 → truly equal columns everywhere. */
  min-width: 0;
  color: var(--text-primary);
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 8px;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
.ch-pl-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.ch-pl-thumb {
  position: relative;
  border-radius: 6px;
  overflow: hidden;
  padding-top: 56.25%; /* 16:9 — padding-top % always resolves to the element's own width */
  flex-shrink: 0;
  background: #0A1622;
}
.ch-pl-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.ch-pl-card:hover .ch-pl-thumb img { transform: scale(1.06); }
.ch-pl-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.35);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s;
}
.ch-pl-card:hover .ch-pl-overlay { opacity: 1; }
.ch-pl-play {
  font-size: 2.5rem;
  color: #fff;
  filter: drop-shadow(0 2px 6px rgba(0,0,0,.5));
}
.ch-pl-count {
  position: absolute;
  bottom: 0;
  right: 0;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.25rem 0.55rem;
  border-top-left-radius: 6px;
}
.ch-pl-info { padding: 0.5rem 0.2rem 0.2rem; flex: 1; min-width: 0; }
.ch-pl-title {
  font-size: 0.875rem;
  font-weight: 600;
  margin: 0 0 0.1rem;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.ch-pl-tagline {
  font-size: 0.75rem;
  color: var(--text-secondary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── 7. Cards ────────────────────────────────────────────────────── */

/* Trip card */
.trip-card {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  display: block;
}
.trip-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-lg);
  border-color: var(--border-strong);
  text-decoration: none;
}

.trip-card-img {
  position: relative;
  height: 220px;
  background-size: cover;
  background-position: center;
  background-color: #1a2535;
}
.trip-card-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.6) 0%, transparent 60%);
}

.trip-card-meta {
  position: absolute;
  bottom: 0.75rem;
  left: 0.75rem;
  right: 0.75rem;
  z-index: 2;
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
}
.trip-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.55rem;
  border-radius: var(--radius-pill);
  background: rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  color: #fff;
  letter-spacing: 0.03em;
}

.trip-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
}
.trip-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.3;
  margin-bottom: 0.35rem;
  letter-spacing: -0.01em;
}
.trip-card-tagline {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}
.trip-card-flags {
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.trip-card-flags .fi { font-size: 1.1rem; border-radius: 2px; }
.trip-flag-more {
  font-size: 0.7rem;
  font-weight: 600;
  color: var(--text-secondary);
  background: var(--surface-alt);
  border-radius: var(--radius-pill);
  padding: 0.05rem 0.45rem;
}

/* Video card */
/* ── Filter chips (YouTube-style horizontal scroll row) ──────── */

.filter-chips-outer {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  border-bottom: 1px solid var(--border);
  padding: 0.6rem 0;
}
.filter-chips-outer::-webkit-scrollbar { display: none; }
.filter-chips {
  display: flex;
  gap: 0.5rem;
  white-space: nowrap;
}
.filter-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.85rem;
  border-radius: var(--radius-pill);
  font-size: 0.8125rem;
  font-weight: 500;
  text-decoration: none;
  background: var(--surface-alt);
  color: var(--text-primary);
  border: none;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  flex-shrink: 0;
}
.filter-chip:hover   { background: var(--border-strong); color: var(--text-primary); text-decoration: none; }
.filter-chip.active  { background: var(--text-primary); color: var(--surface-body); }
.filter-chips-sep {
  width: 1px;
  background: var(--border);
  margin: 0 0.25rem;
  flex-shrink: 0;
}
.filter-select-sm {
  font-size: 0.8125rem;
  font-weight: 500;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-pill);
  padding: 0.25rem 0.75rem;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 1.5rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6' viewBox='0 0 10 6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%23999'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}
.filter-select-sm:focus { outline: none; border-color: var(--brand-blue); }

/* ── Video search (YouTube-style) ───────────────────────────── */

.vs-outer {
  padding: 1.25rem 1.25rem 0.25rem;
}

.filter-chips--full {
  padding: 0 1.25rem;
}

.yt-sort-row {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  justify-content: flex-end;
  padding: 0.35rem 1.25rem;
  margin-bottom: 0.25rem;
}

.yt-videos-section {
  padding: 0 0.75rem 0;
}

.video-watch-outer {
  padding: 1.5rem 1.5rem 3rem;
  max-width: 1800px;
  margin: 0 auto;
}
@media (max-width: 767px) {
  .video-watch-outer {
    padding: 0 0 2rem;
  }
}

/* Search bar row: input + button side by side */
.vs-bar {
  display: flex;
  align-items: stretch;
  max-width: 680px;
  margin: 0 auto;
  height: 44px;
}

/* Input wrapper — holds the input, clear btn, and dropdown */
.vs-input-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.vs-input {
  width: 100%;
  height: 100%;
  padding: 0 2.75rem 0 1rem;
  border: 1px solid var(--border-strong);
  border-right: none;
  border-radius: 2.5rem 0 0 2.5rem;
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-family: inherit;
  transition: border-color 0.15s ease;
  -webkit-appearance: none;
}
[dir="rtl"] .vs-input {
  border-right: 1px solid var(--border-strong);
  border-left: none;
  border-radius: 0 2.5rem 2.5rem 0;
  padding: 0 1rem 0 2.75rem;
}
.vs-input:focus { outline: none; border-color: var(--brand-blue); }
.vs-input::placeholder { color: var(--text-tertiary); }
.vs-input::-webkit-search-cancel-button { -webkit-appearance: none; }

/* Focus border propagates to button via sibling-aware wrapper */
.vs-bar:focus-within .vs-input  { border-color: var(--brand-blue); }
.vs-bar:focus-within .vs-btn    { border-color: var(--brand-blue); }

/* Inline clear × button */
.vs-clear {
  position: absolute;
  right: 0.6rem;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 1.6rem;
  height: 1.6rem;
  border-radius: 50%;
  border: none;
  background: transparent;
  color: var(--text-secondary);
  font-size: 0.7rem;
  cursor: pointer;
  padding: 0;
  transition: background var(--transition), color var(--transition);
}
.vs-clear:hover { background: var(--surface-alt); color: var(--text-primary); }
[dir="rtl"] .vs-clear { right: auto; left: 0.6rem; }

/* Search button */
.vs-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 66px;
  flex-shrink: 0;
  border: 1px solid var(--border-strong);
  border-left: 1px solid var(--border);
  border-radius: 0 2.5rem 2.5rem 0;
  background: var(--surface-alt);
  color: var(--text-primary);
  font-size: 1rem;
  cursor: pointer;
  transition: background var(--transition), border-color 0.15s ease;
}
[dir="rtl"] .vs-btn {
  border-left: 1px solid var(--border-strong);
  border-right: 1px solid var(--border);
  border-radius: 2.5rem 0 0 2.5rem;
}
.vs-btn:hover { background: var(--border); }

/* Suggestions dropdown */
.vs-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-lg);
  z-index: 200;
  overflow: hidden;
}

.vs-suggestion {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  cursor: pointer;
  transition: background 0.1s ease;
  user-select: none;
}
.vs-suggestion:hover     { background: var(--surface-section); }
.vs-suggestion--active   { background: var(--surface-alt); }
[data-bs-theme="dark"] .vs-suggestion:hover   { background: rgba(255,255,255,.05); }
[data-bs-theme="dark"] .vs-suggestion--active { background: rgba(255,255,255,.09); }

.vs-suggestion-icon {
  font-size: 0.8rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
}
.vs-suggestion-text {
  font-size: 0.875rem;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Result hint line */
.vs-hint {
  max-width: 680px;
  margin: 0.4rem auto 0;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding-left: 0.25rem;
}
.vs-hint-clear {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.75rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  padding: 0.1rem 0.55rem;
  transition: background var(--transition), color var(--transition);
}
.vs-hint-clear:hover { background: var(--surface-alt); color: var(--text-primary); }

/* ── YouTube-style video grid ────────────────────────────────── */

.yt-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  padding-top: 1rem;
}

.yt-card {
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 8px;
  transition: background 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}
.yt-card:hover {
  background: var(--surface-card);
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
}

[data-bs-theme="dark"] .yt-card:hover {
  background: var(--surface-card);
  border-color: rgba(255,255,255,.16);
  box-shadow: var(--shadow-md);
}

.yt-thumb-link { display: block; text-decoration: none; }

.yt-thumb {
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: #0A1622;
  aspect-ratio: 16/9;
}

/* Dark overlay fades in on hover (kohistanimedia-style) */
.yt-thumb::after {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity 0.25s ease;
  pointer-events: none;
}
.yt-card:hover .yt-thumb::after { opacity: 1; }

.yt-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}
.yt-card:hover .yt-thumb img { transform: scale(1.07); }

.yt-info {
  padding: 0.55rem 0.1rem 0.1rem;
  flex: 1;
}
.yt-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: -0.01em;
  margin: 0 0 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.yt-title a { color: inherit; text-decoration: none; }
.yt-title a:hover { color: var(--text-primary); }

.yt-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.3rem;
  flex-wrap: wrap;
}
.yt-meta-trip { font-weight: 500; }
.yt-meta-sep  { opacity: 0.5; }

/* Duration / premium badges (shared between grid and watch page) */
.video-duration {
  position: absolute;
  bottom: 0.4rem;
  right: 0.4rem;
  background: rgba(0,0,0,.82);
  color: #fff;
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.12rem 0.4rem;
  border-radius: 4px;
  letter-spacing: 0.03em;
  font-variant-numeric: tabular-nums;
}

.video-premium-badge {
  position: absolute;
  top: 0.4rem;
  left: 0.4rem;
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  background: var(--brand-gold);
  color: #000;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.18rem 0.5rem;
  border-radius: var(--radius-pill);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

/* Grid responsive — container capped at 1280px so 4 cols is the max */
@media (max-width: 1280px) { .yt-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 800px)  { .yt-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px)  { .yt-grid { grid-template-columns: 1fr; } }

/* ── Home page Shorts row — vertical (9:16) cards ─────────────────────── */
.shorts-home-row {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 0.75rem;
}
.shorts-home-card {
  display: block;
  text-decoration: none;
  color: inherit;
}
.shorts-home-card:hover { color: inherit; }
.shorts-home-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: #111;
  margin-bottom: 0.5rem;
}
.shorts-home-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.shorts-home-card:hover .shorts-home-thumb img { transform: scale(1.05); }
.shorts-home-badge {
  position: absolute;
  bottom: 0.4rem;
  left: 0.4rem;
  background: rgba(0,0,0,.72);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  gap: 3px;
  letter-spacing: .02em;
}
.shorts-home-title {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shorts-home-views {
  font-size: 0.72rem;
  color: var(--text-muted-2, #888);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 0.25rem;
}
@media (max-width: 991px) {
  .shorts-home-row { grid-template-columns: repeat(3, 1fr); }
}
@media (max-width: 575px) {
  .shorts-home-row {
    display: flex;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
    margin: 0 -1rem;
    padding: 0 1rem 0.75rem;
    gap: 0.65rem;
  }
  .shorts-home-row::-webkit-scrollbar { display: none; }
  .shorts-home-card {
    flex: 0 0 42vw;
    scroll-snap-align: start;
  }
}

/* Infinite scroll sentinel + spinner */
#yt-sentinel {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 2rem 0 3rem;
  min-height: 80px;
}
.yt-spinner {
  display: none;
  width: 30px;
  height: 30px;
  border: 3px solid var(--border);
  border-top-color: var(--brand-blue);
  border-radius: 50%;
  animation: yt-spin 0.7s linear infinite;
}
.yt-sentinel--loading .yt-spinner { display: block; }
@keyframes yt-spin { to { transform: rotate(360deg); } }

/* Legacy video-card (kept for any other pages that might use it) */
.video-card { background: transparent; }
.video-thumb-wrap {
  position: relative;
  overflow: hidden;
  background: #0A1622;
  border-radius: 12px;
}
.video-thumb-wrap img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.video-card-body { padding: 0.6rem 0.1rem 0; }
.video-card-title {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.video-card-title a { color: inherit; text-decoration: none; }
.video-card-meta {
  font-size: 0.75rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

/* Story card */
.story-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.story-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}

.story-card-img {
  height: 200px;
  background-size: cover;
  background-position: center;
  background-color: #1a2535;
}
.story-card-body { padding: 1.25rem; }
.story-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  line-height: 1.3;
}
.story-card-title a { color: inherit; text-decoration: none; }
.story-card-title a:hover { color: var(--brand-blue); }

/* Stories listing */
.stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1.75rem;
}
.story-card--featured {
  border-color: color-mix(in srgb, var(--brand-blue) 40%, var(--border));
  box-shadow: 0 0 0 1px color-mix(in srgb, var(--brand-blue) 20%, transparent), var(--shadow-sm);
}
/* Make featured card span full width when it's the only or first card in the grid */
@media (min-width: 768px) {
  .stories-grid .story-card--featured:first-child {
    grid-column: 1 / -1;
    flex-direction: row;
  }
  .stories-grid .story-card--featured:first-child .story-card-thumb {
    aspect-ratio: unset;
    width: 45%;
    flex-shrink: 0;
  }
  .stories-grid .story-card--featured:first-child .story-card-body {
    padding: 2rem;
  }
  .stories-grid .story-card--featured:first-child .story-card-title {
    font-size: 1.6rem;
    line-height: 1.2;
  }
  .stories-grid .story-card--featured:first-child .story-card-excerpt {
    -webkit-line-clamp: 4;
    font-size: .92rem;
  }
}
.story-card--draft {
  opacity: .75;
  border-style: dashed;
  border-color: rgba(255,193,7,.4);
}
.story-card-thumb {
  display: block;
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg,#0b1120,#1a3a5c);
  text-decoration: none;
}
.story-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .4s ease;
}
.story-card:hover .story-card-thumb img { transform: scale(1.04); }
.story-card-thumb-gradient {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5) 0%, transparent 50%);
  pointer-events: none;
}
.story-card-badge {
  position: absolute; top: .65rem; left: .65rem;
  background: var(--brand-blue);
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  padding: .2rem .55rem;
  border-radius: 999px;
}
.story-card-placeholder-dots {
  position: absolute; inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.08) 1px, transparent 1px);
  background-size: 20px 20px;
}
.story-card-placeholder-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.5rem;
  color: rgba(255,255,255,.15);
}
.story-card-body {
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.story-card-trip-tag {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--brand-blue);
  text-decoration: none;
  margin-bottom: .6rem;
}
.story-card-trip-tag:hover { text-decoration: underline; }
.story-card-excerpt {
  font-size: .87rem;
  color: var(--text-secondary);
  line-height: 1.55;
  margin-bottom: .9rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-card-footer {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.story-card-author {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .73rem;
  font-weight: 600;
  color: var(--text-secondary);
  flex-shrink: 0;
}
.story-card-author-avatar {
  width: 1.5rem;
  height: 1.5rem;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-size: .65rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.story-card-author-avatar--photo {
  object-fit: cover;
  border: 1px solid var(--border);
  background: var(--card-bg);
}
.story-card-meta {
  font-size: .73rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: .3rem;
}
.story-card-date {
  font-size: .75rem;
  color: var(--text-secondary);
}
.story-card-meta-sep {
  color: var(--text-secondary);
  font-size: .75rem;
  opacity: .5;
}
.story-card-cta {
  font-size: .78rem;
  font-weight: 600;
  color: var(--brand-blue);
  text-decoration: none;
}
.story-card-cta:hover { text-decoration: underline; }

/* Stories empty state */
.stories-empty {
  text-align: center;
  padding: 5rem 1rem;
}
.stories-empty-icon {
  font-size: 3.5rem;
  color: var(--text-secondary);
  opacity: .4;
  margin-bottom: 1.25rem;
}
.stories-empty-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  font-weight: 600;
  margin-bottom: .5rem;
}
.stories-empty-sub {
  color: var(--text-secondary);
  max-width: 420px;
  margin: 0 auto;
  font-size: .9rem;
  line-height: 1.6;
}

/* Story detail hero with cover image */
.story-hero--has-image { padding: 0 !important; min-height: 480px; }
.story-hero-bg {
  position: absolute; inset: 0;
  overflow: hidden;
}
.story-hero-bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
}
.story-hero-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to bottom,
    rgba(0,0,0,.82) 0%,
    rgba(0,0,0,.72) 55%,
    rgba(0,0,0,.30) 85%,
    rgba(0,0,0,.10) 100%
  );
}
/* Push title away from the top edge and add text protection */
.story-hero--has-image .country-hero-inner {
  padding-top: 2.5rem;
  padding-bottom: 2.5rem;
}
.story-hero--has-image .country-hero-name {
  text-shadow: 0 1px 6px rgba(0,0,0,.9), 0 2px 18px rgba(0,0,0,.7);
}
.story-hero--has-image .trip-detail-tagline {
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
  display: inline-block;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

/* Story detail content */
/* ── Reading progress bar ────────────────────────────────────────────────── */
#story-progress {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 3px;
  background: var(--brand-blue);
  transform-origin: left center;
  transform: scaleX(0);
  z-index: 9999;
  transition: transform .05s linear;
  pointer-events: none;
}

/* ── Story detail content ─────────────────────────────────────────────────── */
.story-content-wrap {
  max-width: 720px;
  margin: 0 auto;
}
.story-body {
  font-size: 1.06rem;
  line-height: 1.88;
  /* Paragraphs use --text-secondary to match /about page tone in dark mode */
  color: var(--text-secondary);
}
.story-body p { margin-bottom: 1.5rem; color: var(--text-secondary); }
.story-body p:last-child { margin-bottom: 0; }
/* Lead paragraph — slightly larger but same tone */
.story-body > p:first-of-type {
  font-size: 1.12rem;
  line-height: 1.8;
  color: var(--text-secondary);
}
.story-heading {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-weight: 600;
  margin: 2.5rem 0 .85rem;
  /* Headings stay at --text-primary for clear visual hierarchy */
  color: var(--text-primary);
  letter-spacing: -.01em;
}
h2.story-heading { font-size: 1.8rem; }
h3.story-heading { font-size: 1.4rem; }
h4.story-heading { font-size: 1.12rem; }
/* Images from parse_md() — Parsedown wraps in <p><img></p>, style to match .story-figure */
.story-body p:has(> img:only-child) { margin: 2rem 0; line-height: 0; }
.story-body img {
  display: block;
  width: 100%; height: auto;
  max-height: 560px;
  object-fit: cover;
  border-radius: var(--radius-lg, 10px);
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
}
/* Plain headings from parse_md() (no class) — same style as .story-heading */
.story-body h2 { font-family:'Cormorant Garamond',Georgia,serif; font-weight:600; font-size:1.8rem; margin:2.5rem 0 .85rem; color:var(--text-primary); letter-spacing:-.01em; }
.story-body h3 { font-family:'Cormorant Garamond',Georgia,serif; font-weight:600; font-size:1.4rem; margin:2.5rem 0 .85rem; color:var(--text-primary); letter-spacing:-.01em; }
.story-body h4 { font-family:'Cormorant Garamond',Georgia,serif; font-weight:600; font-size:1.12rem; margin:2.5rem 0 .85rem; color:var(--text-primary); letter-spacing:-.01em; }
.story-body ul,.story-body ol { padding-left:1.5rem; margin-bottom:1.5rem; }
.story-body li { margin-bottom:.4rem; color:var(--text-secondary); }
.story-divider { border: none; border-top: 2px solid var(--border); margin: 2.5rem 0; opacity: 1; }
.story-quote {
  border-left: 3px solid var(--brand-blue);
  margin: 2rem 0;
  padding: .9rem 1.4rem;
  background: color-mix(in srgb, var(--brand-blue) 6%, transparent);
  border-radius: 0 8px 8px 0;
}
.story-quote p { margin: 0; font-style: italic; font-size: 1.05rem; color: var(--text-secondary); }
.story-body strong { color: var(--text-primary); } /* bold text pops back to primary */
.story-body em     { color: inherit; }
.story-body code {
  font-size: .88em;
  background: color-mix(in srgb, var(--brand-blue) 8%, transparent);
  color: var(--brand-blue);
  padding: .1em .4em;
  border-radius: 4px;
}
[data-bs-theme="dark"] .story-body code {
  background: rgba(255,255,255,.1);
  color: #7eb8f5;
}

/* ── Stories search ──────────────────────────────────────────────────────── */
.stories-search-form { margin-bottom: .75rem; }
.stories-search-wrap {
  position: relative;
  max-width: 480px;
}
.stories-search-icon {
  position: absolute;
  left: .85rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .9rem;
  pointer-events: none;
}
[dir="rtl"] .stories-search-icon { left: auto; right: .85rem; }
.stories-search-input {
  width: 100%;
  padding: .5rem 2.5rem .5rem 2.2rem;
  border: 1px solid var(--border);
  border-radius: 2rem;
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: .88rem;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
[dir="rtl"] .stories-search-input { padding: .5rem 2.2rem .5rem 2.5rem; }
.stories-search-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand-blue) 15%, transparent);
}
.stories-search-input::placeholder { color: var(--text-muted); }
.stories-search-clear {
  position: absolute;
  right: .75rem;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
  font-size: .78rem;
  line-height: 1;
  text-decoration: none;
  padding: .15rem .3rem;
  border-radius: 50%;
}
[dir="rtl"] .stories-search-clear { right: auto; left: .75rem; }
.stories-search-clear:hover { color: var(--text-primary); }

/* Story related trip */
/* ── Story tags ──────────────────────────────────────────────────────────── */
.story-tag-filter {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin-bottom: 2rem;
  /* Horizontal scroll on mobile instead of wrapping across many lines */
}
@media (max-width: 575px) {
  .story-tag-filter {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: .25rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .story-tag-filter::-webkit-scrollbar { display: none; }
  .story-tag-pill { flex-shrink: 0; }
}
.story-tag-pill {
  display: inline-flex;
  align-items: center;
  padding: .3rem .85rem;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 500;
  text-decoration: none;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  background: transparent;
  transition: all .15s;
}
.story-tag-pill:hover { border-color: var(--brand-blue); color: var(--brand-blue); background: color-mix(in srgb, var(--brand-blue) 8%, transparent); }
.story-tag-pill.active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.story-card-tags { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0 .5rem; }
.story-card-tag-pill {
  font-size: .7rem;
  padding: .15rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  color: var(--text-secondary);
  text-decoration: none;
  transition: all .12s;
}
.story-card-tag-pill:hover { border-color: var(--brand-blue); color: var(--brand-blue); }
.story-detail-tags { margin: 2rem 0; padding: 1.25rem; background: var(--surface-card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.story-detail-tags-label { display: block; font-size: .72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--text-secondary); margin-bottom: .65rem; }

/* ── Story inline images ──────────────────────────────────────────────────── */
.story-figure {
  position: relative;
  margin: 2rem 0;
  border-radius: var(--radius-lg);
  overflow: hidden;
  line-height: 0;
  box-shadow: 0 4px 24px rgba(0,0,0,.18);
  background: var(--surface-card);
}
.story-figure-img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 600px;
  object-fit: cover;
}
.story-figure-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 3rem 1.25rem 1rem;
  color: #fff;
  font-size: .8rem;
  font-style: italic;
  letter-spacing: .015em;
  line-height: 1.6;
  text-shadow: 0 1px 3px rgba(0,0,0,.4);
}
.story-figure::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 50%;
  z-index: 1;
  background: linear-gradient(to top, rgba(0,0,0,.82) 0%, rgba(0,0,0,.3) 60%, transparent 100%);
  pointer-events: none;
}

.story-related-trip { margin-top: 3rem; padding-top: 2rem; border-top: 1px solid var(--border); }
.story-related-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--text-secondary);
  margin-bottom: 1rem;
}

/* About page */
.about-placeholder {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
}
.about-placeholder-icon {
  font-size: 3rem;
  opacity: .35;
  margin-bottom: 1.25rem;
}
.about-placeholder-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .75rem;
}
.about-placeholder-text {
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
  font-size: .95rem;
}
.about-yt-cta { text-align: center; }
.about-reveal-btn {
  background: none;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  color: var(--brand-blue);
  font-size: .82rem;
  font-weight: 600;
  padding: .25rem .65rem;
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.about-reveal-btn:hover {
  background: color-mix(in srgb, var(--brand-blue) 8%, transparent);
  border-color: var(--brand-blue);
}

/* ── Contact page ──────────────────────────────────────────────────── */

.contact-label {
  display: block;
  font-size: .82rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .4rem;
}
.contact-input {
  background: var(--surface-card);
  border-color: var(--border);
  color: var(--text-primary);
  border-radius: var(--radius);
}
.contact-input:focus {
  background: var(--surface-card);
  border-color: var(--brand-blue);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(15,103,177,.15);
}
.contact-info-block {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1.75rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.contact-info-item {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}
.contact-info-icon {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: color-mix(in srgb, var(--brand-blue) 12%, transparent);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.contact-info-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .07em;
  color: var(--text-secondary);
  margin-bottom: .2rem;
}
.contact-info-value {
  font-size: .9rem;
  color: var(--text-primary);
  text-decoration: none;
}
a.contact-info-value:hover { text-decoration: underline; color: var(--brand-blue); }

.contact-success {
  text-align: center;
  padding: 3rem 1rem;
}
.contact-success-icon {
  font-size: 3rem;
  color: #198754;
  margin-bottom: 1rem;
}
.contact-success-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 2rem;
  font-weight: 600;
  margin-bottom: .5rem;
}
.contact-success-text {
  color: var(--text-secondary);
  max-width: 380px;
  margin: 0 auto;
  line-height: 1.6;
}

/* New contact page layout */
.contact-page-grid {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: 3rem;
  align-items: start;
}
@media (max-width: 900px) {
  .contact-page-grid { grid-template-columns: 1fr; }
}

.contact-form-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 1.5rem;
  color: var(--text-primary);
}

/* Updated success state */
.contact-success-sub {
  color: var(--text-secondary);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.contact-ref-box {
  display: inline-block;
  background: color-mix(in srgb, var(--brand-blue) 8%, transparent);
  border: 1px solid color-mix(in srgb, var(--brand-blue) 30%, transparent);
  border-radius: var(--radius-lg);
  padding: 1rem 2rem;
  margin: 0 auto 1.25rem;
}
.contact-ref-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--brand-blue);
  margin-bottom: .3rem;
}
.contact-ref-code {
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: .08em;
  color: var(--brand-blue);
  margin: 0;
}
.contact-ref-hint {
  font-size: .8rem;
  color: var(--text-secondary);
  max-width: 400px;
  margin: 0 auto;
  line-height: 1.6;
}

.contact-aside-note {
  font-size: .78rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin-top: 1rem;
}

/* Admin ticket thread extras */
.admin-ticket-ref {
  font-weight: 700;
  color: var(--brand-blue);
  text-decoration: none;
  font-family: monospace;
  font-size: .9rem;
}
.admin-ticket-ref:hover { text-decoration: underline; }
.admin-ticket-name  { font-size: .85rem; font-weight: 600; }
.admin-ticket-email { font-size: .75rem; color: var(--admin-text-muted, #6b7280); }
.admin-ticket-subject { font-size: .85rem; max-width: 240px; }
.admin-stat-row {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.admin-stat-card--link {
  text-decoration: none;
  cursor: pointer;
  transition: box-shadow .15s, border-color .15s;
}
.admin-stat-card--link:hover,
.admin-stat-card--link.active { border-color: var(--brand-blue); }
.admin-back-link {
  font-size: .8rem;
  color: var(--admin-text-muted, #6b7280);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: .3rem;
}
.admin-back-link:hover { color: var(--brand-blue); }
.admin-card-header {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--admin-text-muted, #6b7280);
  padding: 12px 16px;
  border-bottom: 1px solid var(--admin-border, #e9ecef);
  display: flex;
  align-items: center;
  gap: .5rem;
}
.admin-card-body { padding: 16px; }

/* ── Legal pages (privacy / terms) ────────────────────────────────── */

.legal-content {
  max-width: 900px;
  margin: 0 auto;
}
.legal-content .story-body h2 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 600;
  margin: 2.75rem 0 .75rem;
  color: var(--text-primary);
}
.legal-content .story-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  margin: 1.75rem 0 .4rem;
  color: var(--text-primary);
}
.legal-content .story-body p,
.legal-content .story-body li {
  color: var(--text-secondary);
  font-size: 1rem;
  line-height: 1.9;
}
.legal-content .story-body ul {
  margin: .5rem 0 1.25rem 1.25rem;
  padding-left: .25rem;
}
.legal-content .story-body li {
  margin-bottom: .35rem;
}
.legal-placeholder {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
}
.legal-placeholder-icon {
  font-size: 3rem;
  opacity: .3;
  margin-bottom: 1.25rem;
}
.legal-footer-nav {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
  font-size: .85rem;
}
.legal-footer-nav a { color: var(--brand-blue); text-decoration: none; }
.legal-footer-nav a:hover { text-decoration: underline; }

.legal-email-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: none;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-sm);
  padding: .15rem .55rem;
  font-size: .875rem;
  color: var(--brand-blue);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
  vertical-align: baseline;
}
.legal-email-btn:hover {
  background: rgba(var(--brand-blue-rgb), .07);
  border-color: var(--brand-blue);
}
.legal-email-link {
  color: var(--brand-blue);
  word-break: break-all;
}

/* ── Search page ──────────────────────────────────────────────────── */

.search-hero {
  background: var(--hero-bg);
  padding: 3rem 0 2.5rem;
}
.search-hero-form { width: 100%; max-width: 680px; margin: 0 auto; }
.search-hero-wrap {
  position: relative;
  display: flex;
  align-items: center;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color .2s, box-shadow .2s;
}
.search-hero-wrap:focus-within {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(15,103,177,.12);
}
.search-hero-icon {
  position: absolute;
  left: 1.1rem;
  color: var(--text-secondary);
  font-size: 1rem;
  pointer-events: none;
  z-index: 2;
}
.search-hero-input {
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 999px;
  color: var(--text-primary);
  font-size: 1rem;
  padding: .75rem 3rem .75rem 2.75rem;
  outline: none;
}
.search-hero-input::placeholder { color: var(--text-tertiary); }
.search-hero-input::-webkit-search-cancel-button { display: none; }
.search-hero-clear {
  position: absolute;
  right: 1rem;
  color: var(--text-secondary);
  font-size: .85rem;
  text-decoration: none;
  padding: .25rem;
  line-height: 1;
}
.search-hero-clear:hover { color: var(--text-primary); }
.search-hero-dropdown {
  position: absolute;
  top: calc(100% + .4rem);
  left: 0; right: 0;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  z-index: 100;
  overflow: hidden;
}
.search-hero-suggest-item {
  display: flex;
  align-items: center;
  gap: .8rem;
  padding: .55rem 1.1rem;
  font-size: .88rem;
  color: var(--text-primary);
  cursor: pointer;
}
.search-hero-suggest-item:first-child {
  margin-bottom: 4px;
  padding-bottom: .6rem;
  border-bottom: 1px solid var(--border);
}
.search-hero-suggest-item:hover,
.search-hero-suggest-item.active {
  background: color-mix(in srgb, var(--brand-blue) 8%, transparent);
}
.search-hero-suggest-item .nav-search-thumb { flex-shrink: 0; }
.search-hero-suggest-item .nav-search-item-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.search-hero-suggest-item .nav-search-type-badge { flex-shrink: 0; }

/* Show more button */
.search-show-more-wrap {
  text-align: center;
  margin: -1rem 0 3rem;
}
.search-show-more-btn {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .5rem 1.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: .875rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
}
.search-show-more-btn:hover:not(:disabled) {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.search-show-more-btn:disabled { opacity: .6; cursor: default; }
.search-show-more-spinner i { animation: spin .75s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Filter bar */
.search-filter-bar {
  background: var(--body-bg);
  border-bottom: 1px solid var(--border);
  padding: .625rem 0;
}
.search-filter-pills {
  display: flex;
  gap: .375rem;
  align-items: center;
  flex-wrap: wrap;
}
.search-filter-pill {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .8rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: .8125rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
  line-height: 1.4;
}
.search-filter-pill:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.search-filter-pill.active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
}
.search-filter-count {
  font-size: .7rem;
  background: rgba(0,0,0,.08);
  border-radius: 999px;
  padding: .1rem .4rem;
  line-height: 1.4;
}
.search-filter-pill.active .search-filter-count { background: rgba(255,255,255,.22); }
[data-bs-theme="dark"] .search-filter-count { background: rgba(255,255,255,.1); }

/* Sort controls (inside filter bar) */
.search-filter-bar .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.search-sort-group {
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-left: auto;
}
[dir="rtl"] .search-sort-group { margin-left: 0; margin-right: auto; }
.search-sort-label {
  font-size: .75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
}
.search-sort-pill {
  display: inline-flex;
  align-items: center;
  padding: .2rem .65rem;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-secondary);
  font-size: .75rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color .15s, color .15s, background .15s;
  white-space: nowrap;
}
.search-sort-pill:hover  { border-color: var(--brand-blue); color: var(--brand-blue); }
.search-sort-pill.active { background: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
@media (max-width: 575.98px) {
  .search-filter-pills {
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    padding-bottom: .125rem;
  }
  .search-filter-pills::-webkit-scrollbar { display: none; }
}

/* Recent searches header inside dropdown */
.search-recent-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .5rem 1.1rem .3rem;
  font-size: .7rem;
  color: var(--text-tertiary);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
}
.search-recent-clear {
  background: none;
  border: none;
  padding: 0;
  font-size: .75rem;
  color: var(--text-tertiary);
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  cursor: pointer;
}
.search-recent-clear:hover { color: var(--brand-blue); }

/* Search term highlight in results */
mark.ks-highlight {
  background: rgba(15,103,177,.10);
  color: var(--brand-blue);
  font-weight: 600;
  border-radius: 2px;
  padding: 0 1px;
}
[data-bs-theme="dark"] mark.ks-highlight {
  background: rgba(96,165,250,.15);
  color: #93c5fd;
}

.search-result-count {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: 2rem;
}
.search-section { margin-bottom: 3rem; }
.search-section-title {
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-secondary);
  text-transform: uppercase;
  letter-spacing: .07em;
  margin-bottom: 1.25rem;
  display: flex;
  align-items: center;
  gap: .5rem;
}
.search-section-count {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 600;
  padding: .1rem .5rem;
  color: var(--text-secondary);
  text-transform: none;
  letter-spacing: 0;
}
.search-countries {
  display: flex;
  flex-wrap: wrap;
  gap: .6rem;
}
.search-country-chip {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .45rem .9rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  font-size: .88rem;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.search-country-chip:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: color-mix(in srgb, var(--brand-blue) 6%, var(--surface-card));
}
.search-country-chip-count {
  font-size: .72rem;
  font-weight: 700;
  color: var(--text-secondary);
  background: var(--border);
  border-radius: 999px;
  padding: .05rem .4rem;
}
/* ── User result cards ───────────────────────────────────────────────────────── */
.search-users-row {
  display: flex;
  flex-wrap: wrap;
  gap: .625rem;
}
.search-user-card {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  padding: .5rem .9rem .5rem .5rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 999px;
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .15s, background .15s;
}
.search-user-card:hover {
  border-color: var(--brand-blue);
  background: color-mix(in srgb, var(--brand-blue) 6%, var(--surface-card));
  color: var(--text-primary);
}
.search-user-avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .8rem;
  font-weight: 700;
  color: #fff;
  flex-shrink: 0;
  overflow: hidden;
}
.search-user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.search-user-name {
  font-size: .875rem;
  font-weight: 500;
  line-height: 1.2;
}
.search-user-handle {
  font-size: .75rem;
  color: var(--text-secondary);
  line-height: 1.2;
}

.search-empty {
  text-align: center;
  padding: 4rem 1rem;
  color: var(--text-secondary);
}
.search-empty-icon {
  font-size: 3rem;
  opacity: .25;
  margin-bottom: 1rem;
}
.search-empty-title {
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: .5rem;
}
.search-empty-text {
  font-size: .9rem;
  line-height: 1.6;
}
.search-empty-text a { color: var(--brand-blue); }

/* ── 8. Video paywall ─────────────────────────────────────────────── */

.video-player-wrap {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #000;
}

/* YouTube sign-in hint — hidden until JS reveals it */
.yt-signin-hint {
  display: none;
  align-items: center;
  gap: 0.75rem;
}
.yt-signin-hint--visible { display: flex; }
.yt-signin-hint-text { flex: 1; font-size: 0.875rem; }
.yt-signin-hint-btn { flex-shrink: 0; }

@media (max-width: 576px) {
  .yt-signin-hint--visible { flex-wrap: wrap; gap: 0.5rem; }
  .yt-signin-hint-text { font-size: 0.78rem; flex-basis: 100%; }
  .yt-signin-hint-btn { font-size: 0.75rem; padding: 0.2rem 0.65rem; width: 100%; text-align: center; }
}

.video-paywall {
  position: relative;
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: center;
  justify-content: center;
}
.video-paywall::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.65);
  backdrop-filter: blur(4px);
}
.video-paywall-inner {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 2rem;
  color: #fff;
  max-width: 400px;
}
.video-paywall-inner h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  color: #fff;
  margin: 0.75rem 0 0.5rem;
}
.video-paywall-inner p {
  color: rgba(255,255,255,.8);
  font-size: 0.9375rem;
  margin-bottom: 1.5rem;
}

/* ── 9. Buttons ──────────────────────────────────────────────────── */

.btn {
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  letter-spacing: 0.01em;
  transition: all var(--transition);
}

.btn-primary {
  --bs-btn-bg:             var(--brand-blue);
  --bs-btn-border-color:   var(--brand-blue);
  --bs-btn-hover-bg:       #0a4d89;
  --bs-btn-hover-border-color: #0a4d89;
  --bs-btn-active-bg:      #083d6e;
  --bs-btn-color:          #fff;
}
.btn-gold {
  background-color: var(--brand-gold);
  border-color: var(--brand-gold);
  color: #000;
  font-weight: 700;
}
.btn-gold:hover {
  background-color: #d4a000;
  border-color: #d4a000;
  color: #000;
}
.btn-outline-brand {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.btn-outline-brand:hover {
  background: var(--brand-blue);
  color: #fff;
}

/* ── 10. Badges ──────────────────────────────────────────────────── */

.badge-premium {
  background: var(--brand-gold);
  color: #000;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2em 0.55em;
  border-radius: var(--radius-pill);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.badge-free {
  background: var(--brand-green);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.2em 0.55em;
  border-radius: var(--radius-pill);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

/* ── 11. Forms ───────────────────────────────────────────────────── */

.form-control, .form-select {
  background-color: var(--surface-input);
  border-color: var(--border);
  color: var(--text-primary);
  border-radius: var(--radius-md);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.form-control:focus, .form-select:focus {
  background-color: var(--surface-input);
  border-color: var(--brand-blue);
  color: var(--text-primary);
  box-shadow: 0 0 0 3px rgba(var(--brand-blue-rgb), 0.15);
}
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select {
  color: var(--text-primary);
}
.form-control::placeholder,
.form-select::placeholder {
  color: var(--text-tertiary);
  opacity: 1;
}
.form-label {
  font-weight: 600;
  font-size: 0.875rem;
  color: var(--text-primary);
  margin-bottom: 0.375rem;
}
.form-text { color: var(--text-secondary); font-size: 0.8125rem; }

/* ── 12. Alerts ──────────────────────────────────────────────────── */

.alert {
  border-radius: var(--radius-md);
  border: 1px solid;
  font-size: 0.9375rem;
}
.flash-alert { animation: flash-in 0.25s ease; }
@keyframes flash-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── 13. Pagination ──────────────────────────────────────────────── */

.pagination .page-link {
  color: var(--brand-blue);
  border-color: var(--border);
  background: var(--surface-card);
  border-radius: var(--radius-sm);
  font-weight: 500;
  font-size: 0.875rem;
  transition: all var(--transition);
}
.pagination .page-link:hover {
  background: rgba(var(--brand-blue-rgb), 0.08);
  border-color: var(--brand-blue);
  color: var(--brand-blue);
}
.pagination .page-item.active .page-link {
  background-color: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
  font-weight: 700;
}
.pagination .page-item.disabled .page-link {
  color: var(--text-tertiary);
  background: var(--surface-card);
  border-color: var(--border);
}

/* ── 14. Footer ──────────────────────────────────────────────────── */

.site-footer {
  background: var(--surface-footer);
  color: rgba(255,255,255,.70);
  padding: 4rem 0 0;
  margin-top: auto;
}

.footer-brand .brand-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.65rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.04em;
}

.footer-desc {
  font-size: 0.875rem;
  color: rgba(255,255,255,.55);
  line-height: 1.65;
  margin-top: 0.5rem;
  max-width: 260px;
}

.footer-heading {
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(255,255,255,.40);
  margin-bottom: 1rem;
}

.footer-links { list-style: none; padding: 0; margin: 0; }
.footer-links li { margin-bottom: 0.5rem; }
.footer-links a {
  color: rgba(255,255,255,.65);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--transition);
}
.footer-links a:hover {
  color: #ffffff;
  text-decoration: none;
}

.footer-social {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}
.footer-social-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.08);
  color: rgba(255,255,255,.70);
  font-size: 1.125rem;
  transition: background var(--transition), color var(--transition);
  text-decoration: none;
}
.footer-social-link:hover {
  background: var(--brand-blue);
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 1.25rem 0;
  margin-top: 3rem;
  font-size: 0.8125rem;
  color: rgba(255,255,255,.35);
  letter-spacing: 0.02em;
}

/* ── 15. Breadcrumb ──────────────────────────────────────────────── */

.breadcrumb-nav { margin-bottom: 1.5rem; }
.breadcrumb {
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-secondary);
  --bs-breadcrumb-divider: '›';
}
.breadcrumb-item a {
  color: var(--text-secondary);
  text-decoration: none;
}
.breadcrumb-item a:hover { color: var(--brand-blue); }
.breadcrumb-item.active { color: var(--text-tertiary); }

/* ── 16. Article / content body ──────────────────────────────────── */

.article-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 700;
  letter-spacing: -0.025em;
  line-height: 1.2;
  color: var(--text-primary);
}

.article-body {
  font-size: 1.0625rem;
  line-height: 1.8;
  color: var(--text-primary);
}
.article-body h2 {
  font-size: 1.5rem;
  margin-top: 2rem;
  margin-bottom: 0.75rem;
}
.article-body h3 {
  font-size: 1.25rem;
  margin-top: 1.5rem;
  margin-bottom: 0.5rem;
}
.article-body p { margin-bottom: 1.2rem; }
.article-body ul, .article-body ol {
  margin-bottom: 1.2rem;
  padding-left: 1.5rem;
}
.article-body li { margin-bottom: 0.375rem; }

/* ── 17. Country card ────────────────────────────────────────────── */

.country-card {
  text-align: center;
  padding: 1.5rem 1rem;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--surface-card);
  transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
  text-decoration: none;
  display: block;
}
.country-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue);
  text-decoration: none;
}
.country-flag { font-size: 2.5rem; display: block; margin-bottom: 0.75rem; }
.country-flag-icon { font-size: 2.5rem; display: inline-block; margin-bottom: 0.75rem; }
.country-name {
  font-size: 0.9375rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.25rem;
}
.country-count { font-size: 0.78rem; color: var(--text-secondary); }

/* ── Countries listing enhancements ──────────────────────────────── */

.countries-stats-bar {
  border-bottom: 1px solid var(--border);
  background: var(--surface-card);
  padding: .875rem 0;
}
.countries-stats-row {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0;
  flex-wrap: wrap;
}
.countries-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: .25rem 2rem;
  gap: .1rem;
}
.countries-stat-num {
  font-size: 1.6rem;
  font-weight: 700;
  line-height: 1.1;
  color: var(--brand-blue);
  font-family: 'Inter', sans-serif;
  letter-spacing: -.03em;
}
.countries-stat-label {
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
  font-weight: 500;
}
.countries-stat-divider {
  width: 1px;
  height: 2rem;
  background: var(--border);
  flex-shrink: 0;
}
@media (max-width: 480px) {
  .countries-stat { padding: .25rem 1.1rem; }
  .countries-stat-num { font-size: 1.3rem; }
}

.countries-map-wrap {
  background: var(--surface-alt);
  border-bottom: 1px solid var(--border);
  position: relative;
}
#countries-map {
  height: 380px;
  width: 100%;
  background: #1a6491;
}
@media (max-width: 768px) { #countries-map { height: 240px; } }

#countries-map:fullscreen,
#countries-map:-webkit-full-screen {
  height: 100dvh !important;
}

/* Map attribution credit button */
.map-credits {
  position: absolute;
  bottom: 8px;
  left: 8px;
  z-index: 800;
}
[dir="rtl"] .map-credits { left: auto; right: 8px; }
.map-credits-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: rgba(255,255,255,.85);
  border: 1px solid rgba(0,0,0,.15);
  color: #555;
  font-size: .7rem;
  font-weight: 700;
  cursor: default;
  line-height: 1;
  backdrop-filter: blur(2px);
  transition: background .15s;
}
[data-bs-theme="dark"] .map-credits-btn {
  background: rgba(30,30,30,.85);
  border-color: rgba(255,255,255,.15);
  color: #bbb;
}
.map-credits-tooltip {
  position: absolute;
  bottom: 28px;
  left: 0;
  white-space: nowrap;
  background: rgba(255,255,255,.95);
  border: 1px solid rgba(0,0,0,.12);
  border-radius: 6px;
  padding: .25rem .5rem;
  font-size: .7rem;
  color: #444;
  pointer-events: none;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity .15s, transform .15s;
  box-shadow: 0 2px 8px rgba(0,0,0,.12);
}
[data-bs-theme="dark"] .map-credits-tooltip {
  background: rgba(30,30,30,.95);
  border-color: rgba(255,255,255,.12);
  color: #ccc;
}
.map-credits-tooltip a { color: inherit; text-decoration: underline; }
.map-credits:hover .map-credits-tooltip,
.map-credits:focus-within .map-credits-tooltip {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.countries-continent-label {
  font-size: .72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-secondary);
  margin-bottom: .75rem;
  margin-top: .25rem;
}
.countries-tab { display: inline-flex; align-items: center; gap: .35rem; }
.countries-tab-count {
  font-size: .7rem;
  font-weight: 600;
  opacity: .7;
}

/* ── Country detail — hero ────────────────────────────────────────── */

.country-hero {
  position: relative;
  background: var(--hero-bg);
  padding: 3.5rem 0 3rem;
  overflow: hidden;
}
.country-hero-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, var(--hero-dot) 1px, transparent 1px);
  background-size: 26px 26px;
  pointer-events: none;
}
.country-hero-inner { position: relative; z-index: 1; }

.country-hero-flag {
  width: 4.5rem;
  height: 3.375rem;
  border-radius: 6px;
  box-shadow: 0 4px 20px rgba(0,0,0,.45);
  flex-shrink: 0;
}
.country-hero-continent-badge {
  display: inline-block;
  background: var(--hero-badge-bg);
  border: 1px solid var(--hero-badge-border);
  color: var(--hero-badge-text);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .07em;
  text-transform: uppercase;
  padding: .3rem .85rem;
  border-radius: 100px;
}
.country-hero-name {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.8rem, 7vw, 5rem);
  font-weight: 600;
  color: var(--hero-text);
  line-height: 1.05;
  margin: 0 0 1rem;
  letter-spacing: -.02em;
}
.country-hero-name-en {
  font-size: .95rem;
  color: var(--hero-text-faint);
  margin-bottom: 1.5rem;
  font-family: 'Inter', sans-serif;
}
.country-hero-pills {
  display: flex;
  flex-wrap: wrap;
  gap: .55rem;
  margin-top: 1.5rem;
}
.country-hero-pill {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--hero-pill-bg);
  border: 1px solid var(--hero-pill-border);
  color: var(--hero-pill-text);
  padding: .4rem .9rem;
  border-radius: 100px;
  font-size: .8rem;
  font-weight: 500;
  backdrop-filter: blur(6px);
}
.country-hero-pill i { opacity: .75; font-size: .8rem; }

/* ── Country detail — facts strip ────────────────────────────────── */

.country-facts-strip {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  padding: 0;
}
.country-facts-strip-row {
  display: flex;
  align-items: stretch;
}
.country-facts-strip-item {
  display: flex;
  align-items: center;
  gap: .85rem;
  flex: 1;
  padding: 1.25rem 1.5rem;
  border-right: 1px solid var(--border);
}
.country-facts-strip-item:last-child { border-right: none; }
.country-facts-strip-item > i {
  font-size: 1.5rem;
  color: var(--brand-blue);
  flex-shrink: 0;
  opacity: .85;
}
.cfs-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--text-secondary);
  margin-bottom: .2rem;
}
.cfs-value {
  font-size: .93rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.2;
}
@media (max-width: 767px) {
  .country-facts-strip-row { flex-wrap: wrap; }
  .country-facts-strip-item {
    flex: 0 0 50%;
    border-right: none;
    border-bottom: 1px solid var(--border);
    padding: 1rem 1.25rem;
  }
  .country-facts-strip-item:nth-last-child(-n+2) { border-bottom: none; }
}
@media (max-width: 400px) {
  .country-facts-strip-item { flex: 0 0 100%; }
  .country-facts-strip-item:last-child { border-bottom: none; }
}

/* ── Country detail — content ─────────────────────────────────────── */

.country-content { max-width: 860px; margin: 0 auto; }

.country-description {
  font-size: 1.075rem;
  line-height: 1.8;
  color: var(--text-primary);
  margin-bottom: 2rem;
}

.country-section-title {
  display: flex;
  align-items: center;
  gap: .6rem;
  font-size: 1rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: 1.25rem;
  padding-bottom: .75rem;
  border-bottom: 2px solid var(--border);
}
.country-section-title i { color: var(--brand-blue); font-size: .95rem; }

.country-afghan-card {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  border-left: 3px solid var(--brand-blue);
  border-radius: var(--radius-lg);
  padding: 1.1rem 1.35rem;
  margin-bottom: 2.5rem;
}
.country-afghan-icon {
  font-size: 1.5rem;
  color: var(--brand-blue);
  flex-shrink: 0;
  line-height: 1;
  margin-top: .05rem;
}
.country-afghan-label {
  font-size: .7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--brand-blue);
  margin-bottom: .4rem;
}

/* ── Country detail — trip cards ─────────────────────────────────── */

.country-trips-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.25rem;
}
.country-trip-card {
  display: flex;
  flex-direction: column;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  overflow: hidden;
  background: var(--surface-card);
  text-decoration: none;
  box-shadow: var(--shadow-sm);
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.country-trip-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue);
  text-decoration: none;
}
.country-trip-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--surface-alt);
}
.country-trip-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s ease;
}
.country-trip-card:hover .country-trip-thumb img { transform: scale(1.04); }
.country-trip-thumb--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: 2.5rem;
}
.country-trip-info {
  padding: .9rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: .35rem;
  min-width: 0;
  flex: 1;
}
.country-trip-badge {
  display: inline-block;
  font-size: .65rem;
  font-weight: 700;
  letter-spacing: .05em;
  text-transform: uppercase;
  background: var(--surface-alt);
  color: var(--text-secondary);
  border: 1px solid var(--border);
  border-radius: 100px;
  padding: .15rem .55rem;
  align-self: flex-start;
}
.country-trip-badge--ongoing {
  background: rgba(var(--brand-green-rgb), .12);
  color: var(--brand-green);
  border-color: rgba(var(--brand-green-rgb), .25);
}
.country-trip-title {
  font-size: .95rem;
  font-weight: 700;
  color: var(--text-primary);
  margin: 0;
  line-height: 1.3;
}
.country-trip-meta {
  font-size: .78rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: .4rem;
  flex-wrap: wrap;
}
.country-trip-meta-sep { opacity: .5; }
.country-trip-cta {
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-blue);
  margin-top: .25rem;
  display: flex;
  align-items: center;
  gap: .3rem;
}

/* ── Country detail — city chips ─────────────────────────────────── */

.country-city-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.country-city-chip {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  color: var(--text-primary);
  padding: .45rem 1rem;
  border-radius: 100px;
  font-size: .84rem;
  font-weight: 500;
}
.country-city-chip i { color: var(--brand-blue); font-size: .8rem; }
.country-city-chip-ep {
  font-size: .72rem;
  color: var(--text-secondary);
  font-weight: 400;
  padding-left: .25rem;
  border-left: 1px solid var(--border);
  margin-left: .1rem;
}

@media (max-width: 400px) {
  .country-trips-grid { grid-template-columns: 1fr; }
}

/* ── 18. Subscribe / plan cards ──────────────────────────────────── */

.plan-card {
  border-radius: var(--radius-xl);
  border: 2px solid var(--border);
  padding: 2rem;
  background: var(--surface-card);
  transition: border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.plan-card.plan-featured {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px rgba(var(--brand-blue-rgb),.10), var(--shadow-md);
}
.plan-badge {
  position: absolute;
  top: -1px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--brand-blue);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.85rem;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.plan-price {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  color: var(--text-primary);
}
.plan-price sup { font-size: 1.5rem; vertical-align: super; }
.plan-period { font-size: 0.875rem; color: var(--text-secondary); }
.plan-features { list-style: none; padding: 0; margin: 1.5rem 0; }
.plan-features li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.4rem 0;
  font-size: 0.9rem;
  border-bottom: 1px solid var(--border);
}
.plan-features li:last-child { border-bottom: none; }
.plan-features .bi-check-circle-fill { color: var(--brand-green); }

/* ── 19. Dashboard / user ────────────────────────────────────────── */

.user-avatar {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  background: rgba(var(--brand-blue-rgb),.12);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.25rem;
  color: var(--brand-blue);
  font-weight: 700;
  overflow: hidden;
}

/* ── 20. Utilities & helpers ─────────────────────────────────────── */

.text-brand      { color: var(--brand-blue) !important; }
.text-gold       { color: var(--brand-gold) !important; }
.text-green      { color: var(--brand-green) !important; }
.text-muted-2    { color: var(--text-secondary) !important; }
.bg-surface      { background: var(--surface-section) !important; }
.bg-card         { background: var(--surface-card) !important; }
.border-brand    { border-color: var(--brand-blue) !important; }
.rounded-brand   { border-radius: var(--radius-lg) !important; }
.shadow-brand    { box-shadow: var(--shadow-md) !important; }

/* ── Subscribe / mailing list CTA section ─────────────────────── */
/* ── Brand identity strip ─────────────────────────────────────────────────── */
.home-brand-strip {
  padding: 3rem 0;
  border-bottom: 1px solid var(--border);
}
.home-brand-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.2rem, 2.5vw, 1.55rem);
  font-weight: 500;
  line-height: 1.6;
  color: var(--text-primary);
  max-width: 780px;
  border-left: 3px solid var(--brand-blue);
  padding-left: 1.5rem;
}
[dir="rtl"] .home-brand-text {
  border-left: none;
  border-right: 3px solid var(--brand-blue);
  padding-left: 0;
  padding-right: 1.5rem;
}

/* ── Featured trip card ───────────────────────────────────────────────────── */
.home-featured-card {
  position: relative;
  display: block;
  text-decoration: none;
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 2rem;
  aspect-ratio: 21/9;
  background: #0a1628;
}
@media (max-width: 767.98px) {
  .home-featured-card { aspect-ratio: 16/9; }
}
.home-featured-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 6s ease;
}
.home-featured-card:hover .home-featured-img { transform: scale(1.04); }
.home-featured-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(5,12,24,.90) 0%,
    rgba(5,12,24,.50) 45%,
    rgba(5,12,24,.15) 100%
  );
}
.home-featured-content {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: clamp(1.25rem, 4vw, 2.5rem);
  z-index: 2;
}
.home-featured-badges {
  display: flex;
  align-items: center;
  gap: .5rem;
  margin-bottom: .75rem;
  flex-wrap: wrap;
}
.home-featured-label {
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.65);
}
.home-featured-active {
  background: var(--brand-gold);
  color: #000;
  font-size: .7rem;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: .2rem .65rem;
  border-radius: 99px;
}
.home-featured-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.6rem, 5vw, 3rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.1;
  margin-bottom: .5rem;
}
.home-featured-tagline {
  color: rgba(255,255,255,.70);
  font-size: clamp(.85rem, 1.5vw, 1rem);
  margin-bottom: 1.1rem;
  max-width: 560px;
}
.home-featured-footer {
  display: flex;
  align-items: center;
  gap: 1.25rem;
  flex-wrap: wrap;
}
.home-featured-flags { display: flex; gap: .35rem; align-items: center; }
.home-featured-flags .fi { font-size: 1.1rem; }
.home-featured-ep {
  color: rgba(255,255,255,.55);
  font-size: .8rem;
}
.home-featured-cta {
  margin-left: auto;
  background: #fff;
  color: #000;
  font-size: .85rem;
  font-weight: 600;
  padding: .5rem 1.25rem;
  border-radius: 99px;
  white-space: nowrap;
  transition: opacity .15s;
}
[dir="rtl"] .home-featured-cta { margin-left: 0; margin-right: auto; }
.home-featured-card:hover .home-featured-cta { opacity: .88; }

/* ── Newsletter slim strip ────────────────────────────────────────────────── */
.home-newsletter-strip {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
  text-align: center;
  color: var(--text-secondary);
  font-size: .9rem;
}
.home-newsletter-strip a {
  color: var(--brand-blue);
  font-weight: 600;
  text-decoration: none;
}
.home-newsletter-strip a:hover { text-decoration: underline; }

.cta-subscribe {
  background: linear-gradient(135deg, var(--brand-blue) 0%, #003049 100%);
}
[data-bs-theme="dark"] .cta-subscribe {
  /* Deep navy-blue — visible against the body but not jarring */
  background: linear-gradient(135deg, #1a4785 0%, #0c2040 100%);
}
.cta-subscribe-icon {
  opacity: .8;
  color: #fff;
}
.cta-subscribe-title {
  color: #fff;
}
.cta-subscribe-desc {
  color: rgba(255,255,255,.82);
}
.cta-subscribe-hint {
  color: rgba(255,255,255,.55);
  font-size: .875rem;
}
[data-bs-theme="dark"] .cta-subscribe .btn-cta-subscribe {
  background: transparent;
  color: #fff;
  border: 2px solid rgba(255,255,255,.7);
}
[data-bs-theme="dark"] .cta-subscribe .btn-cta-subscribe:hover {
  background: rgba(255,255,255,.12);
  border-color: #fff;
}

/* Full-width on mobile */
@media (max-width: 576px) {
  .btn-sm-full { width: 100%; }
  .hero-stats   { gap: 1.25rem; }
}

/* ── 21. Animations ─────────────────────────────────────────────── */

@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}
.animate-fade-up { animation: fade-up 0.45s ease both; }
.animate-delay-1 { animation-delay: 0.1s; }
.animate-delay-2 { animation-delay: 0.2s; }
.animate-delay-3 { animation-delay: 0.3s; }

/* ── 22. Scrollbar ──────────────────────────────────────────────── */

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--surface-body); }
::-webkit-scrollbar-thumb {
  background: var(--border-strong);
  border-radius: var(--radius-pill);
}

/* ── 23. Auth pages ──────────────────────────────────────────────── */

[x-cloak] { display: none !important; }

.auth-wrap {
  min-height: calc(100vh - var(--nav-height));
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem 4rem;
  background: var(--surface-body);
}

.auth-card {
  width: 100%;
  max-width: 430px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem 2rem;
  box-shadow: var(--shadow-lg);
}

/* Turnstile widget full-width inside auth card */
.auth-card .cf-turnstile { display: flex; justify-content: center; }

.auth-card-brand {
  display: flex;
  justify-content: center;
  margin-bottom: 1.5rem;
}
.auth-card-brand .brand-text { font-size: 1.3rem; }

.auth-card-icon {
  width: 48px;
  height: 48px;
  background: rgba(var(--brand-blue-rgb), .1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.35rem;
  color: var(--brand-blue);
}

.auth-card-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.875rem;
  font-weight: 700;
  color: var(--text-primary);
  text-align: center;
  margin-bottom: 0.25rem;
  line-height: 1.2;
}

.auth-card-sub {
  text-align: center;
  color: var(--text-secondary);
  font-size: 0.9375rem;
  margin-bottom: 1.75rem;
}

.auth-field-hint {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

.auth-card-links {
  text-align: center;
  margin-top: 1.25rem;
  font-size: 0.875rem;
  color: var(--text-secondary);
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}
.auth-card-links a {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 500;
}
.auth-card-links a:hover { text-decoration: underline; }

.auth-separator {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin: 1.5rem 0;
  color: var(--text-tertiary);
  font-size: 0.8125rem;
}
.auth-separator::before, .auth-separator::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.auth-success-icon {
  width: 64px;
  height: 64px;
  background: rgba(76, 175, 80, .12);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1.25rem;
  font-size: 1.75rem;
  color: var(--brand-green);
}

/* ── 24. Page hero (inner pages) ──────────────────────────────── */

.page-hero {
  padding: 3.5rem 0 2.5rem;
  background: linear-gradient(135deg, rgba(var(--brand-blue-rgb),.08) 0%, transparent 60%);
  border-bottom: 1px solid var(--border);
  margin-bottom: 0;
}
.page-hero--sm {
  padding: 2.25rem 0 1.75rem;
}
.page-hero-title {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  font-weight: 700;
  color: var(--text-primary);
  margin: 0 0 0.25rem;
}
.page-hero-subtitle {
  color: var(--text-secondary);
  font-size: 1rem;
  margin: 0;
}

/* ── Subscribe page ─────────────────────────────────────────────── */

.subscribe-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-xl);
  padding: 2.5rem 2rem;
  box-shadow: var(--shadow-lg);
  position: relative;
  overflow: hidden;
}
.subscribe-card::before {
  content: '';
  display: block;
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-green) 100%);
}
.subscribe-card .form-control,
.subscribe-card .form-select {
  border-radius: var(--radius-lg);
}
.subscribe-card .form-label {
  font-size: .8125rem;
  letter-spacing: .01em;
  color: var(--text-secondary);
}
.subscribe-benefit-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.5rem 1rem;
  text-align: center;
  height: 100%;
}
.subscribe-benefit-card h6 {
  font-weight: 700;
  font-size: .875rem;
  color: var(--text-primary);
  margin: .5rem 0 .35rem;
}
.subscribe-benefit-card p {
  font-size: .8125rem;
  color: var(--text-secondary);
  margin: 0;
}

/* ── 25. Video card — play overlay ────────────────────────────── */

.video-thumb-link { display: block; }
.video-play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.25);
  opacity: 0;
  transition: opacity 0.2s ease;
  font-size: 3rem;
  color: #fff;
}
.video-card:hover .video-play-overlay { opacity: 1; }

/* ── 26. Video paywall (show page) ────────────────────────────── */

.video-paywall {
  position: relative;
  aspect-ratio: 16/9;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #0A1622;
}
.video-paywall-thumb {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: blur(6px) brightness(0.5);
  transform: scale(1.05);
}
.video-paywall-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.45);
}
.video-paywall-inner {
  text-align: center;
  padding: 2rem 1.5rem;
  max-width: 400px;
  color: #fff;
}
.video-paywall-inner h3 {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1.75rem;
  color: #fff;
  margin-bottom: 0.5rem;
}

/* ── 27. Video info / description ──────────────────────────────── */

.video-info { }

/* Video page title uses Inter, not the editorial serif */
.video-info h1 {
  font-family: 'Inter', sans-serif;
  letter-spacing: -0.02em;
}
@media (max-width: 767px) {
  .video-info h1 {
    font-size: 1.05rem;
    letter-spacing: -0.01em;
  }
  .video-info {
    padding: 0.75rem 1rem 0;
  }
}

/* Description box */
.video-desc-box {
  background: var(--surface-alt);
  border-radius: var(--radius-md);
  padding: 1rem;
  position: relative;
  cursor: pointer;
  user-select: none;
}
.video-desc-box.is-open { cursor: default; }

.video-desc-inner {
  font-size: 0.875rem;
  color: var(--text-secondary);
  line-height: 1.65;
  word-break: break-word;
  max-height: 5.5rem;
  overflow: hidden;
  transition: max-height 0.35s ease;
}
.video-desc-box.is-open .video-desc-inner {
  max-height: 300rem;
}

/* gradient fade */
.video-desc-fade {
  position: absolute;
  bottom: 2.25rem;
  left: 1rem; right: 1rem;
  height: 2.5rem;
  background: linear-gradient(to bottom, transparent, var(--surface-alt));
  pointer-events: none;
}

.video-desc-toggle {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-top: 0.5rem;
  line-height: 1;
  user-select: none;
}
.video-desc-less-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
}

/* timestamp + hashtag links in description */
.yt-timestamp,
.yt-hashtag {
  color: var(--brand-blue);
  text-decoration: none;
  font-weight: 500;
}
.yt-timestamp:hover,
.yt-hashtag:hover { text-decoration: underline; }

/* ── 28a. Like group + action buttons ──────────────────────────── */

.video-like-group {
  display: inline-flex;
  align-items: center;
  background: var(--surface-alt);
  border-radius: 2rem;
  overflow: hidden;
}
.video-like-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 1rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  cursor: pointer;
  transition: background var(--transition), color var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.video-like-btn:hover { background: var(--border); }
.video-like-btn.is-liked  { color: var(--brand-blue); }
.video-like-btn.is-disliked { color: var(--brand-blue); }
.video-like-btn:disabled  { opacity: 0.6; cursor: default; }

.video-like-icon { font-size: 1.25rem; display: inline-block; }

@keyframes like-pop {
  0%   { transform: scale(1)    rotate(0deg); }
  25%  { transform: scale(1.45) rotate(-12deg); }
  55%  { transform: scale(0.85) rotate(6deg); }
  80%  { transform: scale(1.15) rotate(-3deg); }
  100% { transform: scale(1)    rotate(0deg); }
}
.like-pop { animation: like-pop 0.55s cubic-bezier(.36,.07,.19,.97); }

.video-like-divider {
  width: 1px;
  height: 1.5rem;
  background: var(--border);
  flex-shrink: 0;
}

.video-action-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-alt);
  border: none;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 2rem;
  cursor: pointer;
  text-decoration: none;
  transition: background var(--transition);
  white-space: nowrap;
  line-height: 1;
}
.video-action-btn i { font-size: 1.1rem; }
.video-action-btn:hover { background: var(--border); color: var(--text-primary); }

/* Save-to-playlist wrapper uses same pill shape but hosts a panel */
.video-action-btn-inner {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--surface-alt);
  border: none;
  color: var(--text-primary);
  font-size: 0.9375rem;
  font-weight: 600;
  padding: 0.6rem 1.1rem;
  border-radius: 2rem;
  cursor: pointer;
  white-space: nowrap;
  line-height: 1;
  transition: background var(--transition);
  width: 100%;
}
.video-action-btn-inner i { font-size: 1.1rem; }
.video-action-btn-inner:hover { background: var(--border); }
.video-action-btn-inner.is-saved { color: var(--brand-blue); }

/* Save-to-playlist dropdown panel */
.playlist-save-panel {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  z-index: 200;
  width: 330px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: .75rem;
  box-shadow: 0 8px 24px rgba(0,0,0,.14), 0 2px 6px rgba(0,0,0,.08);
  overflow: hidden;
}
[data-bs-theme="dark"] .playlist-save-panel {
  box-shadow: 0 8px 28px rgba(0,0,0,.5), 0 2px 6px rgba(0,0,0,.35);
}
.playlist-save-panel-header {
  padding: .75rem 1rem .5rem;
  font-size: .8rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  border-bottom: 1px solid var(--border);
}
.playlist-save-panel-inner { padding: .4rem 0; max-height: 360px; overflow-y: auto; }
.playlist-save-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .45rem .75rem;
  cursor: pointer;
  transition: background var(--transition);
}
.playlist-save-item:hover { background: var(--surface-alt); }
.playlist-save-check { flex-shrink: 0; width: 1rem; height: 1rem; accent-color: var(--brand-blue); }
.playlist-save-thumb {
  flex-shrink: 0;
  width: 60px;
  height: 34px;
  border-radius: 4px;
  background: var(--surface-alt);
  overflow: hidden;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-tertiary);
  font-size: .875rem;
}
.playlist-save-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.playlist-save-info { flex-grow: 1; display: flex; flex-direction: column; gap: .1rem; min-width: 0; }
.playlist-save-label {
  font-size: .8125rem;
  font-weight: 500;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playlist-save-count { font-size: .7rem; color: var(--text-tertiary); }
.playlist-save-lock  { font-size: .7rem; color: var(--text-tertiary); flex-shrink: 0; }
.playlist-save-empty { padding: .75rem 1rem; font-size: .875rem; color: var(--text-tertiary); }
.playlist-save-new-wrap { border-top: 1px solid var(--border); margin-top: .25rem; padding: .5rem; }
.playlist-save-new-btn {
  background: none;
  border: none;
  padding: .4rem .5rem;
  font-size: .875rem;
  color: var(--brand-blue);
  cursor: pointer;
  width: 100%;
  text-align: left;
}
.playlist-save-new-btn:hover { text-decoration: underline; }
.playlist-save-new-form { padding: .25rem 0; }
.btn-xs { font-size: .75rem; padding: .2rem .55rem; }

/* ── All Bootstrap modals ────────────────────────────────────────── */
.modal-content {
  border-radius: .875rem;
  border: 1px solid var(--border);
  box-shadow: 0 8px 32px rgba(0,0,0,.14), 0 2px 8px rgba(0,0,0,.08);
}
[data-bs-theme="dark"] .modal-content {
  border-color: rgba(255,255,255,.1);
  box-shadow: 0 8px 40px rgba(0,0,0,.55), 0 2px 8px rgba(0,0,0,.4);
}

/* Confirm/alert modal — tighter padding + message size */
#ks-global-modal .modal-body p { font-size: .9rem; }
#ks-global-modal .modal-header { padding: 1.25rem 1.25rem .5rem; }
#ks-global-modal .modal-body   { padding: .25rem 1.25rem 1rem; }
#ks-global-modal .modal-footer { padding: 0 1.25rem 1.25rem; }

/* ── Share modal ────────────────────────────────────────────────── */
.share-modal-dialog { max-width: 480px; }
.share-modal-content {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 1rem;
}
.share-platforms {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  flex-wrap: wrap;
  padding: 0.5rem 0;
}
.share-platform {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  text-decoration: none;
  color: var(--text-primary);
  font-size: 0.78rem;
  font-weight: 500;
}
.share-platform:hover { color: var(--text-primary); }
.share-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  color: #fff;
  transition: transform 0.15s, opacity 0.15s;
}
.share-platform:hover .share-icon { transform: scale(1.08); opacity: 0.9; }

.share-copy-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  background: var(--surface-alt);
  border-radius: 2rem;
  padding: 0.5rem 0.5rem 0.5rem 1rem;
  cursor: pointer;
}
.share-copy-url {
  flex: 1;
  font-size: 0.8125rem;
  color: var(--text-secondary);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.share-copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 2rem;
  padding: 0.35rem 0.9rem;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
  transition: background var(--transition);
}
.share-copy-btn:hover { background: var(--border); }

/* ── 28. Related videos sidebar ────────────────────────────────── */

.related-video-row {
  display: block;
  border-radius: var(--radius-md);
  padding: 0.4rem;
  transition: background var(--transition);
}
.related-video-row:hover { background: var(--surface-alt); }
.related-video-row.active { background: rgba(var(--brand-blue-rgb),.08); }

.related-video-thumb {
  position: relative;
  flex: 0 0 45%;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: #0A1622;
}
.related-video-thumb img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.related-video-title {
  font-family: 'Inter', sans-serif;
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-primary);
  line-height: 1.4;
  letter-spacing: -0.01em;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.related-video-row:hover .related-video-title { color: var(--brand-blue); }

.related-video-meta {
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.related-video-channel {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.related-video-stats {
  font-size: 0.72rem;
  color: var(--text-secondary);
}

@media (max-width: 576px) {
  .related-video-thumb { flex: 0 0 42%; }
}

/* ── 29. Video comments ────────────────────────────────────────── */

.video-comments { border-top: 1px solid var(--border); padding-top: 1.5rem; }
@media (max-width: 767px) {
  .video-comments { padding-left: 1rem; padding-right: 1rem; }
  .video-comments-header { margin-bottom: 0.75rem; }
  .video-comment-login { padding-top: 0.4rem; padding-bottom: 0.4rem; }
}

.video-comments-header {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1.25rem;
  flex-wrap: wrap;
}

.video-comments-heading {
  font-size: 1rem;
  font-weight: 600;
  margin: 0;
  color: var(--text-primary);
}

/* Sort control */
.video-comment-sort { position: relative; }

.video-comment-sort-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  background: none;
  border: none;
  color: var(--text-primary);
  font-size: 0.875rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0.3rem 0.5rem;
  border-radius: 4px;
  transition: background var(--transition);
}
.video-comment-sort-btn:hover { background: var(--surface-alt); }

.video-comment-sort-chevron {
  font-size: 0.65rem;
  transition: transform 0.2s;
}
.video-comment-sort-chevron.rotated { transform: rotate(180deg); }

.video-comment-sort-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 180px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0,0,0,.22);
  z-index: 100;
  overflow: hidden;
}

.video-comment-sort-option {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  width: 100%;
  background: none;
  border: none;
  padding: 0.7rem 1rem;
  font-size: 0.875rem;
  color: var(--text-primary);
  cursor: pointer;
  text-align: left;
  transition: background var(--transition);
}
.video-comment-sort-option:hover,
.video-comment-sort-option.active { background: var(--surface-alt); }
.video-comment-sort-option .bi-check2 { color: var(--brand-blue); font-size: 0.9rem; }

.video-comment-form { }

.ks-comment-form {
  padding: 1rem;
  background: var(--surface-form-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.ks-comment-textarea {
  resize: none;
  overflow: hidden;
  min-height: 60px;
  background-color: var(--surface-textarea) !important;
  transition: border-color var(--transition), background-color var(--transition);
}
.ks-comment-textarea:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(var(--brand-blue-rgb, 37,99,235), .12);
}

.ks-comment-list {
  background: var(--surface-form-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-top: 0.5rem;
  padding: 0.25rem 0.35rem;
  box-shadow: var(--shadow-sm);
}
.ks-comment-list .video-comment-item {
  padding: 0.85rem 0.75rem;
  border-radius: var(--radius-sm);
  transition: background var(--transition);
}
.ks-comment-list .video-comment-item:hover,
#ks-comment-list .video-comment-item:nth-child(even):hover {
  background: color-mix(in srgb, var(--brand-blue) 8%, var(--surface-alt));
}
#ks-comment-list .video-comment-item:nth-child(even) {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}

.video-comment-avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-size: 0.875rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
}

.video-comment-input {
  width: 100%;
  background: transparent;
  border: none;
  border-bottom: 1px solid var(--border);
  border-radius: 0;
  color: var(--text-primary);
  font-size: 0.875rem;
  line-height: 1.5;
  resize: none;
  outline: none;
  overflow: hidden;
  min-height: 36px;
  padding: 0.3rem 0;
  transition: border-color var(--transition);
}
.video-comment-input:focus {
  border-bottom-color: var(--brand-blue);
}
.video-comment-input::placeholder { color: var(--text-tertiary); }

.video-comment-form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.video-comment-chars {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-right: auto;
}

.video-comment-login {
  font-size: 0.875rem;
  color: var(--text-secondary);
  padding: 0.75rem 0;
}

.video-comment-item {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0.6rem;
}
/* Zebra stripe: each x-for comment renders as a direct <div> child */
#comment-list > div:nth-child(even) {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}

.video-comment-meta {
  display: flex;
  align-items: baseline;
  gap: 0.5rem;
  margin-bottom: 0.2rem;
  flex-wrap: wrap;
}

.video-comment-author {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--text-primary);
}

.video-comment-time {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  letter-spacing: 0.01em;
}

.video-comment-body {
  font-size: 0.9rem;
  color: var(--text-secondary);
  line-height: 1.6;
  margin: 0.25rem 0 0;
  word-break: break-word;
  white-space: pre-line;
}

.video-comment-avatar--img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  object-fit: cover;
}

.video-comment-source {
  font-size: 0.68rem;
  font-weight: 600;
  padding: 0.1rem 0.45rem;
  border-radius: 3px;
  letter-spacing: 0.02em;
}
.video-comment-source--yt {
  background: rgba(255,0,0,.12);
  color: #e00;
}
.video-comment-source--site {
  background: rgba(var(--brand-blue-rgb),.12);
  color: var(--brand-blue);
}
.video-comment-pinned {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.68rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: 0.2rem;
  width: 100%;
}

.video-comment-actions {
  display: flex;
  gap: 0.85rem;
  margin-top: 0.3rem;
}
.video-comment-stat {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* Reply thread indentation */
.video-comment-replies {
  margin-left: 48px;
  border-left: 2px solid var(--border);
  padding-left: 0.75rem;
  margin-bottom: 0.25rem;
}
.video-comment-item--reply {
  padding: 0.5rem 0.6rem;
}
.video-comment-avatar--sm {
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
}

/* Skeleton loading */
.skeleton-avatar {
  background: var(--surface-alt);
  animation: skeleton-pulse 1.4s ease infinite;
}
.skeleton-line {
  background: var(--surface-alt);
  border-radius: 4px;
  animation: skeleton-pulse 1.4s ease infinite;
}
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

/* Video description links */
.video-desc-inner a {
  color: var(--brand-blue);
  text-decoration: underline;
  word-break: break-all;
}
.video-desc-inner a:hover { opacity: 0.85; }
.video-desc-inner a.yt-timestamp { text-decoration: none; word-break: normal; }
.video-desc-inner a.yt-timestamp:hover { text-decoration: underline; }
.video-desc-inner a.yt-hashtag { text-decoration: none; word-break: normal; }
.video-desc-inner a.yt-hashtag:hover { text-decoration: underline; }

/* ── Hashtag listing page ───────────────────────────────────────── */
.hashtag-page-header {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.hashtag-page-icon {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  flex-shrink: 0;
}
.hashtag-page-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.5rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  margin: 0 0 0.15rem;
  color: var(--text-primary);
}
.hashtag-page-count {
  font-size: 0.85rem;
  color: var(--text-secondary);
}

.auth-back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--text-secondary);
  font-size: 0.875rem;
  text-decoration: none;
  margin-bottom: 1.5rem;
}
.auth-back-link:hover { color: var(--brand-blue); }
::-webkit-scrollbar-thumb:hover { background: var(--brand-gray); }

/* ── Trips listing ──────────────────────────────────────────────────── */

.trip-cards {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.5rem;
  padding-top: 0.5rem;
}

.trip-card {
  background: var(--surface-card);
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
  display: flex;
  flex-direction: column;
}
.trip-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

/* Featured trips span full width on desktop */
.trip-card--featured:first-child {
  grid-column: 1 / -1;
}
.trip-card--featured:first-child .trip-card-cover { aspect-ratio: 16/9; }

.trip-card-cover-link { display: block; }
.trip-card-cover {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: #0A1622;
}
.trip-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}
.trip-card:hover .trip-card-cover img { transform: scale(1.04); }

.trip-card-cover-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 55%);
}

/* Status badge (shared between listing card and detail hero) */
.trip-status-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  background: rgba(255,255,255,.15);
  color: #fff;
  backdrop-filter: blur(4px);
  border: 1px solid rgba(255,255,255,.25);
}
.trip-status-badge--ongoing {
  background: rgba(var(--brand-green-rgb), .8);
  border-color: transparent;
}

/* Status badge inside listing card — position over image */
.trip-card-cover .trip-status-badge {
  position: absolute;
  top: 0.75rem;
  left: 0.75rem;
}
[dir="rtl"] .trip-card-cover .trip-status-badge { left: auto; right: 0.75rem; }

.trip-card-body {
  padding: 1.1rem 1.25rem 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1;
}

.trip-card-title {
  font-size: 1.05rem;
  font-weight: 700;
  line-height: 1.3;
  margin: 0;
}
.trip-card-title a {
  color: var(--text-primary);
  text-decoration: none;
}
.trip-card-title a:hover { color: var(--brand-blue); }

.trip-card-tagline {
  font-size: 0.8125rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.5;
}

.trip-card-footer {
  margin-top: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-top: 0.75rem;
  border-top: 1px solid var(--border);
}

.trip-card-meta {
  position: static;
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 0.75rem;
  font-size: 0.75rem;
  color: var(--text-secondary);
  z-index: auto;
}

.trip-card-cta {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--brand-blue);
  text-decoration: none;
  white-space: nowrap;
}
.trip-card-cta:hover { color: var(--brand-blue); text-decoration: underline; }

@media (max-width: 768px) {
  .trip-cards { grid-template-columns: 1fr; }
  .trip-card--featured:first-child { grid-column: 1; }
}

/* ── Trips listing page ─────────────────────────────────────────────── */

.trips-listing-hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2.6rem, 5.5vw, 4.2rem);
  font-weight: 700;
  color: var(--hero-text);
  line-height: 1.05;
  letter-spacing: -.02em;
  margin-bottom: .45rem;
}
.trips-listing-hero-sub {
  color: var(--hero-text-muted);
  font-size: 1rem;
  margin-bottom: 1.75rem;
  line-height: 1.55;
  max-width: 520px;
}
.trips-hero-pill--live {
  background: rgba(34,197,94,.2) !important;
  border-color: rgba(34,197,94,.4) !important;
}

.trips-listing-grid {
  display: flex;
  flex-direction: column;
  gap: 1.75rem;
}

.trips-listing-card {
  display: grid;
  grid-template-columns: 360px 1fr;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid var(--border);
  background: var(--surface-card);
  transition: box-shadow .2s, transform .2s;
}
.trips-listing-card:hover {
  box-shadow: var(--shadow-lg);
  transform: translateY(-2px);
}

.trips-listing-thumb {
  position: relative;
  display: block;
  overflow: hidden;
  background: #0A1622;
  min-height: 240px;
  text-decoration: none;
}
.trips-listing-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s ease;
}
.trips-listing-card:hover .trips-listing-thumb img { transform: scale(1.04); }

.trips-listing-thumb-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.45) 0%, transparent 55%);
  z-index: 1;
}
.trips-listing-thumb .trip-status-badge {
  position: absolute;
  top: .75rem;
  left: .75rem;
  z-index: 2;
}
[dir="rtl"] .trips-listing-thumb .trip-status-badge { left: auto; right: .75rem; }

.trips-listing-placeholder-dots {
  position: absolute;
  inset: 0;
  background-image: radial-gradient(circle, rgba(255,255,255,.07) 1px, transparent 1px);
  background-size: 22px 22px;
}
.trips-listing-placeholder-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 3.5rem;
  color: rgba(255,255,255,.12);
  z-index: 1;
}

.trips-listing-body {
  padding: 1.75rem 2rem;
  display: flex;
  flex-direction: column;
  gap: .45rem;
}
.trips-listing-card-title {
  font-size: 1.3rem;
  font-weight: 700;
  line-height: 1.25;
  margin: 0;
}
.trips-listing-card-title a { color: var(--text-primary); text-decoration: none; }
.trips-listing-card-title a:hover { color: var(--brand-blue); }

.trips-listing-card-tagline {
  font-size: .875rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}

.trips-listing-card-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .2rem .85rem;
  font-size: .78rem;
  color: var(--text-secondary);
  margin-top: .2rem;
}
.trips-listing-card-meta span { display: inline-flex; align-items: center; gap: .3rem; }

.trips-listing-flags {
  display: flex;
  flex-wrap: wrap;
  gap: .3rem;
  align-items: center;
  margin-top: .15rem;
}
.trips-listing-flags-more { font-size: .72rem; color: var(--text-secondary); }

.trips-listing-card-footer { margin-top: auto; padding-top: 1.25rem; }

@media (max-width: 860px) {
  .trips-listing-card { grid-template-columns: 1fr; }
  .trips-listing-thumb { min-height: 0; aspect-ratio: 16/9; }
  .trips-listing-body { padding: 1.25rem 1.25rem 1.5rem; }
  .trips-listing-card-title { font-size: 1.1rem; }
}

/* ── Trip detail hero ───────────────────────────────────────────────── */

.trip-hero {
  position: relative;
  height: clamp(320px, 55vh, 520px);
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  background: #0a0e17;
}

/* Centre a 16:9 box — image fills it exactly, no cropping */
.trip-hero-bg {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  aspect-ratio: 16/9;
  height: 100%;
}
.trip-hero-bg img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.trip-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(0,0,0,.85) 0%,
    rgba(0,0,0,.45) 45%,
    rgba(0,0,0,.15) 100%
  );
}

.trip-hero-content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--nav-height) + 3rem);
  padding-bottom: 3rem;
}

.trip-hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(2rem, 5vw, 3.25rem);
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
  margin: 0 0 0.5rem;
}

.trip-hero-tagline {
  font-size: clamp(0.875rem, 2vw, 1.05rem);
  color: rgba(255,255,255,.8);
  margin: 0 0 1.25rem;
  max-width: 600px;
}

.trip-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1.5rem;
}
.trip-stat {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.875rem;
  color: rgba(255,255,255,.85);
}
.trip-stat i { font-size: 0.875rem; color: rgba(255,255,255,.6); }

/* ── Trip detail body ───────────────────────────────────────────────── */

.trip-desc {
  font-size: 0.925rem;
  line-height: 1.75;
  color: var(--text-secondary);
  max-height: 9rem;
  overflow: hidden;
  transition: max-height 0.4s ease;
  white-space: pre-line;
}
.trip-desc:not(.trip-desc--expanded) {
  -webkit-mask-image: linear-gradient(to bottom, black 45%, transparent 100%);
  mask-image: linear-gradient(to bottom, black 45%, transparent 100%);
}
.trip-desc--expanded {
  max-height: 60rem;
  -webkit-mask-image: none;
  mask-image: none;
}

.trip-desc-toggle {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  background: none;
  border: none;
  padding: 0;
  margin-top: 0.5rem;
  font-size: 0.82rem;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color 0.15s;
}
.trip-desc-toggle:hover { color: var(--text-primary); }
.trip-desc-toggle i { font-size: 0.72rem; transition: transform 0.35s; }
.trip-desc-chevron--up { transform: rotate(180deg); }

/* Episodes grid on trip detail: 3 cols */
.yt-grid--trip {
  grid-template-columns: repeat(3, 1fr);
}
@media (max-width: 900px) { .yt-grid--trip { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .yt-grid--trip { grid-template-columns: 1fr; } }

/* Episode number badge */
.video-ep-badge {
  position: absolute;
  bottom: 0.4rem;
  left: 0.4rem;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 3px;
  letter-spacing: .03em;
}
[dir="rtl"] .video-ep-badge { left: auto; right: 0.4rem; }

/* ── Trip sidebar ───────────────────────────────────────────────────── */

.trip-sidebar-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.trip-sidebar-title {
  font-size: 0.8125rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--text-secondary);
  padding: 0.875rem 1rem;
  border-bottom: 1px solid var(--border);
  margin: 0;
}

.trip-country-list { padding: 0.25rem 0; }

.trip-country-row {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.5rem 1rem;
  color: var(--text-primary);
  transition: background var(--transition);
}
.trip-country-row:hover { background: var(--surface-alt); }

.trip-country-flag {
  width: 1.25rem;
  height: 0.9rem;
  border-radius: 2px;
  object-fit: cover;
  flex-shrink: 0;
}

.trip-country-name {
  font-size: 0.875rem;
  flex: 1;
}

.trip-country-arrow {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

@media (max-width: 991px) {
  .trip-hero { min-height: 300px; }
  .trip-hero-content { padding-bottom: 2rem; }
}

/* ── Trip detail — modern redesign ─────────────────────────────────── */

.trip-detail-tagline {
  color: var(--hero-text-muted);
  font-size: clamp(.9rem, 2vw, 1.05rem);
  margin: .4rem 0 0;
  max-width: 600px;
  line-height: 1.55;
}
.story-byline {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-secondary);
  margin-bottom: 1.75rem;
  flex-wrap: wrap;
}
.story-byline-sep { opacity: .45; }
.story-byline-avatar {
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-size: .75rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.story-byline-avatar--photo {
  object-fit: cover;
  border: 2px solid var(--border);
  background: var(--card-bg);
}
.story-byline-author {
  font-weight: 600;
  color: var(--text-secondary);
}
.story-byline-author-link {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  text-decoration: none;
  color: inherit;
}
.story-byline-author-link:hover .story-byline-author,
.story-byline-author-link:hover .story-card-author-avatar { opacity: .75; }
.story-byline-author-link:hover .story-byline-avatar--photo,
.story-byline-author-link:hover .story-card-author-avatar--photo { opacity: .75; }

/* ── Share row ───────────────────────────────────────────────────────────────── */
.story-share-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.story-share-btns {
  display: flex;
  align-items: center;
  gap: .4rem;
  margin-inline-start: auto;
}
.story-share-label {
  font-size: .78rem;
  color: var(--text-secondary);
  margin-inline-end: .15rem;
}
.story-share-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--card-bg);
  color: var(--text-secondary);
  font-size: .85rem;
  text-decoration: none;
  transition: border-color .15s, color .15s, background .15s;
  cursor: pointer;
}
.story-share-btn:hover {
  border-color: var(--brand-blue);
  color: var(--brand-blue);
  background: color-mix(in srgb, var(--brand-blue) 8%, var(--card-bg));
}

/* ── Related stories ─────────────────────────────────────────────────────────── */
.story-related-stories {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--border);
}
.story-related-stories-heading {
  font-size: 1.1rem;
  font-weight: 700;
  margin-bottom: 1.25rem;
}
.story-related-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}
.story-related-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: .75rem;
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  background: var(--card-bg);
  transition: border-color .15s, box-shadow .15s;
}
.story-related-card:hover {
  border-color: var(--brand-blue);
  box-shadow: var(--shadow-sm);
}
.story-related-card-thumb {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: linear-gradient(135deg, #0b1120, #1a3a5c);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(255,255,255,.2);
  font-size: 1.5rem;
}
.story-related-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .35s ease;
}
.story-related-card:hover .story-related-card-thumb img { transform: scale(1.04); }
.story-related-card-body {
  padding: .85rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.story-related-card-title {
  font-size: .9rem;
  font-weight: 600;
  margin-bottom: .3rem;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-related-card-excerpt {
  font-size: .78rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin-bottom: .5rem;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.story-related-card-meta {
  font-size: .72rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  gap: .3rem;
  margin-top: auto;
}

/* ── Trip-page story cards ──────────────────────────────────────────────────── */
.trip-stories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.25rem;
}
.trip-story-card {
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: transform .18s, box-shadow .18s;
}
.trip-story-card:hover { transform: translateY(-3px); box-shadow: 0 8px 28px rgba(0,0,0,.18); }
.trip-story-card-thumb {
  position: relative;
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--surface-raised);
  display: flex;
  align-items: center;
  justify-content: center;
}
.trip-story-card-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s;
}
.trip-story-card:hover .trip-story-card-thumb img { transform: scale(1.04); }
.trip-story-card-thumb-gradient {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.55) 0%, transparent 60%);
}
.trip-story-card-placeholder-icon {
  font-size: 2rem;
  color: var(--text-muted);
}
.trip-story-card-body {
  padding: 1rem 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: .4rem;
}
.trip-story-card-title {
  font-size: .97rem;
  font-weight: 600;
  line-height: 1.35;
  margin: 0;
  color: var(--text-primary);
}
.trip-story-card-title a { color: inherit; text-decoration: none; }
.trip-story-card-title a:hover { color: var(--brand-blue); }
.trip-story-card-excerpt {
  font-size: .82rem;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.trip-story-card-meta {
  display: flex;
  align-items: center;
  gap: .35rem;
  font-size: .76rem;
  color: var(--text-secondary);
  margin-top: auto;
  padding-top: .5rem;
}

.trip-detail-badge--live {
  background: rgba(34,197,94,.2) !important;
  border-color: rgba(34,197,94,.4) !important;
}
.trip-detail-live-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #4ade80;
  margin-right: .35rem;
  vertical-align: middle;
  animation: livePulse 2s ease-in-out infinite;
}
@keyframes livePulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: .35; }
}

/* Countries visited strip */
.trip-countries-strip {
  background: var(--surface-card);
  border-bottom: 1px solid var(--border);
  padding: .85rem 0;
}
.trip-countries-inner {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
}
.trip-countries-label {
  font-size: .7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .09em;
  color: var(--text-secondary);
  white-space: nowrap;
  flex-shrink: 0;
}
.trip-countries-chips {
  display: flex;
  flex-wrap: wrap;
  gap: .4rem;
}
.trip-country-chip {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .28rem .7rem;
  border-radius: var(--radius-pill);
  background: var(--surface-alt);
  border: 1px solid var(--border);
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-primary);
  text-decoration: none;
  transition: border-color .15s, background .15s;
}
.trip-country-chip:hover {
  border-color: var(--brand-blue);
  background: color-mix(in srgb, var(--brand-blue) 8%, var(--surface-alt));
  color: var(--text-primary);
}
.trip-country-chip--upcoming {
  opacity: .45;
  border-style: dashed;
  border-color: var(--border);
}
.trip-country-chip--upcoming:hover {
  opacity: .7;
  border-color: var(--brand-gold, #F5B700);
  background: var(--surface-alt);
}

@media (max-width: 768px) {
  .trip-countries-inner { gap: .65rem; }
}

/* ── Trip route map ─────────────────────────────────────────────────────── */

.trip-route-map-section {
  padding: 1.75rem 0 2rem;
  border-bottom: 1px solid var(--border-color);
}

.trip-route-map {
  height: 420px;
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid var(--border-color);
  background: #1a6491; /* ESRI ocean colour — hides any sub-world-edge gap */
}

@media (max-width: 576px) {
  .trip-route-map { height: 280px; }
}

/* Fullscreen button */
.ks-fs-btn {
  display: flex !important;
  align-items: center;
  justify-content: center;
  width: 26px !important;
  height: 26px !important;
  color: #333 !important;
  text-decoration: none !important;
}

.ks-fs-btn:hover { background: #f4f4f4 !important; }

/* Map fills viewport when fullscreen */
#trip-route-map:fullscreen,
#trip-route-map:-webkit-full-screen {
  height: 100dvh !important;
  border-radius: 0 !important;
  border: none !important;
}

/* Attribution — collapsed to ⓘ icon, expands on hover */
#trip-route-map .leaflet-control-attribution {
  overflow: hidden;
  max-width: 22px;
  white-space: nowrap;
  transition: max-width .35s ease;
  padding: 3px 6px !important;
  background: rgba(0,0,0,.55) !important;
  color: rgba(255,255,255,.75) !important;
  border-radius: 4px 0 0 0 !important;
  font-size: 10px !important;
  cursor: default;
}

#trip-route-map .leaflet-control-attribution:hover {
  max-width: 480px;
}

#trip-route-map .leaflet-control-attribution::before {
  content: 'ⓘ ';
  font-size: 12px;
}

#trip-route-map .leaflet-control-attribution a {
  color: rgba(255,255,255,.75) !important;
}

.ks-route-popup .leaflet-popup-content-wrapper {
  background: rgba(15,20,35,.92);
  color: #e8eaed;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  box-shadow: 0 4px 20px rgba(0,0,0,.55);
  font-family: Inter, sans-serif;
  backdrop-filter: blur(6px);
}

.ks-route-popup .leaflet-popup-tip {
  background: rgba(15,20,35,.92);
}

/* Custom map text labels (Persian city/country names overlaid on tiles) */
.ks-map-label {
  position: absolute;
  left: 10px;
  top: -18px;
  white-space: nowrap;
  font-size: 10px;
  font-weight: 700;
  color: #fff;
  text-shadow: 0 0 4px rgba(0,0,0,.98), 0 0 8px rgba(0,0,0,.85), 1px 1px 2px rgba(0,0,0,.9);
  pointer-events: none;
  user-select: none;
  line-height: 1.3;
}

.ks-map-label--rtl {
  font-family: Vazirmatn, sans-serif;
  left: auto;
  right: 10px;
}

/* ── Map page ───────────────────────────────────────────────────────────── */

.map-page {
  position: fixed;
  inset: 0;
  top: var(--navbar-h, 60px);
  background: #0a0e17;
  overflow: hidden;
}

.globe-container {
  position: relative;
  width: 100%;
  height: 100%;
  cursor: grab;
}

.globe-container:active {
  cursor: grabbing;
}

/* ── Legend panel ── */

.map-legend-panel {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(13, 17, 23, 0.88);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 1rem 1.1rem;
  min-width: 210px;
  max-width: 260px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  z-index: 10;
  color: #c9d1d9;
}

.map-legend-header {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
  font-size: 0.8rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-secondary);
  margin-bottom: 0.75rem;
}

.map-legend-hint {
  margin-left: auto;
  font-size: 0.7rem;
  font-weight: 400;
  text-transform: none;
  letter-spacing: 0;
  opacity: 0.6;
}

.map-legend-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.map-legend-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  cursor: pointer;
  padding: 0.35rem 0.5rem;
  border-radius: 6px;
  transition: background 0.15s, opacity 0.2s;
  user-select: none;
}

.map-legend-item:hover {
  background: rgba(255, 255, 255, 0.06);
}

.map-legend-item:not(.active) {
  opacity: 0.35;
}

.map-legend-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.map-legend-label {
  font-size: 0.825rem;
  color: #c9d1d9;
  flex: 1;
}

.map-legend-badge {
  font-size: 0.65rem;
  font-weight: 600;
  background: #FF6B35;
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex-shrink: 0;
  animation: pulse-badge 2s ease-in-out infinite;
}

@keyframes pulse-badge {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.6; }
}

.map-legend-loading {
  font-size: 0.8rem;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
}

.map-legend-tip {
  margin-top: 0.75rem;
  padding-top: 0.65rem;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.72rem;
  color: var(--text-secondary);
}

/* RTL legend */
[dir="rtl"] .map-legend-panel {
  left: auto;
  right: 1rem;
}

@media (max-width: 575px) {
  .map-legend-panel {
    top: auto;
    bottom: 1rem;
    left: 0.75rem;
    right: 0.75rem;
    max-width: none;
    min-width: 0;
  }
  [dir="rtl"] .map-legend-panel {
    left: 0.75rem;
    right: 0.75rem;
  }
}

/* ── Map video panel (shown on stop hover) ── */

.map-video-panel {
  position: fixed;   /* JS sets left/top */
  width: 290px;
  max-height: 72vh;
  background: rgba(10, 14, 23, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.55);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  z-index: 200;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
}

.map-video-panel.visible {
  pointer-events: auto;
  opacity: 1;
}

.mvp-header {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1rem 0.65rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.mvp-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mvp-meta {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.mvp-city {
  font-size: 0.9rem;
  font-weight: 600;
  color: #c9d1d9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mvp-trip {
  font-size: 0.72rem;
  color: var(--text-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mvp-count {
  font-size: 0.7rem;
  color: var(--text-secondary);
  flex-shrink: 0;
  white-space: nowrap;
}

.mvp-list {
  overflow-y: auto;
  flex: 1;
  padding: 0.5rem 0;
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}

.mvp-list::-webkit-scrollbar { width: 4px; }
.mvp-list::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.mvp-video {
  display: flex;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.55rem 0.85rem;
  text-decoration: none;
  transition: background 0.12s;
  cursor: pointer;
}

.mvp-video:hover {
  background: rgba(255, 255, 255, 0.06);
}

.mvp-thumb {
  width: 100px;
  height: 56px;
  object-fit: cover;
  border-radius: 5px;
  flex-shrink: 0;
  background: #1a1f2e;
}

.mvp-vinfo {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.mvp-vtitle {
  font-size: 0.84rem;
  font-weight: 500;
  line-height: 1.4;
  color: var(--text-primary);
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mvp-vmeta {
  font-size: 0.7rem;
  color: var(--text-tertiary);
  margin: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mvp-none {
  font-size: 0.8rem;
  color: var(--text-secondary);
  padding: 0.75rem 1rem;
  margin: 0;
}

.mvp-nearby {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: .45rem .75rem .3rem;
}
.mvp-nearby-label {
  font-size: .68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: rgba(255,255,255,.4);
  margin-bottom: .3rem;
}
.mvp-nearby-stop {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .18rem 0;
  font-size: .8rem;
  color: rgba(255,255,255,.8);
  text-decoration: none;
  transition: color .12s;
}
.mvp-nearby-stop:hover { color: #fff; }
.mvp-nearby-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}

.mvp-trip-link {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0.6rem 1rem;
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--brand-blue, #1a7fd4);
  text-decoration: none;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  transition: background 0.12s;
  flex-shrink: 0;
}

.mvp-trip-link:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--brand-blue, #1a7fd4);
}

/* On mobile: ignore JS positioning, anchor to bottom */
@media (max-width: 575px) {
  .map-video-panel {
    position: fixed !important;
    top: auto !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    width: 100% !important;
    max-height: 50vh;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.6);
    transform: translateY(12px);
    transition: opacity 0.15s ease, transform 0.2s ease;
  }
  .map-video-panel.visible { transform: translateY(0); }
}

/* ── Quote strip (homepage between videos and countries) ─────────────────── */
.quote-strip {
  background: var(--surface-footer);
  padding: 3.5rem 0;
  text-align: center;
}
.quote-strip-inner {
  margin: 0;
  padding: 0;
  border: none;
}
.quote-strip-fa {
  font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
  font-size: clamp(1.2rem, 3vw, 1.75rem);
  font-weight: 600;
  color: var(--brand-gold, #c9a84c);
  line-height: 1.7;
  margin: 0 0 0.4rem;
  letter-spacing: 0.01em;
}
.quote-strip-en {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: clamp(0.95rem, 2vw, 1.15rem);
  font-style: italic;
  color: rgba(255,255,255,.50);
  margin: 0;
  letter-spacing: 0.02em;
}

/* ── About page quote blockquote ─────────────────────────────────────────── */
.about-quote {
  margin: 2.5rem 0;
  padding: 1.5rem 2rem;
  border-left: 3px solid var(--brand-gold, #c9a84c);
  background: var(--surface-2, rgba(0,0,0,.04));
  border-radius: 0 8px 8px 0;
}
[dir="rtl"] .about-quote {
  border-left: none;
  border-right: 3px solid var(--brand-gold, #c9a84c);
  border-radius: 8px 0 0 8px;
}
.about-quote-fa {
  font-family: 'Vazirmatn', 'Segoe UI', sans-serif;
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--brand-gold, #c9a84c);
  line-height: 1.8;
  margin: 0 0 0.25rem;
}
.about-quote-en {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: var(--text-muted, #6c757d);
  margin: 0;
}

/* ── About page hero split (Option B) ────────────────────────────────────── */
.country-hero.about-hero {
  overflow: hidden;
  padding-bottom: 0; /* portrait sits flush with hero bottom edge */
}

.about-hero-inner {
  position: relative;
  z-index: 1;
  padding: 1rem 0 1.5rem;
}
.about-hero-text {
  max-width: 640px;
}

/* Brand logo — inside the hero, white logo works against the dark hero bg */
.about-brand-logo {
  display: block;
  margin: 1.5rem 0 0;
  width: auto;
  max-width: min(280px, 50vw);
  height: auto;
  opacity: .88;
}

/* Bio portrait in "Who Is Behind" content section */
.about-bio-portrait {
  float: right;
  width: clamp(120px, 26%, 180px);
  border-radius: 10px;
  margin: 0.25rem 0 1.25rem 1.5rem;
  height: auto;
  display: block;
  box-shadow: 0 8px 28px rgba(0,0,0,.18);
}
[dir="rtl"] .about-bio-portrait {
  float: left;
  margin: 0.25rem 1.5rem 1.25rem 0;
}
@media (max-width: 575px) {
  .about-bio-portrait {
    width: 100px;
    margin: 0.25rem 0 0.75rem 1rem;
  }
}

/* ── About page portrait (Option A sidebar — keep for rollback) ───────────── */
.about-portrait-wrap {
  text-align: center;
  margin-bottom: 1.75rem;
}
.about-portrait-img {
  width: 100%;
  max-width: 300px;
  height: auto;
  border-radius: 18px;
  filter: drop-shadow(0 12px 32px rgba(0, 0, 0, 0.45));
  display: block;
  margin: 0 auto;
}
.about-portrait-caption {
  margin-top: 1rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
}
.about-portrait-name {
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-primary);
  letter-spacing: 0.01em;
}
.about-portrait-role {
  font-size: 0.78rem;
  color: var(--text-secondary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
@media (max-width: 991px) {
  .about-portrait-img { max-width: 220px; }
}

/* ── Footer tagline slogan ────────────────────────────────────────────────── */
.footer-tagline-slogan {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 1rem;
  font-style: italic;
  color: rgba(255,255,255,.40);
  margin: 0.25rem 0 0;
  letter-spacing: 0.03em;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DASHBOARD
   ═══════════════════════════════════════════════════════════════════════════ */

.dash-wrap {
  padding: 2rem 0 4rem;
}

/* ── Layout ─────────────────────────────────────────────────────────────── */
.dash-layout {
  display: flex;
  gap: 2rem;
  align-items: flex-start;
}

/* ── Sidebar ─────────────────────────────────────────────────────────────── */
.dash-sidebar {
  width: 240px;
  flex-shrink: 0;
  position: sticky;
  top: calc(var(--nav-height) + 1.5rem);
}

.dash-sidebar-card {
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.dash-user-block {
  padding: 1.5rem;
  border-bottom: 1px solid var(--border);
  text-align: center;
}

.dash-avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-size: 1.5rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 0.75rem;
  overflow: hidden;
  flex-shrink: 0;
}
.dash-avatar.has-image { background: transparent; }
.dash-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.dash-user-name {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--text-primary);
  margin-bottom: 0.2rem;
}

.dash-user-email {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  word-break: break-all;
  margin-bottom: 0.5rem;
}

.dash-plan-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.7rem;
  font-weight: 600;
  padding: 0.2rem 0.65rem;
  border-radius: var(--radius-pill);
}

.dash-plan-badge--premium {
  background: rgba(var(--brand-gold-rgb), 0.15);
  color: #9a7200;
}

[data-bs-theme="dark"] .dash-plan-badge--premium {
  background: rgba(var(--brand-gold-rgb), 0.22);
  color: var(--brand-gold);
}

.dash-plan-badge--free {
  background: var(--surface-alt);
  color: var(--text-secondary);
}

/* ── Sidebar nav ────────────────────────────────────────────────────────── */
.dash-nav {
  padding: 0.5rem 0;
}

.dash-nav-link {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  padding: 0.65rem 1.25rem;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: background var(--transition), color var(--transition);
  border-left: 3px solid transparent;
}

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

.dash-nav-link.active {
  color: var(--brand-blue);
  border-left-color: var(--brand-blue);
  background: rgba(var(--brand-blue-rgb), 0.07);
  font-weight: 600;
}

.dash-nav-link i {
  font-size: 0.95rem;
  width: 1rem;
  text-align: center;
  flex-shrink: 0;
}

.dash-nav-divider {
  margin: 0.375rem 0.875rem;
  border-color: var(--border-color);
  opacity: 0.5;
}

/* ── Content area ────────────────────────────────────────────────────────── */
.dash-content {
  flex: 1;
  min-width: 0;
}

/* ── Mobile nav tabs (bottom tab bar) ───────────────────────────────────── */
.dash-mobile-nav {
  display: none;
}

.dash-mobile-nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.45rem 1rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition);
  flex-shrink: 0;
}

.dash-mobile-nav-link:hover,
.dash-mobile-nav-link.active {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}

/* ── In-page filter tabs (history, saved) ────────────────────────────────── */
.dash-filter-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.dash-filter-tab {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  white-space: nowrap;
  padding: 0.35rem 0.9rem;
  border-radius: var(--radius-pill);
  font-size: 0.82rem;
  font-weight: 500;
  color: var(--text-secondary);
  text-decoration: none;
  background: var(--surface-alt);
  border: 1px solid var(--border);
  transition: background var(--transition), color var(--transition), border-color var(--transition);
}
.dash-filter-tab:hover,
.dash-filter-tab.active {
  background: var(--brand-blue);
  color: #fff;
  border-color: var(--brand-blue);
}

/* ── Cards ───────────────────────────────────────────────────────────────── */
.dash-card {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md);
  padding: 1.5rem;
  margin-bottom: 1.25rem;
}

.dash-card-title {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text-tertiary);
  margin-bottom: 1rem;
}

/* ── Privacy & Data page ────────────────────────────────────────────────── */
.privacy-data-grid { display: flex; flex-direction: column; gap: 0; }
.privacy-data-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 0;
  border-bottom: 1px solid var(--border-color);
}
.privacy-data-row:last-child { border-bottom: none; }
.privacy-data-icon {
  width: 2rem;
  flex-shrink: 0;
  font-size: 1rem;
  color: var(--text-tertiary);
  text-align: center;
}
.privacy-data-body { flex: 1; min-width: 0; }
.privacy-data-label { font-size: .875rem; font-weight: 600; color: var(--text-primary); }
.privacy-data-detail { font-size: .78rem; color: var(--text-secondary); margin-top: .1rem; }
.privacy-data-count { font-size: .78rem; color: var(--text-tertiary); white-space: nowrap; }
.privacy-action-icon { font-size: 1.5rem; }

/* ── Stats row ───────────────────────────────────────────────────────────── */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
  margin-bottom: 1.25rem;
}

.dash-stat-card {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
}

.dash-stat-card:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-md);
}

.dash-stat-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-primary);
  line-height: 1.1;
}

.dash-stat-label {
  font-size: 0.75rem;
  color: var(--text-tertiary);
  margin-top: 0.25rem;
}

/* ── Subscription card ───────────────────────────────────────────────────── */
.dash-sub-header {
  padding: 1.5rem;
  background: linear-gradient(135deg, var(--brand-blue) 0%, #003049 100%);
  color: #fff;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.dash-sub-body {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-top: none;
  padding: 1.25rem 1.5rem;
  border-radius: 0 0 var(--radius-lg) var(--radius-lg);
  box-shadow: var(--shadow-sm);
}

/* ── Billing gold alert / founding banner ────────────────────────────────── */
.founding-banner {
  background: #fef9e7;
  border: 1px solid #f5d87a;
  border-radius: var(--radius-lg);
}
.founding-banner-title { color: #b58900; }
.founding-badge {
  width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0;
  background: #fdeea3; border: 2px solid #f5c842;
  display: flex; align-items: center; justify-content: center;
}
.founding-badge span { font-weight: 800; font-size: .85rem; color: #b58900; }
.founding-badge i    { color: #b58900; }

.billing-gold-alert {
  background: #fef9e7;
  border: 1px solid #f5d87a;
  border-radius: var(--radius-md);
}

.billing-danger-alert {
  background: #fef2f2;
  border: 1px solid #fca5a5;
  border-radius: var(--radius-md);
}

.billing-cancel-btn {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .75rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--bs-danger);
  background: transparent;
  border: 1px solid rgba(220, 53, 69, .35);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition);
}
.billing-cancel-btn:hover {
  background: rgba(220, 53, 69, .06);
  border-color: var(--bs-danger);
}
[data-bs-theme="dark"] .billing-cancel-btn {
  border-color: rgba(220, 53, 69, .4);
}
[data-bs-theme="dark"] .billing-cancel-btn:hover {
  background: rgba(220, 53, 69, .12);
}

.billing-portal-link {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  padding: .3rem .75rem;
  font-size: .8rem;
  font-weight: 500;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.billing-portal-link:hover {
  background: var(--surface-alt);
  border-color: var(--text-secondary);
  color: var(--body-text);
}

.billing-currency-btn,
.billing-currency-active {
  padding: .2rem .55rem;
  font-size: .75rem;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-color);
  cursor: pointer;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.billing-currency-btn {
  background: transparent;
  color: var(--text-secondary);
}
.billing-currency-btn:hover {
  background: var(--surface-alt);
  color: var(--body-text);
}
.billing-currency-active {
  background: var(--brand-blue);
  border-color: var(--brand-blue);
  color: #fff;
  font-weight: 600;
}

.billing-support-link {
  color: var(--brand-blue);
  text-decoration: underline;
  text-decoration-color: transparent;
  text-underline-offset: 2px;
  transition: text-decoration-color var(--transition), opacity var(--transition);
}
.billing-support-link:hover {
  text-decoration-color: currentColor;
  opacity: .8;
}

[data-bs-theme="dark"] .founding-banner {
  background: rgba(var(--brand-gold-rgb), .1);
  border-color: rgba(var(--brand-gold-rgb), .32);
}
[data-bs-theme="dark"] .founding-banner-title { color: var(--brand-gold); }
[data-bs-theme="dark"] .founding-badge {
  background: rgba(var(--brand-gold-rgb), .18);
  border-color: rgba(var(--brand-gold-rgb), .52);
}
[data-bs-theme="dark"] .founding-badge span { color: var(--brand-gold); }
[data-bs-theme="dark"] .founding-badge i    { color: var(--brand-gold); }

[data-bs-theme="dark"] .billing-gold-alert {
  background: rgba(var(--brand-gold-rgb), .1);
  border-color: rgba(var(--brand-gold-rgb), .32);
}

[data-bs-theme="dark"] .billing-danger-alert {
  background: rgba(220, 38, 38, .12);
  border-color: rgba(220, 38, 38, .35);
}

/* ── Watch history rows ──────────────────────────────────────────────────── */
.dash-video-row {
  display: flex;
  gap: 0.75rem;
  align-items: flex-start;
  padding: 0.75rem 0;
  border-bottom: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: opacity var(--transition);
}

.dash-video-row:last-child { border-bottom: none; }
.dash-video-row:hover { opacity: 0.82; text-decoration: none; }

.dash-video-thumb {
  width: 110px;
  aspect-ratio: 16/9;
  border-radius: var(--radius-sm);
  object-fit: cover;
  flex-shrink: 0;
  background: var(--surface-alt);
}

.dash-video-info { flex: 1; min-width: 0; }

.dash-video-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  line-height: 1.4;
  margin-bottom: 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.dash-video-meta {
  font-size: 0.75rem;
  color: var(--text-tertiary);
}

/* ── Playlists ────────────────────────────────────────────────────────────── */
.playlist-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr));
  gap: 1.25rem;
}
.playlist-card {
  display: block;
  border-radius: .75rem;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border);
  transition: box-shadow var(--transition), transform var(--transition);
  color: inherit;
}
.playlist-card:hover { box-shadow: 0 6px 20px rgba(0,0,0,.12); transform: translateY(-2px); }

/* 2×2 thumbnail mosaic */
.playlist-card-mosaic,
.playlist-public-mosaic {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  aspect-ratio: 16/9;
  position: relative;
  background: var(--surface-alt);
}
.playlist-public-mosaic { border-radius: .75rem; overflow: hidden; width: 200px; flex-shrink: 0; }
.playlist-card-mosaic-cell { overflow: hidden; }
.playlist-card-mosaic-cell img { width: 100%; height: 100%; object-fit: cover; display: block; }
.playlist-card-mosaic-empty {
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
  background: var(--surface-alt);
  color: var(--text-tertiary);
  font-size: 1rem;
}
.playlist-card-overlay {
  position: absolute;
  bottom: 0; right: 0;
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: .75rem;
  font-weight: 600;
  padding: .25rem .5rem;
  border-radius: .25rem 0 0 0;
}
.playlist-card-body { padding: .75rem; }
.playlist-card-title {
  font-weight: 600;
  font-size: .9rem;
  color: var(--text-primary);
  margin-bottom: .3rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.playlist-card-meta { display: flex; align-items: center; gap: .5rem; }
.playlist-card-badge {
  display: inline-flex; align-items: center; gap: .25rem;
  font-size: .7rem; font-weight: 600;
  padding: .15rem .45rem; border-radius: 2rem;
}
.playlist-card-badge--public  { background: rgba(25,135,84,.12); color: var(--brand-green); }
.playlist-card-badge--private { background: var(--surface-alt); color: var(--text-tertiary); }
[data-bs-theme="dark"] .playlist-card-badge--public  { background: rgba(25,135,84,.2); }

/* Playlist items (drag-sortable list, dashboard + public page) */
.pl-item {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .6rem 1rem;
  transition: background var(--transition);
}
.pl-item--bordered { border-top: 1px solid var(--border); }
.pl-item:hover     { background: var(--surface-alt); }
.pl-item--ghost    { opacity: .4; }

.pl-item-handle {
  cursor: grab;
  color: var(--text-tertiary);
  padding: .25rem;
  font-size: 1.1rem;
  flex-shrink: 0;
  touch-action: none;
}
.pl-item-handle:active { cursor: grabbing; }

.pl-item-thumb-link {
  position: relative;
  display: block;
  flex-shrink: 0;
  width: 120px;
  border-radius: .375rem;
  overflow: hidden;
  line-height: 0;
}
.pl-item-thumb {
  width: 120px;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
  border-radius: .375rem;
}
.pl-item-duration {
  position: absolute;
  bottom: 3px; right: 4px;
  background: rgba(0,0,0,.75);
  color: #fff;
  font-size: .65rem;
  font-weight: 600;
  padding: 0 .3rem;
  border-radius: .2rem;
}
.pl-item-info {
  flex-grow: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}
.pl-item-title {
  font-size: .875rem;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-decoration: none;
}
.pl-item-title:hover { color: var(--brand-blue); }
.pl-item-pos  { font-size: .75rem; color: var(--text-tertiary); }
.pl-item-views{ font-size: .75rem; color: var(--text-tertiary); }
.pl-item-pos-static { width: 1.5rem; text-align: right; font-size: .8rem; color: var(--text-tertiary); flex-shrink: 0; }
.pl-item-remove {
  background: none;
  border: none;
  padding: .4rem;
  color: var(--text-tertiary);
  cursor: pointer;
  border-radius: .375rem;
  flex-shrink: 0;
  font-size: .85rem;
  opacity: 0;
  transition: opacity var(--transition), color var(--transition);
}
.pl-item:hover .pl-item-remove { opacity: 1; }
.pl-item-remove:hover { color: var(--danger); background: rgba(224,32,44,.08); }

/* ── Playlist player ──────────────────────────────────────────────────────── */
.playlist-player-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  grid-template-rows: auto 1fr;
  grid-template-areas:
    "pl-top     pl-sidebar"
    "pl-bottom  pl-sidebar";
  gap: 0 1.25rem;
  align-items: start;
  padding: 1.25rem 1.25rem 3rem;
  max-width: 1400px;
  margin: 0 auto;
}
.pl-main-top    { grid-area: pl-top;    min-width: 0; }
.pl-main-bottom { grid-area: pl-bottom; min-width: 0; }
.playlist-player-sidebar {
  grid-area: pl-sidebar;
  position: sticky;
  top: 72px;
  max-height: calc(100vh - 88px);
  display: flex;
  flex-direction: column;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: .875rem;
  overflow: hidden;
}
.playlist-player-queue-header {
  padding: .875rem 1rem .75rem;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.playlist-player-queue-title {
  font-size: .875rem;
  font-weight: 600;
  color: var(--text-primary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-bottom: .15rem;
}
.playlist-player-queue-meta { font-size: .75rem; color: var(--text-tertiary); }
.playlist-player-queue { overflow-y: auto; flex: 1; }

/* Queue row */
.pl-queue-item {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .5rem .75rem;
  text-decoration: none;
  transition: background var(--transition);
  border-top: 1px solid var(--border);
  cursor: pointer;
  color: inherit;
}
.pl-queue-item:first-child { border-top: none; }
.pl-queue-item:hover { background: var(--surface-alt); text-decoration: none; color: inherit; }
.pl-queue-item--active { background: rgba(var(--brand-blue-rgb), .06); padding-left: .625rem; border-left: 3px solid var(--brand-blue); }
.pl-queue-item--active .pl-queue-title { color: var(--brand-blue); }

/* Playing bars animation */
.pl-queue-pos {
  width: 1.25rem;
  text-align: right;
  font-size: .75rem;
  color: var(--text-tertiary);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: flex-end;
}
.pl-queue-bars {
  display: flex;
  align-items: flex-end;
  gap: 2px;
  height: 13px;
}
.pl-queue-bars span {
  display: block;
  width: 3px;
  background: var(--brand-blue);
  border-radius: 2px;
  animation: plBarPulse 1.1s ease-in-out infinite;
}
.pl-queue-bars span:nth-child(2) { animation-delay: .22s; }
.pl-queue-bars span:nth-child(3) { animation-delay: .44s; }
@keyframes plBarPulse {
  0%, 100% { height: 3px; }
  50%       { height: 13px; }
}

/* Queue thumbnail */
.pl-queue-thumb {
  position: relative;
  width: 86px;
  flex-shrink: 0;
  border-radius: .3rem;
  overflow: hidden;
  line-height: 0;
}
.pl-queue-thumb img {
  width: 86px;
  aspect-ratio: 16/9;
  object-fit: cover;
  display: block;
}
.pl-queue-dur {
  position: absolute;
  bottom: 2px; right: 3px;
  background: rgba(0,0,0,.8);
  color: #fff;
  font-size: .6rem;
  font-weight: 600;
  padding: 0 .25rem;
  border-radius: .2rem;
  line-height: 1.4;
}
.pl-queue-info { flex: 1; min-width: 0; }
.pl-queue-title {
  font-size: .78rem;
  font-weight: 500;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-bottom: .2rem;
}
.pl-queue-views { font-size: .7rem; color: var(--text-tertiary); }

/* Player title + meta */
.playlist-player-title {
  font-size: 1.1rem;
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: .4rem;
}
.playlist-player-meta {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
  font-size: .82rem;
  color: var(--text-tertiary);
  margin-bottom: .75rem;
}
.playlist-player-owner {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .82rem;
  color: var(--text-secondary);
  text-decoration: none;
  padding: .5rem 0;
  border-top: 1px solid var(--border);
}
.playlist-player-owner:hover { color: var(--brand-blue); }

@media (max-width: 991px) {
  .playlist-player-wrap {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    grid-template-areas: "pl-top" "pl-sidebar" "pl-bottom";
    gap: 0;
    padding: 0 0 2rem;
  }
  .playlist-player-sidebar {
    position: static;
    max-height: 50vh;
    border-radius: 0;
    border-left: none;
    border-right: none;
  }
}

/* Saved grid ──────────────────────────────────────────────────────────────── */
.dash-saved-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}

.dash-saved-card {
  background: var(--surface-card);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  position: relative;
  text-decoration: none;
  color: inherit;
  display: block;
  transition: transform var(--transition), box-shadow var(--transition);
}

.dash-saved-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.dash-saved-card-thumb {
  aspect-ratio: 16/9;
  object-fit: cover;
  width: 100%;
  background: var(--surface-alt);
}

.dash-saved-card-body {
  padding: 0.65rem 0.75rem 0.75rem;
}

.dash-saved-card-title {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-primary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.35;
  margin-bottom: 0.2rem;
}

.dash-saved-card-meta {
  font-size: 0.7rem;
  color: var(--text-tertiary);
}

.dash-saved-remove {
  position: absolute;
  top: 0.4rem;
  right: 0.4rem;
  background: rgba(0,0,0,.55);
  color: #fff;
  border: none;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  font-size: 0.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity var(--transition);
}

.dash-saved-card:hover .dash-saved-remove { opacity: 1; }

/* ── Notification bell badge ─────────────────────────────────────────────── */
.nav-notif-badge {
  position: absolute;
  top: 1px;
  right: 1px;
  background: #e0245e;
  color: #fff;
  font-size: 0.55rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 4px;
  min-width: 15px;
  text-align: center;
  line-height: 1.7;
  pointer-events: none;
}
.nav-notif-badge--drawer {
  position: static;
  margin-left: auto;
  border-radius: 10px;
}
.nav-notif-badge--user {
  position: static;
  border-radius: 10px;
}

/* ── Notification dropdown panel ─────────────────────────────────────────── */
.nav-notif-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  width: 400px;
  background: var(--bs-body-bg);
  border: 1px solid var(--bs-border-color);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0,0,0,.14);
  z-index: 1100;
  overflow: hidden;
  transform-origin: top right;
}
.nav-notif-t       { transition: opacity 180ms ease, transform 180ms ease; }
.nav-notif-hidden  { opacity: 0; transform: translateY(-6px) scale(0.97); }
.nav-notif-visible { opacity: 1; transform: translateY(0)    scale(1); }

/* Mobile drawer user sub-menu (slides down) */
.mob-user-menu-t       { transition: opacity 160ms ease, transform 160ms ease; }
.mob-user-menu-hidden  { opacity: 0; transform: translateY(-5px) scale(0.98); }
.mob-user-menu-visible { opacity: 1; transform: translateY(0)    scale(1); }

/* Dashboard mobile more panel (slides up) */
.dash-more-t       { transition: opacity 180ms ease, transform 180ms ease; }
.dash-more-hidden  { opacity: 0; transform: translateY(10px); }
.dash-more-visible { opacity: 1; transform: translateY(0); }
/* Dashboard mobile more backdrop (fade) */
.dash-more-bd-t       { transition: opacity 180ms ease; }
.dash-more-bd-hidden  { opacity: 0; }
.dash-more-bd-visible { opacity: 1; }
.nav-notif-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.75rem 1rem;
  border-bottom: 1px solid var(--bs-border-color);
}
.nav-notif-head-title {
  font-size: 0.875rem;
  font-weight: 700;
  color: var(--bs-body-color);
}
.nav-notif-mark-btn {
  background: none;
  border: none;
  padding: 0;
  font-size: 0.75rem;
  color: var(--brand-blue, #0F67B1);
  cursor: pointer;
  font-weight: 500;
}
.nav-notif-mark-btn:hover { text-decoration: underline; }
.nav-notif-spinner {
  display: flex;
  justify-content: center;
  padding: 1.5rem;
}
.nav-notif-empty {
  padding: 1.5rem 1rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--bs-secondary-color);
}
.nav-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  padding: 0.65rem 1rem;
  border-bottom: 1px solid var(--bs-border-color);
  text-decoration: none;
  color: var(--bs-body-color);
  transition: background .15s ease;
  position: relative;
}
.nav-notif-item:last-of-type { border-bottom: none; }
.nav-notif-item:hover { background: var(--bs-secondary-bg); }
.nav-notif-item--unread { background: rgba(15, 103, 177, 0.05); }
.nav-notif-item--unread:hover { background: rgba(15, 103, 177, 0.09); }
.nav-notif-thumb {
  flex-shrink: 0;
  width: 44px;
  height: 44px;
  border-radius: 6px;
  overflow: hidden;
  background: var(--bs-secondary-bg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--bs-secondary-color);
}
.nav-notif-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.nav-notif-body { flex: 1; min-width: 0; }
.nav-notif-text {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--bs-body-color);
}
.nav-notif-time {
  font-size: 0.7rem;
  color: var(--bs-secondary-color);
  margin: 0;
}
.nav-notif-dot {
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--brand-blue, #0F67B1);
  margin-top: 4px;
}
.nav-notif-footer {
  display: block;
  text-align: center;
  padding: 0.65rem 1rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--brand-blue, #0F67B1);
  text-decoration: none;
  border-top: 1px solid var(--bs-border-color);
  transition: background .15s ease;
}
.nav-notif-footer:hover {
  background: var(--bs-secondary-bg);
  color: var(--brand-blue, #0F67B1);
}
[data-bs-theme="dark"] .nav-notif-item--unread { background: rgba(15, 103, 177, 0.12); }
[data-bs-theme="dark"] .nav-notif-item--unread:hover { background: rgba(15, 103, 177, 0.18); }
[data-bs-theme="dark"] .nav-notif-panel { box-shadow: 0 8px 32px rgba(0,0,0,.4); }

/* ── Dashboard notification items ────────────────────────────────────────── */
.dash-notif-item {
  display: flex;
  align-items: flex-start;
  gap: 0.875rem;
  padding: 0.875rem 1.25rem;
  border-bottom: 1px solid var(--border);
  transition: background var(--transition);
}
.dash-notif-item:last-child { border-bottom: none; }
.dash-notif-item--unread { background: var(--surface-alt); }
.dash-notif-item--unread:first-child { border-radius: var(--radius) var(--radius) 0 0; }
.dash-notif-icon {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.9rem;
}
.dash-notif-icon--video   { background: rgba(15,103,177,.12); color: var(--brand-blue); }
.dash-notif-icon--account { background: rgba(76,175,80,.12);  color: var(--brand-green); }
.dash-notif-body { flex: 1; min-width: 0; }
.dash-notif-title {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-primary);
  margin-bottom: 0.15rem;
}
.dash-notif-title a { color: inherit; text-decoration: none; }
.dash-notif-title a:hover { color: var(--brand-blue); }
.dash-notif-meta { font-size: 0.75rem; color: var(--text-tertiary); }
.dash-nav-badge {
  margin-left: auto;
  background: #e0245e;
  color: #fff;
  font-size: 0.6rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 16px;
  text-align: center;
  line-height: 1.7;
}

/* ── History page ────────────────────────────────────────────────────────── */
.dash-history-row {
  display: flex;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 0 1.25rem;
}
.dash-history-row:last-child { border-bottom: none; }
.dash-history-row .dash-video-row {
  flex: 1;
  min-width: 0;
  border-bottom: none;
}
.dash-history-remove {
  flex-shrink: 0;
  background: none;
  color: var(--text-secondary);
  border: none;
  width: 28px;
  height: 28px;
  font-size: 0.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  border-radius: 50%;
  opacity: 0;
  transition: opacity var(--transition), background var(--transition), color var(--transition);
}
.dash-history-row:hover .dash-history-remove,
.dash-notif-item:hover .dash-history-remove { opacity: 1; }
.dash-history-remove:hover { background: rgba(125,125,125,.18); color: var(--text-primary); }

/* ── Empty state ─────────────────────────────────────────────────────────── */
.dash-empty {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-tertiary);
}

.dash-empty i { font-size: 2.5rem; margin-bottom: 0.75rem; display: block; }
.dash-empty p { font-size: 0.875rem; margin: 0; }

/* ── Settings view-mode rows ─────────────────────────────────────────────── */
.dash-settings-dl {
  margin: 0;
}
.dash-settings-row {
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: .55rem 0;
  border-bottom: 1px solid var(--border);
}
.dash-settings-row:last-child {
  border-bottom: none;
  padding-bottom: 0;
}
.dash-settings-row dt {
  width: 100px;
  flex-shrink: 0;
  font-size: .75rem;
  font-weight: 500;
  color: var(--text-tertiary);
  text-transform: uppercase;
  letter-spacing: .03em;
}
.dash-settings-row dd {
  flex: 1;
  margin: 0;
  font-size: .875rem;
  color: var(--body-text);
  min-width: 0;
  word-break: break-word;
}

/* ── Settings form ───────────────────────────────────────────────────────── */
.dash-settings-section {
  margin-bottom: 1.5rem;
}

.dash-settings-section + .dash-settings-section {
  padding-top: 1.5rem;
  border-top: 1px solid var(--border);
}

/* Section-header action buttons (Revoke All, etc.) */
.dash-section-action {
  font-size: .75rem;
  padding: .2rem .6rem;
  line-height: 1.4;
}

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
  /* Layout */
  .dash-wrap { padding: 1rem 0 4.5rem; }
  .dash-layout { flex-direction: column; gap: 0; align-items: stretch; }
  .dash-sidebar { width: 100%; position: static; }
  .dash-sidebar-card { display: none; }
  .dash-content { padding: 0; width: 100%; }

  /* Bottom tab bar */
  .dash-mobile-nav {
    display: flex;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 200;
    background: var(--surface-card);
    border-top: 1px solid var(--border);
    padding: 0.35rem 0 env(safe-area-inset-bottom, 0.35rem);
    gap: 0;
    margin: 0;
    justify-content: space-around;
    box-shadow: 0 -2px 12px rgba(0,0,0,.07);
  }
  .dash-mobile-nav-link {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex: 1;
    gap: 0.15rem;
    padding: 0.3rem 0.2rem;
    border-radius: 0;
    background: transparent;
    border: none;
    font-size: 0.6rem;
    font-weight: 500;
    color: var(--text-tertiary);
    letter-spacing: 0;
    white-space: normal;
    text-align: center;
  }
  .dash-mobile-nav-link i {
    font-size: 1.15rem;
    line-height: 1;
  }
  .dash-mobile-nav-link:hover,
  .dash-mobile-nav-link.active {
    background: transparent;
    border: none;
    color: var(--brand-blue);
  }
  .dash-mobile-nav-link.active i {
    /* subtle scale on active */
    transform: scale(1.1);
  }

  /* Cards */
  .dash-card { padding: 1rem; margin-bottom: 1rem; }
  .dash-sub-body { padding: 1rem; }

  /* Billing actions already use flex-wrap via d-flex flex-wrap in HTML */

  /* Invoice table: hide date column */
  .billing-inv-date { display: none; }

  /* Stats grid */
  .dash-stats { grid-template-columns: repeat(2, 1fr); }

  /* Video list */
  .dash-video-thumb { width: 80px; }
  .dash-saved-grid { grid-template-columns: repeat(2, 1fr); }

  /* Settings view rows: stack on mobile */
  .dash-settings-row { flex-direction: column; gap: .1rem; padding: .5rem 0; align-items: flex-start; }
  .dash-settings-row dt { width: auto; }

  /* Settings page */
  .dash-card-title { font-size: .68rem; margin-bottom: .75rem; }
  .dash-settings-section { margin-bottom: 1rem; }

  /* Device / session list rows — tighter gap, smaller Revoke button */
  [id="trusted-devices"] .btn,
  [id="active-sessions"] .btn-sm { font-size: .72rem; padding: .18rem .5rem; }

  /* Form labels */
  .dash-content .form-label { font-size: .8rem; margin-bottom: .25rem; }
  .dash-content .form-text  { font-size: .75rem; }

  /* ── Mobile nav: more backdrop + slide-up panel ─────────────────────────── */
  .dash-mobile-more-backdrop {
    position: fixed;
    inset: 0;
    z-index: 198;
    background: rgba(0,0,0,.5);
    backdrop-filter: blur(2px);
  }
  .dash-mobile-more-panel {
    position: fixed;
    left: 0;
    right: 0;
    bottom: calc(65px + env(safe-area-inset-bottom, 0px));
    z-index: 199;
    background: var(--surface-card);
    border-top: 2px solid var(--brand-blue);
    border-radius: 18px 18px 0 0;
    box-shadow: 0 -12px 48px rgba(0,0,0,.35), 0 -2px 8px rgba(0,0,0,.2);
    overflow: hidden;
  }
  .dash-mobile-more-header {
    display: grid;
    grid-template-columns: 2.5rem 1fr 2.5rem;
    align-items: center;
    padding: .6rem .75rem .3rem;
  }
  .dash-mobile-more-handle {
    grid-column: 2;
    justify-self: center;
    width: 40px;
    height: 4px;
    background: var(--border-strong);
    border-radius: 2px;
    opacity: .6;
  }
  .dash-mobile-more-close {
    grid-column: 3;
    justify-self: end;
    background: var(--surface-alt);
    border: none;
    border-radius: 50%;
    width: 2rem;
    height: 2rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: .8rem;
    cursor: pointer;
    transition: background var(--transition), color var(--transition);
  }
  .dash-mobile-more-close:active {
    background: var(--border);
    color: var(--text-primary);
  }
  .dash-mobile-more-divider {
    height: 1px;
    background: var(--border);
    margin: .25rem 1.25rem;
  }
  .dash-mobile-more-item {
    display: flex;
    align-items: center;
    gap: .85rem;
    padding: .75rem 1.25rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: .9rem;
    font-weight: 500;
    transition: background var(--transition);
  }
  .dash-mobile-more-item:active { background: var(--surface-alt); }
  .dash-mobile-more-icon {
    width: 2rem;
    height: 2rem;
    border-radius: .5rem;
    background: var(--surface-alt);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
  }
  .dash-mobile-more-icon i {
    font-size: .95rem;
    color: var(--text-secondary);
  }
  .dash-mobile-more-item.active .dash-mobile-more-icon {
    background: rgba(var(--brand-blue-rgb), .12);
  }
  .dash-mobile-more-item.active .dash-mobile-more-icon i,
  .dash-mobile-more-item.active { color: var(--brand-blue); }
  .dash-mobile-more-bottom-pad {
    height: env(safe-area-inset-bottom, 6px);
    min-height: 6px;
  }
}

/* ── Newsletter popup ─────────────────────────────────────────────────────── */
.nl-popup-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.45);
  z-index: 9500;
  opacity: 0;
  transition: opacity .3s ease;
  pointer-events: none;
}
.nl-popup-backdrop.is-visible {
  opacity: 1;
  pointer-events: auto;
}
.nl-popup {
  position: fixed;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-50% + 24px));
  width: calc(100% - 2rem);
  max-width: 420px;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 60px rgba(0,0,0,.28);
  z-index: 9501;
  opacity: 0;
  transition: opacity .32s ease, transform .32s cubic-bezier(.22,.61,.36,1), max-width .25s ease;
  pointer-events: none;
  overflow: hidden;
}
.nl-popup.is-visible {
  opacity: 1;
  transform: translate(-50%, -50%);
  pointer-events: auto;
}
.nl-popup--form { max-width: 480px; }
.nl-popup-accent {
  height: 4px;
  background: linear-gradient(90deg, var(--brand-blue) 0%, var(--brand-green) 100%);
}
.nl-popup-body {
  padding: 1.75rem 1.75rem 1.5rem;
  text-align: center;
}
/* Form view overrides — declared after base so cascade works correctly */
.nl-popup-body--form {
  text-align: left;
  background: var(--surface-body); /* off-white in light, deep navy in dark — separates from white inputs */
}
[dir="rtl"] .nl-popup-body--form { text-align: right; }
.nl-label {
  display: block;
  font-size: .8125rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin-bottom: .35rem;
}
/* Better radio/checkbox visibility in dark mode — popup and subscribe page */
[data-bs-theme="dark"] .nl-popup .form-check-input[type="radio"],
[data-bs-theme="dark"] .nl-popup .form-check-input[type="checkbox"],
[data-bs-theme="dark"] .subscribe-card .form-check-input[type="radio"],
[data-bs-theme="dark"] .subscribe-card .form-check-input[type="checkbox"] {
  border-color: rgba(255,255,255,.35);
  background-color: rgba(255,255,255,.06);
}
[data-bs-theme="dark"] .nl-popup .form-check-input:checked,
[data-bs-theme="dark"] .subscribe-card .form-check-input:checked {
  border-color: var(--brand-blue);
  background-color: var(--brand-blue);
}
/* Light mode: give checkboxes/radios a visible border on the subscribe page */
.subscribe-card .form-check-input[type="radio"],
.subscribe-card .form-check-input[type="checkbox"] {
  border-color: #adb5bd;
}
/* Light mode: inputs stand out against the off-white body */
.nl-popup #nl-name,
.nl-popup #nl-email {
  background: var(--surface-card);
  border-color: var(--border-strong);
}
[data-bs-theme="dark"] .nl-popup #nl-name,
[data-bs-theme="dark"] .nl-popup #nl-email {
  background: var(--surface-input);
  border-color: var(--border-strong);
}
/* Restore red validation border when form is submitted invalid */
.nl-popup .was-validated #nl-name:invalid,
.nl-popup .was-validated #nl-email:invalid,
[data-bs-theme="dark"] .nl-popup .was-validated #nl-name:invalid,
[data-bs-theme="dark"] .nl-popup .was-validated #nl-email:invalid {
  border-color: var(--bs-form-invalid-border-color) !important;
}
.nl-popup-icon {
  font-size: 2.25rem;
  color: var(--brand-blue);
  margin-bottom: .75rem;
  display: block;
  line-height: 1;
}
.nl-popup-title {
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--text-primary);
  margin-bottom: .5rem;
}
.nl-popup-desc {
  font-size: .9rem;
  color: var(--text-secondary);
  margin-bottom: 1.25rem;
  line-height: 1.55;
}
.nl-popup-cta {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .65rem 1.75rem;
  background: var(--brand-blue);
  color: #fff;
  border-radius: 50px;
  font-weight: 600;
  font-size: .9rem;
  text-decoration: none;
  transition: background var(--transition), transform var(--transition);
  border: none;
  cursor: pointer;
  width: 100%;
  justify-content: center;
}
.nl-popup-cta:hover {
  background: var(--primary-hover);
  color: #fff;
  transform: translateY(-1px);
}
.nl-popup-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: .9rem 1.75rem 1.25rem;
  border-top: 1px solid var(--border);
}
.nl-popup-no-spam {
  font-size: .775rem;
  color: var(--text-tertiary);
}
.nl-popup-dismiss {
  font-size: .8rem;
  color: var(--text-tertiary);
  background: none;
  border: none;
  cursor: pointer;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 2px;
  transition: color var(--transition);
}
.nl-popup-dismiss:hover { color: var(--text-secondary); }
.nl-popup-close {
  position: absolute;
  top: .6rem;
  right: .75rem;
  background: none;
  border: none;
  font-size: 1.1rem;
  color: var(--text-tertiary);
  cursor: pointer;
  line-height: 1;
  padding: .25rem .3rem;
  border-radius: var(--radius-sm);
  transition: color var(--transition), background var(--transition);
}
.nl-popup-close:hover { color: var(--text-primary); background: var(--surface-alt); }
[dir="rtl"] .nl-popup-close { right: auto; left: .75rem; }

/* ── Shorts listing grid (/shorts/) ─────────────────────────────────────── */
.shorts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
}
@media (min-width: 576px) { .shorts-grid { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); } }
@media (min-width: 992px) { .shorts-grid { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }

.short-grid-card {
  text-decoration: none;
  color: inherit;
  display: block;
}
.short-grid-card:hover { text-decoration: none; }
.short-grid-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-alt);
  margin-bottom: 0.5rem;
}
.short-grid-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.short-grid-card:hover .short-grid-thumb img { transform: scale(1.03); }
.short-grid-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  color: #fff;
  font-size: 2rem;
  opacity: 0;
  transition: opacity .2s, background .2s;
}
.short-grid-card:hover .short-grid-play { opacity: 1; background: rgba(0,0,0,.35); }
.short-grid-title {
  font-size: 0.82rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
}
.short-grid-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Shorts strip (videos page) ─────────────────────────────────────────── */
.yt-shelf-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  margin-bottom: 0.75rem;
}
.yt-shelf-see-all {
  font-size: 0.82rem;
  color: var(--brand-blue);
  text-decoration: none;
  white-space: nowrap;
}
.yt-shelf-see-all:hover { text-decoration: underline; }

/* Override the shelf title margin when inside the header flex */
.yt-shelf--shorts .yt-shelf-title { margin-bottom: 0; }

/* Portrait card grid */
.yt-shelf-row--shorts {
  display: flex;
  gap: 0.75rem;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding-bottom: 0.5rem;
  scrollbar-width: none;
}
.yt-shelf-row--shorts::-webkit-scrollbar { display: none; }

.short-card-sm {
  flex: 0 0 auto;
  width: 130px;
  scroll-snap-align: start;
}
.short-card-sm-link { text-decoration: none; color: inherit; display: block; }
.short-thumb-wrap {
  position: relative;
  aspect-ratio: 9 / 16;
  border-radius: 8px;
  overflow: hidden;
  background: var(--surface-alt);
}
.short-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.short-play-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,0);
  transition: background .2s;
  color: #fff;
  font-size: 1.8rem;
  opacity: 0;
  transition: opacity .2s;
}
.short-card-sm-link:hover .short-play-icon { opacity: 1; background: rgba(0,0,0,.35); }
.short-card-sm-info { padding: 0.4rem 0.15rem 0; }
.short-card-sm-title {
  font-size: 0.78rem;
  font-weight: 500;
  line-height: 1.35;
  margin: 0 0 0.2rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  color: var(--text-primary);
}
.short-card-sm-views {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin: 0;
}

/* ── Shorts player (scroll-snap feed) ───────────────────────────────────── */

/* Always dark regardless of site theme — it's a video viewer */
body.page-shorts {
  overflow: hidden;
  background: #0D1B2A;
}
body.page-shorts footer { display: none; }

.shorts-feed {
  position: fixed;
  top: 56px;
  left: 0;
  right: 0;
  bottom: 0;
  overflow-y: scroll; /* 'scroll' required for iOS momentum + snap reliability */
  scroll-snap-type: y mandatory;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior: none; /* prevent iOS rubber-band from breaking snap */
  background: #0D1B2A;
  scrollbar-width: none;
}
.shorts-feed::-webkit-scrollbar { display: none; }

.short-slide {
  /* Use 100% of the fixed container — avoids iOS 100vh address-bar overflow bug */
  height: 100%;
  scroll-snap-align: start;
  scroll-snap-stop: always;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #0D1B2A;
}
.short-slide--loading,
.short-slide--empty { color: rgba(255,255,255,.6); }

/* Player + action buttons grouped as one centred flex unit */
.short-player-group {
  display: flex;
  align-items: flex-end;
  gap: 0.75rem;
}

/* Phone-shaped player */
.short-player-wrap {
  position: relative;
  --shorts-gap: 1.25rem;
  /* Use dvh (dynamic viewport) with vh fallback — avoids iOS address-bar mismatch */
  height: calc(100vh - 56px - var(--shorts-gap) * 2);
  height: calc(100dvh - 56px - var(--shorts-gap) * 2);
  /* Reserve ~72px for action column + gap so player + buttons fit side by side */
  width: min(
    calc((100dvh - 56px - var(--shorts-gap) * 2) * 9 / 16),
    calc(100vw - 5.5rem)
  );
  background: #111;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 6px 32px rgba(0,0,0,.7);
  transform: translateZ(0);
  /* clip-path clips cross-origin iframes more reliably than overflow:hidden alone */
  -webkit-mask-image: -webkit-radial-gradient(white, black);
}
/* Inset overlay covers any sub-pixel iframe leak at rounded corners */
.short-player-wrap::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 12px;
  box-shadow: inset 0 0 0 1px #111;
  z-index: 50;
  pointer-events: none;
}

.short-thumb {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  filter: blur(6px) brightness(.45);
  transform: scale(1.06);
}
.shorts-iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}

.short-info {
  position: absolute;
  bottom: 0;
  left: 0; right: 0;
  padding: 2rem 1rem 1.1rem;
  background: linear-gradient(to top, rgba(0,0,0,.8) 0%, transparent 100%);
  color: #fff;
  pointer-events: none;
  z-index: 2;
}
.shorts-title {
  font-size: 0.88rem;
  font-weight: 500;
  line-height: 1.4;
  margin: 0 0 0.25rem;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.shorts-views { font-size: 0.75rem; opacity: .8; margin: 0; }
.shorts-views i { margin-inline-end: 0.25rem; }

.shorts-counter {
  position: absolute;
  top: 0.6rem;
  right: 0.6rem;
  background: rgba(0,0,0,.5);
  color: #fff;
  font-size: 0.68rem;
  padding: 2px 7px;
  border-radius: 20px;
  pointer-events: none;
  z-index: 2;
}
[dir="rtl"] .shorts-counter { right: auto; left: 0.6rem; }

/* Action buttons — normal flow column next to the player */
.short-actions {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  padding-bottom: 1.25rem;
  flex-shrink: 0;
}
.short-action-btn {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.25rem;
  background: none;
  border: none;
  cursor: pointer;
  color: #fff;
  font-size: 0.7rem;
  line-height: 1;
  padding: 0;
  min-width: 44px;
}
.short-action-btn i {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  font-size: 1.4rem;
  transition: transform .15s ease, background .15s ease;
}
.short-action-btn:hover i,
.short-action-btn:active i { transform: scale(1.08); background: rgba(255,255,255,.22); }
.short-action-btn--active i { color: #ff2d55; background: rgba(255,45,85,.12); }

/* ── Mobile: full-bleed player with action buttons overlaid on the right (<640px) ── */
@media (max-width: 639px) {
  .short-slide {
    align-items: stretch;
    justify-content: stretch;
  }
  .short-player-group {
    position: relative;
    width: 100%;
    height: 100%;
    gap: 0;
    align-items: stretch;
  }
  .short-player-wrap {
    width: 100%;
    height: 100%;
    border-radius: 0;
    box-shadow: none;
  }
  .short-player-wrap::after {
    border-radius: 0;
    box-shadow: none;
  }
  /* Cover-fill the iframe so YouTube's 9:16 video fills the container without
     letterbox bars, regardless of whether the phone ratio is wider or taller
     than 9:16. Overflow is clipped by the parent's overflow:hidden. */
  .shorts-iframe {
    inset: auto;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    /* Fill whichever dimension is constrained — vh fallback, then dvh */
    width: max(100%, calc((100vh - 56px) * 9 / 16));
    height: max(100%, calc(100vw * 16 / 9));
    width: max(100%, calc((100dvh - 56px) * 9 / 16));
  }
  /* Actions become an absolute overlay on the right side, YouTube-style */
  .short-actions {
    position: absolute;
    right: 0.5rem;
    /* Keep icons above YouTube's native controls bar (~60px) + iPhone home indicator */
    bottom: max(6rem, calc(3.75rem + env(safe-area-inset-bottom)));
    z-index: 10;
    padding-bottom: 0;
    gap: 0.75rem;
  }
  /* Dark semi-transparent circles so icons read against any video content */
  .short-action-btn i {
    background: rgba(18,18,18,.55);
    width: 46px;
    height: 46px;
    font-size: 1.25rem;
  }
  .short-action-btn:hover i,
  .short-action-btn:active i { background: rgba(18,18,18,.72); }
  .short-action-btn--active i { color: #ff2d55; background: rgba(180,0,40,.45); }
  /* Prevent title text from running underneath the action buttons */
  .short-info {
    padding-right: 5rem;
    /* Push title above YouTube controls + home indicator */
    padding-bottom: max(4rem, calc(2.5rem + env(safe-area-inset-bottom)));
  }
}

/* ── Comments panel ──
   Desktop (≥640px): fixed right-side panel in the dark area beside the player.
   Mobile (<640px):  bottom sheet sliding up from the bottom edge.            */

/* Overlay backdrop — only on mobile */
.shorts-comments-overlay {
  position: fixed;
  inset: 0;
  z-index: 1050;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.5);
}

/* Panel — bottom sheet default */
.shorts-comments-panel {
  width: 100%;
  max-width: 480px;
  max-height: 75vh;
  background: var(--surface-card);
  border-radius: 18px 18px 0 0;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  animation: shorts-panel-up .22s ease;
}
@keyframes shorts-panel-up {
  from { transform: translateY(30px); opacity: 0; }
  to   { transform: translateY(0);    opacity: 1; }
}

/* Desktop: right-side fixed panel, no backdrop */
@media (min-width: 640px) {
  .shorts-comments-overlay {
    top: 56px;
    background: transparent;
    pointer-events: none;
    align-items: stretch;
    justify-content: flex-end;
  }
  .shorts-comments-panel {
    pointer-events: all;
    width: 360px;
    max-width: 360px;
    max-height: none;
    height: 100%;
    border-radius: 0;
    animation: shorts-panel-right .22s ease;
    border-left: 1px solid var(--border);
  }
  @keyframes shorts-panel-right {
    from { transform: translateX(30px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
  }
}

.shorts-comments-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 1rem 0.75rem;
  border-bottom: 1px solid var(--border-color, #dee2e6);
  flex-shrink: 0;
}
.shorts-comments-count {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--text-primary, #212529);
  display: flex;
  gap: 0.35rem;
  align-items: baseline;
}
.shorts-comments-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #6c757d);
  font-size: 1rem;
  line-height: 1;
  padding: 0.25rem;
}

.shorts-comments-list {
  flex: 1;
  overflow-y: auto;
  padding: 0.75rem 1rem;
}
.shorts-comments-spinner { text-align: center; padding: 1.5rem 0; }
.shorts-comments-empty {
  text-align: center;
  color: var(--text-muted, #6c757d);
  font-size: 0.85rem;
  padding: 1.5rem 0;
  margin: 0;
}

/* Individual comment */
.sc-item {
  display: flex;
  gap: 0.65rem;
  padding: 0.65rem 0.75rem;
  align-items: flex-start;
}
/* Zebra stripe — matches video comments pattern */
#shortsCommentsList > div:nth-child(even) {
  background: var(--surface-alt);
  border-radius: var(--radius-sm);
}
.sc-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--bs-secondary-bg, #e9ecef);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted, #6c757d);
}
.sc-avatar img { width: 100%; height: 100%; object-fit: cover; }
.sc-body { flex: 1; min-width: 0; }
.sc-author {
  font-size: 0.75rem;
  font-weight: 600;
  margin: 0 0 0.15rem;
  color: var(--text-primary, #212529);
}
.sc-text {
  font-size: 0.82rem;
  margin: 0 0 0.2rem;
  line-height: 1.45;
  color: var(--text-primary, #212529);
  word-break: break-word;
}
.sc-meta {
  font-size: 0.7rem;
  color: var(--text-muted, #6c757d);
  margin: 0;
}

/* Comment input area */
.shorts-comments-input {
  flex-shrink: 0;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border-color, #dee2e6);
}
.shorts-comments-login {
  flex-shrink: 0;
  padding: 0.75rem 1rem 1rem;
  border-top: 1px solid var(--border-color, #dee2e6);
}

/* ── Comment source badges ── */
.sc-source {
  display: inline-flex;
  align-items: center;
  gap: 0.2rem;
  font-size: 0.65rem;
  font-weight: 600;
  padding: 0.1rem 0.35rem;
  border-radius: 4px;
  vertical-align: middle;
  line-height: 1;
}
.sc-source--yt  { background: rgba(255,0,0,.1);   color: #e00; }
.sc-source--site { background: rgba(var(--brand-blue-rgb, 27,58,92),.1); color: var(--brand-blue); }

/* ── Share modal ── */
.shorts-share-overlay {
  position: fixed;
  inset: 0;
  z-index: 1055;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  background: rgba(0,0,0,.55);
}
.shorts-share-panel {
  width: 100%;
  max-width: 480px;
  background: var(--surface-card);
  border-radius: 18px 18px 0 0;
  padding: 1.1rem 1.25rem 1.5rem;
  animation: shorts-panel-up .22s ease;
}
@media (min-width: 640px) {
  .shorts-share-overlay { align-items: center; }
  .shorts-share-panel { max-width: 480px; border-radius: 18px; }
}
.shorts-share-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.shorts-share-head-title {
  font-weight: 700;
  font-size: .95rem;
  color: var(--text-primary);
}
.shorts-share-close {
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted, #6c757d);
  font-size: 1rem;
  padding: .25rem;
  line-height: 1;
}

/* ── Mobile global tweaks ─────────────────────────────────────────────────── */
@media (max-width: 575px) {
  /* Slightly more breathing room on small phones */
  .container {
    padding-left: 1.125rem;
    padding-right: 1.125rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   SUPPORT CENTER
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── Hub hero ─────────────────────────────────────────────────────────────── */
.sup-hub-hero {
  padding: 5rem 0 4.5rem;
}
.sup-hub-hero .country-hero-inner {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.sup-hub-hero .trips-listing-hero-title {
  text-align: center;
  font-size: clamp(2rem, 4vw, 3rem);
  margin-bottom: 1rem;
}
.sup-hub-hero .trips-listing-hero-sub {
  text-align: center;
  margin-left: auto;
  margin-right: auto;
  margin-bottom: 0;
  font-size: 1.05rem;
  opacity: .9;
}
.sup-hub-icon {
  width: 4rem;
  height: 4rem;
  border-radius: 50%;
  background: rgba(255,255,255,.15);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.75rem;
  color: #fff;
  margin: 0 auto 1.75rem;
}

/* ── Hub search ───────────────────────────────────────────────────────────── */
.sup-hero-search {
  position: relative;
  width: 100%;
  max-width: 520px;
  margin: 2rem auto 0;
}
.sup-hero-search-icon {
  position: absolute;
  top: 50%;
  left: 1.1rem;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: .9rem;
  pointer-events: none;
}
[dir="rtl"] .sup-hero-search-icon { left: auto; right: 1.1rem; }
.sup-hero-search-input {
  width: 100%;
  padding: .85rem 1.25rem .85rem 2.75rem;
  border: 1.5px solid rgba(255,255,255,.3);
  border-radius: 3rem;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: .95rem;
  backdrop-filter: blur(8px);
  outline: none;
  transition: border-color .2s, background .2s, box-shadow .2s;
}
[dir="rtl"] .sup-hero-search-input { padding: .85rem 2.75rem .85rem 1.25rem; }
.sup-hero-search-input::placeholder { color: rgba(255,255,255,.6); }
.sup-hero-search-input:focus {
  border-color: rgba(255,255,255,.7);
  background: rgba(255,255,255,.18);
  box-shadow: 0 0 0 .2rem rgba(255,255,255,.15);
}
.sup-hero-search-input { padding-right: 2.75rem; }
[dir="rtl"] .sup-hero-search-input { padding-left: 2.75rem; padding-right: 2.75rem; }
.sup-hero-search-clear {
  position: absolute;
  top: 50%;
  right: 1rem;
  transform: translateY(-50%);
  background: none;
  border: none;
  color: rgba(255,255,255,.7);
  font-size: .75rem;
  cursor: pointer;
  padding: .25rem;
  line-height: 1;
  transition: color .15s;
}
[dir="rtl"] .sup-hero-search-clear { right: auto; left: 1rem; }
.sup-hero-search-clear:hover { color: #fff; }

/* ── Category card ────────────────────────────────────────────────────────── */
.sup-cat-card {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1.1rem 1.1rem 1.1rem 1.1rem;
  border-radius: var(--radius-lg, .875rem);
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: var(--text-primary);
  transition: transform .18s, box-shadow .18s, border-color .18s;
  height: 100%;
}
.sup-cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--brand-blue);
  text-decoration: none;
  color: var(--text-primary);
}
.sup-cat-icon {
  flex-shrink: 0;
  width: 3rem;
  height: 3rem;
  border-radius: var(--radius-md, .5rem);
  background: color-mix(in srgb, var(--brand-blue) 12%, transparent);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: var(--brand-blue);
}
.sup-cat-body {
  flex: 1;
  min-width: 0;
}
.sup-cat-name {
  font-weight: 600;
  font-size: .92rem;
  color: var(--text-primary);
  margin-bottom: .2rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sup-cat-desc {
  font-size: .78rem;
  color: var(--text-secondary);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  line-height: 1.45;
}
.sup-cat-count {
  margin-top: .35rem;
  font-size: .72rem;
  color: var(--text-tertiary);
  display: flex;
  align-items: center;
}
.sup-cat-arrow {
  flex-shrink: 0;
  font-size: .8rem;
  color: var(--text-tertiary);
  transition: transform .18s, color .18s;
}
.sup-cat-card:hover .sup-cat-arrow {
  transform: translateX(3px);
  color: var(--brand-blue);
}
[dir="rtl"] .sup-cat-card:hover .sup-cat-arrow { transform: translateX(-3px); }

/* ── Empty search state ───────────────────────────────────────────────────── */
.sup-empty-search {
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-tertiary);
}
.sup-empty-search i {
  font-size: 2.5rem;
  display: block;
  margin-bottom: .75rem;
  opacity: .5;
}
.sup-empty-search p {
  margin: 0;
  font-size: .95rem;
}

/* ── Contact CTA (hub bottom) ─────────────────────────────────────────────── */
.sup-contact-cta {
  margin-top: 3.5rem;
  padding: 2.5rem 2rem;
  border-radius: var(--radius-lg, .875rem);
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  text-align: center;
}
.sup-contact-cta-icon {
  font-size: 2.25rem;
  color: var(--brand-blue);
  margin-bottom: .75rem;
}
.sup-contact-cta-title {
  font-family: 'Inter', sans-serif;
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: normal;
  line-height: 1.3;
  margin-bottom: .5rem;
  color: var(--text-primary);
}
.sup-contact-cta-body {
  font-size: .95rem;
  color: var(--text-secondary);
  max-width: 480px;
  margin: 0 auto 1.5rem;
}

/* ── Category page header ─────────────────────────────────────────────────── */
.sup-page-header {
  position: relative;
  background: linear-gradient(135deg, #0a2540 0%, #163768 60%, #1a4a8a 100%);
  color: #fff;
  padding: 3.5rem 0 3rem;
  overflow: hidden;
}
[data-bs-theme="light"] .sup-page-header {
  background: linear-gradient(135deg, #1a3a6b 0%, #1e50a2 60%, #2563c7 100%);
}
.sup-page-header .country-hero-dots { opacity: .15; }

.sup-breadcrumb {
  display: flex;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
  margin-bottom: 1.25rem;
  opacity: .85;
}
.sup-breadcrumb a {
  color: rgba(255,255,255,.75);
  text-decoration: none;
}
.sup-breadcrumb a:hover { color: #fff; text-decoration: underline; }
.sup-breadcrumb span { color: rgba(255,255,255,.9); }
.sup-breadcrumb i { color: rgba(255,255,255,.5); }

.sup-page-icon {
  width: 2.75rem;
  height: 2.75rem;
  border-radius: var(--radius-md);
  background: rgba(255,255,255,.18);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  color: #fff;
  flex-shrink: 0;
}
.sup-page-title {
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: 2rem;
  font-weight: 700;
  margin: 0 0 .2rem;
  color: #fff;
  line-height: 1.2;
}
.sup-page-desc {
  font-size: .9rem;
  color: rgba(255,255,255,.78);
  margin: 0;
}

/* ── Category search ──────────────────────────────────────────────────────── */
.sup-cat-search-wrap {
  position: relative;
}
.sup-cat-search-icon {
  position: absolute;
  top: 50%;
  left: 1rem;
  transform: translateY(-50%);
  color: var(--text-tertiary);
  font-size: .85rem;
  pointer-events: none;
}
[dir="rtl"] .sup-cat-search-icon { left: auto; right: 1rem; }
.sup-cat-search-input {
  width: 100%;
  padding: .65rem 1rem .65rem 2.5rem;
  border: 1.5px solid var(--border-strong);
  border-radius: 2rem;
  background: var(--surface-card);
  color: var(--text-primary);
  font-size: .9rem;
  outline: none;
  transition: border-color .2s, box-shadow .2s;
}
[dir="rtl"] .sup-cat-search-input { padding: .65rem 2.5rem .65rem 1rem; }
.sup-cat-search-input:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 .2rem color-mix(in srgb, var(--brand-blue) 18%, transparent);
}

/* ── Accordion ────────────────────────────────────────────────────────────── */
.sup-accordion .accordion-item.sup-accordion-item {
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-md) !important;
  background: var(--surface-card);
  margin-bottom: .5rem;
  overflow: hidden;
}
.sup-accordion .accordion-item + .accordion-item { border-top: 1px solid var(--border-strong); }
.sup-accordion .accordion-button {
  background: var(--surface-card);
  color: var(--text-primary);
  font-family: 'Inter', sans-serif;
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: normal;
  line-height: 1.4;
  padding: 1rem 1.1rem;
  box-shadow: none;
}
.sup-accordion .accordion-button:not(.collapsed) {
  background: color-mix(in srgb, var(--brand-blue) 6%, var(--surface-card));
  color: var(--brand-blue);
  box-shadow: none;
}
.sup-accordion .accordion-button::after {
  filter: var(--bs-accordion-btn-icon-filter, none);
}
.sup-accordion-body {
  padding: 1rem 1.25rem 1.25rem;
  color: var(--text-secondary);
  font-size: .92rem;
  line-height: 1.75;
}
.sup-accordion-body p { margin-bottom: .75rem; }
.sup-accordion-body p:last-child { margin-bottom: 0; }
.sup-accordion-body h2 {
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--text-tertiary);
  margin: 1.5rem 0 .5rem;
  padding-bottom: 0;
  border-bottom: none;
}
.sup-accordion-body h3 {
  font-family: 'Inter', sans-serif;
  font-size: .95rem;
  font-weight: 600;
  color: var(--text-primary);
  margin: 1.25rem 0 .35rem;
}
.sup-accordion-body h4 {
  font-family: 'Inter', sans-serif;
  font-size: .88rem;
  font-weight: 600;
  color: var(--text-secondary);
  margin: 1rem 0 .3rem;
}
.sup-accordion-body h2:first-child,
.sup-accordion-body h3:first-child {
  margin-top: 0;
}
.sup-accordion-body ul, .sup-accordion-body ol {
  padding-inline-start: 1.4rem;
  margin-bottom: .75rem;
}
.sup-accordion-body li { margin-bottom: .3rem; }
.sup-accordion-body code {
  background: color-mix(in srgb, var(--brand-blue) 10%, transparent);
  color: var(--brand-blue);
  padding: .1em .4em;
  border-radius: .25rem;
  font-size: .85em;
}
.sup-accordion-body blockquote {
  border-left: 3px solid var(--brand-blue);
  padding-left: 1rem;
  color: var(--text-tertiary);
  margin: .75rem 0;
  font-style: italic;
}

/* ── Sidebar ──────────────────────────────────────────────────────────────── */
.sup-sidebar {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
@media (min-width: 992px) {
  .sup-sidebar { position: sticky; top: 5rem; }
}
.sup-sidebar-card {
  border: 1px solid var(--border-strong);
  background: var(--surface-card);
  box-shadow: var(--shadow-sm);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
}
.sup-sidebar-help {
  text-align: center;
  background: color-mix(in srgb, var(--brand-blue) 6%, var(--surface-card));
  border-color: color-mix(in srgb, var(--brand-blue) 25%, transparent);
}
.sup-sidebar-help-icon {
  font-size: 2rem;
  color: var(--brand-blue);
  margin-bottom: .5rem;
}
.sup-sidebar-card-title {
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: .92rem;
  letter-spacing: normal;
  line-height: 1.3;
  color: var(--text-primary);
  margin-bottom: .5rem;
}
.sup-sidebar-card-body {
  font-size: .8rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.55;
}
.sup-sidebar-cat-list {
  list-style: none;
  margin: 0 0 .75rem;
  padding: 0;
}
.sup-sidebar-cat-link {
  display: flex;
  align-items: center;
  gap: .6rem;
  padding: .55rem .25rem;
  text-decoration: none;
  color: var(--text-secondary);
  font-size: .85rem;
  border-bottom: 1px solid var(--border);
  transition: color .15s;
}
.sup-sidebar-cat-list li:last-child .sup-sidebar-cat-link { border-bottom: none; }
.sup-sidebar-cat-link:hover { color: var(--brand-blue); text-decoration: none; }
.sup-sidebar-cat-icon { font-size: .95rem; color: var(--brand-blue); flex-shrink: 0; }
.sup-sidebar-all-link {
  display: block;
  font-size: .78rem;
  color: var(--brand-blue);
  text-decoration: none;
  text-align: center;
  padding-top: .25rem;
}
.sup-sidebar-all-link:hover { text-decoration: underline; }

/* ── Popular articles ─────────────────────────────────────────────────────── */
.sup-popular {
  margin-top: 3rem;
  padding-top: 2.5rem;
  border-top: 1px solid var(--border);
}
.sup-popular-heading {
  font-family: 'Inter', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  letter-spacing: .1em;
  line-height: 1.3;
  color: var(--text-tertiary);
  text-transform: uppercase;
  margin-bottom: 1.25rem;
  text-align: center;
}
.sup-popular-card {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding: .75rem .9rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .15s, box-shadow .15s;
  height: 100%;
}
.sup-popular-card:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(var(--brand-blue-rgb), .08);
  color: var(--text-primary);
  text-decoration: none;
}
.sup-popular-card-icon {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-blue) 10%, transparent);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: .9rem;
}
.sup-popular-card-body { flex: 1; min-width: 0; }
.sup-popular-card-title {
  font-size: .85rem;
  font-weight: 600;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sup-popular-card-cat {
  font-size: .72rem;
  color: var(--text-tertiary);
  margin-top: .1rem;
}
.sup-popular-card-arrow {
  flex-shrink: 0;
  color: var(--text-tertiary);
  font-size: .7rem;
}

/* ── Article search results ───────────────────────────────────────────────── */
.sup-search-count {
  font-size: .82rem;
  color: var(--text-tertiary);
  margin-bottom: 1.25rem;
}
.sup-search-result {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .9rem 1rem;
  background: var(--surface-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  text-decoration: none;
  color: var(--text-primary);
  transition: border-color .15s, box-shadow .15s;
  margin-bottom: .5rem;
}
.sup-search-result:hover {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 3px rgba(var(--brand-blue-rgb), .08);
  color: var(--text-primary);
  text-decoration: none;
}
.sup-search-result-icon {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-md);
  background: color-mix(in srgb, var(--brand-blue) 10%, transparent);
  color: var(--brand-blue);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
}
.sup-search-result-body { flex: 1; min-width: 0; }
.sup-search-result-title {
  font-size: .9rem;
  font-weight: 600;
  line-height: 1.3;
  margin-bottom: .15rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.sup-search-result-cat {
  font-size: .75rem;
  color: var(--text-tertiary);
}
.sup-search-result-arrow {
  flex-shrink: 0;
  color: var(--text-tertiary);
  font-size: .75rem;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */
@media (max-width: 575px) {
  .sup-page-title { font-size: 1.5rem; }
  .sup-contact-cta { padding: 1.75rem 1.25rem; }
  .sup-contact-cta-title { font-size: 1.4rem; }
}

/* ════════════════════════════════════════════════════════════════════════════
   PUBLIC PROFILE PAGE
   ════════════════════════════════════════════════════════════════════════════ */

/* Hero section — banner + overlapping avatar */
.profile-hero {
  position: relative;
  margin-bottom: 0;
  overflow-x: hidden;
}
.profile-banner {
  aspect-ratio: 6 / 1;
  background: linear-gradient(135deg, #0d2a52 0%, var(--brand-blue) 55%, #1a4a8a 100%);
  background-size: cover;
  background-position: center;
  position: relative;
  overflow: hidden;
}
@media (max-width: 575px) {
  .profile-banner { min-height: 100px; }
}
.profile-banner:not(.profile-banner--image)::after {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E") repeat;
}
[data-bs-theme="dark"] .profile-banner:not(.profile-banner--image) {
  background: linear-gradient(135deg, #081828 0%, #0f3060 55%, #0a2040 100%);
}
.profile-banner-edit {
  position: absolute;
  top: .75rem;
  right: .75rem;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  padding: .35rem .8rem;
  background: rgba(0,0,0,.52);
  color: #fff;
  font-size: .8rem;
  font-weight: 500;
  border-radius: 999px;
  text-decoration: none;
  backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity .2s;
}
.profile-banner:hover .profile-banner-edit { opacity: 1; }
@media (hover: none) {
  .profile-banner-edit { opacity: 1; } /* always visible on touch devices */
}
/* Container that overlaps the banner bottom */
.profile-hero-body {
  position: relative;
  margin-top: -2.75rem;
}

/* ── Avatar circles (shared: profile, nav, dashboard, mobile) ──────────────── */
.profile-avatar {
  border-radius: 50%;
  background: var(--brand-blue);
  color: #fff;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  user-select: none;
  overflow: hidden;
  position: relative;
}
/* When showing a real photo: remove blue bg, let image fill */
.profile-avatar.has-image { background: transparent; }
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 50%;
  display: block;
}

.profile-avatar--nav { width: 1.75rem; height: 1.75rem; font-size: .7rem; }
.profile-avatar--lg  { width: 5rem;    height: 5rem;    font-size: 2rem; }
.profile-avatar--xl  { width: 6rem;    height: 6rem;    font-size: 2.25rem; }
.profile-avatar--outlined {
  border: 4px solid var(--surface-body);
  box-shadow: 0 2px 16px rgba(0,0,0,.22);
}
[data-bs-theme="dark"] .profile-avatar--outlined {
  border-color: rgba(255,255,255,.12);
}

/* Upload button wrapper on settings page */
.avatar-upload-btn {
  background: none;
  border: none;
  padding: 0;
  position: relative;
  cursor: pointer;
  border-radius: 50%;
  display: block;
  flex-shrink: 0;
}
.avatar-upload-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 1rem;
  opacity: 0;
  transition: opacity var(--transition);
}
.avatar-upload-btn:hover .avatar-upload-overlay { opacity: 1; }

/* Header row: avatar + action buttons side by side, avatar bottom-aligned */
.profile-head-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
  padding: 0 .125rem;
}
.profile-head-actions {
  padding-bottom: .35rem; /* aligns buttons to bottom of avatar */
}

/* Name row + action buttons side by side */
.profile-info-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: .5rem;
}
.profile-info-actions {
  flex-shrink: 0;
  padding-top: .25rem;
  min-width: 0;
}

/* Dashboard: banner upload preview */
.banner-upload-preview {
  width: 100%;
  aspect-ratio: 6 / 1;
  border-radius: .5rem;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: linear-gradient(135deg, #0d2a52 0%, var(--brand-blue) 55%, #1a4a8a 100%);
}
.banner-upload-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.banner-upload-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
.banner-upload-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0,0,0,.45);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: .875rem;
  font-weight: 500;
  opacity: 0;
  transition: opacity .2s;
}
.banner-upload-preview:hover .banner-upload-overlay { opacity: 1; }

/* Name / handle / bio / meta */
.profile-info { padding: 0 .25rem; }
.profile-premium-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(var(--brand-gold-rgb), .13);
  color: var(--brand-gold);
  font-size: .72rem;
  font-weight: 700;
  padding: .2rem .55rem;
  border-radius: 20px;
  letter-spacing: .01em;
}
.profile-premium-badge i { font-size: .6rem; }
[data-bs-theme="dark"] .profile-premium-badge {
  background: rgba(var(--brand-gold-rgb), .2);
}
.profile-staff-badge {
  display: inline-flex;
  align-items: center;
  gap: .3rem;
  background: rgba(var(--brand-blue-rgb), .12);
  color: var(--brand-blue);
  font-size: .72rem;
  font-weight: 600;
  padding: .2rem .55rem;
  border-radius: 20px;
}
.profile-handle {
  color: var(--text-secondary);
  font-size: .9rem;
  margin: 0;
}
.profile-bio {
  font-size: .95rem;
  line-height: 1.65;
  color: var(--text-primary);
  max-width: 560px;
}
.profile-meta {
  display: flex;
  align-items: center;
  gap: .4rem;
  font-size: .82rem;
  color: var(--text-tertiary);
  margin: 0;
}

/* Activity comments */
.profile-comment { padding: 1rem 0; }
.profile-comment--bordered { border-top: 1px solid var(--border); }
.profile-comment-meta {
  display: flex;
  align-items: center;
  gap: .5rem;
  flex-wrap: wrap;
  margin-bottom: .4rem;
}
.profile-comment-source {
  display: inline-flex;
  align-items: center;
  gap: .35rem;
  font-size: .8rem;
  font-weight: 600;
  color: var(--brand-blue);
  text-decoration: none;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: calc(100% - 80px);
}
.profile-comment-source:hover { text-decoration: underline; }
.profile-comment-time {
  font-size: .75rem;
  color: var(--text-tertiary);
  white-space: nowrap;
  margin-left: auto;
  flex-shrink: 0;
}
[dir="rtl"] .profile-comment-time { margin-left: 0; margin-right: auto; }
.profile-comment-body {
  font-size: .9rem;
  color: var(--text-secondary);
  margin: 0;
  line-height: 1.6;
}
.profile-empty-activity {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .6rem;
  padding: 3rem 0;
  color: var(--text-tertiary);
  font-size: .875rem;
}
.profile-empty-activity i { font-size: 2rem; opacity: .4; }

/* ── Privacy visibility selector ─────────────────────────────────────────── */
.privacy-vis-option {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: .85rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: border-color var(--transition), background var(--transition);
}
.privacy-vis-option:hover { border-color: var(--brand-blue); background: rgba(var(--brand-blue-rgb),.04); }
.privacy-vis-option--active {
  border-color: var(--brand-blue);
  background: rgba(var(--brand-blue-rgb),.07);
}
.privacy-vis-icon {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 50%;
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
  color: var(--text-secondary);
}
.privacy-vis-option--active .privacy-vis-icon {
  background: rgba(var(--brand-blue-rgb),.15);
  color: var(--brand-blue);
}
.privacy-vis-body {
  display: flex;
  flex-direction: column;
  gap: .15rem;
  flex-grow: 1;
  min-width: 0;
}
.privacy-vis-label {
  font-size: .9rem;
  font-weight: 600;
  color: var(--text-primary);
}
.privacy-vis-desc {
  font-size: .8rem;
  color: var(--text-secondary);
}
.privacy-vis-check {
  color: var(--brand-blue);
  font-size: 1.1rem;
  flex-shrink: 0;
}

/* Privacy toggle rows */
.privacy-toggle-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.25rem;
  cursor: pointer;
  padding: 0.75rem 1rem;
  border: 1px solid var(--border-color);
  border-radius: 0.5rem;
  transition: border-color .15s, background .15s;
}
.privacy-toggle-row:hover { border-color: var(--brand-blue); background: rgba(var(--brand-blue-rgb),.04); }
.privacy-toggle-body {
  display: flex;
  flex-direction: column;
  gap: .2rem;
  min-width: 0;
}
.privacy-toggle-label { font-size: .875rem; font-weight: 600; color: var(--body-color); }
.privacy-toggle-desc  { font-size: .78rem;  color: var(--text-secondary); }
.privacy-toggle-check {
  width: 2.5em;
  height: 1.35em;
  flex-shrink: 0;
  margin-top: .1rem;
  cursor: pointer;
  background-color: var(--text-tertiary);
  border-color: transparent !important;
  transition: background-color .2s ease;
}
.privacy-toggle-check:checked {
  background-color: var(--brand-blue) !important;
  border-color: transparent !important;
}


/* ═══════════════════════════════════════════════════════════════════
   Guides
   ═══════════════════════════════════════════════════════════════════ */

/* ── Index hero ────────────────────────────────────────────────────── */
.guide-index-hero {
  background: var(--hero-bg);
  padding: 3rem 0 2rem;
}

/* ── Card grid ─────────────────────────────────────────────────────── */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.25rem;
}
@media (max-width: 991px) { .guides-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 575px) { .guides-grid { grid-template-columns: 1fr; } }

/* ── Card ──────────────────────────────────────────────────────────── */
.guide-card {
  display: flex;
  flex-direction: column;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface-card);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  text-decoration: none;
  color: inherit;
  transition: transform .15s, box-shadow .15s;
}
.guide-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); }
.guide-card--draft { opacity: .82; }

.guide-card-thumb {
  position: relative;
  height: 160px;
  overflow: hidden;
  flex-shrink: 0;
}
.guide-card-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .3s;
}
.guide-card:hover .guide-card-thumb img { transform: scale(1.04); }
.guide-card-thumb-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,.5) 0%, rgba(0,0,0,.08) 55%, transparent 100%);
}
.guide-card-thumb-icon {
  position: absolute; top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.8rem; color: #fff; opacity: .22;
}
.guide-related-grid .guide-card-thumb { height: 130px; }

/* Category-colored gradient backgrounds */
.guide-cat-bg-how-to            { background: linear-gradient(135deg, #1a3d6e 0%, #0a2040 100%); }
.guide-cat-bg-tips              { background: linear-gradient(135deg, #065540 0%, #012a20 100%); }
.guide-cat-bg-gear              { background: linear-gradient(135deg, #843811 0%, #3d1905 100%); }
.guide-cat-bg-filmmaking        { background: linear-gradient(135deg, #7c1d2e 0%, #3d0a15 100%); }

.guide-card-cat-badge {
  position: absolute; bottom: .65rem; left: .7rem;
  z-index: 1;
  font-size: .7rem !important; font-weight: 600;
  letter-spacing: .01em;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.guide-card-status-badge {
  position: absolute; top: .6rem; right: .6rem;
  z-index: 1;
  font-size: .68rem; font-weight: 600;
  padding: .2em .55em;
  border-radius: 4px;
}
.guide-card-featured-star {
  position: absolute; top: .55rem; right: .65rem;
  z-index: 1; color: #fbbf24; font-size: 1rem;
  text-shadow: 0 1px 4px rgba(0,0,0,.6);
}

.guide-card-body {
  padding: .85rem 1rem .9rem;
  display: flex; flex-direction: column; flex: 1;
}
.guide-card-title {
  font-size: .93rem; font-weight: 700;
  line-height: 1.4; margin: 0 0 .4rem;
  color: var(--text-primary);
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
}
.guide-card-excerpt {
  font-size: .8rem; color: var(--text-secondary);
  line-height: 1.5; margin: 0 0 .65rem;
  display: -webkit-box; -webkit-line-clamp: 2;
  -webkit-box-orient: vertical; overflow: hidden;
  flex: 1;
}
.guide-card-footer {
  display: flex; align-items: center; gap: .35rem;
  font-size: .75rem; color: var(--text-tertiary);
  margin-top: auto;
}
.guide-card-sep { opacity: .4; }

/* ── Category badge colours ─────────────────────────────────────────── */
.guide-cat-badge { font-size: .7rem; font-weight: 600; }
.guide-cat-how-to            { background: rgba(219,234,254,.88); color: #1e40af; }
.guide-cat-tips              { background: rgba(209,250,229,.88); color: #065f46; }
.guide-cat-gear              { background: rgba(254,243,199,.88); color: #92400e; }
.guide-cat-filmmaking        { background: rgba(254,226,226,.88); color: #9f1239; }
[data-bs-theme="dark"] .guide-cat-how-to            { background: rgba(30,58,95,.9);  color: #93c5fd; }
[data-bs-theme="dark"] .guide-cat-tips              { background: rgba(6,78,59,.9);   color: #6ee7b7; }
[data-bs-theme="dark"] .guide-cat-gear              { background: rgba(120,53,15,.9); color: #fcd34d; }
[data-bs-theme="dark"] .guide-cat-filmmaking        { background: rgba(127,29,29,.9);  color: #fda4af; }

/* ── Page header ───────────────────────────────────────────────────── */
.guide-page-header {
  position: relative;
  padding: 2.5rem 0 2.25rem;
  border-bottom: 1px solid var(--border);
  background: var(--surface-card);
  overflow: hidden;
}
.guide-page-header::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: var(--cat-color, var(--brand-blue));
}
.guide-page-title {
  font-size: 1.85rem; font-weight: 800;
  line-height: 1.25; margin: 0 0 .85rem;
  color: var(--text-primary);
}
@media (min-width: 768px) { .guide-page-title { font-size: 2.3rem; } }
.guide-page-meta {
  display: flex; align-items: center; gap: .45rem;
  font-size: .83rem; color: var(--text-tertiary);
}
.guide-meta-sep { opacity: .4; }
.guide-breadcrumb { font-size: .8rem; }

/* ── Excerpt intro paragraph ───────────────────────────────────────── */
.guide-excerpt {
  font-size: 1.06rem;
  color: var(--text-secondary);
  line-height: 1.88;
}
