/* Layout inspired by x1 / maccms-style video grids; responsive, dark theme */
*, *::before, *::after { box-sizing: border-box; }
/* Accent colors: defaults only — overridden per domain in templates/header.php (:root). */
:root {
  --brand: #ff5f00;
  --niche: #ff5f00;
}
html { font-size: 16px; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "PingFang SC", "Microsoft YaHei", sans-serif;
  background: #0f0f0f;
  color: #e8e8e8;
  line-height: 1.5;
}
a { color: #fff; text-decoration: none; }
a:hover { color: var(--brand, #ff5f00); }
img { max-width: 100%; height: auto; }

.site-header {
  background: linear-gradient(180deg, #171717 0%, #111111 100%);
  border-bottom: 1px solid #2a2a2a;
  border-bottom: 1px solid color-mix(in srgb, var(--brand, #ff5f00) 22%, #2a2a2a);
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(6px);
}
.header-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0.7rem 1rem;
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.55rem 0.8rem;
}
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.header-locale { flex-shrink: 0; }
.header-locale__select {
  background: #1d1d1d;
  color: #e8e8e8;
  border: 1px solid #3a3a3a;
  border-radius: 10px;
  padding: 0.42rem 1.85rem 0.42rem 0.62rem;
  font-size: 0.8rem;
  font-weight: 600;
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23999' d='M1 1l5 5 5-5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
}
.header-locale__select:focus {
  outline: 2px solid var(--brand, #ff5f00);
  outline-offset: 2px;
}
.logo {
  font-weight: 800;
  font-size: 2rem;
  letter-spacing: 0.2px;
  color: #fff;
  flex-shrink: 0;
  line-height: 1;
}
.nav-toggle {
  display: none;
  margin-left: auto;
  background: #1f1f1f;
  border: 1px solid #3a3a3a;
  color: #fff;
  padding: 0.32rem 0.62rem;
  border-radius: 10px;
  font-size: 1.15rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}
.nav-toggle:hover {
  border-color: var(--brand, #ff5f00);
  background: #252525;
}
.main-nav {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: 0.75rem;
}
.main-nav ul { list-style: none; margin: 0; padding: 0; }
.nav-primary {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  gap: 0.25rem 1.25rem;
  flex: 1;
  min-width: 0;
}
.nav-primary > li { position: relative; }

/* Header search */
.header-search {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  gap: 0.45rem;
}
.header-search__input {
  width: min(360px, 44vw);
  background: #1a1a1a;
  color: #e8e8e8;
  border: 1px solid #3a3a3a;
  border-radius: 12px;
  padding: 0.52rem 0.72rem;
  font-size: 0.95rem;
}
.header-search__input:focus {
  outline: 2px solid var(--brand, #ff5f00);
  outline-offset: 2px;
  border-color: var(--brand, #ff5f00);
}
.header-search__btn {
  background: linear-gradient(180deg, #2a2a2a 0%, #1f1f1f 100%);
  border: 1px solid #3a3a3a;
  color: #fff;
  border-radius: 12px;
  padding: 0.5rem 0.8rem;
  font-weight: 700;
  cursor: pointer;
  transition: border-color 0.2s ease, transform 0.12s ease;
}
.header-search__btn:hover {
  color: #fff;
  border-color: var(--brand, #ff5f00);
}
.header-search__btn:active {
  transform: translateY(1px);
}
.nav-primary > li > a {
  display: block;
  padding: 0.4rem 0;
  font-size: 0.93rem;
  color: #ccc;
  line-height: 1.25;
  white-space: nowrap;
}
.nav-primary > li > a:hover { color: var(--brand, #ff5f00); }
.nav-primary > li.is-active > a,
.nav-primary > li > a.is-active {
  color: #fff;
  font-weight: 700;
  box-shadow: inset 0 -2px 0 var(--brand, #ff5f00);
}
.nav-primary > li.has-sub.is-active > a.is-active {
  color: #fff;
}
.has-sub .sub a.is-active {
  background: #2a2520;
  background: color-mix(in srgb, var(--brand, #ff5f00) 16%, #1c1c1c);
  color: var(--brand, #ff5f00);
  font-weight: 600;
}
.has-sub .sub {
  display: none;
  position: absolute;
  left: 0;
  top: 100%;
  min-width: 200px;
  background: #1c1c1c;
  border: 1px solid #2a2a2a;
  border-radius: 8px;
  padding: 0.35rem 0;
  box-shadow: 0 8px 24px rgba(0,0,0,.45);
  z-index: 60;
}
.has-sub:hover .sub { display: block; }
.has-sub .sub a {
  display: block;
  padding: 0.45rem 0.85rem;
  font-size: 0.88rem;
  color: #bbb;
}
.has-sub .sub a:hover { background: #252525; color: #fff; }

.site-main { max-width: 1200px; margin: 0 auto; padding: 1rem; min-height: 50vh; }

/* Desktop header: one clean row */
@media (min-width: 901px) {
  .header-inner {
  }
  .main-nav {
    display: flex !important;
    flex-direction: row;
    align-items: center;
  }
  .nav-toggle {
    display: none !important;
  }
  .header-search {
    flex-shrink: 0;
  }
}

/* Hero swiper */
.hero-swiper-wrap { margin: -1rem -1rem 1.5rem; }
@media (min-width: 1200px) { .hero-swiper-wrap { margin-left: calc(50% - 50vw + 8px); margin-right: calc(50% - 50vw + 8px); } }
.hero-swiper { height: min(52vw, 420px); background: #000; }
.hero-slide { height: 100%; }
.hero-card {
  display: block;
  height: 100%;
  position: relative;
  overflow: hidden;
}
.hero-card__ph {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}
.hero-card__site {
  color: var(--niche, var(--brand, #ff5f00));
  font-weight: 800;
  font-size: clamp(0.95rem, 4.5vw, 1.85rem);
  text-align: center;
  padding: 1rem 1.25rem;
  line-height: 1.25;
  max-width: 90%;
}
.hero-card__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  filter: brightness(0.55);
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease, filter 0.2s ease;
}
.hero-card.is-loaded .hero-card__img {
  opacity: 1;
}
.hero-card.is-loaded .hero-card__ph {
  opacity: 0;
  pointer-events: none;
}
.hero-card:hover .hero-card__img { filter: brightness(0.72); }
.hero-card__play {
  position: absolute;
  left: 50%;
  top: 50%;
  z-index: 4;
  width: 64px;
  height: 64px;
  margin: -32px 0 0 -32px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: 3px solid rgba(255,255,255,.85);
}
.hero-card__play::after {
  content: '';
  position: absolute;
  left: 26px; top: 18px;
  border: 14px solid transparent;
  border-left: 20px solid #fff;
}
.hero-card__meta {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  z-index: 5;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(transparent, rgba(0,0,0,.85));
}
.hero-card__title { display: block; font-size: 1.1rem; font-weight: 700; }
.hero-card__sub { font-size: 0.85rem; color: #bbb; }

/* Hero only: larger nav + pagination hit targets (WCAG 2.2 touch / spacing). */
.hero-swiper .swiper-button-prev,
.hero-swiper .swiper-button-next {
  color: #fff !important;
  opacity: 0.9;
  width: 44px !important;
  height: 44px !important;
  margin-top: -22px !important;
}
.hero-swiper .swiper-pagination {
  display: flex !important;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 4px 2px;
  bottom: 10px !important;
  padding: 6px 8px;
}
.hero-swiper .swiper-pagination-bullet {
  width: 44px !important;
  height: 44px !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  opacity: 1 !important;
  position: relative;
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
}
.hero-swiper .swiper-pagination-bullet::after {
  content: '';
  display: block;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.35);
}
.hero-swiper .swiper-pagination-bullet-active::after {
  width: 12px;
  height: 12px;
  background: var(--brand, #ff5f00);
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.35);
}
.hero-swiper .swiper-pagination-bullet:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 4px;
  border-radius: 10px;
}

.section { margin-bottom: 2rem; }
.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 0.75rem;
  border-left: 4px solid var(--brand, #ff5f00);
  padding-left: 0.65rem;
}
.section-head h1, .section-head h2 { margin: 0; font-size: 1.15rem; }
.section-head__title-link {
  color: inherit;
  text-decoration: none;
}
.section-head__title-link:hover { color: var(--brand, #ff5f00); }
.section-head .more { font-size: 0.85rem; color: #999; }

/* 404: unavailable video/page + random suggestions */
.section-not-found .not-found-hero {
  margin-bottom: 1.5rem;
  max-width: 42rem;
}
.section-not-found .not-found-hero h1 {
  margin: 0 0 0.5rem;
  font-size: 1.35rem;
  line-height: 1.25;
}
.section-not-found .not-found-hero__body {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.6;
}
.section-not-found .not-found-hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 0.75rem;
  margin: 1rem 0 0;
}
.section-not-found .section-head--404-suggested {
  margin-top: 0.25rem;
}

/* List pages: intro copy under h1 (category meta + grid hint), spider-style */
.section-intro {
  margin: 0 0 1rem;
  max-width: 52rem;
}
.section-intro p {
  margin: 0 0 0.65rem;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #ccc;
}
.section-intro p:last-child { margin-bottom: 0; }
.section-intro .muted { color: #888; font-size: 0.88rem; }

/* Breadcrumbs: horizontal trail */
.breadcrumbs {
  margin: 0 0 0.75rem;
}
.breadcrumbs__list {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  gap: 0.25rem;
  color: #888;
  font-size: 0.88rem;
}
.breadcrumbs__list li {
  display: inline-flex;
  align-items: center;
  white-space: nowrap;
}
.breadcrumbs__list li + li::before {
  content: '/';
  color: #555;
  margin: 0 0.35rem 0 0.05rem;
}
.breadcrumbs a { color: #aaa; }
.breadcrumbs a:hover { color: var(--brand, #ff5f00); }
.breadcrumbs__list li[aria-current="page"] {
  color: #fff;
  font-weight: 700;
}

/* Two-column browse category list */
.category-hub-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.55rem 1rem;
}
.category-hub-list li {
  margin: 0;
}
.category-hub-list a {
  display: block;
  padding: 0.45rem 0.6rem;
  border-radius: 8px;
  background: #1f1f1f;
  border: 1px solid #2a2a2a;
  color: #bbb;
  font-size: 0.9rem;
  line-height: 1.25;
}
.category-hub-list a:hover {
  border-color: var(--brand, #ff5f00);
  color: #fff;
}
.category-hub-list .muted {
  display: inline-block;
  margin-left: 0.5rem;
  vertical-align: middle;
  font-size: 0.82rem;
}

/* Play page: h1 + lead + description above player */
.play-page-head {
  margin-bottom: 1rem;
  max-width: 52rem;
}
.play-page-h1 {
  font-size: 1.35rem;
  font-weight: 700;
  margin: 0 0 0.35rem;
  line-height: 1.25;
  color: #fff;
}
.play-page-category {
  margin: 0 0 0.5rem;
  font-size: 0.9rem;
}
.play-page-desc {
  margin: 0;
  font-size: 0.92rem;
  line-height: 1.65;
  color: #aaa;
}

.grid {
  display: grid;
  gap: 0.65rem;
}
/* Video grids: always 2 columns on small / mobile viewports */
.grid-vod {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
@media (min-width: 600px) { .grid-vod { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 900px) { .grid-vod { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (max-width: 599px) {
  .grid-vod {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

/* (No special scrolling rules for recommended videos anymore) */

/* Article grids: 2 columns on mobile & tablet; 4 on large screens */
.grid-art {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}
@media (max-width: 599px) {
  .grid-art {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}
@media (min-width: 1000px) { .grid-art { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card {
  background: #161616;
  border-radius: 8px;
  overflow: hidden;
  border: 1px solid #222;
}
.card a { color: inherit; display: block; }
.card-thumb {
  padding-top: 140%;
  background-color: #000;
  position: relative;
  overflow: hidden;
}
/* Video list posters: 400×269 (landscape); default .card-thumb 140% is portrait and warps covers */
.card-thumb.vod-thumb {
  padding-top: 67.25%; /* height/width = 269/400 */
}
.vod-thumb__placeholder {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: #000;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: opacity 0.35s ease;
}
.vod-thumb__site {
  color: var(--niche, var(--brand, #ff5f00));
  font-weight: 800;
  font-size: clamp(0.65rem, 3.2vw, 0.95rem);
  text-align: center;
  padding: 0.35rem 0.5rem;
  line-height: 1.2;
  max-width: 92%;
  word-break: break-word;
}
.vod-thumb__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  z-index: 2;
  opacity: 0;
  transition: opacity 0.4s ease;
}
.vod-thumb.is-loaded .vod-thumb__img {
  opacity: 1;
}
.vod-thumb.is-loaded .vod-thumb__placeholder {
  opacity: 0;
  pointer-events: none;
}
.thumb-ov {
  position: absolute;
  bottom: 6px;
  z-index: 4;
  font-size: 0.68rem;
  font-weight: 600;
  line-height: 1.2;
  padding: 0.2rem 0.45rem;
  border-radius: 4px;
  background: rgba(0, 0, 0, 0.78);
  color: #eee;
  max-width: 46%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
/* Video list: left = hits + like icon (cool blue), right = category (warm amber) */
.thumb-ov--vod-hits,
.thumb-ov--art-hits {
  left: 6px;
  display: inline-flex;
  align-items: center;
  gap: 0.28rem;
  background: rgba(32, 92, 168, 0.92);
  color: #f2f7ff;
}
.thumb-ov__like-ic {
  flex-shrink: 0;
  display: block;
  opacity: 0.92;
}
.thumb-ov__hits-text {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}
.thumb-ov--vod-type {
  right: 6px;
  left: auto;
  text-align: right;
  background: rgba(168, 92, 32, 0.92);
  color: #fff8f2;
}
/* Article list: left = hits + like (same blue as video), right = category (plum) */
.thumb-ov--art-type {
  right: 6px;
  left: auto;
  text-align: right;
  background: rgba(108, 48, 142, 0.92);
  color: #faf5ff;
}
.badge-play {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: 2px solid #fff;
}
.badge-play::after {
  content: '';
  position: absolute;
  left: 13px; top: 10px;
  border: 8px solid transparent;
  border-left: 12px solid #fff;
}
.card-title {
  margin: 0;
  padding: 0.5rem 0.55rem 0.55rem;
  font-size: 0.88rem;
  font-weight: 600;
  line-height: 1.35;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
/* Grid list cards: up to 3 lines, CJK-safe (no nowrap / no mid-glyph clip) */
.card-title.card-title--list {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
  word-break: break-word;
  max-width: 100%;
  padding: 0.4rem 0.5rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 500;
  line-height: 1.5;
  color: #d0d0d0;
}
/* No nested markup inside title; if any slips through, do not expand layout */
.card-title.card-title--list * {
  display: inline;
  font: inherit;
  color: inherit;
}
.detail-layout {
  display: grid;
  gap: 1.25rem;
}
@media (min-width: 800px) {
  .detail-layout { grid-template-columns: 280px 1fr; align-items: start; }
}
.detail-poster {
  padding-top: 67.25%; /* 400:269, match vod covers */
  border-radius: 10px;
  background-size: cover;
  background-position: center center;
  background-color: #222;
}
.detail-body h1 { margin: 0 0 0.35rem; font-size: 1.5rem; }
.muted { color: #888; font-size: 0.9rem; }
.detail-blurb { color: #ccc; }
.detail-meta { margin: 0.35rem 0; color: #bbb; font-size: 0.9rem; line-height: 1.45; }
.detail-meta__k { color: #888; font-weight: 600; margin-right: 0.35rem; }
.detail-actions { margin: 1rem 0; }
.btn {
  display: inline-block;
  padding: 0.55rem 1.1rem;
  border-radius: 8px;
  background: #2a2a2a;
  border: 1px solid #333;
}
.btn.primary {
  background: var(--brand, #ff5f00);
  border-color: transparent;
  color: #111;
  font-weight: 700;
}
.btn.primary:hover { filter: brightness(1.08); color: #111; }
.detail-content.rte, .rte { color: #ccc; font-size: 0.95rem; }
.rte img { max-width: 100%; height: auto; }

.player-wrap {
  background: #000;
  border-radius: 10px;
  overflow: hidden;
  border: 1px solid #222;
}
.player, .player-frame {
  width: 100%;
  aspect-ratio: 16/9;
  max-height: 70vh;
  display: block;
  background: #000;
}
.player-fallback { padding: 2rem; text-align: center; color: #888; }
.play-meta { margin-top: 1rem; }
.play-meta p { margin: 0; }

.internal-entries {
  margin-top: 1.5rem;
  padding: 1rem;
  background: #141414;
  border: 1px solid #252525;
  border-radius: 10px;
}
.internal-entries__title { margin: 0 0 0.65rem; font-size: 1rem; }
.internal-entries__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}
.internal-entries__list a {
  display: inline-block;
  padding: 0.35rem 0.65rem;
  background: #1f1f1f;
  border: 1px solid #2e2e2e;
  border-radius: 6px;
  font-size: 0.82rem;
  color: #bbb;
}
.internal-entries__list a:hover { border-color: var(--brand, #ff5f00); color: #fff; }

.pager { margin-top: 1rem; display: flex; gap: 1rem; }
.pager a { color: var(--brand, #ff5f00); }
.pager--full {
  flex-direction: column;
  align-items: flex-start;
  gap: 0.65rem;
}
.pager__meta { margin: 0; }
.pager__links {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.35rem 0.45rem;
}
.pager__prev,
.pager__next {
  font-weight: 600;
}
.pager__num {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2rem;
  padding: 0.25rem 0.45rem;
  border-radius: 4px;
  font-size: 0.82rem;
  color: var(--brand, #ff5f00);
  border: 1px solid #333;
  background: #1a1a1a;
}
a.pager__num:hover {
  border-color: var(--brand, #ff5f00);
  color: #fff;
}
.pager__num--current {
  font-weight: 700;
  color: #fff;
  border-color: #444;
  background: #2e2e2e;
  background: color-mix(in srgb, var(--brand, #ff5f00) 22%, #252525);
  border-color: color-mix(in srgb, var(--brand, #ff5f00) 40%, #333);
  cursor: default;
}

.section-related {
  margin-top: 1.5rem;
}

/* Article detail: main + related in one row on large screens */
.art-detail-layout {
  margin-bottom: 2rem;
}
.art-detail-main .section.section-detail {
  margin-bottom: 0;
}
@media (min-width: 1000px) {
  .art-detail-layout--with-sidebar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(260px, 340px);
    gap: 1.25rem 1.75rem;
    align-items: start;
  }
  .art-detail-sidebar {
    position: sticky;
    top: 4.25rem;
    align-self: start;
  }
  .art-detail-sidebar .section-related {
    margin-top: 0;
    padding: 0.75rem 0.85rem;
    background: #141414;
    border: 1px solid #222;
    border-radius: 10px;
  }
  .art-detail-sidebar .section-head {
    margin-bottom: 0.65rem;
  }
  .art-detail-sidebar .section-head h2 {
    font-size: 1rem;
    line-height: 1.3;
  }
  /* Sidebar: single column of cards (override list grid-art density) */
  .art-detail-related__grid {
    grid-template-columns: minmax(0, 1fr) !important;
    gap: 0.55rem;
  }
  .art-detail-related__grid .card-title--list {
    font-size: 0.82rem;
    line-height: 1.35;
  }
}
@media (max-width: 999px) {
  .art-detail-sidebar .section-related {
    margin-top: 1.5rem;
  }
}

.site-footer {
  border-top: 1px solid #222;
  margin-top: 2rem;
  padding: 1.5rem 1rem;
  background: #121212;
}
.footer-inner { max-width: 1200px; margin: 0 auto; }
.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem 1rem;
  margin-bottom: 0.65rem;
}
.footer-links a {
  color: #aaa;
  font-size: 0.9rem;
}
.footer-links a:hover {
  color: var(--brand, #ff5f00);
}
.lang-switch { list-style: none; padding: 0; margin: 0.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem 1rem; }
.lang-switch a { color: #888; }
.lang-switch a.active { color: var(--brand, #ff5f00); font-weight: 700; }
.small { font-size: 0.85rem; }

.floating-actions {
  position: fixed;
  right: 16px;
  bottom: 18px;
  display: flex;
  flex-direction: column;
  gap: 0.65rem; /* spacing between 44px+ touch targets */
  z-index: 90;
}
.float-btn {
  min-width: 48px;
  min-height: 48px;
  width: 48px;
  height: 48px;
  border-radius: 999px;
  border: 2px solid #2f2f2f;
  background: #1d1d1d;
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.35);
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
.float-btn:hover {
  color: #ffffff;
  border-color: var(--brand, #ff5f00);
}
/* Darker than Telegram brand blue: ~7:1 contrast with white for “TG” (WCAG AA). */
.float-btn--telegram {
  background: #005578;
  border-color: #004060;
  color: #ffffff;
}
.float-btn--telegram:hover {
  background: #004060;
  border-color: #003350;
  color: #ffffff;
}
.float-btn--top {
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
}
.float-btn--top.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.art-article .art-hero {
  padding-top: 67.25%; /* match video detail poster / list covers (400:269) */
  background-size: cover;
  background-position: center;
  border-radius: 10px;
  margin: 1rem 0;
  background-color: #222;
}

@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .header-inner {
    flex-wrap: wrap;
    gap: 0.5rem 0.5rem;
    align-items: center;
  }
  .logo {
    order: 1;
    font-size: 1.08rem;
    flex: 0 0 auto;
  }
  /* Search hidden on small screens — use nav / search page if linked */
  .header-search {
    display: none !important;
  }
  /* Top bar: [Logo] [Locale] [Menu] — nav drawer full-width below */
  .header-locale {
    order: 2;
    margin-left: auto;
    flex-shrink: 0;
  }
  .header-locale__select {
    font-size: 0.78rem;
    border-radius: 10px;
    padding: 0.38rem 1.45rem 0.38rem 0.45rem;
  }
  .nav-toggle {
    order: 3;
    margin-left: 0;
    flex-shrink: 0;
    padding: 0.3rem 0.58rem;
    border-radius: 10px;
  }
  .main-nav {
    display: none;
    order: 10;
    flex-basis: 100%;
    width: 100%;
    margin: 0;
    padding: 0.35rem 0 0.75rem;
    border-top: 1px solid #2a2a2a;
    background: #121212;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .main-nav.open {
    display: flex !important;
  }
  .nav-primary {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    flex: none;
    width: 100%;
  }
  .nav-primary > li > a {
    white-space: normal;
  }
  .nav-primary > li > a { padding: 0.65rem 0; border-bottom: 1px solid #222; }
  .nav-primary > li.is-active > a,
  .nav-primary > li > a.is-active {
    box-shadow: none;
    border-left: 3px solid var(--brand, #ff5f00);
    padding-left: 0.5rem;
    margin-left: -0.5rem;
  }
  .has-sub .sub a.is-active {
    border-left: 3px solid var(--brand, #ff5f00);
    padding-left: 0.65rem;
  }
  .has-sub .sub {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    background: #111;
    border-radius: 0;
    padding: 0 0 0.5rem 0.75rem;
  }
  .has-sub.sub-open .sub { display: block; }
  .has-sub:hover .sub { display: none; }
  .has-sub.sub-open .sub { display: block; }
  .floating-actions {
    right: 12px;
    bottom: 14px;
  }
  .float-btn {
    min-width: 44px;
    min-height: 44px;
    width: 44px;
    height: 44px;
    font-size: 0.9rem;
  }
}
