/* ============================================================
   Podcast page. Blocks appear in the order they render.
   ============================================================ */

/* ---- 1. Intro --------------------------------------------- */

.uh-podcast-intro {
  display: grid;
  grid-template-columns: clamp(180px, 17.5vw, 338px) clamp(320px, 28vw, 542px);
  justify-content: center;
  gap: clamp(20px, 3.3vw, 63px);
  align-items: stretch;
  padding: clamp(32px, 3.3vw, 64px) 42px clamp(48px, 6.5vw, 126px);
  /* .uh-section-page adds a gap above; the hidden heading is a sibling. */
  margin-top: 0;
}

.uh-podcast-intro-cover {
  min-width: 0;
}

/* global.css sets height:100% on every image. */
.uh-podcast-intro-cover img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.uh-podcast-intro-body {
  min-width: 0;
}

.uh-podcast-intro-body p {
  font: var(--t-dek-lg);
}

.uh-podcast-intro-body > :last-child {
  margin-bottom: 0;
}

/* An HTML card in the page content, with its own sizing. */
.uh-podcast-intro-body .uh-podcast-platforms {
  flex: 1 1 auto;
  justify-content: center;
  align-items: center;
  gap: clamp(20px, 2.2vw, 42px);
  margin: 0;
}

.uh-podcast-intro-body .uh-podcast-platforms img {
  width: clamp(28px, 2.1vw, 40px);
  height: clamp(28px, 2.1vw, 40px);
}

/* TEMPORARY: hides the WordPress episode list still sitting in the page
   content below the platform links. Remove once it leaves the page. */
.uh-podcast-intro-body .uh-podcast-platforms ~ * {
  display: none;
}

.uh-visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  padding: 0;
  border: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

@media (max-width: 991px) {
  .uh-podcast-intro {
    grid-template-columns: min(100%, 338px);
    justify-content: center;
    gap: 20px;
    padding: 24px 20px 48px;
  }
}

/* ---- 2. Newest episode ------------------------------------ */

.uh-podcast-latest {
  display: grid;
  grid-template-columns: 48.8% minmax(0, 1fr);
  align-items: start;
  /* Literal black and white: the split matches the artwork, not the palette. */
  background: linear-gradient(to right, #000 0 25%, #fff 25% 100%);
  /* global.css colours every <p> with --text-color, so a light band must
   flip the token. */
  --text-color: #000000;
  --background-color: #ffffff;
  color: var(--text-color);
  margin-top: 0;
}

.uh-podcast-latest-art {
  display: block;
  box-shadow: none;
}

.uh-podcast-latest-art img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.uh-podcast-latest-body {
  display: flex;
  flex-direction: column;
  gap: clamp(10px, 1.25vw, 24px);
  min-width: 0;
  padding: clamp(20px, 2.4vw, 46px) 3.3% clamp(28px, 3.3vw, 64px) 2.65%;
}

.uh-podcast-latest-kicker {
  font: var(--t-display-sm);
  text-transform: uppercase;
  color: #999999;
  margin: 0;
}

.uh-podcast-latest-headline {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(16px, 2vw, 40px);
  align-items: end;
}

.uh-podcast-latest-title {
  font: var(--t-display-xl);
  text-transform: uppercase;
  margin: 0;
}

.uh-podcast-latest-title a {
  color: inherit;
}

.uh-podcast-latest-date {
  font: var(--t-meta-xl);
  padding-bottom: 0.15em;
}

.uh-podcast-latest-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: clamp(16px, 2vw, 40px);
  align-items: start;
  border-top: 2px solid currentColor;
  padding-top: clamp(12px, 1.25vw, 24px);
}

.uh-podcast-latest-excerpt {
  font: var(--t-dek-lg);
  opacity: var(--t-emph);
  margin: 0;
  max-width: 68ch;
}

.uh-podcast-latest-writers {
  font: var(--t-byline);
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  gap: 6px;
}

@media (max-width: 991px) {
  .uh-podcast-latest {
    grid-template-columns: 1fr;
    background: #fff;
  }

  .uh-podcast-latest-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: start;
    padding: 20px;
  }

  .uh-podcast-latest-headline,
  .uh-podcast-latest-footer {
    display: contents;
  }

  .uh-podcast-latest-kicker {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .uh-podcast-latest-title {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .uh-podcast-latest-excerpt {
    grid-column: 1 / -1;
    grid-row: 3;
    max-width: none;
  }

  .uh-podcast-latest-date {
    grid-column: 1;
    grid-row: 4;
    align-self: baseline;
    padding-bottom: 0;
  }

  .uh-podcast-latest-writers {
    grid-column: 2;
    grid-row: 4;
    justify-self: end;
    align-self: baseline;
  }
}

/* ---- 3. Episodes and guest appearances -------------------- */

.uh-podcast-columns {
  padding: clamp(32px, 4vw, 78px) 10.5% 0;
}

.uh-podcast-columns-head,
.uh-podcast-columns-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(28px, 6vw, 118px);
}

.uh-podcast-columns-head {
  position: relative;
  align-items: start;
  margin-bottom: clamp(20px, 2.5vw, 48px);
}

.uh-podcast-columns-mark {
  position: absolute;
  left: 50%;
  top: 0;
  transform: translateX(-50%);
  width: clamp(64px, 7vw, 136px);
}

.uh-podcast-columns-mark svg {
  display: block;
  width: 100%;
  height: auto;
}

.uh-podcast-columns-title {
  font: var(--t-display-lg);
  text-transform: uppercase;
  margin: 0;
  /* Fits "HANGOUT PODCAST" but not the whole heading: two lines, as drawn. */
  max-width: 17ch;
}

.uh-podcast-columns-head .uh-podcast-columns-title {
  justify-self: center;
  width: fit-content;
}

.uh-podcast-columns-head .uh-podcast-columns-title:first-child {
  text-align: left;
}

.uh-podcast-columns-head .uh-podcast-columns-title:last-child {
  text-align: right;
}

.uh-podcast-columns-title a,
.uh-podcast-column-heading a {
  color: inherit;
  text-decoration: none;
}

.uh-podcast-columns-title a:hover,
.uh-podcast-column-heading a:hover {
  text-decoration: underline;
}

.uh-podcast-columns-grid {
  position: relative;
}

.uh-podcast-columns-grid::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1px;
  margin-left: -0.5px;
  background-color: var(--text-color);
}

.uh-podcast-column-block {
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.uh-podcast-column-heading {
  display: none;
}

.uh-podcast-column {
  display: flex;
  flex-direction: column;
  gap: clamp(28px, 3.4vw, 66px);
  min-width: 0;
}

.uh-podcast-item {
  display: flex;
  flex-direction: column;
  gap: clamp(8px, 0.9vw, 18px);
}

.uh-podcast-item-art {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: 16 / 9;
  box-shadow: none;
}

.uh-podcast-item-art img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.uh-podcast-item-label {
  font: var(--t-meta-lg);
  margin: 0;
  opacity: var(--t-emph);
}

/* Reserved whatever the content: line-clamp caps the maximum only. */
.uh-podcast-item-title {
  font: var(--t-display-sm);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  min-height: 2.1em;
  -webkit-box-orient: vertical;
  overflow: hidden;
  text-transform: uppercase;
  margin: 0;
}

.uh-podcast-item-title a {
  color: var(--text-color);
}

.uh-podcast-item-excerpt {
  font: var(--t-dek);
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
  /* Room for 4 lines. 1.55 is the line-height set in --t-dek (uh-type.css). */
  min-height: calc(4 * 1.55em);
  margin: 0;
  opacity: var(--t-emph);
}

@media (max-width: 991px) {
  .uh-podcast-columns {
    padding: 32px 20px 0;
  }

  .uh-podcast-columns-head {
    display: none;
  }

  .uh-podcast-column-heading {
    display: block;
    font-size: clamp(24px, 6vw, 40px);
    margin: 0 0 20px;
  }

  .uh-podcast-columns-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }

  .uh-podcast-columns-grid::before {
    display: none;
  }

  .uh-podcast-item-art {
    margin-left: -20px;
    margin-right: -20px;
  }
}

/* ---- 4. Load more ----------------------------------------- */

/* uh-podcast.js removes the button once both columns are exhausted. */

.uh-podcast-more {
  display: flex;
  justify-content: center;
  padding: clamp(36px, 4.5vw, 88px) 0 clamp(32px, 4vw, 78px);
}

.uh-podcast-more button:disabled {
  opacity: 0.5;
  cursor: default;
}

.uh-podcast-more-column {
  display: none;
}

@media (max-width: 991px) {
  .uh-podcast-more-shared {
    display: none;
  }

  .uh-podcast-more-column {
    display: flex;
  }
}

/* ---- 5. More podcasts ------------------------------------- */

.uh-podcast-archive {
  padding: 0 42px clamp(40px, 5vw, 96px);
}

/* Scoped to the grid so the same card keeps its authors on the homepage. */
.uh-podcast-archive .uh-card-authors {
  display: none;
}

.uh-podcast-archive-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(24px, 2.6vw, 48px);
  margin-top: clamp(20px, 2.5vw, 48px);
}

@media (max-width: 1200px) {
  .uh-podcast-archive-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 991px) {
  .uh-podcast-archive {
    padding: 0 20px 40px;
  }

  .uh-podcast-archive-grid {
    grid-template-columns: 1fr;
  }
}
