/* ==========================================================================
   PawgsOnly.com — Master Theme Stylesheet
   KVS v6.4.0 | Kernel Video System
   Last updated: 2026-03-21
   ========================================================================== */

/* ==========================================================================
   1. GOOGLE FONTS
   Loaded via <link> in include_header_general.tpl (not @import — avoids
   render-blocking @import and duplicate loading).
   Bricolage Grotesque: logo, h1-h3, section headings
   Instrument Sans: everything users need to read quickly
   ========================================================================== */


/* ==========================================================================
   2. CSS CUSTOM PROPERTIES
   ========================================================================== */

:root {
  /* Colors */
  --bg-deep:          #09090b;
  --bg-surface:       #131316;
  --bg-elevated:      #1c1c21;
  --accent-warm:      #f43f5e;
  --accent-gold:      #f59e0b;
  --accent-cool:      #06b6d4;
  --text-bright:      #fafafa;
  --text-body:        #d4d4d8;
  --text-dim:         #71717a;
  --border-subtle:    #27272a;
  --border-accent:    #3f3f46;

  /* Spacing */
  --gap-xs:  4px;
  --gap-sm:  8px;
  --gap-md:  12px;
  --gap-lg:  16px;
  --gap-xl:  24px;

  /* Radius */
  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   12px;
  --radius-pill: 999px;

  /* Transitions */
  --ease-default: 250ms ease;

  /* Ad Zone Dimensions */
  --ad-banner-h-desktop:       90px;
  --ad-banner-h-mobile:        50px;
  --ad-sidebar-w:              300px;
  --ad-sidebar-h:              250px;
  --ad-below-player-h-desktop: 90px;
  --ad-below-player-h-mobile:  250px;
}


/* ==========================================================================
   3. RESET & BASE
   ========================================================================== */

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

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

body {
  background-color: var(--bg-deep);
  background-image: radial-gradient(ellipse at 50% 0%, #16161c 0%, var(--bg-deep) 70%);
  color: var(--text-body);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  min-height: 100vh;
}

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

/* Custom Scrollbar */
::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}
::-webkit-scrollbar-track {
  background: var(--bg-surface);
}
::-webkit-scrollbar-thumb {
  background: var(--border-accent);
  border-radius: var(--radius-pill);
}
::-webkit-scrollbar-thumb:hover {
  background: var(--text-dim);
}

/* Selection */
::selection {
  background-color: var(--accent-warm);
  color: #fff;
}

/* Links */
a {
  color: var(--accent-cool);
  text-decoration: none;
  transition: color var(--ease-default);
}
a:hover {
  text-decoration: underline;
}

/* Lists */
ul, ol {
  list-style: none;
}

/* Inputs/Buttons base reset */
button, input, select, textarea {
  font-family: inherit;
  font-size: inherit;
}

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


/* ==========================================================================
   4. TYPOGRAPHY CLASSES
   ========================================================================== */

.heading-xl {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 32px;
  line-height: 1.15;
  color: var(--text-bright);
  letter-spacing: -0.02em;
}

.heading-lg {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
  color: var(--text-bright);
  letter-spacing: -0.01em;
}

.heading-md {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 18px;
  line-height: 1.3;
  color: var(--text-bright);
}

.text-body {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  line-height: 1.5;
  color: var(--text-body);
}

.text-title {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-bright);
}

.text-meta {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-dim);
}

.text-small {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  line-height: 1.4;
  color: var(--text-dim);
}

/* Responsive typography */
@media (max-width: 639px) {
  .heading-xl { font-size: 24px; }
  .heading-lg { font-size: 20px; }
  .heading-md { font-size: 16px; }
}


/* ==========================================================================
   5. LAYOUT
   ========================================================================== */

.container {
  max-width: 1320px;
  width: 100%;
  margin-inline: auto;
  padding-inline: 16px;
}

/* Video Grid — mobile-first */
.grid-videos {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (min-width: 640px) {
  .grid-videos {
    grid-template-columns: repeat(3, 1fr);
    gap: 10px;
  }
}

@media (min-width: 1024px) {
  .grid-videos {
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
  }
}

/* Sidebar layout */
.sidebar {
  display: none;
  width: var(--ad-sidebar-w);
  flex-shrink: 0;
}

@media (min-width: 1024px) {
  .sidebar {
    display: block;
  }
}

.content-with-sidebar {
  display: flex;
  gap: var(--gap-xl);
  align-items: flex-start;
}

.content-with-sidebar .main-content {
  flex: 1;
  min-width: 0;
}


/* ==========================================================================
   6. AD ZONE CONTAINERS
   ========================================================================== */

.ad-zone {
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  flex-shrink: 0;
}

/* Hide when empty, show when filled */
.ad-zone:empty {
  display: none;
}

.ad-zone.ad-loaded {
  display: flex;
}

/* Banner — top of page */
.ad-zone-banner-top {
  width: 100%;
  height: var(--ad-banner-h-desktop);
  max-width: 728px;
  margin: 0 auto var(--gap-md);
}

@media (max-width: 639px) {
  .ad-zone-banner-top {
    height: var(--ad-banner-h-mobile);
    max-width: 320px;
  }
}

/* Sidebar 300×250 */
.ad-zone-sidebar {
  width: var(--ad-sidebar-w);
  height: var(--ad-sidebar-h);
  margin-bottom: var(--gap-lg);
}

/* In-grid ad slot — same aspect ratio as video cards */
.ad-zone-in-grid {
  aspect-ratio: 16 / 9;
  width: 100%;
  height: auto;
  border-radius: var(--radius-md);
}

/* Below video player */
.ad-zone-below-player {
  width: 100%;
  height: var(--ad-below-player-h-desktop);
  max-width: 728px;
  margin: var(--gap-md) auto;
}

@media (max-width: 639px) {
  .ad-zone-below-player {
    height: var(--ad-below-player-h-mobile);
    max-width: 300px;
  }
}

/* Footer banner */
.ad-zone-footer {
  width: 100%;
  height: var(--ad-banner-h-desktop);
  max-width: 728px;
  margin: var(--gap-lg) auto 0;
}

@media (max-width: 639px) {
  .ad-zone-footer {
    height: var(--ad-banner-h-mobile);
    max-width: 320px;
  }
}


/* ==========================================================================
   7. VIDEO CARD COMPONENT
   ========================================================================== */

.video-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color var(--ease-default), transform var(--ease-default);
  cursor: pointer;
}

.video-card:hover {
  border-color: var(--border-accent);
  transform: translateY(-2px);
}

/* Thumbnail wrapper */
.video-card__thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: var(--bg-elevated);
}

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

.video-card:hover .video-card__thumb img {
  transform: scale(1.04);
}

/* Card body */
.video-card__body {
  padding: var(--gap-sm) var(--gap-sm) var(--gap-md);
  display: flex;
  flex-direction: column;
  gap: var(--gap-xs);
}

/* Video title */
.video-card__title {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  line-height: 1.4;
  color: var(--text-bright);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.video-card:hover .video-card__title {
  color: #fff;
}

/* Metadata row */
.video-card__meta {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 11px;
  color: var(--text-dim);
}

/* Rating bar — only shown when votes >= 3 */
.video-card__rating {
  height: 3px;
  width: 100%;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  overflow: hidden;
  margin-top: var(--gap-xs);
}

.video-card__rating-fill {
  height: 100%;
  background: var(--accent-warm);
  border-radius: var(--radius-pill);
  transition: width 600ms ease;
}

/* Duration badge */
.badge-duration {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.78);
  color: #fff;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 11px;
  line-height: 1;
  padding: 3px 5px;
  border-radius: var(--radius-sm);
  backdrop-filter: blur(4px);
  pointer-events: none;
}

/* HD badge */
.badge-hd {
  position: absolute;
  top: 6px;
  left: 6px;
  background: var(--accent-cool);
  color: #000;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 10px;
  line-height: 1;
  padding: 2px 5px;
  border-radius: var(--radius-sm);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  pointer-events: none;
}


/* ==========================================================================
   8. UI COMPONENTS
   ========================================================================== */

/* --- Pill / Tag --- */
.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 10px;
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-pill);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 12px;
  color: var(--text-dim);
  background: transparent;
  transition: color var(--ease-default), background var(--ease-default), border-color var(--ease-default);
  white-space: nowrap;
  text-decoration: none;
}

.pill:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
  border-color: var(--border-accent);
  text-decoration: none;
}

.pill.pill--active {
  color: var(--bg-deep);
  background: var(--accent-warm);
  border-color: var(--accent-warm);
}

/* --- Primary Button --- */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  padding: 10px 20px;
  background: var(--accent-warm);
  color: #fff;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  text-decoration: none;
  transition: background var(--ease-default), opacity var(--ease-default);
  white-space: nowrap;
}

.btn-primary:hover {
  background: #e11d48;
  color: #fff;
  text-decoration: none;
  opacity: 1;
}

.btn-primary:active {
  opacity: 0.85;
}

/* --- Outline Button --- */
.btn-outline {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  padding: 9px 18px;
  background: transparent;
  color: var(--text-body);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-accent);
  text-decoration: none;
  transition: color var(--ease-default), background var(--ease-default), border-color var(--ease-default);
  white-space: nowrap;
}

.btn-outline:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
  border-color: var(--text-dim);
  text-decoration: none;
}

/* --- Rating Bar (standalone, e.g. on video pages) --- */
.rating-bar {
  height: 3px;
  width: 100%;
  background: var(--bg-elevated);
  border-radius: var(--radius-pill);
  overflow: hidden;
}

.rating-bar__fill {
  height: 100%;
  background: var(--accent-warm);
  border-radius: var(--radius-pill);
}

/* --- Breadcrumb --- */
.breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 400;
  font-size: 11px;
  color: var(--text-dim);
}

.breadcrumb a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--ease-default);
}

.breadcrumb a:hover {
  color: var(--text-bright);
  text-decoration: none;
}

.breadcrumb__sep {
  color: var(--border-accent);
  user-select: none;
}

.breadcrumb__current {
  color: var(--text-body);
}

/* --- Search Input --- */
.search-input-wrap {
  position: relative;
  display: flex;
  align-items: center;
}

.search-input-wrap .search-icon {
  position: absolute;
  left: 10px;
  color: var(--text-dim);
  pointer-events: none;
  width: 16px;
  height: 16px;
}

.search-input {
  width: 100%;
  padding: 9px 12px 9px 34px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-bright);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 400;
  font-size: 14px;
  transition: border-color var(--ease-default), background var(--ease-default);
  outline: none;
  appearance: none;
}

.search-input::placeholder {
  color: var(--text-dim);
}

.search-input:focus {
  border-color: var(--accent-warm);
  background: var(--bg-surface);
}

/* --- Pagination --- */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: var(--gap-sm);
  padding: var(--gap-xl) 0;
}

.pagination__item {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  transition: color var(--ease-default), background var(--ease-default), border-color var(--ease-default);
}

.pagination__item:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
  border-color: var(--border-accent);
  text-decoration: none;
}

.pagination__item.active,
.pagination__item.pagination__item--active {
  color: #fff;
  background: var(--accent-warm);
  border-color: var(--accent-warm);
}

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

/* --- Sort Tabs --- */
.sort-tabs {
  display: flex;
  align-items: center;
  gap: 0;
  border-bottom: 1px solid var(--border-subtle);
  overflow-x: auto;
  scrollbar-width: none;
}

.sort-tabs::-webkit-scrollbar {
  display: none;
}

.sort-tabs__item {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  color: var(--text-dim);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  border-bottom: 2px solid transparent;
  margin-bottom: -1px;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease-default), border-color var(--ease-default);
}

.sort-tabs__item:hover {
  color: var(--text-bright);
  text-decoration: none;
}

.sort-tabs__item.active,
.sort-tabs__item.sort-tabs__item--active {
  color: var(--text-bright);
  border-bottom-color: var(--accent-warm);
}

/* --- Empty State --- */
.empty-state {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: var(--gap-md);
  padding: 64px 16px;
  text-align: center;
  color: var(--text-dim);
}

.empty-state__icon {
  font-size: 48px;
  opacity: 0.4;
  line-height: 1;
}

.empty-state__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 18px;
  color: var(--text-body);
}

.empty-state__text {
  font-size: 14px;
  max-width: 320px;
}

/* --- View Toggle (grid / list) --- */
.view-toggle {
  display: flex;
  align-items: center;
  gap: 2px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 2px;
}

.view-toggle__btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 28px;
  border-radius: 6px;
  color: var(--text-dim);
  transition: color var(--ease-default), background var(--ease-default);
}

.view-toggle__btn:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
}

.view-toggle__btn.active {
  color: var(--text-bright);
  background: var(--bg-elevated);
}

/* --- Category Mega-Dropdown (CSS-only) --- */
.nav-item--has-dropdown {
  position: relative;
}

.category-dropdown {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  min-width: 220px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--gap-sm) 0;
  z-index: 100;
  opacity: 0;
  visibility: hidden;
  transform: translateY(6px);
  transition: opacity var(--ease-default), visibility var(--ease-default), transform var(--ease-default);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.nav-item--has-dropdown:hover .category-dropdown,
.nav-item--has-dropdown:focus-within .category-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.category-dropdown__item {
  display: flex;
  align-items: center;
  padding: 8px 16px;
  color: var(--text-body);
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  transition: color var(--ease-default), background var(--ease-default);
  white-space: nowrap;
}

.category-dropdown__item:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
  text-decoration: none;
}

.category-dropdown__count {
  margin-left: auto;
  padding-left: 12px;
  font-size: 11px;
  color: var(--text-dim);
}

/* --- Trending Tags (horizontal scroll row) --- */
.trending-tags {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.trending-tags::-webkit-scrollbar {
  display: none;
}

.trending-tags__label {
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 11px;
  color: var(--text-dim);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  white-space: nowrap;
  flex-shrink: 0;
}

/* --- Age Gate Overlay --- */
.age-gate {
  position: fixed;
  inset: 0;
  background: rgba(9, 9, 11, 0.97);
  backdrop-filter: blur(12px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--gap-lg);
}

.age-gate__box {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 40px 32px;
  max-width: 420px;
  width: 100%;
  text-align: center;
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
}

.age-gate__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 28px;
  color: var(--text-bright);
}

.age-gate__text {
  font-size: 14px;
  color: var(--text-body);
  line-height: 1.6;
}

.age-gate__actions {
  display: flex;
  gap: var(--gap-md);
  justify-content: center;
}

.age-gate[hidden] {
  display: none;
}


/* ==========================================================================
   9. ENGAGEMENT COMPONENTS
   ========================================================================== */

/* --- End Screen Overlay (shown when video ends) --- */
.end-screen-overlay {
  position: absolute;
  inset: 0;
  background: rgba(9, 9, 11, 0.88);
  backdrop-filter: blur(4px);
  z-index: 10;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: var(--gap-lg);
  opacity: 0;
  visibility: hidden;
  transition: opacity var(--ease-default), visibility var(--ease-default);
}

.end-screen-overlay.is-visible {
  opacity: 1;
  visibility: visible;
}

.end-screen-overlay__heading {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--text-bright);
  margin-bottom: var(--gap-md);
}

.end-screen-overlay__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--gap-sm);
  width: 100%;
  max-width: 560px;
}

@media (max-width: 639px) {
  .end-screen-overlay__grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* --- Autoplay Countdown (circular SVG timer) --- */
.autoplay-countdown {
  position: relative;
  width: 56px;
  height: 56px;
  margin: 0 auto var(--gap-md);
}

.autoplay-countdown__svg {
  width: 56px;
  height: 56px;
  transform: rotate(-90deg);
}

.autoplay-countdown__track {
  fill: none;
  stroke: var(--bg-elevated);
  stroke-width: 4;
}

.autoplay-countdown__fill {
  fill: none;
  stroke: var(--accent-warm);
  stroke-width: 4;
  stroke-linecap: round;
  stroke-dasharray: 138.23;  /* 2π × 22 */
  stroke-dashoffset: 138.23;
  animation: countdownShrink 5s linear forwards;
}

.autoplay-countdown__label {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 16px;
  color: var(--text-bright);
}

/* --- Load More Button --- */
.load-more-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--gap-sm);
  width: 100%;
  max-width: 240px;
  margin: var(--gap-xl) auto 0;
  padding: 12px 24px;
  background: var(--bg-surface);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  color: var(--text-body);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 14px;
  transition: color var(--ease-default), background var(--ease-default), border-color var(--ease-default);
}

.load-more-btn:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
  border-color: var(--text-dim);
}

.load-more-btn.is-loading {
  pointer-events: none;
  opacity: 0.6;
}


/* ==========================================================================
   10. ANIMATIONS
   ========================================================================== */

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes countdownShrink {
  from { stroke-dashoffset: 0; }
  to   { stroke-dashoffset: 138.23; }
}

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

/* Entrance animation class */
.animate-in {
  animation: fadeInUp 400ms ease-out both;
}

/* Stagger delays — 30ms increments, 20 steps */
.stagger-1  { animation-delay:  30ms; }
.stagger-2  { animation-delay:  60ms; }
.stagger-3  { animation-delay:  90ms; }
.stagger-4  { animation-delay: 120ms; }
.stagger-5  { animation-delay: 150ms; }
.stagger-6  { animation-delay: 180ms; }
.stagger-7  { animation-delay: 210ms; }
.stagger-8  { animation-delay: 240ms; }
.stagger-9  { animation-delay: 270ms; }
.stagger-10 { animation-delay: 300ms; }
.stagger-11 { animation-delay: 330ms; }
.stagger-12 { animation-delay: 360ms; }
.stagger-13 { animation-delay: 390ms; }
.stagger-14 { animation-delay: 420ms; }
.stagger-15 { animation-delay: 450ms; }
.stagger-16 { animation-delay: 480ms; }
.stagger-17 { animation-delay: 510ms; }
.stagger-18 { animation-delay: 540ms; }
.stagger-19 { animation-delay: 570ms; }
.stagger-20 { animation-delay: 600ms; }

/* Spinner utility */
.spin {
  animation: spin 700ms linear infinite;
}

/* Respect user motion preferences */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}


/* ==========================================================================
   11. RESPONSIVE BREAKPOINTS
   Mobile-first. Breakpoints: 640 (tablet), 1024 (desktop), 1320 (wide)
   ========================================================================== */

/* --- Tablet (640px+) --- */
@media (min-width: 640px) {
  .container {
    padding-inline: 20px;
  }

  .sort-tabs__item {
    padding: 10px 16px;
  }
}

/* --- Desktop (1024px+) --- */
@media (min-width: 1024px) {
  .container {
    padding-inline: 24px;
  }

  .end-screen-overlay__grid {
    grid-template-columns: repeat(4, 1fr);
    max-width: 700px;
  }
}

/* --- Wide (1320px+) --- */
@media (min-width: 1320px) {
  .container {
    padding-inline: 32px;
  }
}


/* ==========================================================================
   12. UTILITY CLASSES
   ========================================================================== */

/* Visually hidden but accessible to screen readers */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

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

/* 1-line truncation */
.truncate-1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Visibility */
.hide-mobile {
  display: none;
}

@media (min-width: 640px) {
  .hide-mobile {
    display: revert;
  }
}

.hide-desktop {
  display: revert;
}

@media (min-width: 1024px) {
  .hide-desktop {
    display: none;
  }
}

/* Flexbox shortcuts */
.flex-row      { display: flex; flex-direction: row; }
.flex-col      { display: flex; flex-direction: column; }
.items-center  { align-items: center; }
.justify-between { justify-content: space-between; }
.gap-sm        { gap: var(--gap-sm); }
.gap-md        { gap: var(--gap-md); }
.gap-lg        { gap: var(--gap-lg); }

/* Color utilities */
.text-accent-warm { color: var(--accent-warm); }
.text-accent-cool { color: var(--accent-cool); }
.text-accent-gold { color: var(--accent-gold); }
.text-bright      { color: var(--text-bright); }
.text-dim         { color: var(--text-dim); }

/* Overflow */
.overflow-hidden { overflow: hidden; }
.overflow-x-auto { overflow-x: auto; }


/* ==========================================================================
   VIDEO CARD — Extended Styles
   Hover preview, list view mode, status states, block headline, sort dropdown
   ========================================================================== */

/* ── Block headline (title + controls row) ── */
.block-headline {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  padding: var(--gap-lg) 0 var(--gap-md);
  flex-wrap: wrap;
}

.block-headline__left {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
  min-width: 0;
}

.block-headline__more {
  color: var(--accent-cool);
  white-space: nowrap;
  text-decoration: none;
  flex-shrink: 0;
}

.block-headline__more:hover {
  text-decoration: underline;
}

.block-headline__right {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  flex-shrink: 0;
}

/* ── Sort dropdown (replaces old .sort UI) ── */
.sort-dropdown {
  position: relative;
}

.sort-dropdown__trigger {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 6px 10px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-dim);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--ease-default), border-color var(--ease-default);
}

.sort-dropdown__trigger:hover {
  color: var(--text-bright);
  border-color: var(--border-accent);
}

.sort-dropdown__menu {
  position: absolute;
  top: calc(100% + 4px);
  right: 0;
  min-width: 160px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--gap-xs) 0;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(4px);
  transition: opacity var(--ease-default), visibility var(--ease-default), transform var(--ease-default);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
}

.sort-dropdown:hover .sort-dropdown__menu,
.sort-dropdown:focus-within .sort-dropdown__menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.sort-dropdown__item {
  display: block;
  padding: 7px 14px;
  color: var(--text-body);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  white-space: nowrap;
  transition: color var(--ease-default), background var(--ease-default);
  cursor: pointer;
}

.sort-dropdown__item:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
  text-decoration: none;
}

/* Small outline button variant */
.btn-outline--sm {
  padding: 5px 10px;
  font-size: 12px;
}

/* ── Preview video layer ── */
.video-card__thumb {
  position: relative; /* ensure absolute children are contained */
}

.video-card__preview-video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
  will-change: opacity;
  border-radius: inherit;
}

/* Static thumb fades out while preview fades in */
.video-card.is-previewing .video-card__preview-video {
  opacity: 1;
}

.video-card.is-previewing .video-card__img {
  opacity: 0;
  transition: opacity 200ms ease;
}

/* ── Access / status badges ── */
.badge-access {
  position: absolute;
  top: 6px;
  right: 6px;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  pointer-events: none;
}

.badge-access--private {
  background: rgba(0, 0, 0, 0.75);
  color: var(--text-dim);
  border: 1px solid var(--border-accent);
}

.badge-access--premium {
  background: var(--accent-gold);
  color: #000;
}

.badge-status {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 600;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.badge-status--disabled  { background: rgba(9, 9, 11, 0.72); color: var(--text-dim); }
.badge-status--error     { background: rgba(239, 68, 68, 0.2); color: #f87171; }
.badge-status--processing { background: rgba(9, 9, 11, 0.72); color: var(--accent-gold); }

/* ── Card state modifiers ── */
.video-card.is-disabled  { opacity: 0.55; }
.video-card.is-error     { border-color: rgba(239, 68, 68, 0.4); }
.video-card.is-processing { opacity: 0.7; }

/* ── List view mode ── */
@media (min-width: 640px) {
  .grid-videos.view-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
  }

  .grid-videos.view-list .video-card {
    flex-direction: row;
    height: 84px;
    border-radius: var(--radius-md);
  }

  .grid-videos.view-list .video-card__link {
    flex-direction: row;
    width: 100%;
  }

  .grid-videos.view-list .video-card__thumb {
    width: 150px;
    min-width: 150px;
    height: 84px;
    aspect-ratio: unset;
    border-radius: var(--radius-md) 0 0 var(--radius-md);
    flex-shrink: 0;
  }

  .grid-videos.view-list .video-card__body {
    flex: 1;
    padding: 10px 14px;
    justify-content: center;
    gap: var(--gap-xs);
  }

  .grid-videos.view-list .video-card__title {
    -webkit-line-clamp: 1;
    font-size: 13px;
  }

  .grid-videos.view-list .video-card__meta {
    display: flex;
    gap: var(--gap-sm);
  }

  .grid-videos.view-list .video-card__rating {
    display: none;
  }

  /* Badges reposition in list mode */
  .grid-videos.view-list .badge-duration {
    bottom: 4px;
    right: 4px;
  }

  /* Ad slot in list mode — full-width row, same height as card */
  .grid-videos.view-list .ad-zone-in-grid {
    aspect-ratio: unset;
    width: 100%;
    height: 84px;
    border-radius: var(--radius-md);
  }
}

/* ── Ensure card link fills card as flex column ── */
.video-card__link {
  display: flex;
  flex-direction: column;
  flex: 1;
  text-decoration: none;
  color: inherit;
  min-width: 0;
}

.video-card__link:hover {
  text-decoration: none;
  color: inherit;
}

/* ── Views count icon ── */
.video-card__views::before {
  content: '';
  display: inline-block;
  width: 12px;
  height: 8px;
  margin-right: 3px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2371717a' stroke-width='2'%3E%3Cpath d='M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z'/%3E%3Ccircle cx='12' cy='12' r='3'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-size: contain;
  vertical-align: middle;
  opacity: 0.7;
}


/* ==========================================================================
   SITE HEADER
   Sticky frosted-glass nav bar, logo, search, nav, categories mega-dropdown
   ========================================================================== */

/* ── Base header ── */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(9, 9, 11, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-subtle);
  height: 56px;
  display: flex;
  align-items: center;
  width: 100%;
}

.site-header .container {
  width: 100%;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--gap-lg);
  height: 56px;
  width: 100%;
}

/* ── Logo ── */
.site-logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  flex-shrink: 0;
}

.site-logo img {
  height: 28px;
  width: auto;
  display: block;
}

.site-logo__text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 22px;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  line-height: 1;
  white-space: nowrap;
}

.site-logo__accent {
  color: var(--accent-warm);
}

.site-logo:hover {
  text-decoration: none;
}

/* ── Site search (center, desktop) ── */
.site-search {
  flex: 1;
  max-width: 400px;
  margin: 0 auto;
  display: none;
}

@media (min-width: 768px) {
  .site-search {
    display: block;
  }
}

.site-search .search-input {
  padding-right: 36px;
}

.site-search__submit {
  position: absolute;
  right: 8px;
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  color: var(--text-dim);
  background: none;
  border: none;
  cursor: pointer;
  transition: color var(--ease-default);
  padding: 0;
}

.site-search__submit:hover {
  color: var(--accent-warm);
}

/* ── Primary nav (desktop) ── */
.site-nav {
  flex-shrink: 0;
}

.site-nav__list {
  display: flex;
  align-items: center;
  gap: 2px;
  list-style: none;
}

.site-nav__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 10px;
  color: var(--text-body);
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 500;
  font-size: 13px;
  text-decoration: none;
  border-radius: var(--radius-sm);
  border-bottom: 2px solid transparent;
  transition: color var(--ease-default), border-color var(--ease-default);
  white-space: nowrap;
}

.site-nav__link:hover {
  color: var(--text-bright);
  text-decoration: none;
}

.site-nav__item.is-active .site-nav__link {
  color: var(--accent-warm);
  border-bottom-color: var(--accent-warm);
}

.site-nav__chevron {
  transition: transform var(--ease-default);
  flex-shrink: 0;
}

/* ── Categories mega-dropdown ── */
.site-nav__item--dropdown {
  position: static; /* intentionally static so dropdown can be full-width relative to header */
}

.nav-mega-dropdown {
  position: absolute;
  top: 56px; /* header height */
  left: 0;
  right: 0;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  border-top: 1px solid var(--border-subtle);
  padding: var(--gap-lg) 0;
  z-index: 150;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity var(--ease-default), visibility var(--ease-default), transform var(--ease-default);
  transition-delay: 0ms;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.5);
}

/* Show on hover — 200ms delay on hide prevents accidental close */
.site-nav__item--dropdown:hover .nav-mega-dropdown,
.site-nav__item--dropdown:focus-within .nav-mega-dropdown {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0ms;
}

.site-nav__item--dropdown:not(:hover):not(:focus-within) .nav-mega-dropdown {
  transition-delay: 200ms;
}

.site-nav__item--dropdown:hover .site-nav__chevron {
  transform: rotate(180deg);
}

/* Grid of categories inside dropdown */
.nav-mega-dropdown__grid {
  max-width: 1320px;
  margin: 0 auto;
  padding: 0 24px;
}

.nav-mega-dropdown .categories-widget__header {
  display: none; /* heading not needed in dropdown context */
}

.nav-mega-dropdown .categories-widget__list {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2px 16px;
  list-style: none;
}

@media (min-width: 1024px) {
  .nav-mega-dropdown .categories-widget__list {
    grid-template-columns: repeat(4, 1fr);
  }
}

.nav-mega-dropdown .categories-widget__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 8px;
  border-radius: var(--radius-sm);
  color: var(--text-body);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: color var(--ease-default), background var(--ease-default);
}

.nav-mega-dropdown .categories-widget__link:hover {
  color: var(--accent-warm);
  background: var(--bg-elevated);
  text-decoration: none;
}

.nav-mega-dropdown .categories-widget__count {
  font-size: 11px;
  color: var(--text-dim);
  margin-left: var(--gap-sm);
  flex-shrink: 0;
}

/* "View all categories" link at bottom of dropdown */
.nav-mega-dropdown__view-all {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  max-width: 1320px;
  margin: var(--gap-md) auto 0;
  padding: var(--gap-sm) 24px;
  color: var(--accent-cool);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  border-top: 1px solid var(--border-subtle);
  display: flex;
  width: 100%;
  transition: color var(--ease-default);
}

.nav-mega-dropdown__view-all:hover {
  color: var(--text-bright);
  text-decoration: none;
}

/* ── Auth links (desktop) ── */
.site-auth {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  flex-shrink: 0;
  margin-left: auto;
}

.site-auth__link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--text-dim);
  text-decoration: none;
  font-size: 12px;
  font-weight: 500;
  white-space: nowrap;
  transition: color var(--ease-default);
}

.site-auth__link:hover {
  color: var(--text-bright);
  text-decoration: none;
}

/* ── Small button variant ── */
.btn-primary--sm {
  padding: 6px 12px;
  font-size: 12px;
  border-radius: var(--radius-sm);
}

/* ── Mobile controls ── */
.mobile-controls {
  display: flex;
  align-items: center;
  gap: var(--gap-xs);
  margin-left: auto;
}

@media (min-width: 1024px) {
  .mobile-controls {
    display: none;
  }
}

.mobile-icon-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  color: var(--text-dim);
  background: none;
  border: none;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: color var(--ease-default), background var(--ease-default);
  padding: 0;
}

.mobile-icon-btn:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
}

/* ── Mobile search overlay ── */
.mobile-search-overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 56px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  z-index: 110;
  padding: 0 var(--gap-md);
  animation: fadeIn 200ms ease;
}

.mobile-search-form {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  height: 100%;
}

/* ── Mobile drawer (off-canvas) ── */
.mobile-drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  width: 280px;
  max-width: 85vw;
  background: var(--bg-surface);
  border-left: 1px solid var(--border-subtle);
  z-index: 200;
  display: flex;
  flex-direction: column;
  padding: var(--gap-lg);
  animation: slideInRight 250ms ease;
  overflow-y: auto;
}

@keyframes slideInRight {
  from { transform: translateX(100%); }
  to   { transform: translateX(0); }
}

.mobile-drawer[hidden] {
  display: none;
}

.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: var(--gap-xl);
}

.mobile-drawer__nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.mobile-drawer__nav a {
  display: block;
  padding: 10px var(--gap-md);
  color: var(--text-body);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  border-radius: var(--radius-sm);
  text-decoration: none;
  transition: color var(--ease-default), background var(--ease-default);
}

.mobile-drawer__nav a:hover {
  color: var(--text-bright);
  background: var(--bg-elevated);
}

.mobile-drawer__auth {
  display: flex;
  flex-direction: column;
  gap: var(--gap-sm);
  margin-top: var(--gap-xl);
  padding-top: var(--gap-lg);
  border-top: 1px solid var(--border-subtle);
}

.mobile-drawer__auth .btn-primary,
.mobile-drawer__auth .btn-outline {
  justify-content: center;
  width: 100%;
}

.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 199;
  backdrop-filter: blur(2px);
}

.mobile-drawer-backdrop[hidden] {
  display: none;
}

body.drawer-open {
  overflow: hidden;
}

/* ── Trending tags bar ── */
.trending-bar {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  height: 40px;
  display: flex;
  align-items: center;
}

.trending-bar .container {
  overflow: hidden;
}

.trending-bar .trending-tags {
  gap: var(--gap-xs);
}

.trending-bar .pill {
  font-size: 11px;
  padding: 3px 8px;
  flex-shrink: 0;
}

/* ── Header mobile responsive ── */
@media (max-width: 767px) {
  .site-header {
    height: 48px;
  }
  .site-header__inner {
    height: 48px;
  }
  .site-logo__text {
    font-size: 18px;
  }
  .mobile-search-overlay {
    height: 48px;
  }
}

/* ── Sidebar categories widget (non-dropdown context) ── */
.sidebar .categories-widget__header,
.sidebar-widget .categories-widget__header {
  display: block;
  padding: 0 0 var(--gap-sm);
  border-bottom: 1px solid var(--border-subtle);
  margin-bottom: var(--gap-sm);
}

.sidebar .categories-widget__title,
.sidebar-widget .categories-widget__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-body);
  text-decoration: none;
  display: block;
}

.sidebar .categories-widget__list,
.sidebar-widget .categories-widget__list {
  display: flex;
  flex-direction: column;
  gap: 1px;
  list-style: none;
}

.sidebar .categories-widget__link,
.sidebar-widget .categories-widget__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 6px 0;
  color: var(--text-dim);
  font-size: 13px;
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color var(--ease-default);
}

.sidebar .categories-widget__link:hover,
.sidebar-widget .categories-widget__link:hover {
  color: var(--text-bright);
  text-decoration: none;
}

.sidebar .categories-widget__count,
.sidebar-widget .categories-widget__count {
  font-size: 11px;
  color: var(--border-accent);
}


/* ==========================================================================
   SITE FOOTER
   ========================================================================== */

.site-footer {
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  margin-top: var(--gap-xl);
}

/* ── SEO text block ── */
.footer-seo {
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--gap-xl) 0;
}

.footer-seo__text {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 800px;
  margin: 0 auto;
  text-align: center;
}

/* ── Footer links grid ── */
.footer-links {
  padding: 40px 0;
  border-bottom: 1px solid var(--border-subtle);
}

@media (max-width: 639px) {
  .footer-links {
    padding: 32px 0;
  }
}

.footer-links__grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-xl);
}

@media (min-width: 640px) {
  .footer-links__grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--gap-xl);
  }
}

/* ── Footer column ── */
.footer-col__heading {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 14px;
  color: var(--text-body);
  margin-bottom: var(--gap-md);
  padding-left: var(--gap-sm);
  border-left: 2px solid var(--accent-warm);
}

.footer-col__list {
  display: flex;
  flex-direction: column;
  gap: 2px;
  list-style: none;
}

.footer-col__list a {
  display: block;
  padding: 5px 0;
  color: var(--text-dim);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  text-decoration: none;
  transition: color var(--ease-default);
}

.footer-col__list a:hover {
  color: var(--text-body);
  text-decoration: none;
}

/* ── Bottom bar ── */
.footer-bottom {
  padding: var(--gap-lg) 0;
}

.footer-bottom__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--gap-md) var(--gap-xl);
}

.footer-bottom__copy {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
  flex-shrink: 0;
}

.footer-bottom__copy a {
  color: var(--text-dim);
}

.footer-badge-18 {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 18px;
  background: var(--accent-warm);
  color: #fff;
  font-family: 'Instrument Sans', sans-serif;
  font-weight: 700;
  font-size: 10px;
  border-radius: var(--radius-sm);
  flex-shrink: 0;
  letter-spacing: 0.02em;
}

.footer-bottom__network,
.footer-bottom__partners {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--gap-xs) var(--gap-md);
}

.footer-bottom__label {
  color: var(--text-dim);
  white-space: nowrap;
}

.footer-bottom__network a,
.footer-bottom__partners a {
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--ease-default);
  white-space: nowrap;
}

.footer-bottom__network a:hover {
  color: var(--text-bright);
  text-decoration: none;
}

.footer-bottom__partners a:hover {
  color: var(--text-body);
  text-decoration: none;
}

.footer-bottom__netlink {
  font-weight: 500;
}

/* ── Ad zone in footer ── */
.ad-zone-footer {
  display: flex;
  align-items: center;
  justify-content: center;
}


/* ==========================================================================
   AGE GATE — Extended Styles
   Supplements the base .age-gate skeleton defined in Section 8
   ========================================================================== */

/* Prevent any content behind the overlay from being scrolled to */
body.age-gate-active {
  overflow: hidden;
  /* Belt-and-suspenders: also prevent pointer events on everything except overlay */
}

/* Override the base .age-gate[hidden] — ensure it's truly gone */
.age-gate[hidden] {
  display: none !important;
  visibility: hidden;
  pointer-events: none;
}

/* Ensure the overlay covers everything, including sticky header */
.age-gate {
  z-index: 9999;
  /* backdrop-filter blurs anything that might peek through at near-opaque bg */
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ── Card ── */
.age-gate__box {
  max-width: 420px;
  width: 100%;
  padding: 36px 32px 28px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--gap-md);
  /* Subtle entrance animation */
  animation: fadeInUp 350ms ease-out both;
}

@media (max-width: 480px) {
  .age-gate__box {
    padding: 28px 20px 24px;
    margin-inline: var(--gap-sm);
  }
}

/* ── Logo ── */
.age-gate__logo {
  text-decoration: none;
  display: inline-block;
  margin-bottom: var(--gap-xs);
}

.age-gate__logo-text {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.03em;
  color: var(--text-bright);
  line-height: 1;
}

.age-gate__logo-accent {
  color: var(--accent-warm);
}

.age-gate__logo:hover {
  text-decoration: none;
}

/* ── Shield icon ── */
.age-gate__icon {
  color: var(--accent-warm);
  margin-bottom: var(--gap-xs);
  line-height: 1;
}

/* ── Heading ── */
.age-gate__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 24px;
  color: var(--text-bright);
  margin: 0;
  /* Override any inherited margins */
}

/* ── Body text ── */
.age-gate__text {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
  max-width: 320px;
}

/* ── Subtext ── */
.age-gate__subtext {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.5;
  margin: 0;
  max-width: 300px;
}

.age-gate__subtext strong {
  color: var(--text-body);
  font-weight: 600;
}

/* ── Actions container ── */
.age-gate__actions {
  flex-direction: column;
  width: 100%;
  gap: 0;
  margin-top: var(--gap-sm);
}

/* ── Enter button — full width, 48px tall ── */
.age-gate__enter {
  width: 100%;
  height: 48px;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  transition: background var(--ease-default), transform 150ms ease, box-shadow var(--ease-default);
}

.age-gate__enter:hover {
  background: #e11d48;
  transform: translateY(-1px);
  box-shadow: 0 4px 16px rgba(244, 63, 94, 0.35);
}

.age-gate__enter:active {
  transform: translateY(0);
  box-shadow: none;
}

/* ── Exit link ── */
.age-gate__exit {
  display: inline-block;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  text-decoration: none;
  padding: var(--gap-sm) 0;
  transition: color var(--ease-default);
  cursor: pointer;
}

.age-gate__exit:hover {
  color: var(--text-body);
  text-decoration: underline;
}

/* ── Legal micro-copy ── */
.age-gate__legal {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 400;
  color: var(--border-accent);
  line-height: 1.5;
  margin-top: var(--gap-xs);
  border-top: 1px solid var(--border-subtle);
  padding-top: var(--gap-md);
  width: 100%;
}

.age-gate__legal a {
  color: var(--text-dim);
  text-decoration: underline;
  text-decoration-color: var(--border-accent);
  transition: color var(--ease-default);
}

.age-gate__legal a:hover {
  color: var(--text-body);
}


/* =============================================================================
   13. HOMEPAGE
   ============================================================================= */

/* ── Page wrapper ── */
.page-home {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xl);
  padding-bottom: var(--gap-xl);
}

/* ── Hero ── */
.hp-hero {
  background: linear-gradient(180deg, rgba(244,63,94,0.06) 0%, transparent 100%),
              var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--gap-xl) 0 var(--gap-lg);
}

.hp-hero__text {
  margin-bottom: var(--gap-md);
}

.hp-hero__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(24px, 4vw, 42px);
  font-weight: 800;
  color: var(--text-bright);
  line-height: 1.1;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.hp-hero__subtitle {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-dim);
  margin: 0;
}

/* ── Category quick-scroll (hero pill row) ── */
.hp-category-scroll {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  display: flex;
  gap: 8px;
  padding: var(--gap-sm) 0;
}

.hp-category-scroll::-webkit-scrollbar {
  display: none;
}

/* Target the categories-widget when rendered inside the quick-scroll nav */
.hp-category-scroll .categories-widget {
  display: contents; /* unwrap wrapper div */
}

.hp-category-scroll .categories-widget__header {
  display: none; /* hide "Top Categories" heading in scroll context */
}

.hp-category-scroll .categories-widget__list {
  display: flex;
  flex-wrap: nowrap;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.hp-category-scroll .categories-widget__item {
  flex-shrink: 0;
}

.hp-category-scroll .categories-widget__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease-default), border-color var(--ease-default), color var(--ease-default);
}

.hp-category-scroll .categories-widget__link:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-warm);
  color: var(--text-bright);
}

.hp-category-scroll .categories-widget__count {
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Main layout: main column + sidebar ── */
.hp-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--gap-xl);
  align-items: start;
}

@media (min-width: 1024px) {
  .hp-layout {
    grid-template-columns: 1fr 280px;
  }
}

/* ── Main column ── */
.hp-main {
  display: flex;
  flex-direction: column;
  gap: var(--gap-xl);
  min-width: 0;
}

/* ── Section wrapper ── */
.hp-section {
  display: flex;
  flex-direction: column;
  gap: var(--gap-md);
}

/* ── Section header: title + optional "View all" link ── */
.hp-section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
}

.hp-section-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 18px;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  letter-spacing: -0.01em;
}

.hp-section-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent-warm);
  flex-shrink: 0;
  position: relative;
}

/* pulse animation on the trending dot */
#hp-trending .hp-section-dot::after {
  content: '';
  position: absolute;
  inset: -3px;
  border-radius: 50%;
  border: 2px solid var(--accent-warm);
  animation: pulseDot 2s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 0.6; transform: scale(1); }
  50%       { opacity: 0;   transform: scale(1.8); }
}

.hp-section-more {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--ease-default);
  white-space: nowrap;
  flex-shrink: 0;
}

.hp-section-more:hover {
  color: var(--accent-warm);
}

/* ── Mobile Top PAWGS section: horizontal avatar scroll ── */
.hp-pawgs-mobile {
  display: block; /* visible on mobile */
}

@media (min-width: 1024px) {
  .hp-pawgs-mobile {
    display: none; /* sidebar shows models on desktop */
  }
}

.hp-pawgs-mobile .sidebar-models-list {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  gap: 8px;
  padding: 4px 0 8px;
  list-style: none;
  margin: 0;
}

.hp-pawgs-mobile .sidebar-models-list::-webkit-scrollbar {
  display: none;
}

.hp-pawgs-mobile .sidebar-models-list__item {
  flex-shrink: 0;
}

.hp-pawgs-mobile .sidebar-models-list__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--ease-default), border-color var(--ease-default);
}

.hp-pawgs-mobile .sidebar-models-list__link:hover {
  border-color: var(--accent-warm);
  color: var(--text-bright);
}

.hp-pawgs-mobile .sidebar-models-list__count {
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Sidebar ── */
.hp-sidebar {
  display: none; /* hidden on mobile */
  flex-direction: column;
  gap: var(--gap-lg);
  position: sticky;
  top: calc(var(--header-h) + var(--gap-md));
  max-height: calc(100vh - var(--header-h) - var(--gap-xl));
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-accent) transparent;
}

@media (min-width: 1024px) {
  .hp-sidebar {
    display: flex;
  }
}

/* ── Sidebar widget shared styles ── */
.sidebar-widget {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.sidebar-widget__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-widget__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  margin: 0;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.sidebar-widget__title a {
  color: inherit;
  text-decoration: none;
  transition: color var(--ease-default);
}

.sidebar-widget__title a:hover {
  color: var(--accent-warm);
}

.sidebar-widget__more {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--ease-default);
}

.sidebar-widget__more:hover {
  color: var(--accent-warm);
}

/* ── Sidebar models list ── */
.sidebar-models-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-models-list__item {
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-models-list__item:last-child {
  border-bottom: none;
}

.sidebar-models-list__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 9px 16px;
  text-decoration: none;
  transition: background var(--ease-default);
}

.sidebar-models-list__link:hover {
  background: var(--bg-elevated);
}

.sidebar-models-list__name {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  transition: color var(--ease-default);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-models-list__link:hover .sidebar-models-list__name {
  color: var(--text-bright);
}

.sidebar-models-list__count {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ── Sidebar sponsors list (same structure as models) ── */
.sidebar-sponsors-list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-sponsors-list__item {
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-sponsors-list__item:last-child {
  border-bottom: none;
}

.sidebar-sponsors-list__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 9px 16px;
  text-decoration: none;
  transition: background var(--ease-default);
}

.sidebar-sponsors-list__link:hover {
  background: var(--bg-elevated);
}

.sidebar-sponsors-list__name {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  transition: color var(--ease-default);
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-sponsors-list__link:hover .sidebar-sponsors-list__name {
  color: var(--text-bright);
}

.sidebar-sponsors-list__count {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  flex-shrink: 0;
}

/* ── Sidebar categories widget (vertical list context) ── */
.sidebar-widget .categories-widget {
  display: block;
}

.sidebar-widget .categories-widget__header {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-widget .categories-widget__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-bright);
  text-transform: uppercase;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.sidebar-widget .categories-widget__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.sidebar-widget .categories-widget__item {
  border-bottom: 1px solid var(--border-subtle);
}

.sidebar-widget .categories-widget__item:last-child {
  border-bottom: none;
}

.sidebar-widget .categories-widget__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-sm);
  padding: 9px 16px;
  text-decoration: none;
  transition: background var(--ease-default);
}

.sidebar-widget .categories-widget__link:hover {
  background: var(--bg-elevated);
}

.sidebar-widget .categories-widget__name {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  transition: color var(--ease-default);
}

.sidebar-widget .categories-widget__link:hover .categories-widget__name {
  color: var(--text-bright);
}

.sidebar-widget .categories-widget__count {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
}

/* ── Tags cloud section ── */
.hp-tags-section {
  padding-top: var(--gap-md);
  border-top: 1px solid var(--border-subtle);
}

/* ── SEO text block ── */
.hp-seo-text {
  padding: var(--gap-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
}

.hp-seo-text p {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--text-dim);
  line-height: 1.7;
  margin: 0;
}

/* ── Load More button (KVS renders it via include_pagination_block_common.tpl) ── */
.load-more {
  display: flex;
  justify-content: center;
  margin-top: var(--gap-lg);
}

.load-more a,
.load-more button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 44px;
  padding: 0 32px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-accent);
  border-radius: var(--radius-md);
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-body);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ease-default), border-color var(--ease-default), color var(--ease-default), transform 150ms ease;
}

.load-more a:hover,
.load-more button:hover {
  background: var(--bg-elevated);
  border-color: var(--accent-warm);
  color: var(--text-bright);
  transform: translateY(-1px);
}

.load-more a:active,
.load-more button:active {
  transform: translateY(0);
}

/* Loading state while KVS fetches next page */
.load-more a.loading,
.load-more button.loading {
  pointer-events: none;
  opacity: 0.6;
}

/* ── Sidebar ad zone position ── */
.hp-sidebar .ad-zone-sidebar {
  margin: 0;
}


/* =============================================================================
   14. MODEL PROFILE
   ============================================================================= */

.model-profile {
  display: flex;
  align-items: flex-start;
  gap: var(--gap-lg);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: var(--gap-lg);
  margin-bottom: var(--gap-lg);
}

/* ── Avatar ── */
.model-profile__avatar-wrap {
  flex-shrink: 0;
}

.model-profile__avatar {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  object-fit: cover;
  border: 2px solid var(--accent-warm);
  display: block;
}

.model-profile__avatar--placeholder {
  width: 100px;
  height: 100px;
  border-radius: var(--radius-md);
  border: 2px solid var(--border-accent);
  background: var(--bg-elevated);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-dim);
}

/* ── Info ── */
.model-profile__info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.model-profile__name {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: clamp(20px, 3vw, 28px);
  font-weight: 800;
  color: var(--text-bright);
  margin: 0;
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.model-profile__stats {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.model-profile__stat {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
}

.model-profile__stat-value {
  font-weight: 600;
  color: var(--text-body);
}

.model-profile__stat-sep {
  color: var(--border-accent);
  font-size: 12px;
}

.model-profile__bio {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-body);
  line-height: 1.6;
  margin: 0;
}

.model-profile__actions {
  display: flex;
  gap: var(--gap-sm);
}

.model-profile__btn {
  display: inline-flex;
  align-items: center;
  height: 36px;
  padding: 0 20px;
  font-size: 13px;
  font-weight: 600;
  border-radius: var(--radius-md);
  text-decoration: none;
  cursor: pointer;
  transition: background var(--ease-default), border-color var(--ease-default), transform 150ms ease;
}

/* Mobile: stack avatar + info vertically */
@media (max-width: 640px) {
  .model-profile {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: var(--gap-md);
  }

  .model-profile__avatar {
    width: 72px;
    height: 72px;
  }

  .model-profile__avatar--placeholder {
    width: 72px;
    height: 72px;
  }

  .model-profile__stats {
    justify-content: center;
  }

  .model-profile__actions {
    justify-content: center;
  }
}


/* =============================================================================
   15. BREADCRUMB
   ============================================================================= */

.breadcrumb {
  padding: var(--gap-sm) 0;
  margin-bottom: var(--gap-sm);
}

.breadcrumb__list {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.breadcrumb__item {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 400;
  color: var(--text-dim);
}

.breadcrumb__link {
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--ease-default);
}

.breadcrumb__link:hover {
  color: var(--accent-warm);
  text-decoration: underline;
}

.breadcrumb__item--current {
  color: var(--text-body);
}

.breadcrumb__sep {
  color: var(--border-accent);
  font-size: 11px;
  user-select: none;
}


/* =============================================================================
   16. MOBILE DRAWER
   ============================================================================= */

/* ── Hamburger button animation ── */
.hamburger {
  display: flex;
  flex-direction: column;
  gap: 5px;
  width: 24px;
  cursor: pointer;
}

.hamburger__line {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--text-body);
  border-radius: 2px;
  transition: transform 300ms ease, opacity 300ms ease;
  transform-origin: center;
}

/* When drawer is open: button gets .is-open class */
.mobile-menu-btn.is-open .hamburger__line:nth-child(1) {
  transform: translateY(7px) rotate(45deg);
}

.mobile-menu-btn.is-open .hamburger__line:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.mobile-menu-btn.is-open .hamburger__line:nth-child(3) {
  transform: translateY(-7px) rotate(-45deg);
}

/* ── Drawer panel ── */
.mobile-drawer {
  position: fixed;
  top: 0;
  left: 0;
  height: 100%;
  width: 280px;
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  z-index: 200;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--border-accent) transparent;
  transform: translateX(-100%);
  transition: transform 300ms ease;
  display: flex;
  flex-direction: column;
}

/* Use CSS instead of hidden attr for animated entry */
.mobile-drawer:not([hidden]) {
  transform: translateX(0);
}

/* Override default [hidden] display:none — we want transform animation */
.mobile-drawer[hidden] {
  display: flex !important;
  transform: translateX(-100%);
  pointer-events: none;
}

/* ── Drawer header ── */
.mobile-drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

/* ── Search ── */
.mobile-drawer__search {
  padding: 12px 16px;
  border-bottom: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.mobile-drawer__search .search-input-wrap {
  width: 100%;
}

.mobile-drawer__search .search-input {
  width: 100%;
}

/* ── Nav list ── */
.mobile-drawer__nav {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  flex-shrink: 0;
}

.mobile-drawer__nav-item {
  position: relative;
}

.mobile-drawer__nav-link {
  display: block;
  padding: 12px 16px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  transition: color var(--ease-default), background var(--ease-default);
  border-left: 3px solid transparent;
}

.mobile-drawer__nav-link:hover {
  background: var(--bg-elevated);
  color: var(--text-bright);
}

.mobile-drawer__nav-item.is-active .mobile-drawer__nav-link {
  border-left-color: var(--accent-warm);
  color: var(--accent-warm);
  background: rgba(244, 63, 94, 0.06);
}

/* ── Categories section ── */
.mobile-drawer__section {
  border-top: 1px solid var(--border-subtle);
  flex-shrink: 0;
}

.mobile-drawer__section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 16px 8px;
}

.mobile-drawer__section-title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
}

.mobile-drawer__section-more {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 11px;
  color: var(--text-dim);
  text-decoration: none;
  transition: color var(--ease-default);
}

.mobile-drawer__section-more:hover {
  color: var(--accent-warm);
}

/* Categories widget in drawer context */
.mobile-drawer__categories .categories-widget__header {
  display: none;
}

.mobile-drawer__categories .categories-widget__list {
  list-style: none;
  padding: 0;
  margin: 0;
}

.mobile-drawer__categories .categories-widget__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 9px 16px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-body);
  text-decoration: none;
  transition: background var(--ease-default), color var(--ease-default);
  border-left: 3px solid transparent;
}

.mobile-drawer__categories .categories-widget__link:hover {
  background: var(--bg-elevated);
  color: var(--text-bright);
}

.mobile-drawer__categories .categories-widget__count {
  font-size: 11px;
  color: var(--text-dim);
}

/* ── Divider ── */
.mobile-drawer__divider {
  border: none;
  border-top: 1px solid var(--border-subtle);
  margin: 8px 0;
  flex-shrink: 0;
}

/* ── Auth ── */
.mobile-drawer__auth {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 12px 16px;
  flex-shrink: 0;
}

.mobile-drawer__auth .btn-primary,
.mobile-drawer__auth .btn-outline {
  width: 100%;
  justify-content: center;
  height: 40px;
}

/* ── Our Network ── */
.mobile-drawer__network {
  padding: 12px 16px 20px;
  border-top: 1px solid var(--border-subtle);
  margin-top: auto;
  flex-shrink: 0;
}

.mobile-drawer__network-label {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  margin-bottom: 8px;
}

.mobile-drawer__network-link {
  display: block;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 4px 0;
  transition: color var(--ease-default);
}

.mobile-drawer__network-link:hover {
  color: var(--text-body);
}

/* ── Backdrop ── */
.mobile-drawer-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.6);
  z-index: 199;
  opacity: 0;
  transition: opacity 200ms ease;
  pointer-events: none;
}

.mobile-drawer-backdrop:not([hidden]) {
  opacity: 1;
  pointer-events: auto;
}

.mobile-drawer-backdrop[hidden] {
  display: block !important;
  opacity: 0;
  pointer-events: none;
}

/* Body scroll lock */
body.drawer-open {
  overflow: hidden;
}


/* =============================================================================
   17. SEARCH PAGE
   ============================================================================= */

.page-search {
  display: flex;
  flex-direction: column;
  gap: var(--gap-lg);
  padding-bottom: var(--gap-xl);
}

/* ── Search hero bar ── */
.search-hero {
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  padding: var(--gap-lg) 0;
}

.search-hero__form {
  max-width: 700px;
  margin: 0 auto;
}

/* Larger search input on search page */
.search-input-wrap--lg .search-input {
  height: 48px;
  font-size: 16px;
  padding-left: 44px;
}

.search-input-wrap--lg {
  display: flex;
  align-items: center;
  gap: 8px;
  position: relative;
}

.search-input-wrap--lg .search-icon {
  position: absolute;
  left: 12px;
  pointer-events: none;
  color: var(--text-dim);
  z-index: 1;
}

.search-input-wrap--lg .search-input {
  flex: 1;
}

/* ── Similar searches ── */
.search-similar {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
  padding: 4px 0;
}

.search-similar::-webkit-scrollbar {
  display: none;
}

.similar-searches {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.similar-searches__label {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 12px;
  font-weight: 500;
  color: var(--text-dim);
  white-space: nowrap;
  flex-shrink: 0;
}

.similar-searches__pill {
  font-size: 12px;
  padding: 4px 12px;
}

/* ── Results header ── */
.search-results-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--gap-md);
  flex-wrap: wrap;
}

.search-results-count {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-dim);
  margin: 0;
}

.search-results-count strong {
  font-weight: 600;
  color: var(--text-body);
}

.search-results-count em {
  font-style: normal;
  color: var(--text-bright);
}

/* ── Zero-state ── */
.search-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--gap-md);
  padding: var(--gap-xl) var(--gap-lg);
  text-align: center;
}

.search-empty__icon {
  color: var(--text-dim);
  opacity: 0.5;
}

.search-empty__title {
  font-family: 'Bricolage Grotesque', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text-bright);
  margin: 0;
}

.search-empty__text {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 15px;
  color: var(--text-body);
  margin: 0;
}

.search-empty__tip {
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  color: var(--text-dim);
  margin: 0;
}

/* Categories in zero state: horizontal scroll pills */
.search-empty__categories {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}

.search-empty__categories::-webkit-scrollbar {
  display: none;
}

.search-empty__categories .categories-widget__list {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.search-empty__categories .categories-widget__header {
  display: none;
}

.search-empty__categories .categories-widget__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: 999px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 13px;
  font-weight: 500;
  color: var(--text-body);
  text-decoration: none;
  transition: border-color var(--ease-default), color var(--ease-default);
}

.search-empty__categories .categories-widget__link:hover {
  border-color: var(--accent-warm);
  color: var(--text-bright);
}

.search-empty__categories .categories-widget__count {
  font-size: 11px;
  color: var(--text-dim);
}


/* =============================================================================
   18. AUTOCOMPLETE / SEARCH SUGGEST DROPDOWN
   (KVS uses jQuery Autocomplete — .autocomplete-suggestions class)
   ============================================================================= */

.autocomplete-suggestions {
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  border-top: none;
  border-radius: 0 0 var(--radius-md) var(--radius-md);
  box-shadow: 0 8px 24px rgba(0,0,0,0.4);
  overflow: hidden;
  z-index: 150;
  max-width: 600px;
}

.autocomplete-suggestion {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 14px;
  font-weight: 400;
  color: var(--text-body);
  cursor: pointer;
  transition: background var(--ease-default), color var(--ease-default);
  border-bottom: 1px solid var(--border-subtle);
}

.autocomplete-suggestion:last-child {
  border-bottom: none;
}

.autocomplete-suggestion:hover,
.autocomplete-suggestion.selected {
  background: var(--bg-elevated);
  color: var(--text-bright);
}

/* Highlight matched text */
.autocomplete-suggestion strong {
  font-weight: 600;
  color: var(--accent-warm);
}

/* Group header (for "mixed" type with categories + videos) */
.autocomplete-group {
  padding: 6px 14px;
  font-family: 'Instrument Sans', sans-serif;
  font-size: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-dim);
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-subtle);
  cursor: default;
}

/* Search icon prefix on each suggestion */
.autocomplete-suggestion::before {
  content: '';
  display: block;
  width: 14px;
  height: 14px;
  background: currentColor;
  opacity: 0.3;
  flex-shrink: 0;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  mask-size: contain;
  -webkit-mask-size: contain;
  mask-repeat: no-repeat;
  -webkit-mask-repeat: no-repeat;
}
