.block-content {
  position: relative;
  margin: 3rem auto;
  width: 100%;
  /* no padding above or below: the margin is the space between sections */
  padding: 0 var(--edge);

  .section-title {
    margin-top: 0;
  }

  /* a heading that opens the section sits at its top edge, like
     .section-title (no extra 2rem from _typography.css) */
  > :is(h1, h2, h3, h4, h5, h6):first-child {
    margin-top: 0;
  }
}

.block-content.md {
  width: clamp(0px, 1024px, 100%);
}

.block-content.full-width {

  /* padding-block: var(--edge); */
  *:first-child {
    margin-top: 0;
  }
}

.img-container {

  img,
  video {
    display: block;
    max-width: 100%;
  }
}

.block-content.no-padding {
  padding: 0;
  margin-block: 0;
}

/* Compact sections: consecutive .block-content.compact sections are one
   --compact-gap apart (their margins collapse into one), instead of the
   first heading's and last component's own margins on top.
   Gap: 2rem on phones, growing with the viewport to 4rem (from 1440px). */
.block-content.compact {
  --compact-gap: clamp(2rem, 1rem + 3.33vw, 4rem);
  margin-block: var(--compact-gap);

  > :first-child {
    margin-top: 0;
  }

  :is(.slider-layout, .side-by-side):last-child {
    margin-bottom: 0;
  }
}

.oveflow-auto {
  overflow: auto;
}

.oveflow-visble {
  overflow: visible;
}

.marker {
  position: absolute;
  top: calc((90px + 10rem) * -1);
}

.flex {
  display: flex;
  gap: var(--edge);

  .img-container {
    flex: 1 1 20rem;

    video,
    img {
      display: block;
      width: 100%;
    }
  }

  .desc-container {
    flex: 1 1 450px;
  }
}

.w-full {
  width: 100%;
}

.gap-0 {
  gap: 0;
}

.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--edge);
  margin-block: var(--edge);
}

/* Grid variants. A plain .grid (1 → 2 at 768px → 3 at 1024px) is unchanged.
   .grid--cols-1 | -2 | -3 | -4  most columns: 1 on phones, 2 from 768px,
                                 the full count from 1024px (cols-1 stays 1)
   .grid--from-lg                stay 1 column until 1024px (wide items)
   .grid--gap-wide               3.5rem between columns instead of --edge
   .grid--rows-flush             no gap between rows (items draw their own lines)
   .grid--flush                  no margin above and below
   .grid--sm-2                   2 columns on phones too (e.g. square tiles that
                                 would be too tall at full width); the --cols-N
                                 counts take over from 768px
   .grid--max-4                  show at most 4 items; items hidden by their
                                 dates (.slide-hidden-by-date) don't count, so
                                 render a few extra for ended ones to drop */
.grid.grid--cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.grid.grid--gap-wide {
  column-gap: 3.5rem;
}

.grid.grid--rows-flush {
  row-gap: 0;
}

.grid.grid--flush {
  margin-block: 0;
}

.grid.grid--max-4 > :nth-child(n + 5 of :not(.slide-hidden-by-date)) {
  display: none;
}

/* before the media queries below, so .grid--cols-N (same specificity, later)
   takes over from 768px */
.grid.grid--sm-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 1rem;
}

@media only screen and (min-width: 768px) {
  .grid.grid--sm-2 {
    column-gap: var(--edge);
  }
}

@media only screen and (min-width: 768px) {
  .grid.grid--cols-2,
  .grid.grid--cols-3,
  .grid.grid--cols-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.grid--cols-1,
  .grid.grid--from-lg {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media only screen and (min-width: 1024px) {
  .grid.grid--cols-2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .grid.grid--cols-3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .grid.grid--cols-4 {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

.flex-wrap {
  flex-wrap: wrap;
}

.align-center {
  align-items: center;
}

.bg-accent-200 {
  background-color: var(--accent-200);
}

/* a tinted section around .block-content keeps the content's margin inside
   the tint, as its padding, instead of a white strip outside (like
   .section-band) */
.bg-accent-200:has(> .block-content) {
  display: flow-root;
}

.min-h-screen {
  min-height: 100vh;
}

.side-by-side {
  /* space above/below the row and between its columns:
     24px on phones, growing with the viewport to 48px (~1800px) */
  --side-by-side-space: clamp(1.5rem, 0.75rem + 2vw, 3rem);

  display: flex;
  flex-wrap: wrap;
  gap: var(--side-by-side-space);
  /* text-align: center; */
  margin-top: var(--side-by-side-space);
  align-items: center;

  &:last-child:not(:only-child) {
    margin-bottom: var(--side-by-side-space);
  }

  >div {
    flex: 1 1 275px;
  }

  h2,
  h3,
  h4,
  h5 {
    &:first-child {
      margin-top: 0;
    }

    margin-bottom: 1rem;
  }

  .img-container {

    img,
    video {
      display: block;
      width: 100%;
      height: auto;
    }
  }

  .desc-container {
    margin: 1rem 0;
  }

  hr {
    margin: 1.25rem 0;
    border: 0;
    border-top: 1px solid var(--background-accent);
  }

  .btn-text {
    justify-content: flex-start;
    margin-inline: auto;
  }

  .slider-layout {
    margin: 0 auto;
  }
}

.sticky-container {
  .side-by-side {
    >div {
      flex: 1 1 275px;
    }
  }
}

.side-by-side.reverse {
  /* display: flex; */
  /* flex-direction: column-reverse; */
  padding-right: 0;
}

/* Logo rows: logo | copy | action, stacked rows split by hairlines
   (e.g. the Mega Brunch venue list). Mobile: centred stack. */
.side-by-side.logo-row {
  gap: 1rem;
  justify-content: center;
  margin-block: 0;
  padding-block: 1.5rem;
  border-top: 1px solid var(--background-muted);
  text-align: center;

  &:last-child {
    border-bottom: 1px solid var(--background-muted);
  }

  >.img-container {
    flex: 0 1 240px;
  }

  >.call-actions {
    flex: 1 1 100%;
    justify-content: center;
    margin: 0;
  }

  h3 {
    margin-bottom: 0.5rem;
  }

  p {
    margin: 0;
  }
}

@media only screen and (min-width: 768px) {
  .side-by-side.logo-row {
    flex-wrap: nowrap;
    gap: calc(var(--edge) * 1.5);
    padding-block: 2rem;
    text-align: left;

    >.img-container {
      flex: 0 0 clamp(140px, 18vw, 200px);
    }

    >.call-actions {
      flex: 0 0 auto;
    }
  }
}

.responsive-media {
  display: block;

  .default {
    display: block;
  }

  [class*='min'] {
    display: none;
  }
}

.table-container table {
  width: 100%;
}

.table-container table th {
  padding: 0.5rem;
  color: #fff;
  background-color: var(--primary);
}

.table-container table td {
  padding: 0.5rem;
  color: var(--foreground);
  background-color: var(--background-accent);
  text-align: center;
}

/* A wide table scrolls sideways inside its box instead of widening the page
   (e.g. a floor plan with many columns): <div class="table-container scrollable"> */
.table-container.scrollable {
  margin-block: 1.5rem;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* animation style */
.parallax-img {
  overflow: hidden;

  img {
    transform: scale(1.05);
  }
}

/* end animation style */

/* theatre schedule styles */
.schedule_row {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 0 0.5rem;
  flex-wrap: wrap;

}

.schedule_time {
  flex: 1 1 400px;
}


.schedule_row p {
  margin-block: 0;
}

.schedule_dot,
.schedule_time {
  color: var(--foreground);
}

.schedule_date {
  font-weight: bold;
}

.schedule_footer {
  margin-top: 0.5rem;
  font-weight: 500;
}

.stack {
  display: flex;
  flex-direction: column;

  &.center {
    align-items: center;
    justify-content: center;
  }
}

@media only screen and (max-width: 768px) {
  .side-by-side .img-container {
    order: -1;
  }
}

@media only screen and (min-width: 550px) {
  .block-content {
    padding-inline: 1.5rem;
  }

  .responsive-media {
    .default {
      display: none;
    }

    [class*='min-sm'] {
      display: block;
    }
  }
}

@media only screen and (min-width: 768px) {
  .block-content {
    padding-inline: 2rem;
  }

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

  .side-by-side {
    text-align: left;

    .span-1\/3 {
      flex: 0 0.5 450px;
    }

    .btn-text {
      margin-left: 0;
    }
  }

  .side-by-side.reverse {
    flex-direction: row-reverse;
  }
}

@media only screen and (min-width: 1024px) {
  .grid {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

@media only screen and (min-width: 1200px) {
  .block-content {
    width: clamp(1200px, 80vw, 1600px);
  }

  .block-content.full-width {
    width: 100%;
    padding-inline: 3rem;
  }
}

@media only screen and (min-width: 1440px) {
  .block-content {
    width: clamp(1200px, 80vw, 1600px);
  }

  .block-content.full-width {
    padding-inline: 5rem;
  }
}
/* Sections a sticky section nav links to: land below the header and the nav
   on a plain #anchor jump (js/section-nav.js does this itself when it runs) */
.main:has(> .pseudo-tabs-container) > .block-content[id] {
  scroll-margin-top: calc(var(--header-height) + var(--sn-secnav-offset, 4rem) + 1rem);
}
