/**
 * @file
 * Home landing — Governor's message promo + family benefits.
 */

.ymb-page--front .maryland-promo__title {
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-weight: 300;
}

/* Blue promo band (matches former crisis section). */
.ymb-page--front .ymb-promo-primary.maryland-promo--image {
  background-color: #005ea2;
  color: #fff;
}

.ymb-page--front .ymb-promo-primary .maryland-promo__title,
.ymb-page--front .ymb-promo-primary .maryland-promo__description,
.ymb-page--front .ymb-promo-primary .maryland-promo__link {
  color: #fff;
}

.ymb-page--front .ymb-promo-primary .maryland-promo__description {
  opacity: 0.85;
}

.ymb-page--front .ymb-promo-primary .maryland-promo__link {
  font-weight: 600;
}

.ymb-page--front .ymb-promo-primary.maryland-promo--image::after {
  display: none;
}

/*
 * Single promo under header — cancel MDWDS upward image protrusion (designed for
 * stacked promos, otherwise the photo leaks into the header).
 */
.ymb-page--front #main-content > .ymb-promo-primary.maryland-promo--image {
  margin-block: 1.5rem 0;
  padding-block: 2rem 3rem;
  overflow: clip;
}

.ymb-page--front .ymb-promo-primary .maryland-promo__img {
  margin-block: 0 1.5rem;
  width: 100%;
}

/*
 * Cap the photo's height.
 *
 * MDWDS gives the figure `aspect-ratio: 3/4` and absolutely positions the img
 * inside it, so the figure's width alone decided its height: at 518px wide the
 * portrait came out ~690px tall, and the header plus this one band was 910px —
 * the Governor's message did not fit a 900px screen by itself.
 *
 * The cap therefore has to go on the FIGURE. Sizing the img does nothing: it is
 * positioned inset:0 and already covers whatever box it is given.
 *
 * object-position keeps the crop on the faces rather than the middle of the
 * frame, which is where a shorter box would otherwise cut.
 */
.ymb-page--front .ymb-promo-primary .maryland-promo__img {
  aspect-ratio: 4 / 3;
  max-block-size: 40vh;
}

.ymb-page--front .ymb-promo-primary .maryland-promo__img img {
  object-position: center 22%;
}

@media (min-width: 40em) {
  .ymb-page--front .ymb-promo-primary .maryland-promo__img {
    margin-block: 0;
  }

  /* min() so a short laptop screen gets a proportionally shorter photo, while
     a tall monitor stops at a sensible absolute size. */
  .ymb-page--front .ymb-promo-primary .maryland-promo__img {
    aspect-ratio: 5 / 4;
    max-block-size: min(52vh, 26rem);
  }

  /* MDWDS pads this column by 5rem top and bottom, which on its own made the
     copy column 614px tall — taller than the photo it sits beside. */
  .ymb-page--front .ymb-promo-primary .maryland-promo__content-container {
    padding-block: 1.5rem;
  }

  /* With a shorter photo the copy would sit at the top of a tall blue band;
     centring keeps the two columns balanced at any height. */
  .ymb-page--front .ymb-promo-primary .maryland-promo__row {
    align-items: center;
  }

  .ymb-page--front #main-content > .ymb-promo-primary.maryland-promo--image {
    margin-block-start: 1.5rem;
    padding-block: 2rem 2.5rem;
  }
}

/* Family & children benefits — V1 external link to Maryland.gov */
.ymb-family-benefits {
  background: #f0f0f0;
  color: #1b1b1b;
  padding-block: 3rem 4rem;
}

.ymb-family-benefits__inner {
  display: grid;
  gap: 1.5rem;
  align-items: center;
}

.ymb-family-benefits__copy {
  display: grid;
  gap: 0.75rem;
}

.ymb-family-benefits__eyebrow {
  margin: 0;
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #565c65;
}

.ymb-family-benefits__title {
  margin: 0;
  font-family: "Merriweather", Georgia, "Times New Roman", serif;
  font-size: clamp(1.75rem, 4vw, 2.25rem);
  font-weight: 300;
  line-height: 1.2;
}

.ymb-family-benefits__body {
  margin: 0;
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.125rem;
  line-height: 1.55;
  color: #3d4551;
  max-inline-size: 36rem;
}

.ymb-family-benefits__card {
  display: grid;
  gap: 0.4rem;
  padding: 1.25rem 1.35rem;
  border: 1px solid #dfe1e2;
  border-radius: 0.5rem;
  background: #fff;
  color: inherit;
  text-decoration: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.ymb-family-benefits__card:hover,
.ymb-family-benefits__card:focus-visible {
  border-color: #005ea2;
  box-shadow: 0 0.5rem 1.25rem rgba(27, 27, 27, 0.08);
  outline: none;
}

.ymb-family-benefits__card-meta {
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 0.8125rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #005ea2;
}

.ymb-family-benefits__card-title {
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1.25rem;
  font-weight: 700;
  line-height: 1.3;
}

.ymb-family-benefits__card-desc {
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  line-height: 1.5;
  color: #3d4551;
}

.ymb-family-benefits__card-cta {
  margin-block-start: 0.25rem;
  font-family: "Source Sans 3", "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 1rem;
  font-weight: 700;
  color: #005ea2;
}

@media (min-width: 40em) {
  .ymb-family-benefits {
    padding-block: 3.5rem 5rem;
  }
}

@media (min-width: 56em) {
  .ymb-family-benefits__inner {
    grid-template-columns: minmax(0, 1.1fr) minmax(18rem, 0.9fr);
    gap: 2.5rem;
  }
}
