/* YouTube Shorts — styles live only in this file (linked from head.php). */

.youtube-section {
  padding-top: 56px;
  padding-bottom: 56px;
  background:
    linear-gradient(180deg, rgba(15, 143, 137, 0.04) 0%, rgba(255, 255, 255, 0) 100%),
    var(--wash);
}

.youtube-section-heading {
  margin-bottom: 28px;
}

.youtube-section-heading p:not(.section-kicker):not(.youtube-channel-link) {
  max-width: 58ch;
  color: var(--muted);
  line-height: 1.7;
}

.youtube-channel-link {
  margin: 14px 0 0;
}

.youtube-channel-link a {
  color: var(--teal);
  font-weight: 900;
}

.youtube-section .youtube-shorts-scroller {
  margin-top: 8px;
}

.youtube-section .youtube-shorts-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(16px, 3vw, 36px);
  align-items: start;
  justify-content: center;
  max-width: min(100%, 900px);
  margin-inline: auto;
  width: 100%;
}

.youtube-section .youtube-short-card {
  min-width: 0;
}

.youtube-section .youtube-embed-frame {
  position: relative;
  overflow: hidden;
  width: 100%;
  max-width: 100%;
  margin-inline: auto;
  aspect-ratio: 9 / 16;
  max-height: min(80vh, 520px);
  border: 1px solid var(--line);
  border-radius: 22px;
  background: #000;
  box-shadow: var(--shadow);
}

.youtube-section .youtube-embed {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: #000;
}

@media (max-width: 720px) {
  .youtube-section .youtube-shorts-scroller {
    overflow-x: auto;
    padding-bottom: 10px;
    scroll-snap-type: x proximity;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .youtube-section .youtube-shorts-grid {
    display: flex;
    gap: 12px;
    max-width: 100%;
    justify-content: flex-start;
  }

  .youtube-section .youtube-short-card {
    flex: 0 0 calc((100% - 12px) / 1.5);
    scroll-snap-align: start;
  }

  .youtube-section .youtube-embed-frame {
    max-height: min(72vh, 460px);
  }
}
