/* ==========================================================================
   Page Banner Component (H1)
   Dark blue background with white text
   Per Figma design - "H2" text style used for page titles
   ========================================================================== */

.page-banner {
  background-color: #003260; /* --Branded-Blue-dark */
  padding: 0;
  position: relative;
  min-height: 290px;
  overflow: visible;
  display: grid;
  align-items: center;
  z-index: 1;
}

.page-banner__section {
  width: 100%;
  overflow: hidden;
  height: fit-content;
}

.page--cholestatic-pruritus-improvements-in-pfic .page-banner--light .page-banner__title {
  @media (width < 570px) {
    font-size: 22px;
     max-width: 220px !important;
  }
}

.page--do-not-sell .page-banner--light .page-banner__title {
  @media (width < 570px) {
    max-width: 160px !important;
  }
}

.page--meet-the-moms-video .page-banner--light .page-banner__title,
.page--emma-abby-video .page-banner--light .page-banner__title,
.page--support-and-resources .page-banner--light .page-banner__title,
.page--getting-patients-started .page-banner--light .page-banner__title {
  @media (width < 570px) {
    max-width: 180px !important;
  }
}

/* Decorative swoosh on dark banner */
.page-banner--dark {
  margin-bottom: 40px;
  background-color: var(--color-white);
  background-image: linear-gradient(#003260, #003260);
  background-repeat: no-repeat;
  background-size: 100% 165px;
  position: relative;
  min-height: 188px;

  @media (width >= 1024px) {
    background-size: 100% 185px;
    min-height: 290px;
  }
}

.page-banner__container {
  display: flex;
  flex-direction: column;
  align-items: flex-start; /* Left-align content */
  gap: var(--space-5);
  max-width: 1140px;
  position: relative;
  z-index: 1;

  @media (width >= 1024px) {
    gap: var(--space-2);
  }
}

/* H1 Title */
.page-banner__title {
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-size: 46px;
  font-style: normal;
  font-weight: 600;
  line-height: 120%;
  font-feature-settings: 'liga' off, 'clig' off;
  text-align: left;
  margin: 0;
  padding: 0;
  max-width: 930px;

  @media (width < 1280px) {
    max-width: 660px;
    min-height: 188px;
    line-height: 1.1;
    display: flex;
    align-items: center;
    margin-right: 380px;
  }
}

.page-banner--light .page-banner__title {
  @media (width < 1024px) {
    margin-right: 160px;
  }
}

.page-banner--dark .page-banner__title {
  @media (width < 1024px) {
    margin-right: 50px;
  }
}

.page-banner__title--large {
  font-size: clamp(27px, 5vw, 32px);

  @media (width >= 1024px) {
    font-size: 46px;
  }
}

.page-banner__title--small {
  font-size: clamp(22px, 5vw, 30px);

  @media (width >= 1024px) {
    font-size: 36px;
  }
}

/* Deep Links Navigation */
.page-banner__nav {
  width: 100%;

  @media (min-width: 1024px) {
    margin-bottom: var(--space-4);
  }
}

/* List Label (above deep links) */
.page-banner__list-label {
  font-family: 'Outfit', sans-serif;
  font-size: 18px;
  font-style: normal;
  font-weight: 500;
  line-height: 120%; /* 21.6px */
  text-transform: uppercase;
  font-feature-settings: 'liga' off, 'clig' off;
  color: #FFFFFF;
  margin: 0 0 12px 0;

  @media (width < 1024px) {
    color: var(--color-blue-dark);
  }
}

.page-banner__links {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  gap: var(--space-3) var(--space-4);
  list-style: disc; /* Show bullets */
  margin: 0;
  padding: 0;
  padding-left: 1rem; /* Space for bullets */

  @media (min-width: 1024px) {
    align-items: flex-start;
  }
}

.page-banner--dark .page-banner__links {
  gap: var(--space-5);

  @media (width >= 1024px) {
    gap: var(--space-11);
  }
}

.page-banner__link-item {
  margin: 0;
  padding: 0;
  color: #FFFFFF; /* For bullet color on dark theme */

  @media (width < 1024px) {
    color: var(--color-blue-dark);
  }

  br {
    @media (width < 768px) {
      display: none;
    }
  }
}

.page-banner__link-item::marker {
  color: #FFFFFF;
  font-size: 0.6em; /* Smaller bullets - about 60% */

  @media (width < 1024px) {
    color: var(--color-blue-dark);
  }
}

.page-banner__link,
.page-banner__link:visited {
  color: #FFFFFF;
  font-family: 'Outfit', sans-serif;
  font-size: 16px;
  font-style: normal;
  font-weight: 400;
  line-height: 130%;
  font-feature-settings: 'liga' off, 'clig' off;
  text-decoration-line: underline;
  text-decoration-style: solid;
  text-decoration-skip-ink: auto;
  text-decoration-thickness: auto;
  text-underline-offset: 3px;
  text-underline-position: from-font;
  transition: opacity 150ms ease;

  @media (width < 1024px) {
    color: var(--color-blue-dark);
  }
}

.page-banner__link:hover {
  color: #FFFFFF;
  opacity: 0.8;

  @media (width < 1024px) {
    color: var(--color-blue-dark);
  }
}

.page-banner__link:focus-visible {
  color: #FFFFFF;
  outline: 2px solid #FFFFFF;
  outline-offset: 2px;

  @media (width < 1024px) {
    color: var(--color-blue-dark);
    outline-color: var(--color-blue-dark);
  }
}

/* Responsive adjustments */
@media (max-width: 767px) {

  .page-banner__links {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-5);
  }
}

/* ==========================================================================
   Light Theme Variant
   Solid background with dark blue text
   Decorative swoosh on left, leaf image on right
   ========================================================================== */
.page-banner--light {
  /* Solid background color matching dark variant pattern */
  background-color: var(--color-white);
  background-image: linear-gradient(#ECF8FF, #ECF8FF);
  background-repeat: no-repeat;
  background-size: 100% 165px;
  position: relative;
  min-height: 188px;
  overflow: visible;
  padding: 0;
  /* Account for decorative elements overflowing below (leaves: 28px top + 290px height = 318px, minus 236px banner = 82px overflow) */
  margin-bottom: 60px;

  @media (width >= 1024px) {
    background-size: 100% 236px;
    min-height: 290px;
    margin-bottom: 82px;
  }
}

.page-banner__background {
  grid-area: 1 / 1;
  height: 100%;
  width: 100%;

  picture {
    width: 100%;
    height: 100%;
    /* padding-right: var(--space-4); */
    margin-top: calc(var(--space-3) * -1);

    @media (width >= 1024px) {
      padding: 0;
      margin: 0;
    }
  }

  img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    object-position: right bottom;
    pointer-events: none;

    @media (width > 528px) {
      object-fit: fill;
    }

    @media (width >= 1024px) {
      --clamp: clamp(32px, 34.375vw - 320px, 175px);;

      width: calc(100% - (var(--clamp)/1440px * 100%));
      height: 290px;
      object-position: right center;
      object-fit: fill;
    }

    @media (width > 1440px) {
      width: calc(100% - 175px);
      object-fit: fill;
    }
  }
}

/* Decorative leaf image (default, hidden when custom image is provided) */
.page-banner--light::after {
  content: '';
  position: absolute;
  right: 0;
  top: 28px;
  width: 100%;
  height: 290px;
  background-image: url('/themes/custom/livmarli/images/leaves.png');
  background-size: auto 290px;
  background-repeat: no-repeat;
  background-position: right top;
  pointer-events: none;
}

/* Hide default leaves when a custom banner image is uploaded */
.page-banner--has-image.page-banner--light::after {
  display: none;
}

/* Custom banner image (replaces leaves) */
.page-banner__image-wrapper {
  grid-area: 1 / 1;
  justify-self: end;
  align-self: stretch;
  position: relative;
  max-height: 290px;
  right: -12px;
  display: grid;
  place-content: end;
  z-index: 0;

  @media (width < 1024px) {
    max-width: 203px;
    max-height: 180px;
    bottom: -16px;
  }

  @media (width >= 1024px) {
    top: 60px;
  }
}

.page-banner__image {
  width: 100%;
  height: auto;
  max-width: 450px;
  object-fit: contain;
  object-position: right top;
  pointer-events: none;
  z-index: 0;
}

/* Picture element within image wrapper (used when mobile image is provided) */
.page-banner__image-wrapper picture {
  display: contents;
}

.page-banner__container {
  /* Content inherits base container styles, z-index to stay above decorative elements */
  z-index: 1;
  grid-area: 1 / 1;
}

.page-banner--light .page-banner__title {
  color: #003A70; /* --Branded-Blue-dark */

  @media (width < 570px) {
    max-width: 660px;
    min-height: 188px;
    line-height: 1.1;
    display: flex;
    align-items: center;
    margin-right: 23.1%;
  }

  @media (width < 570px) {
    max-width: 250px !important;
  }
}

.page-banner--light .page-banner__list-label {
  color: #003A70;
}

.page-banner--light .page-banner__links {
  list-style: none;
  padding-left: 0;
}

.page-banner--light .page-banner__link-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;

  @media (min-width: 1024px) {
    align-items: flex-start;
  }
}

/* Leaf icon for light theme bullets */
.page-banner--light .page-banner__link-item::before {
  content: '';
  display: inline-block;
  width: 19px;
  height: 18px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='19' height='18' viewBox='0 0 19 18' fill='none'%3E%3Cg clip-path='url(%23clip0_2783_61315)'%3E%3Cpath d='M9.06846 17.9999C9.06846 17.9999 8.62562 8.8698 0.506861 5.03125C0.506861 5.03125 -3.12022 15.1373 9.06846 17.9999Z' fill='%23003A70'/%3E%3Cpath d='M10.5511 16.7988C11.3328 16.3165 20.2297 12.2826 16.1509 0.547846C16.1916 0.558983 16.223 0.522656 16.2026 0.517087C15.8767 0.427993 6.09544 3.00776 10.5511 16.7988Z' fill='%23003A70'/%3E%3C/g%3E%3Cdefs%3E%3CclipPath id='clip0_2783_61315'%3E%3Crect width='19' height='18' fill='white'/%3E%3C/clipPath%3E%3C/defs%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}

.page-banner--light .page-banner__link,
.page-banner--light .page-banner__link:visited {
  color: #003A70; /* --Branded-Blue-dark */
}

.page-banner--light .page-banner__link:hover {
  color: #003A70;
  opacity: 0.8;
}

.page-banner--light .page-banner__link:focus-visible {
  color: #003A70;
  outline-color: #003A70;
}


.page--the-impact-of-cholestasis .page-banner__title {
  @media (width < 540px) {
    max-width: 250px !important;
  }
}