/* ===== NSO Reels + Videos =====
   Your original stylesheet, unchanged, with a facade block appended at the
   bottom for the click-to-play thumbnails. */

.nso-combined {
  --nso-accent: #32bcad;
  --nso-accent-text: #ffffff;
  --nso-navy: #1e526e;
  --nso-tabbar-bg: rgba(30, 82, 110, 0.08);
  --nso-chip-border: rgba(30, 82, 110, 0.22);
  --nso-card-bg: #ffffff;
  --nso-shadow: 0 4px 14px rgba(30, 82, 110, 0.1);
  --nso-shadow-h: 0 10px 26px rgba(30, 82, 110, 0.2);
  --nso-radius: 12px;
  --nso-gap: 22px;

  color: var(--nso-navy);
  max-width: 1180px;
  margin: 0 auto;
  box-sizing: border-box;
}
.nso-combined * {
  box-sizing: border-box;
}

/* ─── Shared filter ─── */
.nso-combined .nso-filters {
  text-align: center;
  margin: 0 0 28px;
}
.nso-combined .nso-row--main {
  display: inline-flex;
  flex-wrap: wrap;
  gap: 6px;
  background: var(--nso-tabbar-bg);
  padding: 6px;
  border-radius: 999px;
  margin: 0 0 14px;
}
.nso-combined .nso-tab {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  color: var(--nso-navy);
  padding: 11px 24px;
  border-radius: 999px;
  line-height: 1;
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
  white-space: nowrap;
}
.nso-combined .nso-tab:hover {
  color: var(--nso-accent);
}
.nso-combined .nso-tab.is-active {
  background: var(--nso-accent);
  color: var(--nso-accent-text);
  box-shadow: 0 4px 12px rgba(50, 188, 173, 0.35);
}
.nso-combined .nso-tab:focus-visible {
  outline: 3px solid rgba(50, 188, 173, 0.45);
  outline-offset: 2px;
}
.nso-combined .nso-row--sub {
  margin: 0 0 28px;
}
.nso-combined .nso-sub-select {
  display: block;
  width: 100%;
  max-width: 360px;
  margin: 0 auto;
  padding: 13px 44px 13px 20px;
  border: 2px solid var(--nso-accent);
  border-radius: 999px;
  background: #fff;
  color: var(--nso-navy);
  font: inherit;
  font-weight: 600;
  appearance: none;
  -webkit-appearance: none;
  cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%2332BCAD' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 18px center;
}
.nso-combined .nso-sub-select:focus {
  outline: 2px solid var(--nso-accent);
  outline-offset: 2px;
}

/* ─── Reels section ─── */
.nso-combined .nso-reels-section {
  margin-bottom: 44px;
}
.nso-combined .nso-reels-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.nso-combined .nso-reels-divider {
  flex: 1;
  height: 1px;
  background: var(--nso-chip-border);
}
.nso-combined .nso-reels-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--nso-navy);
  opacity: 0.55;
  white-space: nowrap;
}
.nso-combined .nso-reels-status {
  font-size: 0.75rem;
  font-weight: 600;
  white-space: nowrap;
  opacity: 0;
  transition: opacity 0.3s, color 0.3s;
}
.nso-combined .nso-reels-status.is-scrolling {
  color: var(--nso-accent);
  opacity: 1;
}
.nso-combined .nso-reels-status.is-paused {
  color: var(--nso-navy);
  opacity: 0.45;
}

/* Stage (holds arrows + strip) */
.nso-combined .nso-reels-stage {
  position: relative;
}
.nso-combined .nso-reels-outer {
  overflow: hidden;
  border-radius: var(--nso-radius);
}
.nso-combined .nso-reels-strip {
  display: flex;
  gap: var(--nso-gap);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  padding: 4px 4px 14px;
  scrollbar-width: none;
  cursor: grab;
  touch-action: pan-y;
  user-select: none;
  -webkit-user-select: none;
}
.nso-combined .nso-reels-strip::-webkit-scrollbar {
  display: none;
}
.nso-combined .nso-reels-strip.is-dragging {
  cursor: grabbing;
  scroll-snap-type: none;
}
.nso-combined .nso-reels-strip.is-dragging iframe {
  pointer-events: none;
}

/* Side arrows */
.nso-combined .nso-reels-btn {
  appearance: none;
  position: absolute;
  z-index: 5;
  border: 1.5px solid var(--nso-chip-border);
  background: #fff;
  color: var(--nso-navy);
  width: 44px;
  height: 44px;
  border-radius: 50%;
  cursor: pointer;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: border-color 0.18s, color 0.18s, opacity 0.25s, transform 0.15s;
  box-shadow: 0 4px 12px rgba(30, 82, 110, 0.18);
}
.nso-combined .nso-reels-prev {
  left: -8px;
}
.nso-combined .nso-reels-next {
  right: -8px;
}
.nso-combined .nso-reels-btn:hover:not(:disabled) {
  border-color: var(--nso-accent);
  color: var(--nso-accent);
  transform: translateY(-50%) scale(1.08);
}
.nso-combined .nso-reels-btn:not(:hover) {
  transform: translateY(-50%);
}
.nso-combined .nso-reels-btn:disabled {
  opacity: 0;
  pointer-events: none;
}

/* Reel cards */
.nso-combined .nso-reel-card {
  flex: 0 0 220px;
  width: 220px;
  background: var(--nso-card-bg);
  border-radius: var(--nso-radius);
  overflow: hidden;
  box-shadow: var(--nso-shadow);
  scroll-snap-align: start;
  transition: box-shadow 0.25s, transform 0.2s;
}
.nso-combined .nso-reel-card:hover {
  box-shadow: var(--nso-shadow-h);
  transform: translateY(-2px);
}
.nso-combined .nso-reel-thumb {
  position: relative;
  aspect-ratio: 9 / 16;
  background: #d9dee2;
  overflow: hidden;
}
.nso-combined .nso-reel-thumb iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.nso-combined .nso-reel-title {
  margin: 0;
  padding: 12px 14px 4px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--nso-navy);
}
.nso-combined .nso-reel-cat {
  display: block;
  padding: 0 14px 14px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--nso-accent);
}

/* Progress bar */
.nso-combined .nso-reels-progress {
  height: 2px;
  background: var(--nso-chip-border);
  border-radius: 1px;
  margin: 10px 0 0;
  overflow: hidden;
}
.nso-combined .nso-reels-bar {
  height: 100%;
  width: 0;
  background: var(--nso-accent);
  border-radius: 1px;
  will-change: width;
}

/* ─── Video grid ─── */
@keyframes nsoCFadeIn {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
.nso-combined .nso-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--nso-gap);
  align-items: start;
}
.nso-combined .nso-card {
  display: none;
  background: var(--nso-card-bg);
  border-radius: var(--nso-radius);
  overflow: hidden;
  box-shadow: var(--nso-shadow);
  transition: box-shadow 0.25s, transform 0.2s;
}
.nso-combined .nso-card.is-visible {
  display: block;
  animation: nsoCFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.nso-combined .nso-card:hover {
  box-shadow: var(--nso-shadow-h);
  transform: translateY(-2px);
}
.nso-combined .nso-thumb {
  position: relative;
  aspect-ratio: 16 / 9;
  background: #d9dee2;
  overflow: hidden;
}
.nso-combined .nso-thumb iframe {
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}
.nso-combined .nso-card-title {
  margin: 0;
  padding: 16px 18px 6px;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.35;
  color: var(--nso-navy);
}
.nso-combined .nso-card-cat {
  display: block;
  padding: 0 18px 18px;
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--nso-accent);
}

/* ─── Video section divider ─── */
.nso-combined .nso-videos-header {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}
.nso-combined .nso-videos-divider {
  flex: 1;
  height: 1px;
  background: var(--nso-chip-border);
}
.nso-combined .nso-videos-label {
  font-size: 0.82rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.09em;
  color: var(--nso-navy);
  opacity: 0.55;
  white-space: nowrap;
}

/* ─── Pagination ─── */
.nso-combined .nso-pagination {
  display: none;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
  margin: 32px 0 8px;
}
.nso-combined .nso-page-btn {
  appearance: none;
  cursor: pointer;
  font: inherit;
  font-weight: 600;
  min-width: 40px;
  height: 40px;
  padding: 0 14px;
  border: 1px solid var(--nso-chip-border);
  background: #fff;
  color: var(--nso-navy);
  border-radius: 999px;
  line-height: 1;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}
.nso-combined .nso-page-btn:hover:not(:disabled) {
  border-color: var(--nso-accent);
  color: var(--nso-accent);
}
.nso-combined .nso-page-btn.is-active {
  background: var(--nso-accent);
  border-color: var(--nso-accent);
  color: var(--nso-accent-text);
  pointer-events: none;
}
.nso-combined .nso-page-btn:disabled {
  opacity: 0.3;
  cursor: default;
}
.nso-combined .nso-page-ellipsis {
  display: flex;
  align-items: center;
  height: 40px;
  padding: 0 4px;
  color: var(--nso-navy);
  opacity: 0.45;
  font-weight: 600;
}

/* ─── Empty states ─── */
.nso-combined .nso-empty-v,
.nso-combined .nso-empty-r {
  display: none;
  padding: 36px 4px;
  color: #7a8893;
  font-style: italic;
  text-align: center;
}

/* ─── Responsive ─── */
@media (max-width: 768px) {
  .nso-combined .nso-filters {
    text-align: left;
  }
  .nso-combined .nso-row--main {
    display: flex;
    flex-direction: column;
    width: 100%;
    border-radius: 16px;
    gap: 4px;
  }
  .nso-combined .nso-tab {
    width: 100%;
    text-align: center;
    padding: 14px 16px;
    border-radius: 12px;
    white-space: normal;
    line-height: 1.3;
    min-height: 48px;
  }
  .nso-combined .nso-sub-select {
    max-width: 100%;
  }
  .nso-combined .nso-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .nso-combined .nso-reel-card {
    flex: 0 0 170px;
    width: 170px;
  }
  .nso-combined .nso-reels-btn {
    width: 38px;
    height: 38px;
    font-size: 1rem;
  }
  .nso-combined .nso-reels-prev {
    left: 4px;
  }
  .nso-combined .nso-reels-next {
    right: 4px;
  }
}
@media (max-width: 480px) {
  .nso-combined {
    --nso-gap: 14px;
  }
  .nso-combined .nso-grid {
    grid-template-columns: 1fr;
  }
  .nso-combined .nso-card-title {
    padding: 12px 14px 5px;
  }
  .nso-combined .nso-card-cat {
    padding: 0 14px 14px;
  }
  .nso-combined .nso-reel-card {
    flex: 0 0 150px;
    width: 150px;
  }
}

/* =========================================================================
   NEW: click-to-play facade
   Nothing is requested from YouTube until the visitor presses play.
   ====================================================================== */

.nso-combined .nso-facade {
  appearance: none;
  border: 0;
  padding: 0;
  margin: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #d9dee2;
  cursor: pointer;
  position: relative;
}
.nso-combined .nso-facade img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}
.nso-combined .nso-facade:hover img,
.nso-combined .nso-facade:focus-visible img {
  transform: scale(1.04);
}
.nso-combined .nso-facade:focus-visible {
  outline: 3px solid var(--nso-accent);
  outline-offset: -3px;
}
.nso-combined .nso-play {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;
}
.nso-combined .nso-play svg {
  filter: drop-shadow(0 2px 8px rgba(0, 0, 0, 0.35));
  transition: transform 0.2s ease;
}
.nso-combined .nso-play-bg {
  fill: rgba(30, 82, 110, 0.82);
  transition: fill 0.2s ease;
}
.nso-combined .nso-facade:hover .nso-play-bg,
.nso-combined .nso-facade:focus-visible .nso-play-bg {
  fill: var(--nso-accent);
}
.nso-combined .nso-facade:hover .nso-play svg {
  transform: scale(1.08);
}
.nso-combined .nso-reel-thumb .nso-play svg {
  width: 42px;
  height: 30px;
}
.nso-combined .nso-reels-strip.is-dragging .nso-facade {
  cursor: grabbing;
}

@media (prefers-reduced-motion: reduce) {
  .nso-combined .nso-facade img,
  .nso-combined .nso-play svg,
  .nso-combined .nso-card.is-visible {
    transition: none;
    animation: none;
  }
}
