/* ==========================================================================
   1. ACCESSIBILITY & BREADCRUMB CLEANUP
   ========================================================================== */

/* Fix "Skip to main content" link showing in top left */
a.skip-link,
a[href="#main-content"] {
  position: absolute !important;
  top: -9999px !important;
  left: -9999px !important;
  z-index: 99999 !important;
}

a.skip-link:focus,
a[href="#main-content"]:focus {
  top: 10px !important;
  left: 10px !important;
  background: #ffffff !important;
  color: #002849 !important;
  padding: 10px 15px !important;
}

/* Hide duplicate breadcrumbs rendered in <main> */
header + main .block-germanna-breadcrumbs,
header + main .block-system-breadcrumb-block {
  display: none !important;
}

/* ==========================================================================
   2. STANDARD NON-HERO PAGES ONLY (Public Info, Speech Policy)
   ========================================================================== */

/* Paints dark blue banner ONLY when no hero container exists in the header */
body.node--type-page header:not(:has(.header__with-img)):not(:has(.header_with_img)) .header_inner_bottom,
body.node--type-page header:not(:has(.header__with-img)):not(:has(.header_with_img)) .header_inner__bottom,
body.node-type-page header:not(:has(.header__with-img)):not(:has(.header_with_img)) .header_inner_bottom,
body.node-type-page header:not(:has(.header__with-img)):not(:has(.header_with_img)) .header_inner__bottom,
body.page-node-type-page header:not(:has(.header__with-img)):not(:has(.header_with_img)) .header_inner_bottom,
body.page-node-type-page header:not(:has(.header__with-img)):not(:has(.header_with_img)) .header_inner__bottom {
  background-color: #002849 !important;
  background: #002849 !important;
  padding-top: 140px !important;
  padding-bottom: 40px !important;
  position: relative !important;
  z-index: 1 !important;
  overflow: visible !important;
  display: block !important;
}

/* ==========================================================================
   3. HERO PAGES OVERRIDE (Degrees & Programs, Visit Germanna, Articles)
   ========================================================================== */

/* Enforce position anchor on the main hero image wrapper */
.header__with-img,
.header_with_img {
  position: relative !important;
}

/* Position from top: 0 to freeze position, use padding-top to push text above toggle */
header .header__with-img .header_inner_bottom,
header .header__with-img .header_inner__bottom,
header .header_with_img .header_inner_bottom,
header .header_with_img .header_inner__bottom,
body.node--type-page .header__with-img .header_inner_bottom,
body.node--type-page .header__with-img .header_inner__bottom,
body.node--type-page .header_with_img .header_inner_bottom,
body.node--type-page .header_with_img .header_inner__bottom {
  background-color: transparent !important;
  background: transparent !important;
  padding-top: 550px !important; /* Pushes white title down right above the toggle bar */
  padding-bottom: 0 !important;
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  position: absolute !important;
  top: 0 !important; /* Locks anchor to photo top so menu toggle can't shift it */
  bottom: auto !important;
  left: 0 !important;
  height: 653px !important;
  width: 100% !important;
  z-index: 10 !important;
  display: block !important;
  pointer-events: none !important; /* Retains full toggle bar clickability */
}

/* Ensure title text and breadcrumb links render crisp white and remain clickable */
.header__with-img .header_inner__bottom *,
.header__with-img .header_inner__bottom h1,
.header__with-img .header_inner__bottom .heading_title,
.header__with-img .header_inner__bottom .breadcrumb,
.header__with-img .header_inner__bottom .breadcrumb-item,
.header__with-img .header_inner__bottom a,
.header_with_img .header_inner__bottom *,
.header_with_img .header_inner__bottom h1,
.header_with_img .header_inner__bottom .heading_title,
.header_with_img .header_inner__bottom .breadcrumb,
.header_with_img .header_inner__bottom .breadcrumb-item,
.header_with_img .header_inner__bottom a {
  color: #ffffff !important;
  position: relative !important;
  z-index: 11 !important;
  pointer-events: auto !important;
}

/* ==========================================================================
   4. TEXT & LINK COLORING FOR ALL HEADERS
   ========================================================================== */

.header_inner__bottom *,
.header_inner__bottom h1,
.header_inner__bottom .breadcrumb,
.header_inner__bottom .breadcrumb a,
.header_inner__bottom .breadcrumb-item,
.header_inner__bottom .breadcrumb-item a {
  color: #ffffff !important;
}

/* Push interior page titles comfortably above "In this Section" tab */
body:not(.path-frontpage) .header_inner__bottom h1,
body:not(.path-frontpage) .header_inner__bottom .page-title,
body:not(.path-frontpage) .header_inner__bottom .block-page-title-block h1 {
  margin-bottom: 0 !important;
}

/* Alignment grid */
.header_inner__bottom .container,
.header_inner__bottom .title-container {
  max-width: 100% !important;
  margin: 0 auto !important;
  padding-left: 15px !important;
  padding-right: 15px !important;
  position: relative !important;
}

/* Ensure "In this Section" dropdown button layers above lower content */
.header_inner__bottom .in-this-section,
.header_inner__bottom .section-toggle,
.header_inner__bottom [class*="section"] {
  z-index: 10 !important;
}

/* ==========================================================================
   5. SPECIAL CASES & OVERRIDES
   ========================================================================== */

/* Collapse empty hero container on Homepage */
body.path-frontpage .header_inner__bottom {
  display: none !important;
}

/* Restores filled-in striped top banner on 'By the Numbers' globally */
div.container-facts {
  padding-top: 1.4375rem !important;
  position: relative !important;
}

div.container-facts::before {
  content: "" !important;
  display: block !important;
  width: 100% !important;
  height: 1.4375rem !important;
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  z-index: 2 !important;
  background-image: url('data:image/svg+xml;charset=utf-8,%3Csvg width="1920" height="23" viewBox="0 0 1920 23" fill="none" xmlns="http://www.w3.org/2000/svg"%3E%3Cpath d="M0 0h1920v23H0z" fill="%23002849"/%3E%3Cpath d="M-15 28L13 -2M5 28L33 -2M25 28L53 -2M45 28L73 -2M65 28L93 -2M85 28l28-30M105 28l28-30M125 28l28-30M145 28l28-30M165 28l28-30M185 28l28-30M205 28l28-30M225 28l28-30M245 28l28-30M265 28l28-30M285 28l28-30M305 28l28-30M325 28l28-30M345 28l28-30M365 28l28-30M385 28l28-30M405 28l28-30M425 28l28-30M445 28l28-30M465 28l28-30M485 28l28-30M505 28l28-30M525 28l28-30M545 28l28-30M565 28l28-30M585 28l28-30M605 28l28-30M625 28l28-30M645 28l28-30M665 28l28-30M685 28l28-30M705 28l28-30M725 28l28-30M745 28l28-30M765 28l28-30M785 28l28-30M805 28l28-30M825 28l28-30M845 28l28-30M865 28l28-30M885 28l28-30M905 28l28-30M925 28l28-30M945 28l28-30M965 28l28-30M985 28l28-30M1005 28l28-30M1025 28l28-30M1045 28l28-30M1065 28l28-30M1085 28l28-30M1105 28l28-30M1125 28l28-30M1145 28l28-30M1165 28l28-30M1185 28l28-30M1205 28l28-30M1225 28l28-30M1265 28l28-30M1305 28l28-30M1325 28l28-30M1345 28l28-30M1365 28l28-30M1385 28l28-30M1405 28l28-30M1465 28l28-30M1485 28l28-30M1505 28l28-30M1525 28l28-30M1565 28l28-30M1585 28l28-30M1605 28l28-30M1625 28l28-30M1645 28l28-30M1665 28l28-30M1685 28l28-30M1705 28l28-30M1725 28l28-30M1745 28l28-30M1765 28l28-30M1785 28l28-30M1805 28l28-30M1825 28l28-30M1845 28l28-30M1865 28l28-30M1885 28l28-30M1905 28l28-30M1925 28l28-30" stroke="%23fff" stroke-width="3"/%3E%3C/svg%3E') !important;
  background-repeat: no-repeat !important;
  background-size: cover !important;
  background-position: 50% !important;
}

/* Sets the hero image wrapper as the positioning boundary */
body.page-node-type-news-story .header_with-img {
  position: relative !important;
}

/* Positions title block inside the hero image down in the dark fade area */
body.page-node-type-news-story .header_inner__bottom {
  position: absolute !important;
  top: 470px !important;
  bottom: auto !important;
  left: 0 !important;
  margin-top: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
  width: 100% !important;
  z-index: 10 !important;
}

/* ==========================================================================
   RESPONSIVE CONTAINER ALIGNMENT
   ========================================================================== */

/* Mobile & Tablet (< 992px): Resets padding so text fits naturally */
@media (max-width: 991.98px) {
  .header_inner__bottom .container,
  .page_header .container,
  .page_header {
    padding-left: 15px !important;
    padding-right: 15px !important;
    max-width: 100% !important;
    margin-left: auto !important;
    margin-right: auto !important;
  }
}

/* Desktop (>= 992px): Applies 300px offset to align under View tab */
@media (min-width: 992px) {
  /* News Story / Becky Morris */
  body.page-node-type-news-story .header_inner__bottom .container,
  body.page-node-type-news-story .page_header .container {
    max-width: 1250px !important;
    padding-left: 300px !important;
    margin-left: 0 !important;
  }

  /* All Standard Non-Hero Pages */
  html body .header_inner__bottom .container,
  html body .page_header .container,
  html body .page_header {
    padding-left: 200px !important;
    padding-right: 40px !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    box-sizing: border-box !important;
  }
}

/* Ensure child elements sit left-aligned inside container across all screen sizes */
.header_inner__bottom .block-system-breadcrumb-block,
.header_inner__bottom .block-core-block-page-title-block,
.header_inner__bottom h1 {
  margin-left: 0 !important;
  padding-left: 0 !important;
}


/* ==========================================================================
   6. TARGETED HERO OVERRIDES (Degrees & Programs / Visit Germanna / Landing Pages)
   Forces hero pages to remove blue background and overlay title over the image
   ========================================================================== */

.header_with-img,
header .header_with-img {
  position: relative !important;
}

/* High specificity targeting every possible hero inner bottom container */
body .header_with-img .header_inner__bottom,
body header .header_with-img .header_inner__bottom,
.header_with-img .header_inner__bottom {
  background-color: transparent !important;
  background: transparent !important;
  position: absolute !important;
  bottom: 25px !important;
  top: auto !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 10 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* ==========================================================================
   DEPARTMENT CONTACT INFORMATION - DIRECT FLEX LAYOUT
   ========================================================================== */

/* Outer block styling */
#content-below .block--department-contact-information {
  box-sizing: border-box !important;
  padding: 40px 15px !important;
}

/* Inner content wrapper: centered max-width container */
#content-below .block--department-contact-information > div,
#content-below .block--department-contact-information .block__content {
  max-width: 1140px !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

@media (min-width: 768px) {
  /* Force the container holding both fields to display side-by-side */
  #content-below .block--department-contact-information .field--name-field-contact-information,
  #content-below .block--department-contact-information .field--name-field-service-hours {
    width: 48% !important;
    max-width: 48% !important;
    display: inline-block !important;
    vertical-align: top !important;
    box-sizing: border-box !important;
  }

  /* Force parent of both fields to act as a flex row */
  #content-below .block--department-contact-information div:has(> .field--name-field-contact-information) {
    display: flex !important;
    flex-wrap: wrap !important;
    justify-content: space-between !important;
    align-items: flex-start !important;
  }

  /* Reset vertical stacking for all text/elements INSIDE each field */
  #content-below .block--department-contact-information .field--name-field-contact-information *,
  #content-below .block--department-contact-information .field--name-field-service-hours * {
    box-sizing: border-box !important;
  }

  #content-below .block--department-contact-information .field--name-field-contact-information div,
  #content-below .block--department-contact-information .field--name-field-service-hours div,
  #content-below .block--department-contact-information .field--name-field-contact-information p,
  #content-below .block--department-contact-information .field--name-field-service-hours p,
  #content-below .block--department-contact-information .field--name-field-contact-information h2,
  #content-below .block--department-contact-information .field--name-field-service-hours h2 {
    display: block !important;
    width: 100% !important;
  }

  /* Bullet list formatting */
  #content-below .block--department-contact-information ul {
    display: block !important;
    list-style-type: disc !important;
    padding-left: 20px !important;
    margin-top: 0.5rem !important;
    margin-bottom: 1rem !important;
  }

  #content-below .block--department-contact-information li {
    display: list-item !important;
    margin-bottom: 0.25rem !important;
  }
}

/* ==========================================================================
   GLOBAL HEADER OVERLAY & TRANSPARENCY FIX
   ========================================================================== */

header.page_header.header_with-img,
.header_with-img {
  position: relative !important;
  background: transparent !important;
  background-color: transparent !important;
}

.header_with-img figure.header_bg {
  position: absolute !important;
  top: 0 !important;
  left: 0 !important;
  width: 100% !important;
  height: 100% !important;
  z-index: 0 !important;
  background: transparent !important;
}

.header_with-img figure.header_bg img {
  width: 100% !important;
  height: 100% !important;
  object-fit: cover !important;
}

.header_with-img .page_header-region,
.header_with-img .header_inner__bottom {
  position: relative !important;
  z-index: 2 !important;
  background: transparent !important;
}

/* ==========================================================================
   DEFAULT SUBPAGE POSITIONING (e.g., Morris Page)
   ========================================================================== */

/* Keep normal padding on standard subpages so titles remain in the header */
.block-system-breadcrumb-block .block__content,
.block-core-block-page-title-block .block__content {
  padding-top: 0 !important;
  padding-left: 0 !important;
  margin-left: 0 !important;
}

/* ==========================================================================
   HERO / LANDING PAGE TRANSPARENCY OVERRIDE
   ========================================================================== */

/* Target all header containers when hero image is present */
header.page_header:has(.header_with_img) .page_header-region,
header.page_header:has(.header_with_img) .header_inner_bottom,
header.page_header:has(.header_with_img) .header_inner__bottom,
.header_with_img ~ .page_header-region,
.header_with_img ~ .page_header-region .header_inner_bottom,
.header_with_img ~ .page_header-region .header_inner__bottom {
  background: transparent !important;
  background-color: transparent !important;
}

/* Position title region over the bottom of the hero photo */
header.page_header:has(.header_with_img) .page_header-region,
.header_with_img ~ .page_header-region {
  position: absolute !important;
  bottom: 0 !important;
  left: 0 !important;
  width: 100% !important;
  z-index: 10 !important;
}

/* Parent container setup */
header.page_header:has(.header_with_img),
.header_with_img {
  position: relative !important;
}

/* 1. Mobile reset and single green divider line */
@media (max-width: 991.98px) {
  .fact-card,
  .fact-card-content,
  .paragraph--type--quick-fact {
    transform: revert !important;
  }

  /* Target ONLY the inner fact-card to avoid double border */
  .field--item.fact-card-wrapper:not(:last-child) .fact-card {
    border-bottom: 2px solid #5a761e !important; /* Germanna Green separator */
    padding-bottom: 1.5rem;
    margin-bottom: 1.5rem;
  }
}

/* 2. Green background highlight when stat card is active or clicked */
.fact-card:active,
.fact-card:focus,
.fact-card-wrapper:active .fact-card,
.fact-card-wrapper:focus .fact-card {
  background-color: #006837 !important; /* Germanna Green */
}

/* 3. Button pill container setup across all breakpoints */
html body .facts-left a.btn-secondary,
html body .paragraph--type--quick-facts a.btn-secondary,
html body a.btn-secondary {
  position: relative !important;
  display: inline-flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
  padding: 12px 48px 12px 24px !important;
  border-radius: 50px !important;
  border: 2px solid #ffffff !important;
  white-space: nowrap !important;
  text-decoration: none !important;
}

/* 4. Desktop chevron positioning */
html body .facts-left a.btn-secondary::after,
html body .paragraph--type--quick-facts a.btn-secondary::after,
html body a.btn-secondary::after {
  content: "" !important; /* Uses native background icon on desktop */
  position: absolute !important;
  right: 20px !important;
  top: 50% !important;
  transform: translateY(-50%) !important;
  margin: 0 !important;
  display: inline-block !important;
  opacity: 1 !important;
  visibility: visible !important;
  transition: none !important;
}

/* 5. Mobile override: force unicode chevron (\276F) on screens <= 991.98px */
@media (max-width: 991.98px) {
  html body .facts-left a.btn-secondary::after,
  html body .paragraph--type--quick-facts a.btn-secondary::after,
  html body a.btn-secondary::after {
    content: "\276F" !important;
    font-weight: bold !important;
    font-size: 14px !important;
    line-height: 1 !important;
    color: #ffffff !important;
  }
}

/* 6. Lock chevron vertical position on hover/focus/active */
html body .facts-left a.btn-secondary:hover::after,
html body .facts-left a.btn-secondary:focus::after,
html body .facts-left a.btn-secondary:active::after,
html body .paragraph--type--quick-facts a.btn-secondary:hover::after,
html body .paragraph--type--quick-facts a.btn-secondary:focus::after,
html body .paragraph--type--quick-facts a.btn-secondary:active::after,
html body a.btn-secondary:hover::after,
html body a.btn-secondary:focus::after,
html body a.btn-secondary:active::after {
  transform: translateY(-50%) !important;
}

/* 7. PROD active/focus state: Maroon-to-Navy gradient */
html body .facts-left a.btn-secondary:active,
html body .facts-left a.btn-secondary:focus,
html body .paragraph--type--quick-facts a.btn-secondary:active,
html body .paragraph--type--quick-facts a.btn-secondary:focus,
html body a.btn-secondary:active,
html body a.btn-secondary:focus {
  background: linear-gradient(90deg, #a6192e 0%, #a6192e 45%, #002b49 100%) !important;
  border-color: #ffffff !important;
  color: #ffffff !important;
}

/* Responsive font scaling to prevent title wrapping & clipping */
@media (max-width: 1400px) {
  .header__with-img .heading_title,
  .header__with-img .heading_title span,
  .header_with_img .heading_title,
  .header_with_img .heading_title span {
    font-size: 2.75rem !important; /* Reduces 66px font size to ~44px */
    line-height: 1.1 !important;
    word-break: break-word !important;
  }
}

@media (max-width: 991.98px) {
  .header__with-img .heading_title,
  .header__with-img .heading_title span,
  .header_with_img .heading_title,
  .header_with_img .heading_title span {
    font-size: 2rem !important; /* Scales down to ~32px on smaller screens */
    line-height: 1.1 !important;
  }
}

/* Tablet / Mid-sized Screens */
@media (max-width: 1400px) {
  .header__with-img .heading_title,
  .header__with-img .heading_title span,
  .header_with_img .heading_title,
  .header_with_img .heading_title span {
    font-size: 2.75rem !important;
    line-height: 1.1 !important;
    word-break: break-word !important;
  }
}

/* Mobile Screens: Hero title & breadcrumb positioning */
@media (max-width: 768px) {
  /* 1. Force absolute positioning ONLY on hero image wrappers */
  .header__with-img .title-container,
  .header_with_img .title-container {
    position: absolute !important;
    left: 15px !important;
    right: 15px !important;
    width: auto !important;
    z-index: 12 !important;
  }

  /* 2. Base bottom offset for standard hero pages (e.g., GenAI) */
  .header__with-img .title-container,
  .header_with_img .title-container {
    bottom: 48px !important; /* Exact PROD baseline */
  }

  /* 3. Higher bottom offset ONLY for hero pages WITH "In this Section" */
  header.header__with-img:has(.header_inner_secondary) .title-container,
  header.header_with_img:has(.header_inner_secondary) .title-container {
    bottom: 105px !important; /* Clears secondary bar to match PROD */
  }

  /* 4. Exact PROD mobile title scaling & line height */
  .header__with-img .heading_title,
  .header__with-img .heading_title span,
  .header_with_img .heading_title,
  .header_with_img .heading_title span {
    font-size: 26px !important;
    line-height: 32px !important;
    word-break: break-word !important;
  }
}

/* Event/News Pages: Restore blue banner on non-hero pages */
.page-node-type-event .header__default,
.page-node-type-news-story .header__default {
  position: relative !important;
  top: auto !important;
  margin-top: 0 !important;
  padding-top: 90px !important; /* Clears fixed top nav bar */
}

.page-node-type-event .header_inner__bottom,
.page-node-type-news-story .header_inner__bottom,
.header__default .header_inner__bottom {
  background-color: #002b49 !important; /* Germanna dark blue */
  position: relative !important;
  top: 0 !important;
  display: block !important;
  width: 100% !important;
  padding: 60px 30px 60px !important; /* Taller banner height matching PROD */
  min-height: 220px !important;       /* Ensures full vertical presence */
  margin-top: 0 !important;
}

.page-node-type-event .header_inner__bottom .title-container,
.page-node-type-news-story .header_inner__bottom .title-container,
.header__default .header_inner__bottom .title-container {
  position: relative !important;
  bottom: auto !important;
  top: auto !important;
  transform: none !important;
  display: flex !important;
  flex-direction: column !important;
  justify-content: flex-end !important;
}

/* ==========================================================================
   MOBILE HOMEPAGE HERO & FORM CENTERED OVERLAY FIX
   ========================================================================== */

@media (max-width: 991.98px) {
  /* 1. Flex container centering setup */
  .path-frontpage .paragraph--type--contact-form .container,
  .path-frontpage .container:has(> .image-container),
  .path-frontpage .container:has(> .form-container) {
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
    box-sizing: border-box !important;
  }

  /* 2. Hero image card */
  .path-frontpage .image-container {
    width: 100% !important;
    max-width: 100% !important;
    margin-bottom: 0 !important;
  }

  /* 3. Shift form container left to center perfectly over the card */
  .path-frontpage .form-container {
    width: 88% !important;           /* Match PROD width proportion */
    max-width: 350px !important;     /* Keep form compact */
    margin-top: -820px !important;   /* Retain exact vertical placement under "Germanna." */
    margin-bottom: 2rem !important;
    margin-left: auto !important;    /* Forces horizontal balance */
    margin-right: auto !important;   /* Forces horizontal balance */
    left: -12px !important;          /* Nudges card left toward the red arrow */
    position: relative !important;
    z-index: 10 !important;
    box-sizing: border-box !important;
  }

  /* 4. Upcoming Events section stacked cleanly below */
  .path-frontpage .upcoming-events {
    width: 100% !important;
    margin-top: 0 !important;
    padding-top: 1rem !important;
    clear: both !important;
    position: relative !important;
    z-index: 5 !important;
  }
}

/* ==========================================================================
   WEBFORM PAGES ONLY - Clean Header & Red Top Bar Accent
   ========================================================================== */

body.path-webform header,
body.path-form header,
.node--type-webform header {
  background: transparent !important;
  box-shadow: none !important;
  min-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

/* Keep top bar container for red accent strip, but hide nav links/logo */
body.path-webform .header_inner__top,
body.path-form .header_inner__top {
  background: transparent !important;
  min-height: 0 !important;
  padding-top: 0 !important;
  padding-bottom: 0 !important;
}

body.path-webform .header_inner__top nav,
body.path-webform .header_inner__top .utility_wrapper,
body.path-webform .header_inner__top .logo,
body.path-form .header_inner__top nav,
body.path-form .header_inner__top .utility_wrapper,
body.path-form .header_inner__top .logo {
  display: none !important;
}

body.path-webform .header_inner__bottom,
body.path-form .header_inner__bottom {
  background: transparent !important;
  padding-top: 20px !important;
  padding-bottom: 0 !important;
  min-height: 0 !important;
}

/* Position the title cleanly above the form tabs */
body.path-webform .block-page-title-block h1,
body.path-form .block-page-title-block h1,
body.path-webform h1.page-title,
body.path-form h1.page-title {
  color: #002b49 !important;
  margin-top: 20px !important;
  margin-bottom: 15px !important;
}

/* Lower standalone form title for logged-out visitors only */
body:not(.user-logged-in).path-webform .block-page-title-block h1,
body:not(.user-logged-in).path-form .block-page-title-block h1,
body:not(.user-logged-in).path-webform h1.page-title,
body:not(.user-logged-in).path-form h1.page-title {
  margin-top: 90px !important;
}

body.path-webform #main-content,
body.path-form #main-content,
body.path-webform main,
body.path-form main {
  padding-top: 20px !important;
}

@media (max-width: 991.98px) {
  body.path-webform #main-content,
  body.path-form #main-content,
  body.path-webform main,
  body.path-form main {
    padding-top: 15px !important;
  }
}

/* ==========================================================================
   MOBILE HOMEPAGE HORIZONTAL SCROLL / ELASTICITY FIX
   ========================================================================== */

@media (max-width: 991.98px) {
  html:has(body.path-frontpage),
  body.path-frontpage,
  body.path-frontpage .dialog-off-canvas-main-canvas,
  body.path-frontpage .page-wrapper,
  body.path-frontpage main {
    max-width: 100% !important;
    overflow-x: clip !important; /* Prevents horizontal dragging without breaking sticky headers */
  }

  /* Prevent Bootstrap/Isovera negative row margins from bleeding past viewport width */
  body.path-frontpage .row {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  /* Keep the hero form container centered without nudging past screen bounds */
  body.path-frontpage .form-container {
    left: 0 !important;
  }
}

/* ==========================================================================
   PROGRAM PAGES HERO TITLE WRAPPING & BOTTOM ANCHOR FIX (Desktop >= 992px)
   ========================================================================== */

@media (min-width: 992px) {
  /* 1. Constrain width (to match PROD's 5-line wrap) and 46px line-height on Program nodes */
  body.page-node-type-program .header__with-img .block--germanna-page-title,
  body.page-node-type-program .header_with_img .block--germanna-page-title,
  body.page-node-type-program .header__with-img h1.heading_title,
  body.page-node-type-program .header_with_img h1.heading_title,
  body.node--type-program .header__with-img .block--germanna-page-title,
  body.node--type-program .header_with_img .block--germanna-page-title,
  body.node--type-program .header__with-img h1.heading_title,
  body.node--type-program .header_with_img h1.heading_title {
    max-width: 750px !important;
    line-height: 46px !important;
  }

  /* 2. Anchor bottom edge above the Program at a Glance card so 1-, 2-, and 5-line titles grow UPWARD like PROD */
  body.page-node-type-program header .header__with-img .header_inner_bottom,
  body.page-node-type-program header .header__with-img .header_inner__bottom,
  body.page-node-type-program header .header_with_img .header_inner_bottom,
  body.page-node-type-program header .header_with_img .header_inner__bottom,
  body.node--type-program header .header__with-img .header_inner_bottom,
  body.node--type-program header .header__with-img .header_inner__bottom,
  body.node--type-program header .header_with_img .header_inner_bottom,
  body.node--type-program header .header_with_img .header_inner__bottom {
    top: auto !important;
    bottom: 0 !important;
    height: auto !important;
    padding-top: 0 !important;
    padding-bottom: 20px !important; /* Matches PROD's exact baseline height above the white card */
  }
}

/* Desktop (>= 992px): Align Non-Hero breadcrumb & page title flush with left edge of "In this Section" container */
@media (min-width: 992px) {
  html body:has(.header_inner__secondary):not(:has(.header_with_img)) .header_inner__bottom {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html body:has(.header_inner__secondary):not(:has(.header_with_img)) .header_inner__bottom > .container {
    width: 100% !important;
    max-width: 1536px !important;
    margin-left: auto !important;
    margin-right: auto !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
  }

  html body:has(.header_inner__secondary):not(:has(.header_with_img)) .header_inner__bottom .title-container {
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
}

/* Mobile (< 992px): Align Non-Hero breadcrumb & page title flush with left edge of "In this Section" container */
@media (max-width: 991.98px) {
  html body:has(.header_inner__secondary):not(:has(.header_with_img)) .header_inner__bottom {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  html body:has(.header_inner__secondary):not(:has(.header_with_img)) .header_inner__bottom > .container {
    width: 100% !important;
    max-width: 100% !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    padding-left: 15px !important;
    padding-right: 15px !important;
    box-sizing: border-box !important;
  }

  html body:has(.header_inner__secondary):not(:has(.header_with_img)) .header_inner__bottom .title-container {
    margin-left: 0 !important;
    padding-left: 0 !important;
  }
}