/* InnerFeature reserves room for the overlaid header and grows for longer page titles. */
.fansa-home.fansa-feature:where(:not(.fansa-control-view)) {
  --fe-banner-top: 142px;
  --fe-banner-bottom: 54px;
  --fe-banner-min-height: 324px;
  --fe-title-size: 36px;
  --fe-section-gap: 32px;
}

.fansa-home.fansa-feature:where(:not(.fansa-control-view)) .fe-hero {
  min-height: var(--fe-banner-min-height);
}

.fansa-home.fansa-feature:where(:not(.fansa-control-view)) .fe-heading h1 {
  font-size: var(--fe-title-size);
  line-height: 1.6;
}

.fansa-home.fansa-feature:where(:not(.fansa-control-view)) .fe-heading .fe-trail {
  margin-block-end: 16px;
}

/* DNN omits SliderPane entirely when the page has no modules assigned to it. */
.fansa-home.fansa-feature:where(:not(.fansa-control-view)) .fe-hero + .fe-story {
  padding-block-start: var(--fe-section-gap);
}

/* Keep the first two-column module aligned with its pane. Its text and image retain
   the per-instance padding configured by SuperLinks. */
.fansa-feature:where(:not(.fansa-control-view, .fansa-editing)) :is(
  .fe-main > .fe-lead,
  .fe-hero + .fe-story .fansa-inner-center,
  .fe-lead:not(:has(.DnnModule)) + .fe-story .fansa-inner-center
) > :nth-child(1 of .DnnModule):has(.two-columns-layout__container),
.fansa-feature:where(:not(.fansa-control-view, .fansa-editing)) :is(
  .fe-main > .fe-lead,
  .fe-hero + .fe-story .fansa-inner-center,
  .fe-lead:not(:has(.DnnModule)) + .fe-story .fansa-inner-center
) > :nth-child(1 of .DnnModule):has(.two-columns-layout__container)
:is(.container__body, .DNNModuleContent, .superlinks__container, .two-columns-layout__container) {
  margin-block-start: 0;
  padding-block-start: 0;
}

@media (max-width: 800px) {
  .fansa-home.fansa-feature:where(:not(.fansa-control-view)) {
    --fe-banner-top: 128px;
    --fe-banner-bottom: 42px;
    --fe-banner-min-height: 300px;
    --fe-title-size: 30px;
    --fe-section-gap: 24px;
  }
}

@media (max-width: 550px) {
  .fansa-home.fansa-feature:where(:not(.fansa-control-view)) {
    --fe-banner-top: 112px;
    --fe-banner-bottom: 33px;
    --fe-banner-min-height: 260px;
    --fe-title-size: 27px;
    --fe-section-gap: 20px;
  }

  .fansa-home.fansa-feature:where(:not(.fansa-control-view)) .fe-heading h1 {
    line-height: 1.75;
  }
}

/* FansaMain renders linked pages and folder buttons with the same caption. */
.fansa-home .fc-nav .fc-submenu .fc-node > .fc-link {
  min-width: 0;
  white-space: nowrap;
}
.fansa-home .fc-nav .fc-submenu .fc-nav-caption {
  min-width: 0;
  max-width: 100%;
  white-space: nowrap;
  overflow-wrap: normal;
  overflow-x: auto;
  scrollbar-width: thin;
}

@media (min-width: 1101px) {
  /* Measure each panel as one intrinsic column, including its disclosure buttons. */
  .fansa-home .fc-nav .fc-menu-list .fc-submenu.fr-menu-measure,
  .fansa-home .fc-nav .fc-menu-list .fr-menu-measure .fc-submenu {
    display: grid;
    visibility: hidden;
    pointer-events: none;
    width: max-content;
    grid-auto-flow: row;
    grid-auto-columns: max-content;
    grid-template-rows: none;
  }
  .fansa-home .fc-nav .fc-submenu .fc-node > .fc-submenu {
    transform: translateX(var(--fr-child-shift, 0px));
  }
}

@media (max-width: 1100px) {
  .fansa-home .fr-drawer .fc-nav .fc-submenu .fc-node > .fc-link {
    display: flex;
    align-items: center;
  }
  .fansa-home .fr-drawer .fc-nav .fc-submenu .fc-toggle::after {
    flex: none;
  }
}

@media (max-width: 380px) {
  .fansa-home .fr-drawer {
    padding-inline: 12px;
  }
}
