/* =============================================================================
   With The Woods Podcast — Widget Styles
   ============================================================================= */

/* ── Episode Card ──────────────────────────────────────────────────────────── */

.wtwp-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Image wrapper uses padding-bottom trick for aspect ratio */
.wtwp-card__image-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%; /* 16:9 default — overridden by Elementor slider */
  overflow: hidden;
  border-radius: 12px;
  background: #1a1a1a;
  flex-shrink: 0;
}

.wtwp-card__image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.4s ease;
}

.wtwp-card:hover .wtwp-card__image {
  transform: scale(1.03);
}

/* Overlay play button (hover reveal in light, always visible in dark) */
.wtwp-card__play-btn {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  border: none;
  cursor: pointer;
  transition: background 0.25s ease;
  padding: 0;
}

.wtwp-card__play-btn svg {
  width: 52px;
  height: 52px;
  opacity: 0;
  transform: scale(0.85);
  transition: opacity 0.25s ease, transform 0.25s ease;
  filter: drop-shadow(0 2px 8px rgba(0,0,0,0.35));
}

.wtwp-card__play-btn .wtwp-play-circle {
  fill: rgba(255, 255, 255, 0.9);
}

.wtwp-card__play-btn .wtwp-play-triangle {
  fill: #111;
}

.wtwp-card:hover .wtwp-card__play-btn {
  background: rgba(0, 0, 0, 0.25);
}

.wtwp-card:hover .wtwp-card__play-btn svg {
  opacity: 1;
  transform: scale(1);
}

/* Dark style: play button always visible */
.wtwp-grid--dark .wtwp-card__play-btn svg,
.wtwp-carousel--dark .wtwp-card__play-btn svg {
  opacity: 0.85;
  transform: scale(1);
}

/* Card body */
.wtwp-card__body {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.wtwp-card__title-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}

/* Inline play icon next to title */
.wtwp-card__play-inline {
  flex-shrink: 0;
  width: 22px;
  height: 22px;
  padding: 0;
  background: none;
  border: none;
  cursor: pointer;
  margin-top: 2px;
  color: inherit;
  opacity: 0.8;
  transition: opacity 0.2s;
}

.wtwp-card__play-inline:hover {
  opacity: 1;
}

.wtwp-card__play-inline svg {
  width: 22px;
  height: 22px;
}

.wtwp-card__title {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.35;
  color: inherit;
}

.wtwp-card__meta {
  margin: 0;
  font-size: 0.85rem;
  opacity: 0.65;
  color: inherit;
}

.wtwp-card__desc {
  margin: 4px 0 0;
  font-size: 0.82rem;
  opacity: 0.55;
  line-height: 1.5;
  color: inherit;
}

/* Dark card theme */
.wtwp-grid--dark .wtwp-card,
.wtwp-carousel--dark .wtwp-card {
  color: #ffffff;
}

/* Light card theme */
.wtwp-grid--light .wtwp-card,
.wtwp-carousel--light .wtwp-card {
  color: #111111;
}

/* No episodes placeholder */
.wtwp-no-episodes {
  padding: 24px;
  background: #f5f5f5;
  border-left: 4px solid #ccc;
  font-style: italic;
  color: #555;
}

/* ── Episode Grid ──────────────────────────────────────────────────────────── */

.wtwp-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

/* ── Episode Carousel ─────────────────────────────────────────────────────── */

.wtwp-carousel-wrapper {
  position: relative;
}

.wtwp-carousel__track-container {
  overflow: hidden;
  width: 100%;
}

.wtwp-carousel__track {
  display: flex;
  gap: 24px;
  transition: transform 0.45s cubic-bezier(0.25, 0.46, 0.45, 0.94);
  will-change: transform;
}

.wtwp-carousel__slide.wtwp-card {
  flex: 0 0 calc(33.333% - 16px);
  min-width: 0;
}

/* Nav buttons */
.wtwp-carousel__nav {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-bottom: 18px;
}

.wtwp-carousel__nav button {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: transparent;
  cursor: pointer;
  color: #111;
  transition: background 0.2s, color 0.2s;
}

.wtwp-carousel--dark .wtwp-carousel__nav button {
  color: #fff;
}

.wtwp-carousel__nav button:hover {
  background: currentColor;
}

.wtwp-carousel__nav button:hover svg {
  stroke: #fff;
}

.wtwp-carousel--dark .wtwp-carousel__nav button:hover svg {
  stroke: #111;
}

.wtwp-carousel__nav button svg {
  width: 18px;
  height: 18px;
}

.wtwp-carousel__nav button:disabled {
  opacity: 0.3;
  cursor: default;
}

/* ── Latest Episode Hero ──────────────────────────────────────────────────── */

.wtwp-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}

.wtwp-hero--image-right {
  direction: rtl;
}

.wtwp-hero--image-right > * {
  direction: ltr;
}

.wtwp-hero__image-col {
  position: relative;
}

.wtwp-hero__image-wrap {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  cursor: pointer;
}

.wtwp-hero__image {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease;
}

.wtwp-hero__image-wrap:hover .wtwp-hero__image {
  transform: scale(1.03);
}

.wtwp-hero__image-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0);
  transition: background 0.25s;
}

.wtwp-hero__image-wrap:hover .wtwp-hero__image-overlay {
  background: rgba(0, 0, 0, 0.2);
}

.wtwp-hero__overlay-play {
  width: 72px;
  height: 72px;
  opacity: 0;
  transform: scale(0.8);
  transition: opacity 0.25s, transform 0.25s;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.4));
}

.wtwp-hero__image-wrap:hover .wtwp-hero__overlay-play {
  opacity: 1;
  transform: scale(1);
}

.wtwp-hero__content-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.wtwp-hero__label {
  margin: 0;
  font-size: 0.8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.6;
}

.wtwp-hero__title {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 800;
  line-height: 1.2;
}

.wtwp-hero__guest {
  margin: 0;
  font-size: 0.9rem;
  opacity: 0.6;
}

.wtwp-hero__desc {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.65;
  opacity: 0.7;
}

.wtwp-hero__play {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  border: 1.5px solid currentColor;
  background: transparent;
  cursor: pointer;
  color: #111;
  transition: background 0.2s, color 0.2s, transform 0.2s;
  padding: 0;
}

.wtwp-hero__play:hover {
  background: #111;
  color: #fff;
  transform: scale(1.08);
}

.wtwp-hero__play svg {
  width: 22px;
  height: 22px;
}

/* ── Video Modal ───────────────────────────────────────────────────────────── */

.wtwp-modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.88);
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.25s ease;
  padding: 20px;
}

.wtwp-modal-overlay.wtwp-modal--open {
  opacity: 1;
}

.wtwp-modal {
  position: relative;
  width: 100%;
  max-width: 960px;
  background: #000;
  border-radius: 12px;
  overflow: hidden;
  transform: translateY(20px) scale(0.97);
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.wtwp-modal-overlay.wtwp-modal--open .wtwp-modal {
  transform: translateY(0) scale(1);
}

.wtwp-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 10;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.15);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  line-height: 1;
  transition: background 0.2s;
}

.wtwp-modal__close:hover {
  background: rgba(255, 255, 255, 0.3);
}

.wtwp-modal__iframe-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
}

.wtwp-modal__iframe-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
  display: block;
}

.wtwp-modal__title {
  padding: 14px 16px;
  color: #fff;
  font-size: 0.9rem;
  font-weight: 600;
  opacity: 0.8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Responsive ───────────────────────────────────────────────────────────── */

@media (max-width: 1024px) {
  .wtwp-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .wtwp-carousel__slide.wtwp-card {
    flex: 0 0 calc(50% - 12px);
  }

  .wtwp-hero {
    gap: 32px;
  }
}

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

  .wtwp-carousel__slide.wtwp-card {
    flex: 0 0 calc(100% - 0px);
  }

  .wtwp-hero {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .wtwp-hero--image-right {
    direction: ltr;
  }
}
