/* ICCM Bible Institute: agent-authored components. Every value resolves from css/tokens.css.
   Captured Enfold / Popup Maker CSS stays in css/source/ and is not restated here. */

/* ---- Home hero: static stand-in for the one-slide Revolution Slider ---- */
.ym-hero-box {
  container-type: inline-size;
}
.ym-hero {
  position: relative;
  overflow: hidden;
  height: min(var(--ym-hero-h), var(--ym-hero-h-fluid));
  height: round(nearest, min(var(--ym-hero-h), var(--ym-hero-h-fluid)), 1px);
}
#top .ym-hero__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: center center;
}
.ym-hero__title,
.ym-hero__sub {
  position: absolute;
  left: 0;
  width: 100%;
  margin: 0;
  text-align: center;
  white-space: nowrap;
  line-height: min(var(--ym-hero-line), var(--ym-hero-line-fluid));
  line-height: round(nearest, min(var(--ym-hero-line), var(--ym-hero-line-fluid)), 1px);
}
.ym-hero__title {
  z-index: 9;
  top: min(var(--ym-hero-title-top), var(--ym-hero-title-top-fluid));
  top: round(down, min(var(--ym-hero-title-top), var(--ym-hero-title-top-fluid)), 1px);
  color: var(--ym-hero-title-color);
  font-family: var(--ym-hero-title-font);
  font-weight: var(--ym-hero-title-weight);
  font-size: min(var(--ym-hero-title-size), var(--ym-hero-title-size-fluid));
  font-size: round(nearest, min(var(--ym-hero-title-size), var(--ym-hero-title-size-fluid)), 1px);
  text-shadow: var(--ym-hero-title-shadow);
}
.ym-hero__sub {
  z-index: 10;
  top: min(var(--ym-hero-sub-top), var(--ym-hero-sub-top-fluid));
  top: round(down, min(var(--ym-hero-sub-top), var(--ym-hero-sub-top-fluid)), 1px);
  color: var(--ym-hero-sub-color);
  font-family: var(--ym-hero-sub-font);
  font-weight: var(--ym-hero-sub-weight);
  font-size: min(var(--ym-hero-sub-size), var(--ym-hero-sub-size-fluid));
  font-size: round(nearest, min(var(--ym-hero-sub-size), var(--ym-hero-sub-size-fluid)), 1px);
  text-shadow: var(--ym-hero-sub-shadow);
}

/* ---- Popup: the captured Popup Maker CSS draws it; this is only the slide-in ---- */
.pum-container.ym-popup-sliding {
  transition: top var(--ym-popup-slide) ease-out;
}
@media (prefers-reduced-motion: reduce) {
  .pum-container.ym-popup-sliding {
    transition: none;
  }
}

/* ---- Programs grid: match Enfold's tile width on a full-width masonry ---- */
#top .av-masonry.av-large-gap .av-masonry-container {
  width: calc((100% - var(--ym-masonry-gap)) * var(--ym-masonry-bleed) + var(--ym-masonry-gap));
}
#top .av-masonry-col-5.av-large-gap .av-masonry-container {
  grid-template-columns: repeat(5, var(--ym-masonry-col-5)) !important;
}
@media only screen and (min-width: 480px) and (max-width: 767px) {
  #top .av-masonry-col-5.av-large-gap .av-masonry-container {
    grid-template-columns: repeat(2, var(--ym-masonry-col-2)) !important;
  }
}
@media only screen and (max-width: 479px) {
  #top .av-masonry-col-5.av-large-gap .av-masonry-container {
    grid-template-columns: 100% !important;
  }
}

/* ---- Section arrow: Enfold's own rules, minus the `.avia_transform` gate ---- */
.av-extra-border-element.border-extra-arrow-down {
  position: relative;
  overflow: visible;
  clear: both;
  left: 50%;
  z-index: var(--ym-arrow-z);
  width: var(--ym-arrow-w);
  height: var(--ym-arrow-h);
  margin-left: var(--ym-arrow-shift);
  margin-top: var(--ym-arrow-overlap);
  margin-bottom: calc(var(--ym-arrow-h) * -1);
}
.av-extra-border-element.border-extra-arrow-down .av-extra-border-outer {
  position: absolute;
  overflow: hidden;
  width: 100%;
  height: 100%;
}
.av-extra-border-element.border-extra-arrow-down .av-extra-border-inner {
  position: absolute;
  left: 50%;
  top: var(--ym-arrow-inner-top);
  width: var(--ym-arrow-inner);
  height: var(--ym-arrow-inner);
  transform: translateX(-50%) rotate(45deg);
}

/* ---- Elegant accordion header: Enfold's own rule, minus the `.js_active` gate.
   Same specificity as the original (three classes) so the site's own 25px header size and
   the first row's top border still win over it, exactly as they do on live. ---- */
.togglecontainer.av-elegant-toggle .toggler {
  top: 0;
  padding: var(--ym-toggle-pad);
  font-size: var(--ym-toggle-size);
  border-top-width: 0;
  border-left-width: 0;
  border-right-width: 0;
}

/* ---- Section links land below the fixed header, as on live (js/submenu.js adds the sticky
   course submenu's height on /programs-and-degrees/) ---- */
html {
  scroll-padding-top: var(--ym-anchor-offset);
}
