/* ═══════════════════════════════════════
   Tinklalaidės – Podcast Archive
═══════════════════════════════════════ */

.podcasts-archive {
  background: #0f1a14;
  min-height: 80vh;
  padding: 72px 0 96px;
}

.podcasts-container {
  max-width: 900px;
  margin: 0 auto;
  padding: 0 40px;
}

/* ─── Header ─── */
.podcasts-header {
  margin-bottom: 64px;
  background: none;
  position: relative;
  z-index: 1;
}

.podcasts-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #6fbe4f;
  margin-bottom: 16px;
}

.podcasts-label::before {
  content: '';
  display: block;
  width: 28px;
  height: 2px;
  background: #6fbe4f;
  flex-shrink: 0;
}

.podcasts-heading {
  font-family: 'Work Sans', Arial, sans-serif;
  font-size: clamp(2.2rem, 4vw, 3rem);
  font-weight: 800;
  color: #fff;
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin: 0 0 12px;
}

.podcasts-sub {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

/* ─── List ─── */
.podcasts-list {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

/* ─── Card ─── */
.podcast-card {
  display: grid;
  grid-template-columns: 160px 1fr;
  grid-template-rows: auto auto;
  background: #182318;
  border: 1px solid rgba(111, 190, 79, 0.1);
  border-radius: 16px;
  overflow: hidden;
  transition:
    border-color 0.25s,
    box-shadow 0.25s;
}

.podcast-card:hover {
  border-color: rgba(111, 190, 79, 0.3);
  box-shadow: 0 8px 40px rgba(0, 0, 0, 0.45);
}

/* Cover – row 1, col 1 */
.podcast-card__cover {
  position: relative;
  background: #0d1a10;
  grid-column: 1;
  grid-row: 1;
  width: 160px;
  aspect-ratio: 1 / 1;
}

/* Body – row 1, col 2 */
.podcast-card__body {
  grid-column: 2;
  grid-row: 1;
  padding: 24px 28px 20px;
  display: flex;
  flex-direction: column;
}

/* Player – row 2, spans both columns */
.podcast-player {
  grid-column: 1 / -1;
  grid-row: 2;
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-top: 1px solid rgba(111, 190, 79, 0.08);
  border-radius: 0 0 16px 16px;
  padding: 14px 20px;
}

.podcast-card__cover-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.podcast-card__cover-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0d2a18, #193d22);
  color: rgba(111, 190, 79, 0.4);
}

.podcast-card__badge {
  position: absolute;
  bottom: 10px;
  left: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: rgba(9, 101, 66, 0.85);
  backdrop-filter: blur(4px);
  color: #b8eaa0;
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.1em;
  padding: 4px 8px;
  border-radius: 6px;
}

/* Body */
.podcast-card__body {
  padding: 28px 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.podcast-card__top {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.podcast-card__date {
  font-size: 12px;
  font-weight: 600;
  color: #6fbe4f;
  letter-spacing: 0.04em;
}

.podcast-card__title {
  font-family: 'Work Sans', Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 700;
  line-height: 1.35;
  color: #fff;
  margin: 0;

  a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s;

    &:hover {
      color: #6fbe4f;
    }
  }
}

.podcast-card__excerpt {
  font-size: 0.88rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.5);
  margin: 0;
}

.podcast-card__no-audio {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.25);
  margin: 0;
}

/* ─── Player ─── */
.podcast-player {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 14px;
  background: rgba(0, 0, 0, 0.35);
  border-radius: 12px;
  padding: 14px 16px;
  margin-top: auto;
}

/* Play/Pause button */
.pp-btn {
  all: unset;
  cursor: pointer;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #6fbe4f;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #0f1a14;
  flex-shrink: 0;
  transition:
    background 0.2s,
    transform 0.15s;
}

.pp-btn:hover {
  background: #88d460;
  transform: scale(1.07);
}

.pp-btn:active {
  transform: scale(0.96);
}

/* Waveform canvas wrap */
.pp-waveform-wrap {
  position: relative;
  cursor: pointer;
  height: 52px;
  display: flex;
  align-items: center;
}

.pp-canvas {
  width: 100%;
  height: 52px;
  display: block;
  border-radius: 4px;
}

/* Loading dots */
.pp-loading {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  pointer-events: none;
  opacity: 1;
  transition: opacity 0.3s;
}

.pp-loading.hidden {
  opacity: 0;
}

.pp-loading span {
  display: block;
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(111, 190, 79, 0.6);
  animation: ppDot 1.2s ease-in-out infinite;
}

.pp-loading span:nth-child(2) {
  animation-delay: 0.2s;
}
.pp-loading span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes ppDot {
  0%,
  80%,
  100% {
    transform: scale(0.6);
    opacity: 0.4;
  }
  40% {
    transform: scale(1.2);
    opacity: 1;
  }
}

/* Times */
.pp-times {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
  color: rgba(255, 255, 255, 0.5);
  white-space: nowrap;
  min-width: 80px;
  justify-content: flex-end;
}

.pp-current {
  color: #fff;
  font-weight: 600;
}

.pp-sep {
  opacity: 0.4;
}

/* ─── Pagination ─── */
.podcasts-pagination {
  margin-top: 56px;
  display: flex;
  justify-content: center;

  .nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
  }

  .page-numbers {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 40px;
    height: 40px;
    padding: 0 12px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.6);
    text-decoration: none;
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition:
      background 0.2s,
      color 0.2s;

    &:hover,
    &.current {
      background: #6fbe4f;
      color: #0f1a14;
      border-color: transparent;
    }
  }
}

.podcasts-empty {
  color: rgba(255, 255, 255, 0.4);
  text-align: center;
  padding: 60px 0;
  font-size: 1rem;
}

/* ─── Single post player ─── */
.single-podcast-player {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 16px;
  background: #182318;
  border: 1px solid rgba(111, 190, 79, 0.18);
  border-radius: 14px;
  padding: 18px 20px;
  margin-bottom: 40px;
}

.single-podcast-player .pp-btn {
  width: 52px;
  height: 52px;
}

/* ─── Single podcast post – dark skin ─── */
.single-post--podcast {
  background: #0f1a14;
}

.single-post--podcast .single-post__intro {
  background: #0d1e12;
  position: relative;
  z-index: 1;
}

.single-post--podcast .single-post__body {
  background: #0f1a14;
}

/* Header – left-aligned */
.single-post--podcast .single-post__container {
  width: 100%;
  max-width: none;
}

.single-post--podcast .single-post__header {
  text-align: left;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
  padding: 56px 40px 52px;
  background: none;
  box-shadow: none;
}

.single-post--podcast .single-post__category {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: #6fbe4f;

  &::before {
    content: '';
    display: block;
    width: 28px;
    height: 2px;
    background: #6fbe4f;
    flex-shrink: 0;
    margin: 0;
  }

  &::after {
    display: none;
  }

  &:hover {
    color: #a8e08a;
  }
}

.single-post--podcast .single-post__meta {
  justify-content: flex-start;
}

/* Featured image – full width, before player */
.single-post__podcast-thumb {
  margin-bottom: 28px;
  border-radius: 14px;
  overflow: hidden;
}

.single-post__podcast-thumb-img {
  width: 100%;
  height: auto;
  display: block;
  object-fit: cover;
}

.single-podcast-media {
  width: 100%;
  margin-bottom: 28px;
}

.single-podcast-media__tabs {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 5px;
  margin-bottom: 18px;
  border: 1px solid rgba(111, 190, 79, 0.18);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
}

.single-podcast-media__tab {
  all: unset;
  cursor: pointer;
  min-width: 96px;
  text-align: center;
  padding: 10px 18px;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.62);
  font-family: 'Arial', sans-serif;
  font-size: 13px;
  font-weight: 700;
  transition:
    background 0.2s,
    color 0.2s,
    box-shadow 0.2s;
}

.single-podcast-media__tab:hover {
  color: #fff;
}

.single-podcast-media__tab.is-active {
  background: #6fbe4f;
  color: #0f1a14;
  box-shadow: 0 8px 24px rgba(111, 190, 79, 0.18);
}

.single-podcast-media__frame {
  width: 100%;
  border-radius: 14px;
  overflow: hidden;
  background: #0b150f;
  border: 1px solid rgba(111, 190, 79, 0.12);
}

.single-podcast-media__panel {
  display: none;
  width: 100%;
  aspect-ratio: 16 / 9;
}

.single-podcast-media__panel.is-active {
  display: block;
}

.single-podcast-media__img,
.single-podcast-media__video {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
}

.single-podcast-media__video {
  background: #000;
}

.single-podcast-media__panel .plyr {
  min-width: 100%;
  max-width: none;
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 14px;
}

.single-podcast-media__panel .plyr__video-wrapper {
  width: 100%;
  height: 100%;
}

.single-podcast-media__panel .plyr video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.single-podcast-media__panel .plyr__poster {
  background-size: cover;
  background-position: center;
}

.single-post--podcast {
  --plyr-color-main: #2d6b40;
  --plyr-video-control-color: #fff;
  --plyr-video-control-color-hover: #fff;
  --plyr-video-control-background-hover: #2d6b40;
  --plyr-range-fill-background: #2d6b40;
  --plyr-range-thumb-background: #2d6b40;
  --plyr-video-progress-buffered-background: rgba(45, 107, 64, 0.3);
  --plyr-font-family: 'Work Sans', Arial, sans-serif;
  --plyr-font-size-base: 13px;
  --plyr-control-spacing: 10px;
  --plyr-video-controls-background: linear-gradient(rgba(0, 0, 0, 0), rgba(5, 20, 10, 0.82));
}

.single-post--podcast .plyr--video .plyr__control--overlaid {
  background: rgba(45, 107, 64, 0.85);
  border-radius: 50%;
  padding: 20px;
  transform: translate(-50%, -50%) scale(1);
  transition:
    background 0.2s,
    transform 0.2s;
}

.single-post--podcast .plyr--video .plyr__control--overlaid:hover {
  background: #2d6b40;
  transform: translate(-50%, -50%) scale(1.08);
}

.single-podcast-media[data-mode='watch'] + .single-podcast-player {
  display: none;
}

.single-post--podcast .single-post__content {
  color: rgba(255, 255, 255, 0.8);

  h2,
  h3,
  h4 {
    color: #fff;
  }

  a {
    color: #6fbe4f;
    &:hover {
      color: #a8e080;
    }
  }

  blockquote {
    background: rgba(111, 190, 79, 0.08);
    color: rgba(255, 255, 255, 0.65);
    border-left-color: #6fbe4f;
  }
}

.single-post--podcast .single-post__footer {
  border-top-color: rgba(255, 255, 255, 0.1);
}

.single-post--podcast .single-post__back {
  color: #6fbe4f;
  &:hover {
    color: #a8e080;
  }
}

/* Sidebar related posts – dark */
.single-post--podcast .single-post__sidebar {
  background: transparent;
}

.single-post--podcast .sidebar__heading {
  color: rgba(255, 255, 255, 0.5);
}

.sidebar__item:hover {
  background: #0d1e12 ;
}

.single-post--podcast .sidebar__link {
  color: #fff;
  &:hover .sidebar__title {
    color: #6fbe4f;
  }
}

.single-post--podcast .sidebar__title {
  color: #fff;
}

.single-post--podcast .sidebar__date {
  color: rgba(255, 255, 255, 0.4);
}

.single-post--podcast .sidebar__item {
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

@media (max-width: 600px) {
  .single-podcast-player {
    grid-template-columns: 44px 1fr auto;
    gap: 10px;
    padding: 14px;
  }
}

/* ─── Responsive ─── */
@media (max-width: 700px) {
  .podcast-card {
    grid-template-columns: 1fr;
    grid-template-rows: auto auto auto;
  }

  /* Cover spans full width, fixed square-ish height */
  .podcast-card__cover {
    grid-column: 1;
    grid-row: 1;
    width: 100%;
    aspect-ratio: 16 / 9;
  }

  .podcast-card__cover-img {
    height: 100%;
  }

  /* Body below cover */
  .podcast-card__body {
    grid-column: 1;
    grid-row: 2;
    padding: 20px 20px 16px;
  }

  /* Player below body, still full width */
  .podcast-player {
    grid-column: 1;
    grid-row: 3;
    border-radius: 0 0 16px 16px;
    grid-template-columns: 40px 1fr auto;
    gap: 10px;
    padding: 12px 16px;
  }

  .pp-btn {
    width: 40px;
    height: 40px;
  }
}

@media (max-width: 480px) {
  .podcasts-container {
    padding: 0 16px;
  }

  .pp-times {
    display: none;
  }
}

@media (max-width: 480px) {
  .podcasts-container {
    padding: 0 20px;
  }
}
