/* ============================================================
   TS Episode Template Styles
   ============================================================ */

.ts-episode-wrapper {
  padding: 4rem 1rem;
  background-color: #fff;
}

.ts-episode-container {
  max-width: 1100px;
  margin: 0 auto;
}

.ts-episode-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.ts-episode-body {
  font-size: 1rem;
  line-height: 1.6;
  color: #333;
}

.ts-episode-content {
  margin-bottom: 2rem;
}

/* PDF Viewer Wrapper */
.ts-episode-pdf {
  width: 100%;
  margin-top: 2rem;
  position: relative;
  overflow: hidden;
}

.ts-episode-pdf iframe {
  width: 100%;
  height: 80vh;
  border: none;
  display: block;
}

/* Responsive Layout */
.ts-episode-layout {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
  align-items: flex-start;
  margin-top: 2rem;
}

.ts-episode-column {
  flex: 1 1 48%;
  min-width: 300px;
}

.ts-episode-form {
  margin-top: 2rem;
}

/* YouTube Video Embed */
.ts-episode-video {
  position: relative;
}

.ts-video-wrapper {
  position: relative;
  padding-bottom: 56.25%; /* 16:9 aspect ratio */
  height: 0;
  overflow: hidden;
}

.ts-video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
  display: block;
}

/* ============================================================
   Responsive Tweaks
   ============================================================ */

@media screen and (max-width: 768px) {
  .ts-episode-wrapper {
    padding: 2rem 1rem;
  }

  .ts-episode-layout {
    flex-direction: column;
  }

  .ts-episode-column {
    flex: 1 1 100%;
  }

  .ts-episode-title {
    font-size: 1.5rem;
  }

  .ts-episode-pdf iframe {
    height: 70vh; /* Adjust slightly for smaller screens */
  }
}

@media screen and (max-width: 480px) {
  .ts-episode-title {
    font-size: 1.3rem;
  }

  .ts-episode-body {
    font-size: 0.95rem;
  }

  .ts-episode-pdf iframe {
    height: 60vh;
  }
}
