/* Section heading with yellow underline accent — applies to every h2 on the
   Beyond Breakeven main page (post 8993) and every single episode page
   (body.single-podcasts, added by WordPress for the podcasts post type) */
.single-podcasts h2,
.elementor-8993 h2 {
  margin: 50px 0 70px;
  position: relative;
}

.single-podcasts h2::after,
.elementor-8993 h2::after {
  content: "";
  width: 100px;
  height: 4px;
  position: absolute;
  left: 0;
  bottom: -35px;
  background: var(--primary-yellow);
}

/* Season 2 episode grid — [podcasts] shortcode */
.pf-podcast-post-container {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  grid-row-gap: 60px;
  grid-column-gap: 40px;
  padding: 0;
}

@media (max-width: 1206px) {
  .pf-podcast-post-container {
    padding: 0 24px;
  }
}

@media (max-width: 767px) {
  .pf-podcast-post-container {
    grid-template-columns: 1fr;
    grid-row-gap: 30px;
  }
}

.pf-podcast-post-container article {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 24px;
  height: 100%;
}

/* "Stretched link" pattern — only the title text is a real <a>, so
   screen readers announce a short, sensible link name, but a pseudo-element
   expands its clickable area to cover the whole card. */
.pf-podcast-card-link {
  color: inherit;
  text-decoration: none;
}

.pf-podcast-card-link::after {
  content: "";
  position: absolute;
  inset: 0;
}

@media (max-width: 600px) {
  .pf-podcast-post-container article {
    flex-direction: column;
    align-items: stretch;
  }

  /* flex-basis applies to height once the article stacks to a column, so
     without this the thumbnail shrinks to a squashed 45%-tall strip instead
     of sitting full-width above the content */
  .pf-podcast-post-container .cl-post-thumbnail {
    flex: none;
    width: 100%;
  }
}

.pf-podcast-post-container .cl-post-thumbnail {
  position: relative;
  flex: 0 0 35%;
  aspect-ratio: 4 / 3;
  border-radius: 12px;
  overflow: hidden;
}

.pf-podcast-post-container .cl-post-thumbnail img {
  width: 100%;
  height: 100%;
  border-radius: 12px;
  object-fit: cover;
}

.pf-podcast-post-container .cl-post-content {
  flex: 1;
}

.pf-podcast-post-container .cl-text-content h3 {
  margin: 0 0 4px 0;
  font-size: 20px !important;
  line-height: 1.2;
  color: var(--primary-darkblue);
}

.pf-podcast-post-container .pf-podcast-guest {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 6px;
  font-size: 15px;
  line-height: 1.3;
  color: var(--primary-darkblue);
}

/* Keep the icon pinned to the first line's cap-height and its own width,
   rather than centering against the whole block once the name/role wraps */
.pf-podcast-post-container .pf-podcast-guest i {
  flex-shrink: 0;
  margin-top: 3px;
}

.pf-podcast-post-container .pf-podcast-excerpt {
  margin: 0 0 8px;
  font-size: 16px;
  line-height: 1.4;
  color: var(--secondary-sturdygray);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.pf-podcast-post-container .pf-podcast-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin: 0 0 6px;
  font-size: 14px;
  color: var(--secondary-sturdygray);
}

.pf-podcast-post-container .pf-podcast-meta span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.pf-podcast-post-container .pf-podcast-topics {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 4px 0 0;
  padding: 0;
  list-style: none;
}

.pf-podcast-post-container .pf-podcast-topic-tag {
  padding: 0 12px;
  border-radius: 999px;
  background: var(--secondary-lightgray);
  font-size: 13px;
  font-weight: 600;
  color: var(--primary-darkblue);
}

/* Podcast grid pager — custom AJAX pagination (see podcasts.js) */
.pf-podcast-pager {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  margin-top: 40px;
}

.pf-podcast-pager-link {
  color: var(--secondary-sturdygray);
  font-size: 14px;
  font-weight: bold;
  text-decoration: none;
  cursor: pointer;
}

.pf-podcast-pager-link.is-active {
  color: var(--secondary-orange);
  text-decoration: underline;
}

.pf-podcast-pager-link:hover {
  color: var(--primary-darkblue);
}

/* CTA banner — [cta_banner] shortcode */
.pf-cta-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 24px;
  padding: 24px 40px;
  background: var(--secondary-orange);
  border-radius: 100px;
}

.pf-cta-banner-text {
  margin: 0;
  color: white;
  font-size: 20px;
}

.pf-cta-banner-btn {
  flex-shrink: 0;
  background: white;
  color: var(--primary-darkblue);
  font-weight: bold;
  border-radius: 100px;
  padding: 13px 24px;
  text-decoration: none;
  white-space: nowrap;
}

.pf-cta-banner-btn:hover {
  background: var(--secondary-lightgray);
}

@media (max-width: 767px) {
  .pf-cta-banner {
    border-radius: 24px;
    padding: 24px;
  }
}

/* Inline audio player — [podcast_player] shortcode */
.pf-podcast-player {
  border-radius: 12px;
  overflow: hidden;
}

.pf-podcast-player iframe {
  display: block;
  width: 100%;
  border: 0;
}

.pf-podcast-player--video {
  position: relative;
  height: 0;
  padding-bottom: 56.25%; /* 16:9 */
}

.pf-podcast-player--video iframe {
  position: absolute;
  inset: 0;
  height: 100%;
}

/* Watch/Listen tabs — shown instead of the layout classes below when an
   episode has both a video and an audio player, so only one shows at a time */
.pf-podcast-player-tabs {
  display: flex;
  gap: 24px;
  margin-bottom: 16px;
  border-bottom: 1px solid var(--secondary-lightgray);
}

.pf-podcast-player-tab {
  padding: 0 0 12px;
  background: none;
  border: none;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  font-size: 20px;
  font-weight: 700;
  color: var(--secondary-sturdygray);
  cursor: pointer;
}

.pf-podcast-player-tab:hover,
.pf-podcast-player-tab:focus {
  background-color: transparent;
  color: var(--support-hoverorange);
}

.pf-podcast-player-tab.is-active {
  color: var(--secondary-orange);
  border-bottom-color: var(--secondary-orange);
}

.pf-podcast-player-panel[hidden] {
  display: none;
}

/* Player + platform links layout — audio sits side-by-side, video stacks
   the links underneath since the video already takes the full width */
.pf-podcast-player-wrap--side {
  display: flex;
  align-items: center;
  gap: 40px;
}

.pf-podcast-player-wrap--side .pf-podcast-player-media {
  flex: 1;
  min-width: 0;
}

.pf-podcast-player-wrap--side .pf-platform-links-container {
  flex: 0 0 auto;
}

.pf-podcast-player-wrap--stacked .pf-platform-links-container {
  margin-top: 24px;
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px 32px;
}

.pf-podcast-player-wrap--stacked .pf-platform-links {
  flex: 1;
  flex-direction: row;
  flex-wrap: wrap;
  margin: 0;
  gap: 8px 32px;
}

.pf-podcast-player-wrap--stacked .pf-follow-podcast-btn {
  margin-left: auto;
}

@media (max-width: 767px) {
  .pf-podcast-player-wrap--side {
    flex-direction: column;
    align-items: stretch;
  }
}

.pf-platform-links {
  list-style: none;
  margin: 0 0 16px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.pf-platform-link a {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--primary-darkblue);
  text-decoration: none;
  font-size: 15px;
}

.pf-platform-link i {
  color: var(--secondary-orange);
  font-size: 18px;
  width: 20px;
  text-align: center;
}

/* [podcast_follow_links] hero variant — yellow icons, white text, since
   it sits on the dark hero photo background rather than a white card */
.pf-platform-links--inline {
  flex-direction: row;
  flex-wrap: wrap;
  gap: 8px 32px;
}

.pf-platform-links--inline .pf-platform-link a {
  color: white;
}

.pf-platform-links--inline .pf-platform-link i {
  color: var(--primary-yellow);
}

.pf-follow-podcast-btn {
  display: inline-block;
  background: var(--secondary-orange);
  color: white;
  font-weight: bold;
  border-radius: 100px;
  padding: 13px 24px;
  text-decoration: none;
}

.pf-follow-podcast-btn:hover {
  background: var(--support-hoverorange);
  color: white;
}

/* Latest episode featured block — [latest_podcast] shortcode */
.pf-latest-podcast {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 40px 0;
  background: var(--secondary-lightgray);
  border-radius: 16px;
}

.pf-latest-podcast-media {
  flex: 0 0 40%;
  aspect-ratio: 1 / 1;
  border-radius: 12px;
  overflow: hidden;
  background: var(--secondary-disabledgray);
}

.pf-latest-podcast-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.pf-latest-podcast-content {
  flex: 1;
}

/* Override the sitewide h2 spacing (see top of file) — that's tuned for
   full-width section headings, too much gap for this component's title.
   The yellow underline (::after, top of file) is positioned bottom: -35px,
   tuned for the sitewide margin-bottom: 70px — with only 20px of margin
   here that offset would land past the heading, on top of the paragraph
   text below, so it needs its own closer offset to match. */
.pf-latest-podcast-content h2 {
  margin: 0 0 40px;
}

.pf-latest-podcast-content h2::after {
  bottom: -16px;
}

.pf-latest-podcast-content p {
  margin: 0 0 24px;
  font-size: 16px;
  color: var(--secondary-sturdygray);
}

@media (max-width: 1206px) {
  .pf-latest-podcast {
    padding: 40px 24px;
  }
}

@media (max-width: 767px) {
  .pf-latest-podcast {
    flex-direction: column;
    align-items: stretch;
  }

  .pf-latest-podcast-media {
    flex-basis: auto;
  }
}

/* Episode transcript — [podcast_transcript] shortcode */
.pf-transcript-content {
  max-height: 0;
  overflow: hidden;
}

.pf-transcript.is-expanded .pf-transcript-content {
  max-height: none;
}

.pf-transcript-content p {
  margin: 0 0 16px;
  font-size: 16px;
  color: var(--secondary-sturdygray);
}

.pf-transcript-content p:first-child {
  margin-top: 0;
}

.pf-transcript-content strong {
  color: var(--primary-darkblue);
}

.pf-transcript-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 16px;
  padding: 0;
  background: none;
  border: none;
  font-size: 14px;
  font-weight: 700;
  color: var(--secondary-orange);
  cursor: pointer;
}

.pf-transcript-toggle:hover,
.pf-transcript-toggle:focus {
  background-color: transparent;
  color: var(--support-hoverorange);
}

.pf-transcript-toggle::after {
  content: "";
  width: 12px;
  height: 8px;
  background: var(--icon-dropdown-down) no-repeat center / contain;
  transition: transform 0.2s ease;
}

.pf-transcript.is-expanded .pf-transcript-toggle::after {
  transform: rotate(180deg);
}

/* Hide Elementor containers wrapping an empty podcast shortcode (the `no-content` /
   `no-posts` markers from podcast-functions.php) before first paint, so the section
   doesn't flash until hide-empty-sections.js runs. That script stays as the fallback
   for browsers without :has(). The first rule only matches the nearest boxed container,
   like the script does; the second also hides the outer container when the hidden boxed
   one was its only child, so its background doesn't leave a band. */
body:not(.elementor-editor-active) .e-con-boxed:has(.pf-transcript.no-content, .pf-podcast-post-container.no-posts):not(:has(.e-con-boxed :is(.pf-transcript.no-content, .pf-podcast-post-container.no-posts))),
body:not(.elementor-editor-active) .e-con:has(> .e-con-boxed:only-child:has(.pf-transcript.no-content, .pf-podcast-post-container.no-posts)) {
    display: none;
}
