/* Reset all margins, paddings, and ensure box-sizing */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* Ensure body has no default styles interfering */
body {
  font-family: 'Open Sans', sans-serif;
  color: #222;
  background-color: #fefefe;
  margin: 0 !important;
  padding: 0 !important;
  overflow-x: hidden !important;
}

/* Headings */
h1, h2, h3 {
  font-family: 'Playfair Display', serif;
  margin-bottom: 0.5rem;
}

a {
  text-decoration: none;
}

/* Page Container */
.page-container {
  display: flex !important;
  flex-direction: row !important;
  min-height: 100vh !important;
  max-width: 1200px !important;
  width: 100% !important;
  margin: 0 auto !important;
  overflow: hidden !important;
}

/* Left Column */
.left-column {
  flex: 0 0 50% !important;
  max-width: 50% !important;
  width: 50% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  order: 1 !important;
}

/* Right Column */
.right-column {
  flex: 0 0 50% !important;
  max-width: 50% !important;
  width: 50% !important;
  display: flex !important;
  flex-direction: column !important;
  align-items: flex-start !important;
  order: 2 !important;
  overflow: hidden !important;
  max-height: 100vh !important;
  padding: 0 1rem !important;
}

/* Hero Section */
.hero {
  position: relative;
  width: 50vw !important;
  max-width: 100% !important;
  height: 50vh !important;
  background: url('../img/resalphalogo.png') no-repeat center center/cover !important;
  display: flex !important;
  justify-content: center;
  align-items: center;
  text-align: center;
  flex-shrink: 0;
  flex-grow: 0;
  margin: 0 !important;
}

.overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100% !important;
  height: 100% !important;
  background: rgba(0, 0, 0, 0.5);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  color: white;
}

.hero-logo {
  max-width: 120px;
  margin-bottom: 8px;
}

.hero-title {
  font-family: 'Playfair Display', serif;
  font-size: 2rem;
  margin: 0;
}

.tagline {
  font-family: 'Open Sans', sans-serif;
  font-size: 0.9rem;
  margin-bottom: 8px;
}

.cta-buttons .btn {
  display: inline-block;
  padding: 6px 12px;
  margin: 4px;
  text-decoration: none;
  color: white;
  background-color: #000;
  border-radius: 5px;
  font-size: 0.8rem;
}

.cta-buttons .btn.secondary {
  background-color: #1DB954;
}

.icon-small {
  width: 14px;
  vertical-align: middle;
  margin-left: 4px;
}

.cta-buttons {
  display: flex;
  gap: 0.5rem;
  margin: 0 -4px;
}

.cta-buttons > * {
  margin: 0 4px;
}

/* Latest Episode */
.latest-episode {
  padding: 0 0 1rem 0 !important;
  width: 100% !important;
  margin-top: 0 !important;
  flex-shrink: 0 !important;
}

.video-header-container {
  display: flex !important;
  flex-direction: column !important;
  width: 100% !important;
}

.video-header-container h2 {
  margin: 0 0 8px 0 !important;
  font-size: 1.6rem;
}

.video-section-container {
  position: relative;
  width: 40vw;
  max-width: 480px;
  height: 264px; /* 30% taller from 203px */
  overflow: hidden;
  background: #000;
  z-index: 3;
  margin: 8px auto !important;
  display: flex !important;
  justify-content: center;
}

.video-section {
  position: relative;
  width: 100% !important;
  height: 100% !important;
  overflow: hidden;
  background: transparent;
}

#background-video {
  width: 100% !important;
  height: 100% !important;
  max-width: 100% !important;
  max-height: 100% !important;
  object-fit: cover;
  position: absolute;
  top: 0;
  left: 0;
  transition: opacity 0.3s ease;
}

.sound-toggle {
  position: absolute;
  bottom: 8px;
  left: 8px;
  width: 24px;
  height: 24px;
  cursor: pointer;
  z-index: 4;
  opacity: 0.8;
  transition: opacity 0.2s ease;
  /* Displays soundoff.png (muted) or soundon.png (unmuted) */
}

.sound-toggle:hover {
  opacity: 1;
}

@media (max-aspect-ratio: 9/16) {
  #background-video {
    object-fit: contain;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: auto;
    height: 100%;
  }
}

.video-section.fading #background-video {
  opacity: 0;
}

.btn-primary {
  background-color: #17a2b8;
  border-color: #17a2b8;
  color: white;
  padding: 6px 12px;
  font-size: 12px;
  border-radius: 5px;
}

.btn-primary:hover {
  background-color: #138496;
  border-color: #138496;
}

.text-center {
  text-align: center;
}

.mt-2 {
  margin-top: 0.5rem;
}

/* Hosts */
.hosts {
  padding: 1rem !important;
  width: 100% !important;
}

.hosts h2 {
  margin: 0 0 10px 0 !important;
  font-size: 1.6rem;
}

.carousel {
  position: relative;
  width: 100% !important;
  max-width: 100% !important;
  overflow: hidden !important;
  height: auto;
}

.carousel-track {
  display: flex;
  width: max-content;
  min-width: auto;
  transition: transform 0.3s ease;
  gap: 10px;
}

.host {
  flex: 0 0 150px;
  min-width: 150px;
  max-width: 150px;
  text-align: center;
  padding: 0 10px;
  height: auto;
}

.host img {
  width: 100%;
  max-width: 120px;
  height: 120px;
  object-fit: cover;
  border-radius: 50%;
  display: block;
  margin: 0 auto 10px;
}

.host p {
  font-size: 0.9rem;
  line-height: 1.2;
  margin: 0;
}

.carousel-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.5);
  border: none;
  font-size: 1.5rem;
  color: white;
  cursor: pointer;
  padding: 0 10px;
  transition: background 0.3s;
  z-index: 10;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel-btn:hover {
  background: rgba(0, 0, 0, 0.7);
}

.carousel-btn.prev {
  left: 10px;
}

.carousel-btn.next {
  right: 10px;
}

/* Episodes - Auto Scrolling Effect */
.episodes {
  margin: 0 !important;
  padding: 1rem 0 !important;
  width: 100% !important;
  flex-grow: 1 !important;
  overflow: hidden !important;
  max-height: calc(100vh - 264px - 2rem) !important; /* Adjusted for taller video player */
  position: relative !important;
}

/* Hide scrollbar in all browsers */
.episodes::-webkit-scrollbar {
  display: none !important;
}

.episodes {
  -ms-overflow-style: none !important;
  scrollbar-width: none !important;
}

.episodes h2 {
  font-size: 1.6rem;
  margin-bottom: 1rem !important;
  position: sticky !important;
  top: 0 !important;
  background: #fefefe !important;
  z-index: 2 !important;
  padding-bottom: 0.5rem !important;
}

.episodes-track {
  display: flex;
  flex-direction: column;
  height: 100% !important;
  animation: autoScroll 40s linear infinite !important;
  will-change: transform;
}

@keyframes autoScroll {
  0% {
    transform: translateY(0);
  }
  100% {
    transform: translateY(-100%);
  }
}

.episodes .episode {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.8rem;
  background: #fafafa;
  border: 1px solid #ddd;
  border-radius: 8px;
  margin-bottom: 0.8rem;
  flex-wrap: wrap;
  width: 100%;
  flex-shrink: 0;
}

.episodes .btn {
  padding: 0.5rem 1rem;
  background: #000;
  color: #fff;
  border-radius: 5px;
  text-decoration: none;
}

.episodes:hover .episodes-track {
  animation-play-state: paused !important;
}

/* Newsletter */
.newsletter {
  background: #eee;
  padding: 2rem;
  text-align: center;
  width: 100%;
}

/* Footer */
.footer {
  text-align: center;
  padding: 1rem;
  background: #222;
  color: white;
  width: 100%;
}

/* Responsive Design */
@media (max-width: 768px) {
  .page-container {
    flex-direction: column !important;
  }

  .left-column, .right-column {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    width: 100% !important;
  }

  .right-column {
    max-height: none !important;
    overflow-y: visible !important;
    padding: 1rem !important;
  }

  .hero {
    width: 100% !important;
    max-width: 100% !important;
    height: 50vh !important;
  }

  .hero-logo {
    max-width: 100px;
  }

  .hero-title {
    font-size: 1.8rem;
  }

  .tagline {
    font-size: 0.8rem;
  }

  .cta-buttons .btn {
    padding: 5px 10px;
    font-size: 0.7rem;
  }

  .video-section-container {
    width: 80vw;
    max-width: 360px;
    height: 198px; /* 30% taller from 152px */
  }

  .sound-toggle {
    width: 20px;
    height: 20px;
    bottom: 6px;
    left: 6px;
  }

  .host {
    flex: 0 0 120px;
    min-width: 120px;
    max-width: 120px;
    padding: 0 5px;
  }

  .host img {
    max-width: 100px;
    height: 100px;
  }

  .host p {
    font-size: 0.8rem;
  }

  .carousel {
    width: 100%;
  }

  .carousel-track {
    gap: 5px;
  }

  .episodes {
    padding: 1rem !important;
    max-height: none !important;
    overflow: visible !important;
    animation: none !important;
  }

  .episodes-track {
    animation: none !important;
  }

  .video-header-container h2 {
    font-size: 1.4rem;
  }

  .btn-primary {
    padding: 5px 10px;
    font-size: 10px;
  }
}

/* iOS Safari Fix */
@supports (-webkit-touch-callout: none) {
  .video-section-container {
    width: 80vw;
    max-width: 360px;
    height: 198px;
    margin: 8px auto;
  }

  .episodes::-webkit-scrollbar {
    display: none !important;
  }
}