/* Shared layout for individual programme pages */

.programme-detail-page,
.programme-detail-page * {
  font-family: Avenir;
}

.programme-detail-main {
  width: 980px;
  margin: 0 auto;
  padding-top: 21px;
  padding-bottom: 42px;
}

.programme-page-heading {
  margin-left: 30px;
}

.programme-page-heading h1 {
  margin: 0 0 2px;
  font-size: 40px;
  font-weight: 700;
  line-height: 1.2;
}

.programme-page-rule {
  width: 918px;
  height: 1px;
  margin-bottom: 17px;
  background: #c9c9c9;
}

.programme-introduction {
  position: relative;
  min-height: 218px;
}

.synopsis-section {
  width: 304px;
  margin-left: 30px;
}

.synopsis-section h2,
.production-section h2,
.episodes-section h2,
.technical-sheet h2 {
  margin: 0;
  font-size: 22px;
  font-weight: 700;
  line-height: 1.25;
}

.section-rule {
  height: 1px;
  background: #c9c9c9;
}

.synopsis-section .section-rule {
  width: 286px;
  margin: 2px 0 7px;
}

.synopsis-section p,
.production-section p {
  margin: 0;
  font-size: 17px;
  font-weight: 400;
  line-height: 1.42;
  text-align: justify;
}

.programme-logo-image {
  position: absolute;
  top: -2px;
  left: 334px;
  width: 303px;
  height: 218px;
  object-fit: contain;
}

.technical-sheet {
  position: absolute;
  top: 6px;
  left: 640px;
  box-sizing: border-box;
  width: 308px;
  min-height: 360px;
  padding: 9px 10px 24px;
  color: #fff;
  background: #8d1700;
  border-radius: 0 60px 0 60px;
}

.technical-sheet h2 {
  padding-left: 1px;
}

.technical-rule {
  width: 286px;
  height: 1px;
  margin: 1px 0 8px;
  background: rgb(255 255 255 / 72%);
}

.technical-sheet dl {
  margin: 0;
}

.technical-sheet dl > div {
  display: grid;
  grid-template-columns: 128px 1fr;
  align-items: baseline;
  min-height: 43px;
}

.technical-sheet dt,
.technical-sheet dd {
  margin: 0;
  font-size: 17px;
  line-height: 1.3;
}

.technical-sheet dt {
  font-weight: 700;
}

.technical-sheet dd {
  text-align: center;
}

.production-section {
  width: 577px;
  margin-top: 15px;
  margin-left: 30px;
}

.production-section .section-rule {
  width: 566px;
  margin: 1px 0 10px;
}

.production-section p {
  margin-left: 5px;
}

.episodes-section {
  margin-top: 14px;
  margin-left: 36px;
}

.episodes-section h2 {
  width: 577px;
}

.episodes-rule {
  width: 911px;
  height: 1px;
  margin: 3px 0 18px;
  background: #c9c9c9;
}

.episode-video {
  width: 591px;
  height: 343px;
  margin-left: 158px;
  background: #000;
}

.episode-video iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

.episodes-section h3 {
  width: 591px;
  margin: 0 0 0 158px;
  padding-top: 5px;
  font-size: 0;
  font-weight: 400;
  line-height: 1.15;
  text-align: center;
}

.episode-number {
  font-size: 20px;
  font-weight: 700;
}

.episode-year {
  margin-left: 5px;
  font-size: 16px;
  font-style: italic;
  font-weight: 400;
}

.episode-title-rule {
  width: 591px;
  height: 3px;
  margin: 2px 0 4px 158px;
  background: #000;
}

.episode-name {
  width: 591px;
  margin: 0 0 0 158px;
  font-size: 15px;
  font-weight: 400;
  line-height: 1.3;
  text-align: center;
}

@media (max-width: 980px) {
  .programme-detail-main {
    width: calc(100% - 32px);
  }

  .programme-page-heading,
  .synopsis-section,
  .production-section,
  .episodes-section {
    margin-left: 0;
  }

  .programme-page-rule,
  .episodes-rule {
    width: 100%;
  }

  .programme-introduction {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 308px;
    gap: 28px;
  }

  .synopsis-section,
  .production-section {
    width: 100%;
  }

  .synopsis-section .section-rule,
  .production-section .section-rule {
    width: 100%;
  }

  .programme-logo-image {
    position: static;
    grid-column: 1;
    width: 100%;
    max-width: 303px;
    height: auto;
    margin: 20px auto 0;
  }

  .technical-sheet {
    position: static;
    grid-column: 2;
    grid-row: 1 / span 2;
    width: 308px;
  }

  .episode-video,
  .episodes-section h3,
  .episode-name,
  .episode-title-rule {
    margin-left: auto;
    margin-right: auto;
  }

  .episodes-section h3,
  .episode-name,
  .episode-title-rule {
    width: 591px;
  }
}

@media (max-width: 720px) {
  .programme-page-heading h1 {
    font-size: 33px;
  }

  .programme-introduction {
    grid-template-columns: 1fr;
  }

  .technical-sheet {
    grid-column: 1;
    grid-row: auto;
    width: 100%;
    border-radius: 0 45px 0 45px;
  }

  .technical-rule {
    width: 100%;
  }

  .production-section {
    margin-top: 28px;
  }

  .episode-video {
    width: 100%;
    height: auto;
    aspect-ratio: 591 / 343;
  }

  .episodes-section h3,
  .episode-name,
  .episode-title-rule {
    width: 100%;
  }

  .episode-number {
    font-size: 20px;
  }

  .episode-year {
    font-size: 16px;
  }

  .episode-name {
    font-size: 15px;
  }
}
