/* Hero card: fill the right column to the wrap edge (UK / Australia pattern). */

@media (min-width: 981px) {
  .hero-grid > .hero-card,
  .hero-card {
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    justify-self: stretch !important;
    margin-left: auto;
    margin-right: 0;
    aspect-ratio: auto !important;
    min-height: 560px !important;
    max-height: none !important;
  }
}

/* Hero stats row: first item on the left wrap edge, last item on the right. */

.hero .wrap > .hero-metaline,
.hero-metaline {
  display: flex !important;
  flex-wrap: wrap !important;
  justify-content: space-between !important;
  align-items: flex-start !important;
  width: 100% !important;
  max-width: 100% !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  gap: clamp(20px, 3vw, 48px);
  box-sizing: border-box;
}

.hero-metaline > .meta {
  flex: 0 1 auto !important;
  min-width: 0 !important;
  width: auto !important;
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  text-align: left;
}

.hero-metaline > .meta:last-child {
  text-align: right;
}

@media (max-width: 1024px) {
  .hero .wrap > .hero-metaline,
  .hero-metaline {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: initial !important;
    gap: 18px !important;
  }

  .hero-metaline > .meta:last-child {
    text-align: left;
  }
}

/* Phone / small tablet: stack hero like the UK page, no horizontal clip. */
@media (max-width: 980px) {
  html,
  body {
    overflow-x: hidden;
  }

  .hero,
  .hero .wrap,
  .hero-grid,
  .hero-copy,
  .hero-card,
  .hero-metaline {
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .hero {
    overflow-x: hidden !important;
    overflow-y: visible !important;
  }

  .hero-grid {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 28px !important;
  }

  .hero-grid > .hero-card,
  .hero-card {
    width: 100% !important;
    justify-self: stretch !important;
    margin-left: 0 !important;
    aspect-ratio: auto !important;
    min-height: 360px !important;
    max-height: none !important;
  }

  .hero h1,
  .sec-title {
    text-wrap: wrap !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: break-word !important;
    hyphens: auto;
  }

  .hero h1 {
    font-size: clamp(32px, 10.5vw, 56px) !important;
    line-height: 1.06 !important;
    max-width: 100%;
  }

  .hero h1 br {
    display: none;
  }

  .hero-card p {
    font-size: clamp(22px, 6.2vw, 28px) !important;
    line-height: 1.2 !important;
    overflow-wrap: anywhere !important;
    max-width: 100%;
  }

  .eyebrow {
    white-space: normal !important;
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  .hero {
    overflow-x: hidden;
    overflow-y: visible;
  }

  .hero h1 {
    font-size: clamp(36px, 12vw, 52px) !important;
    line-height: 1.05 !important;
    overflow-wrap: anywhere;
  }

  .hero h1 br {
    display: none;
  }

  .hero p.lead {
    font-size: 16px !important;
    max-width: 100% !important;
  }

  .hero-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
  }

  .hero-actions .btn {
    width: 100% !important;
    justify-content: center !important;
    box-sizing: border-box;
  }

  .hero-grid > .hero-card,
  .hero-card {
    min-height: 320px !important;
    padding: 22px !important;
  }

  .hero-card p {
    font-size: clamp(22px, 6.4vw, 28px) !important;
    line-height: 1.15 !important;
    overflow-wrap: anywhere;
  }

  .hero .wrap > .hero-metaline,
  .hero-metaline {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 16px !important;
  }

  .hero-metaline > .meta:last-child {
    text-align: left;
  }

  .meta .num {
    font-size: 29px !important;
  }

  .meta .lbl {
    font-size: 11px !important;
  }
}
