/* =========================================================
   CORE PAGE HEADER
   Used on About, Services, Quote and Contact
   Keeps hero/header cards identical while allowing unique SEO text
   ========================================================= */

.mb-core-page-hero {
  position: relative;
  padding-top: 190px;
  padding-bottom: 52px;
  overflow: hidden;
}

.mb-core-page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 16% 18%, rgba(255,77,77,.12), transparent 26%),
    radial-gradient(circle at 84% 10%, rgba(62,166,255,.16), transparent 30%),
    linear-gradient(180deg, rgba(255,255,255,.025), rgba(255,255,255,0));
  pointer-events: none;
}

.mb-core-page-hero-shell {
  position: relative;
  z-index: 1;
  border-radius: 38px;
  padding: clamp(30px, 5vw, 58px);
  min-height: 520px;
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 12% 10%, rgba(255,77,77,.11), transparent 30%),
    radial-gradient(circle at 88% 16%, rgba(62,166,255,.15), transparent 34%),
    linear-gradient(180deg, rgba(255,255,255,.085), rgba(255,255,255,.045));
  border: 1px solid rgba(62,166,255,.14);
  box-shadow: var(--shadow, 0 28px 70px rgba(0,0,0,.32));
  backdrop-filter: blur(12px);
  overflow: hidden;
}

.mb-core-page-hero-shell::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -100px;
  width: 310px;
  height: 310px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(143,208,255,.22), rgba(255,77,77,.10) 48%, transparent 72%);
  filter: blur(8px);
  pointer-events: none;
}

.mb-core-page-hero-grid {
  position: relative;
  z-index: 1;
  min-height: 404px;
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(300px, .95fr);
  gap: clamp(24px, 5vw, 58px);
  align-items: center;
}

.mb-core-page-copy {
  min-width: 0;
}

.mb-core-page-title {
  min-height: 238px;
  display: grid;
  align-content: center;
  margin: 18px 0 20px;
  font-family: "Outfit", Inter, sans-serif;
  font-size: clamp(44px, 7vw, 86px);
  line-height: .92;
  letter-spacing: -.045em;
  font-weight: 900;
  max-width: 10ch;
  text-wrap: balance;
}

.mb-core-page-title span {
  display: block;
}

.mb-core-page-copy p {
  min-height: 106px;
  margin: 0;
  max-width: 680px;
  color: var(--muted, rgba(255,255,255,.76));
  font-size: clamp(17px, 1.8vw, 20px);
  line-height: 1.75;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mb-core-page-actions {
  min-height: 52px;
  margin-top: 28px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
}

.mb-core-page-card-panel {
  height: 404px;
  display: grid;
  grid-template-rows: repeat(3, 1fr);
  gap: 14px;
}

.mb-core-page-card {
  height: 125px;
  min-height: 125px;
  max-height: 125px;
  overflow: hidden;
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  padding: 20px;
  border-radius: 24px;
  background: rgba(255,255,255,.055);
  border: 1px solid rgba(62,166,255,.12);
  box-shadow: 0 16px 34px rgba(0,0,0,.14);
}

.mb-core-page-card-icon {
  width: 48px;
  height: 48px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  font-family: "Outfit", Inter, sans-serif;
  font-weight: 900;
  background: linear-gradient(135deg, rgba(255,77,77,.24), rgba(62,166,255,.24));
  border: 1px solid rgba(62,166,255,.16);
}

.mb-core-page-card h3 {
  min-height: 24px;
  margin: 0 0 7px;
  font-family: "Outfit", Inter, sans-serif;
  font-size: 22px;
  line-height: 1.05;
  font-weight: 900;
}

.mb-core-page-card p,
.mb-core-page-card a {
  margin: 0;
  color: var(--muted, rgba(255,255,255,.76));
  line-height: 1.62;
  font-size: 15px;
  text-decoration: none;
}

.mb-core-page-card p {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.mb-core-page-card a:hover {
  color: #fff;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Prevent active/current nav item changing layout */
.mb-nav-links a,
.mb-nav-links a[aria-current="page"] {
  font-weight: 800;
}

/* Tablet */
@media (max-width: 900px) {
  .mb-core-page-hero {
    padding-top: 150px;
    padding-bottom: 42px;
  }

  .mb-core-page-hero-shell,
  .mb-core-page-hero-grid,
  .mb-core-page-card-panel,
  .mb-core-page-card {
    height: auto;
    min-height: 0;
    max-height: none;
  }

  .mb-core-page-hero-grid {
    grid-template-columns: 1fr;
  }

  .mb-core-page-copy {
    text-align: center;
  }

  .mb-core-page-title,
  .mb-core-page-copy p,
  .mb-core-page-actions,
  .mb-core-page-copy .mb-badge {
    margin-left: auto;
    margin-right: auto;
  }

  .mb-core-page-title,
  .mb-core-page-copy p {
    min-height: auto;
  }

  .mb-core-page-actions {
    justify-content: center;
  }

  .mb-core-page-card-panel {
    grid-template-rows: none;
  }
}

/* Mobile */
@media (max-width: 640px) {
  .mb-core-page-hero {
    padding-top: 122px;
    padding-bottom: 38px;
  }

  .mb-core-page-hero-shell {
    border-radius: 28px;
  }

  .mb-core-page-card {
    grid-template-columns: 1fr;
    text-align: center;
  }

  .mb-core-page-card-icon {
    margin: 0 auto;
  }
}
