/************************
 * CATALOG - GLOBAL
 ************************/
.jakso-template-default main,
.tarinatuokio-template-default main,
.elokuva-template-default main,
.page-template-template-videot main {
  text-align: center;
  color: #fff;
  min-height: 630px;
  padding-top: 2rem;
}

.page-template-template-videot .catalog-page > h1 {
  margin-top: 1.5rem;
}

.catalog-subtitle {
  max-width: 820px;
  margin: 0.2rem auto 1.2rem;
  opacity: 0.9;
  font-size: 0.98rem;
  line-height: 1.5;
}

.catalog-intro {
  opacity: 0.8;
  font-size: 0.95rem;
  margin-bottom: 2rem;
}

.page-template-template-videot .catalog-intro {
  opacity: 1;
}

/* WWW videos-page section intros (screens/videos.php uses .content-description) */
.page-template-template-videot .content-description,
.page-template-template-videot .catalog-intro {
  max-width: 700px;
  margin: 0 auto 1rem;
  padding-inline: 1rem;
  line-height: 1.6;
}

.catalog-content,
.single-video-content {
  background: var(--gradient-bg-opacity);
  padding: 1.5rem;
  border-radius: 12px;
  text-align: left;
}

.single-video-page .single-video-content {
  padding: 2rem 1.8rem 2.1rem;
}

/************************
 * CATALOG - LAYOUT
 ************************/
.catalog-layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 48px;
  max-width: 1400px;
  margin: 0 auto;
  padding: 30px;
}

.catalog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 32px;
}

.catalog-grid > * {
  align-self: start;
}

.catalog-grid.is-loading {
  opacity: 0.6;
  transition: opacity 0.2s ease;
}

.catalog-grid .is-just-added {
  opacity: 0;
  transform: translateY(10px);
  animation: catalogFadeIn 0.45s ease forwards;
}

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

.catalog-load-more {
  margin-top: 1.5rem;
  text-align: center;
}

.catalog-load-more .btn {
  -webkit-appearance: none;
  appearance: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  box-shadow: none !important;
}

.catalog-load-more .btn:hover {
  box-shadow: none !important;
}

.catalog-load-more .btn.is-loading {
  position: relative;
  pointer-events: none;
  opacity: 0.85;
}

.catalog-load-more .btn.is-loading::after {
  content: "";
  display: inline-block;
  width: 14px;
  height: 14px;
  margin-left: 8px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.4);
  border-top-color: #fff;
  animation: spin 0.8s linear infinite;
  vertical-align: -2px;
}

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

/************************
 * CATALOG - CARDS
 ************************/
.catalog-card,
.content-card {
  background: rgba(0, 0, 0, 0.25);
  border-radius: 14px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  height: auto;
}

.content-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
}

.content-card__thumb {
  position: relative;
}

.content-card__thumb img {
  width: 100%;
  height: auto;
  display: block;
  aspect-ratio: 16 / 9;
}

.content-card--elokuva .content-card__thumb {
  width: 100%;
  aspect-ratio: 2 / 3;
  overflow: hidden;
  margin: auto;
}

.content-card--elokuva .content-card__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.content-card__badge {
  position: relative;
  z-index: 3;
  background: linear-gradient(
    135deg,
    var(--kerho-color-start),
    var(--kerho-color-mid),
    var(--kerho-color-end)
  );
  background-size: 200% 200%;
  color: #fff;
  padding: 4px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}

.content-card__badges {
  position: absolute;
  top: 0.6rem;
  left: 0.6rem;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  z-index: 3;
}

.content-card__badge--new {
  background: linear-gradient(
    135deg,
    #ff6a6a,
    #ff3b30
  );
  font-weight: 700;
  text-transform: capitalize;
}

.content-card__badge--preview {
  opacity: 0.95;
  text-transform: capitalize;
}

.content-card__icons {
  position: absolute;
  top: 0.2rem;
  right: 0.1rem;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  z-index: 3;
}

/* Tarinatuokio: anna Väinämöinen-ikonille hieman enemmän tilaa */
.content-card--tarinatuokio .content-card__icons {
  top: 0.4rem;
  right: 0.4rem;
}

.content-card__badge--membership {
  display: inline-flex;
  align-items: center;
  padding: 0.2rem 0.45rem;
  border-radius: 6px;
  background: rgba(15, 31, 53, 0.9);
  color: #eafcff;
  font-size: 0.7rem;
  letter-spacing: 0.02em;
  text-transform: capitalize;
}

.content-card__type {
  text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.3);
  padding: 3px 9px;
  border-radius: 3px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
  transition: background-position 0.4s ease, transform 0.3s ease, box-shadow 0.3s ease, text-shadow 0.3s ease;
  font-size: 0.75rem;
  opacity: 0.85;
  font-weight: bold;
}

.content-card--jakso .content-card__type {
  background: linear-gradient(
    135deg,
    var(--luontojaksot-color-start),
    var(--luontojaksot-color-end)
  );
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: var(--text-color-white);
}

.content-card--tarinatuokio .content-card__type {
  background: linear-gradient(
    135deg,
    var(--tarinatuokiot-color-start),
    var(--tarinatuokiot-color-end)
  );
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: var(--text-color-white);
}

.content-card--elokuva .content-card__type {
  background: linear-gradient(
    135deg,
    var(--elokuvat-color-start),
    var(--elokuvat-color-end)
  );
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: var(--text-color-white);
}

.content-card--yhteistyovideo .content-card__type {
  background: linear-gradient(
    135deg,
    var(--primary-blue-highlight),
    var(--primary-blue)
  );
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: var(--text-color-white);
}

.content-card__body {
  padding: 0.6rem;
  color: #fff;
  text-align: center;
}

.content-card__title {
  font-size: 1rem;
  margin-top: 4px;
}

/************************
 * CATALOG - NAV
 ************************/
.catalog-sidebar {
  background: transparent;
  border-radius: 9px;
}

.catalog-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.catalog-nav li {
  margin-bottom: 8px;
}

.catalog-nav button {
  all: inherit;
  display: block;
  width: 100%;
  cursor: pointer;
}

.catalog-nav button,
.catalog-nav a {
  --catalog-active-glow: rgba(20, 36, 62, 0.34);
  --catalog-active-ring: rgba(255, 255, 255, 0.24);
  --catalog-active-border: rgba(255, 255, 255, 0.75);
  display: block;
  padding: 10px 14px;
  border-radius: 8px;
  color: #fff;
  text-decoration: none;
  margin-bottom: 1rem;
  font-weight: bold;
  opacity: 0.9;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
  transition:
    background-position 0.35s ease,
    transform 0.22s ease,
    box-shadow 0.25s ease,
    opacity 0.2s ease,
    filter 0.2s ease;
}

.catalog-nav a.is-active {
  font-weight: 700;
  color: #fff;
  opacity: 1;
  transform: translateY(-1px);
  filter: saturate(1.14) brightness(1.06);
  border: 1px solid var(--catalog-active-border);
  box-shadow:
    0 10px 22px var(--catalog-active-glow),
    0 0 0 2px var(--catalog-active-ring);
}

.catalog-nav a:not(.is-active):hover {
  opacity: 1;
  transform: translateY(-1px);
}

.catalog-nav .btn-luontojaksot {
  --catalog-active-glow: rgba(46, 125, 50, 0.35);
  --catalog-active-ring: rgba(133, 222, 129, 0.24);
  --catalog-active-border: rgba(210, 244, 201, 0.75);
  background: linear-gradient(
    135deg,
    var(--luontojaksot-color-start),
    var(--luontojaksot-color-end)
  );
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: var(--text-color-white);
  transition:
    background-position 0.4s ease,
    transform 0.3s ease,
    box-shadow 0.3s ease,
    text-shadow 0.3s ease;
}

.catalog-nav .btn-kerho,
.catalog-nav .membership-btn {
  --catalog-active-glow: rgba(43, 179, 192, 0.35);
  --catalog-active-ring: rgba(111, 227, 193, 0.24);
  --catalog-active-border: rgba(202, 252, 238, 0.75);
  background: linear-gradient(
    135deg,
    var(--kerho-color-start),
    var(--kerho-color-mid),
    var(--kerho-color-end)
  );
  background-size: 200% 200%;
  background-position: 0% 50%;
  color: var(--text-color-white);
}

.catalog-nav .btn-all-videos {
  --catalog-active-glow: rgba(74, 97, 183, 0.34);
  --catalog-active-ring: rgba(138, 198, 253, 0.22);
  --catalog-active-border: rgba(195, 228, 255, 0.72);
  background: rgba(58, 79, 133, 0.45);
  color: #fff;
}

/* Active state by category (avoid all-active looking gray) */
.catalog-nav .btn-luontojaksot.is-active {
  background: linear-gradient(
    135deg,
    var(--luontojaksot-color-start),
    var(--luontojaksot-color-end)
  );
  background-size: 200% 200%;
  background-position: 100% 50%;
}

.catalog-nav .btn-tarinatuokiot {
  --catalog-active-glow: rgba(57, 73, 214, 0.35);
  --catalog-active-ring: rgba(79, 108, 255, 0.24);
  --catalog-active-border: rgba(210, 218, 255, 0.72);
}

.catalog-nav .btn-tarinatuokiot.is-active {
  background: linear-gradient(
    135deg,
    var(--tarinatuokiot-color-start),
    var(--tarinatuokiot-color-end)
  );
  background-size: 200% 200%;
  background-position: 100% 50%;
}

.catalog-nav .btn-elokuvat {
  --catalog-active-glow: rgba(255, 153, 0, 0.35);
  --catalog-active-ring: rgba(255, 204, 102, 0.24);
  --catalog-active-border: rgba(255, 233, 176, 0.74);
}

.catalog-nav .btn-elokuvat.is-active {
  background: linear-gradient(
    135deg,
    var(--elokuvat-color-start),
    var(--elokuvat-color-end)
  );
  background-size: 200% 200%;
  background-position: 100% 50%;
}

.catalog-nav .btn-kerho.is-active,
.catalog-nav .membership-btn.is-active {
  background: linear-gradient(
    135deg,
    var(--kerho-color-start),
    var(--kerho-color-mid),
    var(--kerho-color-end)
  );
  background-size: 200% 200%;
  background-position: 100% 50%;
}

.catalog-nav .btn-all-videos.is-active {
  background: linear-gradient(135deg, #4a61b7, #334b92);
}

.catalog-nav .btn-base {
  --catalog-active-glow: rgba(24, 48, 91, 0.3);
  --catalog-active-ring: rgba(160, 183, 233, 0.2);
  --catalog-active-border: rgba(203, 218, 255, 0.7);
}

.catalog-subnav {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.3s ease;
}

.catalog-subnav.is-open {
  max-height: 400px;
}

.catalog-subnav a.is-active {
  opacity: 1;
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.34);
  box-shadow:
    0 8px 18px rgba(18, 35, 60, 0.18),
    0 0 0 1px rgba(255, 255, 255, 0.12);
}

.catalog-subnav .season-btn {
  display: block;
  padding: 6px 12px;
  border-radius: 6px;
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
  margin: 1rem auto;
  font-size: 0.9rem;
  text-align: left;
  width: calc(100% - 1rem);
  margin-left: 1rem;
  margin-right: auto;
  opacity: 0.9;
  box-sizing: border-box;
}

/* Membership filters compact and side-by-side */
.catalog-membership {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
  margin-bottom: 0.8rem;
}

.catalog-membership .membership-btn {
  min-height: 34px;
  padding: 6px 10px;
  font-size: 0.82rem;
  border-radius: 7px;
  background: rgba(15, 31, 53, 0.9);
    color: #eafcff;
}

/* Keep preview button as full-width lead-in */
.catalog-nav .btn-kerho[data-filter-type="preview"] {
  margin-bottom: 0.6rem;
}

/************************
 * CATALOG - BADGES
 ************************/
.season-emoji {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    min-width: 32px;
    height: 32px;
    padding: 0;
    border-radius: 999px;
    background: rgba(8, 20, 38, 0.6);
    border: 2px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
    backdrop-filter: blur(1px);
}

.season-emoji img {
  width: 27px;
  height: 27px;
  object-fit: contain;
  display: block;
}

.ikaraja-badge {
  width: 26px;
  min-width: 26px;
  height: 26px;
  border-radius: 50%;
  font-size: 14px;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #000;
  color: #fff;
}

.ikaraja-s {
  background-color: #3e3e3e;
  color: #97d64e;
}

.ikaraja-k7 {
  background-color: #3e3e3e;
  color: #ffff00;
}

.ikaraja-k12 {
  background: #c62828;
}

.ikaraja-default {
  background-color: #3e3e3e;
}

/* Ikärajasymboli video-katalogin kortteihin (renderöidään .ikaraja-symbol luokalla) */
.content-card__icons .ikaraja-symbol {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  font-weight: 700;
  font-size: 16px;
  font-family: sans-serif;
  line-height: 1;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.28);
}

/************************
 * SINGLE VIDEO - LAYOUT
 ************************/
.single-video-layout {
  display: grid;
  grid-template-columns: 260px 1fr;
  gap: 2rem;
  max-width: 1400px;
  margin: 0 auto;
  padding: 64px 24px;
}

.single-video-sidebar[data-aspect="16-9"] img {
  aspect-ratio: 16 / 9;
}

.single-video-sidebar[data-aspect="4-3"] img {
  aspect-ratio: 4 / 3;
}

.breadcrumb {
  text-align: left;
  margin-bottom: 2rem;
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.9rem;
  font-weight: 600;
}

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

.breadcrumb span {
  margin: 0 5px;
}

.video-player-wrapper {
  width: 100%;
  margin: 0 0 1.25rem 0;
}

.video-player-wrapper .video-player {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.video-player-wrapper .video-player iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-title {
  font-size: 2.1rem;
  color: #fff;
  margin: 0.8rem 0 0.95rem;
  line-height: 1.2;
  text-transform: uppercase;
}

.single-season-meta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  margin: 0.2rem 0 0.6rem;
  color: #f1f5ff;
}

.single-season-meta .season-emoji {
  margin: 0;
}

.single-season-meta strong {
  font-size: 1rem;
  letter-spacing: 0.01em;
}

.single-season-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: inherit;
  text-decoration: none;
}

.single-season-link:hover {
  opacity: 0.92;
}

.single-video-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.65rem;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.02em;
  margin: 0.15rem 0 0.55rem;
}

.single-video-badge--yhteistyo {
  background: linear-gradient(
    135deg,
    var(--primary-blue-highlight),
    var(--primary-blue)
  );
  color: #fff;
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.26);
}

a.single-video-badge {
  text-decoration: none;
}

a.single-video-badge:hover {
  filter: brightness(1.06);
}

.video-synopsis,
.video-content,
.video-excerpt {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1rem;
  line-height: 1.6;
  margin: 0.7rem 0;
}

.single-video-page .video-excerpt {
  margin-bottom: 1rem;
}

.single-video-page .video-content {
  margin-top: 0.9rem;
}

.single-yhteistyovideo .video-content a {
  color: #9ad9ff;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.single-yhteistyovideo .video-content a:hover {
  color: #c6e9ff;
}

.single-yhteistyovideo .video-disclaimer,
.content-advisory {
  margin-top: 1rem;
  padding: 0.7rem 0.9rem;
  border-radius: 8px;
  border: 1px solid rgba(154, 217, 255, 0.35);
  background: rgba(16, 34, 58, 0.42);
  color: rgba(236, 246, 255, 0.92);
  font-size: 0.95rem;
  line-height: 1.5;
      max-width: 650px;
}

.single-yhteistyovideo .video-disclaimer em {
  font-style: italic;
}

.related-section {
  margin-top: 4rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  padding-top: 1rem;
}

.related-section h2 {
  color: #fff;
  margin-bottom: 1.5rem;
  font-size: 1.2rem;
}

.related-section h3 {
  color: #fff;
  margin: 1rem 0rem;
  font-size: 1.1rem;
}

.video-access-message {
  text-align: center;
  padding: 40px;
  margin: 2rem 0;
  height: 400px;
  color: #fff;
  background: rgba(0, 0, 0, 0.3);
}

/* Single movie: keep access wrapper aligned with poster top edge */
.single-elokuva .video-access-message {
  margin-top: 0;
}

/************************
 * SINGLE VIDEO - ELOKUVA
 ************************/
.elokuva-columns {
  display: grid;
  grid-template-columns: 250px 1fr;
  gap: 40px;
  margin: 2.2rem 0 1.2rem;
  align-items: start;
}

.elokuva-media-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.elokuva-poster {
  width: 100%;
  border-radius: 12px;
  overflow: hidden;
  background: rgba(0, 0, 0, 0.3);
}

.elokuva-poster-img {
  width: 100%;
  height: 358px;
  display: block;
  object-fit: cover;
  background: rgba(0, 0, 0, 0.25);
}

.btn-trailer {
  display: block;
  background: linear-gradient(
    135deg,
    var(--elokuvat-color-start),
    var(--elokuvat-color-end)
  );
  color: #fff;
  padding: 14px 24px;
  border-radius: 8px;
  text-decoration: none;
  font-weight: 600;
  text-align: center;
  transition: all 0.3s ease;
  border: none;
  cursor: pointer;
  font-size: 1rem;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.btn-trailer:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
  color: #fff;
}

.btn-trailer i {
  margin-left: 8px;
  font-size: 0.9em;
}

.elokuva-content-column {
  display: flex;
  flex-direction: column;
  gap: 20px;
  text-align: left;
  justify-content: flex-start;
}

.single-elokuva .elokuva-content-column > .video-player-wrapper {
  margin: 0;
  padding: 0;
}

.single-elokuva .elokuva-content-column .video-player {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.single-elokuva .elokuva-content-column .video-player iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  border-radius: 12px;
}

.single-elokuva .video-meta-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.75rem 2rem;
  font-size: 0.95rem;
  color: #fff;
  margin: 2rem 0;
  padding: 1.5rem;
  background: rgba(255, 255, 255, 0.05);
  border-radius: 9px;
}

.single-elokuva .video-meta-grid .span-2 {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: baseline;
  gap: 0.5rem;
}

.single-elokuva .video-meta-grid strong {
  font-weight: 600;
  color: var(--accent-color);
  display: inline-block;
}

.single-elokuva .video-meta-grid div {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr);
  align-items: baseline;
  gap: 0.5rem;
  line-height: 1.5;
}

.single-elokuva .video-meta-grid .meta-value {
  min-width: 0;
}

.single-elokuva .video-meta-grid a {
  color: #8edbff;
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: 1px;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.single-elokuva .video-meta-grid a:hover {
  color: #c9eeff;
}

/************************
 * VIDEO MODAL
 ************************/
.video-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.9);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.video-modal .video-modal-content {
  background: #000;
  border-radius: 8px;
  padding: 1rem;
  width: 90%;
  max-width: 800px;
  box-shadow: 0 0 40px rgba(0, 0, 0, 0.8);
  position: relative;
}

#video-frame-container {
  width: 100%;
  padding-bottom: 56.25%;
  position: relative;
  background: #000;
}

#video-frame-container iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

#close-modal {
  position: absolute;
  top: 20px;
  right: 20px;
  color: #fff;
  border: none;
  font-size: 3rem;
  width: 40px;
  height: 40px;
  line-height: 40px;
  text-align: center;
  border-radius: 0;
  cursor: pointer;
  font-weight: bold;
  background: transparent;
  z-index: 10;
  opacity: 0.8;
  transition: opacity 0.2s;
}

#close-modal:hover {
  opacity: 1;
}

body.modal-open {
  overflow: hidden;
}

/************************
 * RESPONSIVE
 ************************/
@media (max-width: 1024px) {
  .elokuva-columns {
    grid-template-columns: 1fr;
    gap: 30px;
  }

  .elokuva-media-column {
    max-width: 420px;
    margin: 0 auto;
    order: 1;
    width: 100%;
  }

  .elokuva-content-column {
    order: 2;
  }
}

@media (max-width: 900px) {
  .single-video-layout,
  .catalog-layout {
    grid-template-columns: 1fr;
    padding: 30px;
    gap: 2rem;
  }

  .single-video-sidebar,
  .catalog-sidebar {
    order: 2;
    margin-top: 2rem;
  }

  .single-video-content,
  .catalog-content {
    order: 1;
  }

  .catalog-sidebar {
    overflow-x: hidden;
  }

  .catalog-nav {
    overflow-x: hidden;
    max-width: 100%;
    padding-top: 0.35rem;
    padding-bottom: 0.2rem;
  }

  .catalog-nav > a,
  .catalog-nav > .catalog-membership,
  .catalog-nav > .catalog-subnav {
    width: min(90%, 420px);
    margin-left: auto;
    margin-right: auto;
  }

  .catalog-nav > .catalog-subnav .season-btn,
  .catalog-nav > .catalog-subnav .kokoelma-btn,
  .catalog-nav > .catalog-subnav .genre-btn {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  .catalog-nav a.is-active,
  .catalog-subnav a.is-active {
    transform: none;
  }
}

@media (max-width: 768px) {
  .single-video-layout {
    padding: 16px 12px;
  }

  .single-video-page .single-video-content {
    padding: 1.35rem 1rem 1.5rem;
  }

  .video-access-message {
    height: auto;
    padding: 16px;
  }

  .jakso-template-default .video-title,
  .tarinatuokio-template-default .video-title,
  .elokuva-template-default .video-title,
  .single-yhteistyovideo .video-title {
    font-size: 1.5rem;
    text-align: left;
    margin: 0.75rem 0 0.85rem;
  }

  .content-card__body {
    text-align: left;
  }

  .page-template-template-videot .content-description,
  .page-template-template-videot .catalog-intro {
    max-width: 100%;
    padding-inline: 0.9rem;
  }

  .elokuva-poster-img {
    height: 425px;
    object-fit: contain;
    background: rgba(0, 0, 0, 0.35);
  }

  .single-elokuva .video-meta-grid {
    grid-template-columns: 1fr;
    padding: 1rem;
    gap: 0.75rem;
  }

  .single-elokuva .video-meta-grid .span-2 {
    grid-column: span 1;
  }

  .single-elokuva .video-meta-grid .span-2 {
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 0.4rem;
  }

  .single-elokuva .video-meta-grid strong {
    font-size: 0.9rem;
  }

  .single-elokuva .video-meta-grid div {
    grid-template-columns: 95px minmax(0, 1fr);
    gap: 0.4rem;
  }

  #close-modal {
    font-size: 2.5rem;
    width: 35px;
    height: 35px;
    line-height: 35px;
    top: 10px;
    right: 10px;
  }
}

/************************
 * ACTIVE MENU
 ************************/
.single-jakso .menu-videot > a,
.single-tarinatuokio .menu-videot > a,
.single-elokuva .menu-videot > a,
.page-template-template-videot .menu-videot > a {
  color: var(--accent-color);
  font-weight: 600;
}

/************************
 * VIDEO ACCESS WRAPPER
 ************************/
.video-access-wrapper {
  position: relative;
  width: 100%;
  min-height: 320px;
  padding: 40px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-size: cover;
  background-position: center;
  border-radius: 12px;
  overflow: hidden;
}

.video-access-wrapper::before {
  content: '';
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.7);
  z-index: 1;
}

.video-access-box {
  position: relative;
  z-index: 2;
  max-width: 520px;
  width: 100%;
  padding: 24px;
  text-align: center;
  background: rgba(0, 0, 0, 0.6);
  border-radius: 12px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.35);
  display: grid;
  gap: 0.75rem;
  border: 1px solid var(--kerho-color-main);
  box-shadow:
    0 8px 30px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(43, 179, 192, 0.15),
    0 0 24px rgba(43, 179, 192, 0.25);
}

.video-access-box > * {
  margin: 0;
}

.video-access-box > .btn,
.video-access-box > .button {
  display: inline-flex;
  align-items: center;
  width: min(100%, 320px);
  margin-inline: auto;
  justify-content: center;
}

.video-access-box > .muted {
  font-size: 0.92rem;
}

.video-access-box > p {
  margin: 0;
}

.video-access-box p a {
  color: var(--kerho-color-main);
}

@media (max-width: 768px) {
  .video-access-wrapper {
    min-height: 240px;
    padding: 30px 15px;
  }

  .video-access-box {
    padding: 16px;
  }
}

.video-access-wrapper h2,
.video-access-wrapper h3 {
  color: #fff;
  margin-bottom: 0rem;
}

.video-access-wrapper p {
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.95rem;
  line-height: 1.5;
  margin-bottom: 1rem;
}

.video-access-box > p,
.video-access-box > p.muted {
  margin: 0;
}

.video-access-box > .btn,
.video-access-box > .button {
  margin-top: 0.15rem;
}

@media (max-width: 768px) {
  .video-access-wrapper {
    min-height: 260px;
    border-radius: 10px;
  }

  .video-access-wrapper > * {
    padding: 16px;
  }
}

.login-character {
  display: block;
  max-width: 60px;
  margin-inline: auto;
  margin-bottom: -1rem;
}

/************************
 * TARINATUOKIOT META
 ************************/
.content-advisory {
  display: flex;
  align-items: center;
  gap: 10px;
}

.content-advisory img {
  width: 40px;
  height: 40px;
  flex: 0 0 24px;
  border-radius: 99px;
}

.content-advisory p {
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
}

/* Blogiartikkelissa vaalea versio advisory-boksista */
.single-post .article-content .content-advisory,
.single .article-content .content-advisory {
  border: 1px solid rgba(79, 108, 255, 0.25);
  background: var(--gradient-bg);
  color: #ffff;
  box-shadow: 0 8px 18px rgba(37, 58, 101, 0.08);
  padding: 1rem;
}

.single-post .article-content .content-advisory img,
.single .article-content .content-advisory img {
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9);
}

.collection-hint-icon img {
  width: 39px;
  height: 39px;
  flex-shrink: 0;
}
