/* ---- Hero -------------------------------------------------------------
   Same construction as the About Us hero, with the panel/border colours
   swapped: navy panel, red edge. fade-left-soft lives in site.css. */
.mb-hero {
  position: relative;
  min-height: 700px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-image: url('/images/iStock-2170483510.jpg');
  background-position: center center;
  background-repeat: no-repeat;
  background-size: cover;
}

/* height (not min-height) is the total border-box height (box-sizing:
   border-box is set globally), so it already includes the 50px border below
   - not on top of it. Fixed rather than min-height so the band stays pinned
   to the bottom of .mb-hero instead of growing with its contents. */
.mb-hero-band {
  height: 260px;
  border-bottom: 50px solid rgba(112, 146, 180, 0.5);
  background: linear-gradient(90deg, rgba(31, 78, 132, 0.5) 0%, rgba(28, 66, 110, 0.5) 100%);
}

/* Anchored to the bottom of .mb-hero (the nearest positioned ancestor) rather
   than pushed there by a negative margin: the panel's height varies with font
   metrics and how the title wraps, so any fixed offset drifts off the edge.
   bottom: 0 keeps the panel's bottom flush with the hero's however tall it
   gets, and it grows upward out of the band over the photo. */
.mb-hero-row {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
}

.mb-hero-inner {
  max-width: 1350px;
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  flex-direction: row;
  gap: 20px;
}

.mb-hero-panel {
  width: 40%;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 40px;
  padding: 100px 0;
  background: #0f467c;
  border-right: 25px solid #d54553;
  animation: fade-left-soft 2s ease forwards;
}

.mb-hero-spacer {
  width: 60%;
}

.mb-hero-panel h1 {
  width: 82%;
  margin: 0;
  font-family: var(--font-din);
  font-size: 60px;
  font-weight: 700;
  line-height: 75px;
  color: #fff;
}

.mb-hero-panel p {
  width: 82%;
  margin: 0;
  font-family: var(--font-myriad);
  font-size: 18px;
  font-weight: 500;
  line-height: 26px;
  color: #fff;
}

/* ---- Pin timeline -----------------------------------------------------
   Shared component (timeline.css); this page runs slightly smaller titles
   than the homepage and About Us. */
.mb-purpose {
  background: #fff;
  padding: 110px 12px 20px;
}

.mb-purpose-inner {
  max-width: 1300px;
  margin: 0 auto;
}

.mb-purpose .timeline-item h3 {
  width: 95%;
  min-height: 56px;
  font-size: 22px;
  line-height: 28px;
  color: #3975b4;
}

/* ---- Benefit cards ---------------------------------------------------- */
.mb-cards {
  background: #fff;
  padding: 0 12px;
}

.mb-cards-inner {
  max-width: 1250px;
  margin: 0 auto;
  padding: 100px 0;
  display: flex;
  flex-direction: column;
  gap: 40px;
}

.mb-card-row {
  display: flex;
  flex-direction: row;
  gap: 50px;
}

.benefit-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 25px 0 40px;
  background: var(--color-offwhite);
  opacity: 0;
}

/* Cards carry "animated-slow" on the live site, so 2s rather than 1.25s,
   staggered 200/400/600 within each row. */
.benefit-card.in-view {
  animation: fade-in-up 2s ease both;
  animation-delay: 0.2s;
}

.mb-card-row .benefit-card:nth-child(2).in-view {
  animation-delay: 0.4s;
}

.mb-card-row .benefit-card:nth-child(3).in-view {
  animation-delay: 0.6s;
}

.benefit-card img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
}

.benefit-card h3 {
  margin: 0;
  padding: 0 20px;
  font-family: var(--font-din);
  font-size: 28px;
  font-weight: 700;
  line-height: 38px;
  color: #0f467c;
  text-align: center;
}

.benefit-card p {
  margin: 0;
  padding: 0 20px;
  font-family: var(--font-din);
  font-size: 18px;
  font-weight: 400;
  line-height: 24px;
  color: #064872;
  text-align: center;
}

/* ---- Responsive ------------------------------------------------------- */
@media (max-width: 1024px) {
  .mb-hero-panel h1 {
    font-size: 44px;
    line-height: 56px;
  }

  .mb-card-row {
    flex-wrap: wrap;
    gap: 30px;
  }

  .benefit-card {
    flex: 1 1 45%;
  }
}

@media (max-width: 768px) {
  /* Back into normal flow: stacked full-width the panel can outgrow the hero,
     and anchoring it to the bottom would spill it over the section below.
     The band has to size to its content here for the same reason - at a fixed
     height the taller stacked panel overflows it. */
  .mb-hero-row {
    position: static;
  }

  .mb-hero-band {
    height: auto;
  }

  .mb-hero-inner {
    flex-direction: column;
    padding: 0;
  }

  .mb-hero-panel {
    width: 100%;
    align-items: flex-start;
    gap: 24px;
    padding: 50px 20px;
    border-right: 0;
    border-bottom: 25px solid #d54553;
  }

  .mb-hero-panel h1,
  .mb-hero-panel p {
    width: 100%;
  }

  .mb-hero-panel h1 {
    font-size: 36px;
    line-height: 44px;
  }

  .mb-hero-spacer {
    display: none;
  }

  .mb-purpose {
    padding: 50px 12px 20px;
  }

  .mb-purpose .timeline-item h3 {
    width: 80%;
    min-height: 0;
    font-size: 18px;
    line-height: 26px;
  }

  .mb-cards-inner {
    padding: 50px 0;
  }

  .mb-card-row {
    flex-direction: column;
  }

  .benefit-card h3 {
    font-size: 24px;
    line-height: 32px;
  }
}
