/* Podcasts page — light Academy theme */

.podcasts-page {
  --podcast-video-max-h: 80vh;
}

/* Hero split layout */
.podcasts-hero.academy-section {
  min-height: auto;
  padding-top: clamp(52px, 5vw, 68px);
  padding-bottom: clamp(36px, 4.5vw, 48px);
}

.podcasts-hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(32px, 5vw, 64px);
  align-items: center;
}

@media (min-width: 900px) {
  .podcasts-hero__grid {
    grid-template-columns: minmax(0, 0.92fr) minmax(0, 1.08fr);
  }
}

.podcasts-brand-lockup {
  display: grid;
  gap: clamp(8px, 1.6vw, 16px);
  margin: 0 0 clamp(14px, 2.4vw, 22px);
  color: var(--academy-night);
  font-family: "League Spartan", Inter, system-ui, sans-serif;
  font-weight: 700;
  line-height: 0.92;
  text-transform: uppercase;
}

.podcasts-brand-lockup__main {
  font-size: clamp(42px, 8.4vw, 96px);
  letter-spacing: 0.03em;
}

.podcasts-brand-lockup__sub {
  color: rgba(15, 31, 61, 0.62);
  font-size: clamp(28px, 5vw, 56px);
  letter-spacing: 0.12em;
}

.podcasts-hero__body {
  max-width: 52ch;
  margin: 0;
  font-size: 17px;
  line-height: 1.7;
  color: rgba(26, 26, 26, 0.74);
}

/* Featured hero player */
.podcasts-hero__featured {
  border: 1px solid var(--academy-line);
  border-radius: clamp(20px, 3vw, 28px);
  padding: clamp(16px, 2.4vw, 22px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.82), rgba(255, 255, 255, 0.62)),
    rgba(250, 247, 240, 0.78);
  box-shadow: 0 22px 70px rgba(15, 31, 61, 0.08);
  backdrop-filter: blur(16px);
}

.podcasts-featured__label {
  margin: 0 0 12px;
  color: var(--academy-day);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.podcasts-hero__meta {
  margin-top: 16px;
}

.podcasts-hero__meta .h3 {
  color: var(--academy-night);
  margin: 4px 0 8px;
}

/* Shared 16:9 video frame */
.aspect-video {
  position: relative;
  width: 100%;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: clamp(14px, 2vw, 18px);
  background: rgba(15, 31, 61, 0.08);
}

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

.podcasts-player__frame {
  border: 1px solid rgba(111, 168, 214, 0.24);
}

.podcasts-player__poster {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  cursor: pointer;
  background: rgba(15, 31, 61, 0.06);
  transition: transform 220ms ease, box-shadow 220ms ease;
}

.podcasts-player__poster img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.podcasts-player__poster::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(15, 31, 61, 0.08), rgba(15, 31, 61, 0.28));
  transition: opacity 220ms ease;
}

.podcasts-player__poster:hover::after {
  opacity: 0.72;
}

.podcasts-player__play {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: clamp(56px, 8vw, 72px);
  height: clamp(56px, 8vw, 72px);
  border-radius: 999px;
  border: 1px solid rgba(244, 246, 250, 0.42);
  background: rgba(15, 31, 61, 0.72);
  color: var(--academy-cloud);
  box-shadow: 0 16px 40px rgba(15, 31, 61, 0.28);
  transition:
    transform 220ms ease,
    background 220ms ease,
    box-shadow 220ms ease;
}

.podcasts-player__poster:hover .podcasts-player__play {
  transform: scale(1.06);
  background: rgba(15, 31, 61, 0.86);
  box-shadow: 0 20px 48px rgba(111, 168, 214, 0.28);
}

.podcasts-player__poster:active .podcasts-player__play {
  transform: scale(0.98);
}

/* Gallery grid */
.podcasts-gallery {
  padding-top: clamp(32px, 5vw, 56px);
}

.podcasts-gallery__head .lead {
  max-width: 58ch;
}

.podcasts-theater {
  position: relative;
}

.podcasts-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(16px, 2.4vw, 24px);
  margin-top: 28px;
}

@media (max-width: 640px) {
  .podcasts-grid {
    grid-template-columns: 1fr;
  }
}

/* Episode cards */
.podcast-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--academy-line);
  border-radius: 20px;
  padding: clamp(14px, 2vw, 18px);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.78), rgba(255, 255, 255, 0.58)),
    rgba(250, 247, 240, 0.74);
  box-shadow: 0 18px 56px rgba(15, 31, 61, 0.07);
  backdrop-filter: blur(14px);
  cursor: pointer;
  text-align: left;
  transition:
    transform 200ms ease,
    border-color 200ms ease,
    box-shadow 200ms ease,
    opacity 320ms ease,
    visibility 320ms ease;
}

.podcast-card:hover {
  transform: translateY(-4px);
  border-color: rgba(111, 168, 214, 0.52);
  box-shadow: 0 24px 72px rgba(111, 168, 214, 0.16);
}

.podcast-card:focus-visible {
  outline: 2px solid var(--academy-day);
  outline-offset: 3px;
}

.podcast-card__media {
  position: relative;
  margin-bottom: 14px;
}

.podcast-card--expanded .podcast-card__media {
  margin: 0;
  position: relative;
}

.podcast-card__media .podcasts-player__poster {
  border-radius: 14px;
}

.podcast-card__episode {
  margin: 0 0 4px;
  color: var(--academy-day);
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.podcast-card__title {
  margin: 0 0 8px;
  color: var(--academy-night);
  font-size: 18px;
  letter-spacing: -0.01em;
  line-height: 1.25;
}

.podcast-card__desc {
  margin: 0 0 12px;
  color: rgba(26, 26, 26, 0.72);
  font-size: 14px;
  line-height: 1.55;
}

.podcast-card__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.podcast-card__tags li {
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid rgba(111, 168, 214, 0.28);
  background: rgba(244, 246, 250, 0.72);
  color: rgba(15, 31, 61, 0.84);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.04em;
}

.podcasts-grid__controls {
  display: flex;
  justify-content: center;
  margin-top: clamp(24px, 4vw, 36px);
  transition: opacity 320ms ease, visibility 320ms ease;
}

.podcasts-load-more {
  min-width: min(100%, 220px);
}

/* Expanded theater state */
.podcasts-page--expanded {
  overflow: hidden;
}

html:has(.podcasts-page--expanded) {
  overflow: hidden;
}

.podcasts-theater__backdrop {
  position: fixed;
  inset: 0;
  z-index: 45;
  border: 0;
  padding: 0;
  margin: 0;
  background: rgba(244, 246, 250, 0.94);
  backdrop-filter: blur(8px);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition:
    opacity 320ms ease,
    visibility 320ms ease;
}

.podcasts-page--expanded .podcasts-theater__backdrop {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.podcasts-page--expanded .podcasts-hero,
.podcasts-page--expanded .podcasts-gallery__head,
.podcasts-page--expanded .podcasts-subscribe,
.podcasts-page--expanded .footer {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 280ms ease, visibility 280ms ease;
}

.podcasts-page--expanded .podcast-card:not(.podcast-card--expanded) {
  display: none;
}

.podcasts-page--expanded .podcasts-grid__controls {
  display: none;
}

.podcasts-page--expanded .podcasts-gallery {
  padding: 0;
  min-height: 0;
}

.podcasts-page--expanded .podcasts-theater {
  position: static;
}

.podcasts-page--expanded .podcasts-grid {
  display: block;
  margin: 0;
}

.podcast-card--expanded {
  position: fixed;
  top: 50%;
  left: 50%;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: min(92vw, calc(var(--podcast-video-max-h) * 16 / 9));
  max-width: 1100px;
  max-height: var(--podcast-video-max-h);
  padding: 0;
  border-radius: clamp(16px, 2.4vw, 22px);
  cursor: default;
  overflow: hidden;
  box-shadow: 0 32px 100px rgba(15, 31, 61, 0.24);
  transform: translate(-50%, -50%);
  transition: none;
  animation: podcast-theater-in 340ms cubic-bezier(0.18, 0.85, 0.22, 1) forwards;
  pointer-events: auto;
}

@keyframes podcast-theater-in {
  from {
    opacity: 0;
    transform: translate(-50%, -50%) scale(0.94);
  }
  to {
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }
}

.podcast-card--expanded:hover {
  transform: translate(-50%, -50%);
}

.podcast-card--expanded .podcast-card__media .aspect-video {
  border-radius: clamp(16px, 2.4vw, 22px) clamp(16px, 2.4vw, 22px) 0 0;
  width: 100%;
  max-height: calc(var(--podcast-video-max-h) - 132px);
  aspect-ratio: 16 / 9;
  height: auto;
}

.podcast-card--expanded .podcast-card__body {
  flex-shrink: 0;
  overflow: hidden;
  padding: clamp(14px, 2vw, 20px) clamp(16px, 2.4vw, 22px) clamp(18px, 2.6vw, 24px);
}

.podcast-card__back {
  position: absolute;
  top: 12px;
  left: 12px;
  z-index: 5;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 14px;
  border: 1px solid rgba(244, 246, 250, 0.32);
  border-radius: 999px;
  background: rgba(15, 31, 61, 0.78);
  backdrop-filter: blur(10px);
  color: var(--academy-cloud);
  font-size: 13px;
  font-weight: 700;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition:
    background 180ms ease,
    border-color 180ms ease,
    transform 180ms ease;
}

.podcast-card__back:hover {
  background: rgba(15, 31, 61, 0.92);
  border-color: rgba(111, 168, 214, 0.48);
}

.podcast-card__back:active {
  transform: scale(0.98);
}

.podcast-card__back svg {
  flex-shrink: 0;
}

.podcast-card--expanded .podcast-card__media .podcasts-player__poster {
  display: none;
}

@media (max-width: 640px) {
  .podcast-card--expanded {
    width: 94vw;
    max-height: var(--podcast-video-max-h);
  }

  .podcast-card--expanded .podcast-card__media .aspect-video {
    max-height: calc(var(--podcast-video-max-h) - 160px);
  }
}

@media (prefers-reduced-motion: reduce) {
  .podcast-card,
  .podcasts-player__poster,
  .podcasts-player__play,
  .podcasts-grid__controls,
  .podcasts-theater__backdrop,
  .podcasts-page--expanded .podcasts-hero {
    transition: none;
  }

  .podcast-card--expanded {
    animation: none;
  }
}
