/* ==========================================================================
   Basic page
   Header (optional dark band), then three columns:
   section nav | body | resource rail.
   1200px+   three columns (1920 design)
   993-1199  two columns, rail drops under the body (no design; content breaks)
   992 and below  one column, nav collapses behind a toggle (414 design)
   ========================================================================== */

/* The breadcrumb sits just under the fixed header; the gap to the title
   comes from the breadcrumb's margin. */
.basic-page {
  padding-top: calc(var(--header-height, 72px) + 3rem);
  padding-bottom: clamp(48px, calc(48px + (96 - 48) * (100vw - 414px) / (1920 - 414)), 96px);
  background-image: linear-gradient(28deg, #f2edea 0%, #f4f4fc 99%);
}

.basic-page__layout {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 7fr) minmax(0, 3fr);
  grid-template-areas: "nav body rail";
  align-items: start;
  column-gap: clamp(32px, calc(32px + (72 - 32) * (100vw - 992px) / (1920 - 992)), 72px);
  row-gap: clamp(48px, calc(48px + (72 - 48) * (100vw - 414px) / (1920 - 414)), 72px);
}

/* Body widens into a missing nav or rail column. Each breakpoint below
   repeats all three variants so empty rows don't leave extra row gaps. */
.basic-page__layout--no-nav                            { grid-template-areas: "body body rail"; }
.basic-page__layout--no-rail                           { grid-template-areas: "nav body body"; }
.basic-page__layout--no-nav.basic-page__layout--no-rail { grid-template-areas: "body body body"; }

.basic-page__nav  { grid-area: nav; }
.basic-page__body { grid-area: body; }
.basic-page__rail { grid-area: rail; }

.basic-page__body > :first-child { margin-top: 0; }
.basic-page__body > :last-child  { margin-bottom: 0; }

/* --------------------------------------------------------------------------
   Header: breadcrumb + title (+ excerpt in the header band option)
   -------------------------------------------------------------------------- */

/* Header sits outside the grid so the band option can run full width. */
.basic-page__header {
  margin-bottom: clamp(48px, calc(48px + (72 - 48) * (100vw - 414px) / (1920 - 414)), 72px);
}

.basic-page__title {
  margin: 0;
  font-family: 'Merriweather', serif;
  font-weight: 300;
  font-size: clamp(32px, calc(32px + (56 - 32) * (100vw - 414px) / (1920 - 414)), 56px);
  line-height: 1.22;
  color: #24125f;
}

/* Breadcrumb spacing (styles: breadcrumb.css) */
.basic-page__header .breadcrumbs {
  margin-bottom: clamp(48px, calc(48px + (88 - 48) * (100vw - 414px) / (1920 - 414)), 88px);
}

/* Header band (page option): dark band from the top of the page, behind the
   fixed site header, holding breadcrumb, title and excerpt. */
.basic-page--header-band {
  padding-top: 0;
}

.basic-page--header-band .basic-page__header {
  padding-top: calc(var(--header-height, 72px) + clamp(48px, calc(48px + (96 - 48) * (100vw - 414px) / (1920 - 414)), 96px));
  padding-bottom: clamp(40px, calc(40px + (72 - 40) * (100vw - 414px) / (1920 - 414)), 72px);
  background: #2f2f48;
  color: #fff;
}

.basic-page--header-band .basic-page__header .breadcrumbs {
  margin-bottom: clamp(12px, calc(12px + (20 - 12) * (100vw - 414px) / (1920 - 414)), 20px);
}

.basic-page--header-band .breadcrumbs,
.basic-page--header-band .breadcrumbs a,
.basic-page--header-band .breadcrumbs__item + .breadcrumbs__item::before {
  color: rgba(255, 255, 255, 0.5);
}

.basic-page--header-band .breadcrumbs a:hover,
.basic-page--header-band .breadcrumbs a:focus-visible,
.basic-page--header-band .breadcrumbs [aria-current],
.basic-page--header-band .breadcrumbs li:last-child {
  color: #fff;
}

.basic-page--header-band .basic-page__title {
  color: #fff;
}

.basic-page__excerpt {
  max-width: 820px;
  margin: clamp(12px, calc(12px + (20 - 12) * (100vw - 414px) / (1920 - 414)), 20px) 0 0;
  font-family: 'Merriweather', serif;
  font-weight: 300;
  font-size: clamp(16px, calc(16px + (20 - 16) * (100vw - 414px) / (1920 - 414)), 20px);
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.85);
}

.basic-page__body .field--name-body p
.basic-page__body .field--name-body ul {
  margin-bottom: 32px;
}

.field--name-body ul li { 
  margin-bottom: 8px;
}

.basic-page__body .field--name-body .notice p {
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Section navigation
   -------------------------------------------------------------------------- */

.section-nav__label {
  margin: 0 0 1rem;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 500;
  line-height: 1.4;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #242935;
}

.section-nav__list {
  margin: 0;
  padding: 0;
  list-style: none;
}

.section-nav__link {
  position: relative;
  display: block;
  padding: 10px 0;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.5;
  color: #24125f;
  text-decoration: none;
}

.section-nav__link:hover,
.section-nav__link:focus-visible,
.section-nav__link[aria-current="page"] {
  color: #7e61de;
}

/* Open section: white panel with a purple edge, pulled left so its text
   stays on the column line. */
.section-nav__list--level-1 > .is-active-trail {
  margin-left: -24px;
  padding: 10px 0 10px 21px;
  border-left: 3px solid #7e61de;
  background: #fff;
}

.section-nav__list--level-2 {
  padding-left: 16px;
}

.section-nav__list--level-2 .section-nav__link {
  padding: 6px 0;
  font-size: 15px;
  font-weight: 400;
}

.section-nav__marker {
  position: absolute;
  top: 50%;
  left: -14px;
  font-size: 10px;
  line-height: 1;
  transform: translateY(-50%);
}

/* Toggle only exists once JS has enhanced the nav, below 992px. */
.section-nav__toggle {
  display: none;
  width: 100%;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 12px 16px 12px 13px;
  border: 0;
  border-left: 3px solid #7e61de;
  background: #fff;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  font-weight: 500;
  line-height: 1.5;
  color: #24125f;
  text-align: left;
}

.section-nav__chevron {
  display: inline-flex;
  font-size: 12px;
  transition: transform 0.2s ease;
}

.section-nav.is-open .section-nav__chevron {
  transform: rotate(180deg);
}

/* --------------------------------------------------------------------------
   Resource rail
   -------------------------------------------------------------------------- */

.page-rail__box {
  display: flex;
  flex-direction: column;
  gap: 4rem;
  padding: 48px clamp(24px, calc(24px + (32 - 24) * (100vw - 414px) / (1920 - 414)), 32px);
  border-radius: 8px;
  color: #242935;
}

.page-rail__section {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.page-rail__title {
  margin: 0;
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.4;
  color: #24125f;
}

.page-rail__subtitle {
  margin: 0 0 0.75rem;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 600;
  color: #24125f;
}

.page-rail__description {
  font-size: 15px;
  line-height: 1.5;
}

.page-rail__description > :first-child { margin-top: 0; }
.page-rail__description > :last-child  { margin-bottom: 0; }

.page-rail__group + .page-rail__group {
  margin-top: 1rem;
}

.page-rail a:focus-visible {
  outline: 2px solid #7e61de;
  outline-offset: 2px;
}

/* Related links (link field, default formatter) */
.page-rail .field--name-field-related-links {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.page-rail .field--name-field-related-links a {
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  text-decoration: none;
}

.page-rail .field--name-field-related-links a:hover {
  text-decoration: underline;
}

/* Downloads */
.file-list {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.file-list__link {
  display: inline-flex;
  align-items: baseline;
  gap: 8px;
  font-family: 'Inter', sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.4;
  color: #7e61de;
  text-decoration: none;
}

.file-list__link:hover .file-list__name {
  text-decoration: underline;
}

.file-list__icon {
  flex: none;
  width: 12px;
  font-size: 12px;
}

.file-list__meta {
  display: block;
  margin-top: 0.25rem;
  padding-left: 20px; /* icon + gap */
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  line-height: 1.4;
  opacity: 0.85;
  color: #707070;
}

.file-list__pages {
  margin-left: 6px;
  padding-left: 6px;
  border-left: 1px solid currentColor;
}

/* Videos */
.page-rail__videos {
  gap: 2rem;
}

.page-rail .lb-video-title,
.page-rail .lb-video-description,
.page-rail .video-runtime {
  color: #7e61de; 
}

.btn-video-lb {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  background: none;
}

.img-video-lb {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 8px;
}

/* Play icon centred over the thumbnail; clicks pass through to the button. */
.i-video-lb {
  position: absolute;
  top: 50%;
  left: 50%;
  z-index: 1;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.lb-video-title {
  margin: 0.75rem 0 0;
  font-size: 16px;
  font-weight: 500;
}

/* Highlighted rail (page option): purple box, white text. */
.page-rail--highlight .page-rail__box {
  background: #7e61de;
  color: #fff;
}

.page-rail--highlight .page-rail__title,
.page-rail--highlight .page-rail__subtitle,
.page-rail--highlight .field--name-field-related-links a,
.page-rail--highlight .file-list__link,
.page-rail--highlight .file-list__meta,
.page-rail--highlight .lb-video-title,
.page-rail--highlight .lb-video-description,
.page-rail--highlight .video-runtime {
  color: #fff;
}

.page-rail--highlight a:focus-visible {
  outline-color: #fff;
}

/* --------------------------------------------------------------------------
   Breakpoints
   -------------------------------------------------------------------------- */

/* Three columns get too narrow here: rail moves under the body. */
@media (max-width: 1199px) {
  .basic-page__layout {
    grid-template-columns: minmax(0, 1fr) minmax(0, 3fr);
    grid-template-areas:
      "nav body"
      "nav rail";
  }

  .basic-page__layout--no-nav {
    grid-template-areas:
      "body body"
      "rail rail";
  }

  .basic-page__layout--no-rail                           { grid-template-areas: "nav body"; }
  .basic-page__layout--no-nav.basic-page__layout--no-rail { grid-template-areas: "body body"; }
}

@media (max-width: 992px) {
  .basic-page__layout {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "nav"
      "body"
      "rail";
  }

  .basic-page__layout--no-nav {
    grid-template-areas:
      "body"
      "rail";
  }

  .basic-page__layout--no-rail {
    grid-template-areas:
      "nav"
      "body";
  }

  .basic-page__layout--no-nav.basic-page__layout--no-rail { grid-template-areas: "body"; }

  .section-nav__list--level-1 > .is-active-trail {
    margin-left: 0;
    padding-left: 13px;
  }

  /* Collapsible once JS is running; without JS the list stays open. */
  .section-nav.is-enhanced .section-nav__toggle {
    display: flex;
  }

  .section-nav.is-enhanced:not(.is-open) .section-nav__menu {
    display: none;
  }

  .section-nav.is-enhanced .section-nav__menu {
    margin-top: 4px;
    padding: 8px 16px;
    background: #fff;
  }

  .section-nav.is-enhanced .section-nav__list--level-1 > .is-active-trail {
    background: transparent;
  }
}

.basic-page__body figure.table {
  margin: 0;
}

.basic-page__body .table-scroll {
  margin: 0 0 2rem;
  background: #fff;
  border-radius: 16px;
  overflow-x: auto;
}

.basic-page__body .table-scroll table {
  width: 100%;
  margin: 0;
  border: 0;
  border-collapse: separate;
  border-spacing: 0;
  background: transparent;
  font-family: Inter, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: #242935;
}

.basic-page__body .table-scroll th,
.basic-page__body .table-scroll td {
  padding: 30px 22px;
  background: #fff;
  box-shadow: none;
  border: 0;
  border-bottom: 1px solid #d9d9d9;
  text-align: left;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.basic-page__body .table-scroll thead th {
  padding-top: 18px;
  padding-bottom: 18px;
  font-weight: 400;
  color: #808080;
}

.basic-page__body .table-scroll tbody tr:last-child > * {
  border-bottom: 0;
}