:root {
  --primary: #2E6B4E;
  --light: #f7fbfa;
  --dark: #0d171c;
  --muted: color-mix(in srgb, var(--dark) 62%, transparent);
  --line: color-mix(in srgb, var(--dark) 16%, transparent);
  --surface: var(--light);
  --surface-2: #ffffff;
  --shadow: 0 18px 50px rgba(13, 23, 28, 0.1);
  --radius: 24px;
  --radius-sm: 15px;
  --container: 1180px;
  --space: 8px;
}
* {
  box-sizing: border-box;
}
html {
  scroll-behavior: smooth;
}
body {
  margin: 0;
  background: var(--surface);
  color: var(--dark);
  font-family:
    Inter,
    system-ui,
    -apple-system,
    Segoe UI,
    sans-serif;
  line-height: 1.65;
}
img {
  max-width: 100%;
  display: block;
}
a {
  color: inherit;
  text-decoration: none;
}
button,
input,
select,
textarea {
  font: inherit;
}
.container {
  width: min(var(--container), calc(100% - 32px));
  margin: auto;
}
.section {
  padding: 88px 0;
}
.section-sm {
  padding: 56px 0;
}
.eyebrow {
  display: inline-flex;
  gap: 8px;
  align-items: center;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
}
.eyebrow::before {
  content: "";
  width: 24px;
  height: 2px;
  background: var(--primary);
}
h1,
h2,
h3,
h4 {
  line-height: 1.1;
  margin: 0 0 16px;
  font-family: "Space Grotesk", Inter, sans-serif;
}
h1 {
  font-size: clamp(2.7rem, 7vw, 5.8rem);
  letter-spacing: -0.055em;
}
h2 {
  font-size: clamp(2rem, 4vw, 3.5rem);
  letter-spacing: -0.04em;
}
h3 {
  font-size: 1.35rem;
}
.lead {
  font-size: 1.12rem;
  color: var(--muted);
  max-width: 700px;
}
.muted {
  color: var(--muted);
}
.grid {
  display: grid;
  gap: 24px;
}
.grid-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}
.grid-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.grid-4 {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.card {
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: 0 8px 30px rgba(13, 23, 28, 0.04);
  transition: 0.28s ease;
}
.card:hover {
  transform: translateY(-5px);
  box-shadow: var(--shadow);
  border-color: color-mix(in srgb, var(--primary) 35%, var(--line));
}
.iconbox {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  background: color-mix(in srgb, var(--primary) 14%, transparent);
  display: grid;
  place-items: center;
  color: var(--primary);
  font-size: 1.35rem;
}
.btn {
  min-height: 46px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  padding: 11px 20px;
  font-weight: 800;
  cursor: pointer;
  transition: 0.22s ease;
}
.btn-primary {
  background: var(--primary);
  color: white;
}
.btn-primary:hover {
  filter: brightness(0.92);
  transform: translateY(-2px);
}
.btn-outline {
  border-color: var(--line);
  background: transparent;
}
.btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
}
.btn-dark {
  background: var(--dark);
  color: white;
}
.badge {
  display: inline-flex;
  border-radius: 999px;
  padding: 6px 11px;
  font-size: 0.78rem;
  font-weight: 800;
  background: color-mix(in srgb, var(--primary) 13%, transparent);
  color: var(--primary);
}
.skip-link {
  position: absolute;
  left: -9999px;
}
.skip-link:focus {
  left: 16px;
  top: 16px;
  background: var(--dark);
  color: white;
  padding: 10px;
  z-index: 9999;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: color-mix(in srgb, var(--surface-2) 88%, transparent);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--line);
}
.nav {
  height: 76px;
  display: flex;
  align-items: center;
  gap: 24px;
}
.brand {
  font-family: "Space Grotesk";
  font-size: 1.4rem;
  font-weight: 800;
  display: flex;
  align-items: center;
  gap: 10px;
}
.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 12px 12px 12px 3px;
  background: var(--primary);
  position: relative;
}
.brand-mark::after {
  content: "";
  position: absolute;
  inset: 9px;
  background: var(--light);
  border-radius: 50%;
}
.navlinks {
  display: flex;
  align-items: center;
  gap: 22px;
  margin-left: auto;
}
.navlinks a {
  font-weight: 700;
  font-size: 0.94rem;
}
.navlinks a:hover,
.navlinks a.active {
  color: var(--primary);
}
.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}
.icon-btn {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: var(--surface-2);
  color: var(--dark);
  display: grid;
  place-items: center;
  cursor: pointer;
}
.menu-btn {
  display: none;
}
.mobile-menu {
  display: none;
  width: 100%;
  grid-template-columns: 1fr;
  gap: 6px;
  padding: 14px 0 20px;
  background: var(--surface-2);
  border-top: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(13, 23, 28, 0.08);
}
.mobile-menu > a {
  display: block;
  padding: 13px 16px;
  font-weight: 700;
  font-size: 0.98rem;
  border-radius: 12px;
  color: var(--dark);
  transition: 0.2s ease;
}
.mobile-menu > a:hover,
.mobile-menu > a.active {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-2));
  color: var(--primary);
}
.mobile-menu .mobile-home-group {
  margin-bottom: 4px;
}
.mobile-menu .mobile-home-group a {
  font-weight: 700;
}
/* Ensure mobile menu is above content and header stays solid when open */
.site-header:has(.mobile-menu[style*="grid"]) {
  background: var(--surface-2);
}
/* Mobile / tablet icon cluster locked to right corner */
@media (max-width: 1024px) {
  .nav-actions {
    order: 3;
  }
  .brand {
    order: 1;
    flex: 0 1 auto;
    min-width: 0;
  }
  .nav-actions .menu-btn {
    order: 10;
  }
}

.hero {
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  width: 520px;
  height: 520px;
  border: 1px solid color-mix(in srgb, var(--primary) 20%, transparent);
  border-radius: 50%;
  right: -180px;
  top: -180px;
}
.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 54px;
  align-items: center;
}
.hero-visual {
  position: relative;
  min-height: 560px;
}
.hero-visual > img {
  width: 82%;
  height: 500px;
  object-fit: cover;
  border-radius: 36px 36px 140px 36px;
  margin-left: auto;
}
.floating-card {
  position: absolute;
  background: var(--surface-2);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 20px;
  padding: 18px;
}
.float-top {
  top: 28px;
  left: 0;
}
.float-bottom {
  bottom: 20px;
  left: 35px;
  max-width: 250px;
}
.hero-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 28px;
}
.trust-row {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  margin-top: 34px;
}
.trust-item {
  display: flex;
  gap: 9px;
  align-items: center;
  color: var(--muted);
  font-size: 0.92rem;
}
.search-panel {
  margin-top: -10px;
  position: relative;
  z-index: 5;
}
.search-shell {
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 12px;
  padding: 14px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 22px;
  box-shadow: var(--shadow);
}
.search-shell input,
.search-shell select {
  border: 0;
  background: transparent;
  outline: 0;
  padding: 12px 14px;
  color: var(--dark);
}
.page-hero {
  /* =========================================================
     PAGE HEADING BACKGROUND IMAGE BOX
     To use your own image: change the background-image URL
     in each page's <section class="page-hero" style="...">
     Example: set the background image directly in each page's hero section.
     ========================================================= */
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #0d171c; /* fallback if image missing */
  position: relative;
  color: white;
  display: flex;
  align-items: center;
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    105deg,
    rgba(13, 23, 28, 0.88) 0%,
    rgba(13, 23, 28, 0.72) 45%,
    rgba(13, 23, 28, 0.45) 100%
  );
  z-index: 0;
}
.page-hero .container {
  position: relative;
  z-index: 2;
  width: 100%;
}
.page-hero h1 {
  max-width: 850px;
  color: white;
}
.page-hero .lead {
  color: rgba(255, 255, 255, 0.82);
}
.page-hero .eyebrow {
  color: white;
}
.package-card {
  display: flex;
  flex-direction: column;
  min-height: 100%;
}
.package-card .price {
  font-size: 2rem;
  font-weight: 900;
}
.package-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin: 18px 0;
}
.package-meta span {
  padding: 10px;
  border-radius: 12px;
  background: color-mix(in srgb, var(--primary) 7%, transparent);
  font-size: 0.86rem;
}
.process {
  counter-reset: step;
}
.process-item {
  position: relative;
  padding-left: 74px;
  min-height: 90px;
}
.process-item::before {
  counter-increment: step;
  content: counter(step);
  position: absolute;
  left: 0;
  top: 0;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--primary);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 900;
}
.process-item::after {
  content: "";
  position: absolute;
  left: 25px;
  top: 56px;
  bottom: -30px;
  width: 2px;
  background: var(--line);
}
.process-item:last-child::after {
  display: none;
}
.stats-strip {
  background: var(--dark);
  color: white;
  border-radius: 32px;
  padding: 34px;
}
.stat strong {
  display: block;
  font-size: 2.2rem;
  font-family: "Space Grotesk";
}
.stat span {
  color: rgba(255, 255, 255, 0.65);
}
.image-frame {
  overflow: hidden;
  border-radius: 30px;
}
.image-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 46px;
  align-items: center;
}
.bento {
  display: grid;
  grid-template-columns: 1.3fr 0.7fr;
  grid-template-rows: repeat(2, 1fr);
  gap: 18px;
}
.bento .card:first-child {
  grid-row: span 2;
}
.quote {
  font-size: 1.35rem;
  font-weight: 700;
}
.cta-panel {
  background: var(--primary);
  color: white;
  border-radius: 36px;
  padding: 44px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 32px;
  align-items: center;
}
.cta-panel .lead {
  color: rgba(255, 255, 255, 0.8);
}
.filterbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin: 24px 0;
}
.filter-chip {
  border: 1px solid var(--line);
  background: var(--surface-2);
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
}
.filter-chip.active {
  background: var(--primary);
  color: white;
  border-color: var(--primary);
}
.table-wrap {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--surface-2);
}
table {
  width: 100%;
  border-collapse: collapse;
  min-width: 720px;
}
th,
td {
  padding: 15px;
  border-bottom: 1px solid var(--line);
  text-align: left;
}
th {
  font-size: 0.84rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.status {
  font-weight: 800;
  color: var(--primary);
}
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.field.full {
  grid-column: 1/-1;
}
.field label {
  font-weight: 800;
  font-size: 0.9rem;
}
.field input,
.field select,
.field textarea {
  width: 100%;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface-2);
  color: var(--dark);
  outline: none;
}
.field input:focus,
.field select:focus,
.field textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--primary) 15%, transparent);
}
.error {
  color: var(--primary);
  font-size: 0.8rem;
  min-height: 1em;
}
.upload-box {
  border: 2px dashed color-mix(in srgb, var(--primary) 45%, var(--line));
  border-radius: 22px;
  padding: 34px;
  text-align: center;
  background: color-mix(in srgb, var(--primary) 5%, transparent);
}
.timeline {
  display: flex;
  gap: 0;
  overflow: auto;
  padding: 16px 0;
}
.timeline-step {
  min-width: 170px;
  position: relative;
  text-align: center;
}
.timeline-step::before {
  content: "";
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  display: block;
  margin: 0 auto 10px;
}
.timeline-step::after {
  content: "";
  position: absolute;
  height: 2px;
  background: var(--line);
  top: 10px;
  left: 50%;
  right: -50%;
}
.timeline-step:last-child::after {
  display: none;
}
.dashboard {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
  background: var(--surface);
}
.sidebar {
  background: var(--dark);
  color: white;
  padding: 24px;
  position: sticky;
  top: 0;
  height: 100vh;
}
.sidebar .brand {
  margin-bottom: 28px;
}
.side-nav {
  display: grid;
  gap: 6px;
}
.side-nav a {
  padding: 11px 13px;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.72);
  display: flex;
  gap: 10px;
  align-items: center;
}
.side-nav a:hover,
.side-nav a.active {
  background: color-mix(in srgb, var(--primary) 45%, transparent);
  color: white;
}
.dash-main {
  padding: 32px;
}
.dash-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  margin-bottom: 24px;
}
.metric-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}
.metric {
  padding: 22px;
  border-radius: 22px;
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.metric strong {
  font-size: 2rem;
  display: block;
}
.chart-bars {
  height: 220px;
  display: flex;
  gap: 12px;
  align-items: flex-end;
  padding: 20px;
}
.bar {
  flex: 1;
  background: var(--primary);
  border-radius: 10px 10px 4px 4px;
  min-width: 22px;
}
.dash-menu-btn {
  display: none;
}
.footer {
  background: var(--dark);
  color: white;
  padding: 64px 0 20px;
  margin-top: 70px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 40px;
}
.footer a {
  display: block;
  color: rgba(255, 255, 255, 0.68);
  margin: 9px 0;
}
.footer a:hover {
  color: white;
}
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  margin-top: 38px;
  padding-top: 18px;
  display: flex;
  justify-content: space-between;
  color: rgba(255, 255, 255, 0.58);
  font-size: 0.9rem;
}
.newsletter {
  display: flex;
  gap: 8px;
}
.newsletter input {
  min-width: 0;
  flex: 1;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.2);
  background: transparent;
  color: white;
  padding: 12px 15px;
}
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: 0.65s ease;
}
.reveal.visible {
  opacity: 1;
  transform: none;
}
.skeleton {
  position: relative;
  overflow: hidden;
  background: color-mix(in srgb, var(--dark) 8%, var(--surface-2));
  min-height: 16px;
  border-radius: 8px;
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.55),
    transparent
  );
  animation: shimmer 1.4s infinite;
}
@keyframes shimmer {
  to {
    transform: translateX(100%);
  }
}
@media (max-width: 1024px) {
  .navlinks {
    display: none;
  }
  .menu-btn {
    display: grid;
  }
  .nav {
    justify-content: space-between;
    gap: 12px;
  }
  .nav-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
  }
  .nav-actions > a.btn {
    display: none;
  }
  .nav-actions .icon-btn {
    flex-shrink: 0;
  }
  .mobile-menu {
    border-radius: 0 0 18px 18px;
  }
  .hero-grid,
  .split {
    grid-template-columns: 1fr;
  }
  .hero-visual {
    min-height: 470px;
  }
  .hero-visual > img {
    height: 430px;
  }
  .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .grid-3 {
    grid-template-columns: repeat(2, 1fr);
  }
  .bento {
    grid-template-columns: 1fr 1fr;
  }
  .dashboard {
    grid-template-columns: 1fr;
  }
  .sidebar {
    position: fixed;
    left: -280px;
    width: 260px;
    z-index: 2000;
    transition: 0.25s;
  }
  .sidebar.open {
    left: 0;
  }
  .dash-menu-btn {
    display: grid;
  }
  .metric-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .footer-grid {
    grid-template-columns: 1.4fr 1fr 1fr;
  }
  .footer-grid > div:last-child {
    grid-column: 1/-1;
  }
  .cta-panel {
    grid-template-columns: 1fr;
  }
}
@media (max-width: 640px) {
  .container {
    width: min(100% - 22px, var(--container));
  }
  .section {
    padding: 62px 0;
  }
  .nav {
    height: 68px;
    justify-content: space-between;
  }
  .nav-actions {
    gap: 6px;
    margin-left: auto;
  }
  .nav-actions .btn {
    display: none;
  }

  .hero-visual {
    min-height: 390px;
  }
  .hero-visual > img {
    width: 92%;
    height: 355px;
    border-radius: 28px 28px 90px 28px;
  }
  .floating-card {
    padding: 13px;
  }
  .float-top {
    left: 4px;
  }
  .float-bottom {
    left: 12px;
    bottom: 8px;
  }
  .search-shell {
    grid-template-columns: 1fr;
  }
  .grid-2,
  .grid-3:not(.three-item-grid),
  .grid-4,
  .form-grid,
  .footer-grid,
  .bento {
    grid-template-columns: 1fr;
  }
  .bento .card:first-child {
    grid-row: auto;
  }
  .package-meta {
    grid-template-columns: 1fr;
  }
  .stats-strip {
    padding: 24px;
  }
  .stats-strip .grid-4 {
    grid-template-columns: repeat(2, 1fr);
  }
  .cta-panel {
    padding: 30px 24px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }
  .dash-main {
    padding: 18px;
  }
  .dash-top {
    align-items: flex-start;
  }
  .footer-grid > div:last-child {
    grid-column: auto;
  }
  .footer-bottom {
    flex-direction: column;
    gap: 10px;
  }
  .newsletter {
    flex-direction: column;
  }
  .timeline-step {
    min-width: 145px;
  }
  .hero-actions .btn {
    width: 100%;
  }
}
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    animation: none !important;
    transition: none !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}

/* =========================================================
   2026 PAGE-SPECIFIC MEDICAL VISUAL SYSTEM
   Each page intentionally has a different composition/motif.
========================================================= */
body[class*="page-"] main {
  overflow: hidden;
}
body[class*="page-"] section {
  isolation: isolate;
}
body[class*="page-"] section > .container {
  position: relative;
  z-index: 2;
}

/* Home hover dropdown */
.nav-dropdown {
  position: relative;
  display: flex;
  align-items: center;
  height: 100%;
}
.nav-drop-trigger {
  display: flex;
  align-items: center;
  gap: 6px;
  font-weight: 700;
  font-size: 0.94rem;
  height: 100%;
}
.nav-drop-trigger i {
  font-size: 0.72rem;
  transition: transform 0.2s ease;
}
.nav-drop-menu {
  position: absolute;
  top: calc(100% - 8px);
  left: 50%;
  transform: translate(-50%, 10px);
  min-width: 170px;
  padding: 9px;
  background: var(--surface-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: var(--shadow);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: 0.2s ease;
  z-index: 1200;
}
.nav-drop-menu::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: -14px;
  height: 16px;
}
.nav-drop-menu a {
  display: block;
  padding: 11px 13px;
  border-radius: 10px;
  color: var(--dark) !important;
  white-space: nowrap;
}
.nav-drop-menu a:hover,
.nav-drop-menu a.active {
  background: color-mix(in srgb, var(--primary) 12%, var(--surface-2));
  color: var(--primary) !important;
}
.nav-dropdown:hover .nav-drop-menu,
.nav-dropdown:focus-within .nav-drop-menu {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
  transform: translate(-50%, 0);
}
.nav-dropdown:hover .nav-drop-trigger i {
  transform: rotate(180deg);
}
.mobile-home-group {
  display: grid;
  grid-template-columns: auto 1fr 1fr;
  align-items: center;
  gap: 8px;
  padding: 6px 0 10px;
}
.mobile-home-group span {
  font-weight: 900;
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.mobile-home-group a {
  padding: 11px 12px !important;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-align: center;
  background: var(--surface);
  font-weight: 700;
}
.mobile-home-group a:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
}

/* Floating medical art. It never carries readable content, so overlays cannot hide text. */
.medical-motif {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
  z-index: 0;
}
.medical-float {
  position: absolute;
  display: grid;
  place-items: center;
  color: var(--primary);
  filter: drop-shadow(
    0 14px 20px color-mix(in srgb, var(--primary) 22%, transparent)
  );
  opacity: 0.24;
  animation: medicalFloat 6s ease-in-out infinite;
}
.medical-float i {
  font-size: clamp(2.2rem, 5vw, 5.2rem);
}
.mf-1 {
  right: 5%;
  top: 14%;
  animation-duration: 5.6s;
}
.mf-2 {
  right: 26%;
  bottom: 8%;
  animation-delay: -2.2s;
  animation-duration: 7.4s;
}
.mf-3 {
  left: 4%;
  bottom: 14%;
  animation-delay: -4s;
  animation-duration: 6.8s;
}
@keyframes medicalFloat {
  0%,
  100% {
    transform: translate3d(0, 0, 0) rotate(-5deg);
  }
  50% {
    transform: translate3d(0, -18px, 0) rotate(8deg);
  }
}

/* HOME 1 — blood-flow editorial */
.page-home1 .hero {
  background: linear-gradient(
    135deg,
    color-mix(in srgb, var(--primary) 8%, var(--surface)) 0 38%,
    var(--surface) 38% 100%
  );
}

.page-home1 .search-panel .search-shell {
  border-radius: 12px 30px 12px 30px;
}
.page-home1 main > .section:nth-of-type(4) {
  background: linear-gradient(
    90deg,
    transparent,
    color-mix(in srgb, var(--primary) 7%, var(--surface)),
    transparent
  );
}
.page-home1 .package-card:nth-child(even) {
  transform: translateY(18px);
}
.page-home1 .package-card:nth-child(even):hover {
  transform: translateY(11px);
}

/* HOME 2 — capsule/molecule magazine layout */
.page-home2 .hero {
  background: repeating-linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 5%, transparent) 0 1px,
    transparent 1px 72px
  );
}
.page-home2 .hero > .container > .card {
  border-radius: 60px 18px 60px 18px !important;
  /* Fixed dark panel so text stays readable in both light & dark mode */
  background: linear-gradient(
    135deg,
    #0d171c,
    color-mix(in srgb, #0d171c 86%, var(--primary))
  );
  color: #f7fbfa;
  overflow: hidden;
  position: relative;
}
.page-home2 .hero > .container > .card h1,
.page-home2 .hero > .container > .card h2 {
  color: #f7fbfa;
}
.page-home2 .hero .lead {
  color: rgba(247, 251, 250, 0.78);
}
.page-home2 .hero > .container > .card .btn-outline {
  border-color: rgba(247, 251, 250, 0.4);
  color: #f7fbfa;
}
.page-home2 .hero > .container > .card .btn-outline:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: transparent;
}
.page-home2 main > .section-sm:nth-of-type(2) .card {
  border-radius: 999px;
  padding: 28px;
  text-align: center;
  box-shadow: none;
}
.page-home2 main > .section:nth-of-type(3) .split {
  grid-template-columns: 0.78fr 1.22fr;
}
.page-home2 main > .section-sm:nth-of-type(4) .bento {
  transform: rotate(-1deg);
}
.page-home2 main > .section:nth-of-type(5) .grid-4 {
  display: flex;
  overflow: auto;
  padding-bottom: 14px;
  scroll-snap-type: x mandatory;
}
.page-home2 main > .section:nth-of-type(5) .grid-4 > .card {
  min-width: 250px;
  scroll-snap-align: start;
  border-radius: 18px 50px 18px 18px;
}

/* ABOUT — DNA/history */
.page-about .page-hero {
  clip-path: polygon(0 0, 100% 0, 100% 84%, 72% 96%, 0 88%);
  padding-bottom: 130px;
}
.page-about main > .section:nth-of-type(3) .split {
  grid-template-columns: 0.8fr 1.2fr;
}
.page-about main > .section-sm:nth-of-type(2) {
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
}
.page-about main > .section:nth-of-type(4) .card {
  border-left: 5px solid var(--primary);
  border-radius: 8px 28px 28px 8px;
}

/* TESTS — syringe/test-tube visual */
.page-tests .page-hero {
  border-bottom: 8px solid var(--primary);
}
.page-tests .filterbar {
  position: sticky;
  top: 88px;
  z-index: 20;
  background: color-mix(in srgb, var(--surface) 92%, transparent);
  backdrop-filter: blur(14px);
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.page-tests [data-category] {
  border-radius: 8px 30px 8px 30px;
}
.page-tests main > .section:nth-of-type(4) {
  background: linear-gradient(
    180deg,
    transparent,
    color-mix(in srgb, var(--primary) 6%, var(--surface))
  );
}

/* TEST DETAILS — microscope/report sheet */
.page-testdetails .page-hero .container {
  border-left: 6px solid var(--primary);
  padding-left: 34px;
}
.page-testdetails main > .section:nth-of-type(2) .card:first-child {
  border-radius: 6px 42px 6px 42px;
}
.page-testdetails main > .section-sm:nth-of-type(3) {
  background: repeating-linear-gradient(
    0deg,
    transparent 0 31px,
    color-mix(in srgb, var(--line) 65%, transparent) 32px
  );
}

/* HOME COLLECTION — route/house */
.page-collection .page-hero {
  border-radius: 0 0 80px 80px;
}
.page-collection .process-item::after {
  background: repeating-linear-gradient(
    to bottom,
    var(--primary) 0 6px,
    transparent 6px 12px
  );
}
.page-collection main > .section-sm:nth-of-type(3) .card {
  border-radius: 48px 12px 48px 12px;
}
.page-collection main > .section:nth-of-type(6) {
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

/* REPORTS — paper/report dashboard aesthetic */
.page-reports .page-hero {
  clip-path: polygon(0 0, 100% 0, 100% 92%, 92% 100%, 0 100%);
}
.page-reports .timeline {
  background: var(--surface-2);
  border: 1px solid var(--line);
  padding: 28px 18px;
  border-radius: 10px;
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--primary) 14%, transparent);
}
.page-reports main > .section:nth-of-type(4) {
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 7%, var(--surface)) 0 50%,
    var(--surface) 50%
  );
}

/* CERTIFICATIONS — seal/shield */
.page-certs .page-hero {
  border-radius: 0;
}
.page-certs main > .section:nth-of-type(2) .card {
  border-radius: 28px;
  aspect-ratio: auto;
  display: grid;
  align-content: start;
  text-align: left;
  min-height: 0;
}
.page-certs main > .section-sm:nth-of-type(3) {
  background: color-mix(in srgb, var(--primary) 8%, var(--surface));
  clip-path: none;
  padding-block: 72px;
}

/* SERVICES — clinical cross tiles */
.page-services .page-hero {
  background-position: center 38%;
}
.page-services main > .section:nth-of-type(2) .grid > *:nth-child(3n + 2) {
  transform: translateY(24px);
}
.page-services main > .section:nth-of-type(2) .card {
  border-radius: 4px 34px 4px 34px;
}
.page-services main > .section:nth-of-type(4) {
  background: var(--dark);
  color: var(--light);
}
.page-services main > .section:nth-of-type(4) .muted,
.page-services main > .section:nth-of-type(4) .lead {
  color: color-mix(in srgb, var(--light) 68%, transparent);
}

/* SERVICE DETAIL — infusion flow */
.page-servicedetails .page-hero::after {
  content: "";
  position: absolute;
  right: 8%;
  top: 18%;
  width: 3px;
  height: 68%;
  background: var(--primary);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--primary) 14%, transparent);
}
.page-servicedetails main > .section:nth-of-type(2) .split {
  align-items: start;
}
.page-servicedetails main > .section-sm:nth-of-type(5) {
  background: color-mix(in srgb, var(--primary) 7%, var(--surface));
  border-block: 1px solid var(--line);
}

/* PRICING — medicine blister tiles */
.page-pricing .page-hero {
  clip-path: ellipse(85% 100% at 50% 0%);
}
.page-pricing .package-card {
  border-radius: 38px 38px 12px 12px;
  position: relative;
  overflow: hidden;
}
.page-pricing .package-card::after {
  content: "";
  position: absolute;
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 12px solid color-mix(in srgb, var(--primary) 10%, transparent);
  right: -16px;
  top: -16px;
}
.page-pricing main > .section:nth-of-type(4) {
  background: color-mix(in srgb, var(--primary) 6%, var(--surface));
}

/* BLOG — health journal */
.page-blog .page-hero {
  border-bottom-left-radius: 120px;
}
.page-blog main > .section:nth-of-type(2) .card {
  border-radius: 0 30px 0 30px;
}
.page-blog main > .section-sm:nth-of-type(3) {
  background: linear-gradient(
    90deg,
    var(--surface),
    color-mix(in srgb, var(--primary) 8%, var(--surface))
  );
}
.page-blog main > .section:nth-of-type(4) .grid > *:nth-child(odd) {
  transform: rotate(-0.55deg);
}

/* BLOG DETAILS — article / DNA rail */
.page-blogdetails .page-hero {
  border-right: 0;
}
.page-blogdetails main > .section:nth-of-type(2) .container {
  max-width: 980px;
}
.page-blogdetails main > .section:nth-of-type(2) .card {
  border-radius: 4px;
  box-shadow: 12px 12px 0 color-mix(in srgb, var(--primary) 10%, transparent);
}
.page-blogdetails main > .section-sm:nth-of-type(3) {
  border-block: 1px solid var(--line);
}

/* CONTACT — map pin/radar */
.page-contact .page-hero {
  clip-path: polygon(0 0, 100% 0, 100% 88%, 54% 88%, 50% 100%, 46% 88%, 0 88%);
}
.page-contact main > .section:nth-of-type(2) .grid > * {
  border-radius: 50px 12px 50px 12px;
}
.page-contact main > .section:nth-of-type(4) {
  background: radial-gradient(
    circle at 15% 50%,
    color-mix(in srgb, var(--primary) 11%, transparent),
    transparent 34%
  );
}

/* AUTH — secure medical portal */
.page-login main > .section,
.page-register main > .section,
.page-forgot main > .section {
  min-height: calc(100vh - 146px);
  display: grid;
  align-items: center;
  background:
    radial-gradient(
      circle at 85% 15%,
      color-mix(in srgb, var(--primary) 15%, transparent),
      transparent 30%
    ),
    linear-gradient(
      135deg,
      var(--surface) 0 58%,
      color-mix(in srgb, var(--primary) 6%, var(--surface)) 58%
    );
}
.page-login main .card,
.page-register main .card,
.page-forgot main .card {
  border-radius: 12px 54px 12px 54px;
  box-shadow: 24px 24px 0 color-mix(in srgb, var(--primary) 8%, transparent);
}

/* DASHBOARDS — medical command center */
.page-patientdash .dash-main {
  background: radial-gradient(
    circle at 90% 5%,
    color-mix(in srgb, var(--primary) 10%, transparent),
    transparent 28%
  );
}
.page-patientdash .metric:nth-child(odd) {
  border-radius: 30px 8px 30px 8px;
}
.page-admindash .dash-main {
  background: repeating-linear-gradient(
    135deg,
    transparent 0 32px,
    color-mix(in srgb, var(--primary) 3%, transparent) 32px 33px
  );
}
.page-admindash .metric {
  border-top: 4px solid var(--primary);
  border-radius: 8px 8px 24px 24px;
}

/* 404 — broken diagnostic strip */
.page-error404 main > .section {
  min-height: 70vh;
  display: grid;
  place-items: center;
  background: linear-gradient(
    -12deg,
    transparent 49%,
    color-mix(in srgb, var(--primary) 8%, var(--surface)) 49% 54%,
    transparent 54%
  );
}
.page-error404 h1 {
  font-size: clamp(6rem, 18vw, 13rem);
  color: var(--primary);
  text-shadow: 8px 8px 0 color-mix(in srgb, var(--primary) 12%, transparent);
}

/* COMING SOON — heartbeat monitor */
.page-comingsoon main > .section {
  min-height: 72vh;
  display: grid;
  align-items: center;
  background: linear-gradient(
    90deg,
    transparent 0 49.8%,
    color-mix(in srgb, var(--primary) 12%, transparent) 50%,
    transparent 50.2%
  );
}
.page-comingsoon .card {
  border-radius: 60px 12px 60px 12px;
}

/* Text and overlay safety */
.page-hero::before {
  z-index: 0;
}
.page-hero .container {
  z-index: 2;
}
.page-hero .medical-motif {
  z-index: 1;
  opacity: 0.75;
}
.hero .container {
  position: relative;
  z-index: 2;
}
.hero .medical-motif {
  z-index: 1;
}
.card,
.cta-panel,
.search-shell {
  color: var(--dark);
}
.cta-panel,
.stats-strip {
  color: white;
}
.cta-panel h2,
.cta-panel h3,
.stats-strip strong {
  color: inherit;
}

@media (max-width: 1024px) {
  .nav-dropdown {
    display: none;
  }
  .page-home1 .package-card:nth-child(even),
  .page-services main > .section:nth-of-type(2) .grid > *:nth-child(3n + 2),
  .page-blog main > .section:nth-of-type(4) .grid > *:nth-child(odd) {
    transform: none;
  }
  .page-certs main > .section:nth-of-type(2) .card {
    border-radius: 22px;
    aspect-ratio: auto;
  }
  .page-pricing .page-hero {
    clip-path: none;
  }
  .page-contact .page-hero {
    clip-path: none;
  }
}
@media (max-width: 640px) {
  .medical-float {
    opacity: 0.12;
  }
  .medical-float i {
    font-size: 2.5rem;
  }
  .page-about .page-hero,
  .page-reports .page-hero,
  .page-certs main > .section-sm:nth-of-type(3) {
    clip-path: none;
  }
  .page-collection .page-hero {
    border-radius: 0 0 34px 34px;
  }
  .page-home2 .hero > .container > .card {
    border-radius: 30px 10px 30px 10px !important;
    padding: 28px !important;
  }
  .page-home2 main > .section:nth-of-type(3) .split {
    grid-template-columns: 1fr;
  }
  .mobile-home-group {
    grid-template-columns: 1fr 1fr;
  }
  .mobile-home-group span {
    grid-column: 1/-1;
  }
}
@media (prefers-reduced-motion: reduce) {
  .medical-float {
    animation: none !important;
  }
}

/* =========================================================
   RESPONSIVE + PAGE-SPECIFIC CARD SYSTEM — 2026-09 refinement
   ========================================================= */
html,
body {
  max-width: 100%;
  overflow-x: hidden;
}
main,
section,
.container,
.grid,
.split,
.bento,
.card,
.metric,
.table-wrap {
  min-width: 0;
}
.card,
.metric,
.floating-card,
.search-shell,
.cta-panel {
  isolation: isolate;
  overflow-wrap: anywhere;
}
.card img,
.grid img,
.split img {
  width: 100%;
  height: auto;
  max-width: 100%;
}

/* HOME 1 — diagnostic ticket cards */
.page-home1 main .card {
  border-radius: 24px 6px 24px 6px;
  border-inline-start: 4px solid var(--primary);
  box-shadow: 10px 10px 0 color-mix(in srgb, var(--primary) 7%, transparent);
}
.page-home1 .package-card {
  background: linear-gradient(
    145deg,
    var(--surface-2) 0 78%,
    color-mix(in srgb, var(--primary) 7%, var(--surface-2)) 78%
  );
}
.page-home1 .package-card:nth-child(even) {
  border-radius: 6px 24px 6px 24px;
  border-inline-start: 1px solid var(--line);
  border-inline-end: 4px solid var(--primary);
}

/* HOME 2 — soft biomarker panels */
.page-home2 main .card {
  border-radius: 38px 38px 12px 38px;
  border: 0;
  box-shadow: 0 18px 45px color-mix(in srgb, var(--dark) 9%, transparent);
  background: linear-gradient(
    160deg,
    var(--surface-2),
    color-mix(in srgb, var(--primary) 6%, var(--surface-2))
  );
}
.page-home2 main .grid .card:nth-child(2n) {
  border-radius: 12px 38px 38px 38px;
}
.page-home2 main .grid .card:nth-child(3n) {
  border-radius: 38px 12px 38px 38px;
}

/* ABOUT — editorial profile cards */
.page-about main .card {
  border-radius: 0 32px 0 32px;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  box-shadow: none;
  position: relative;
}
.page-about main .card::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 24px;
  width: 5px;
  height: 46px;
  background: var(--primary);
  border-radius: 0 8px 8px 0;
}
.page-about main .grid .card:nth-child(even) {
  border-radius: 32px 0 32px 0;
}

/* TESTS — specimen-label cards */
.page-tests main .card {
  border-radius: 8px;
  border: 1px solid var(--line);
  border-top: 5px solid var(--primary);
  box-shadow: 8px 8px 0 color-mix(in srgb, var(--primary) 8%, transparent);
  position: relative;
}
.page-tests main .card::after {
  content: "";
  position: absolute;
  right: 18px;
  top: 18px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--primary);
  box-shadow: 18px 0 0 color-mix(in srgb, var(--primary) 45%, transparent);
}

/* TEST DETAILS — prescription sheet */
.page-testdetails main .card {
  border-radius: 6px 42px 6px 42px;
  border-inline-start: 5px solid var(--primary);
  box-shadow: 0 18px 36px color-mix(in srgb, var(--dark) 8%, transparent);
}
.page-testdetails main .grid .card:nth-child(2n) {
  border-radius: 42px 6px 42px 6px;
  border-inline-start: 1px solid var(--line);
  border-inline-end: 5px solid var(--primary);
}

/* HOME COLLECTION — route stops */
.page-collection main .card {
  border-radius: 46px 12px 46px 12px;
  border: 1px dashed color-mix(in srgb, var(--primary) 48%, var(--line));
  box-shadow: none;
  background: linear-gradient(
    135deg,
    var(--surface-2),
    color-mix(in srgb, var(--primary) 5%, var(--surface-2))
  );
}
.page-collection main .grid .card:nth-child(2n) {
  border-radius: 12px 46px 12px 46px;
}

/* REPORTS — paper sheets */
.page-reports main .card {
  border-radius: 4px;
  border: 1px solid var(--line);
  box-shadow: 12px 12px 0 color-mix(in srgb, var(--primary) 8%, transparent);
  background: repeating-linear-gradient(
    0deg,
    var(--surface-2) 0 31px,
    color-mix(in srgb, var(--primary) 5%, var(--surface-2)) 32px
  );
}
.page-reports main .grid .card:nth-child(2n) {
  box-shadow: -10px 10px 0 color-mix(in srgb, var(--primary) 6%, transparent);
}

/* CERTIFICATIONS — seal plaques (aligned, no overflow) */
.page-certs main .card {
  border-radius: 24px;
  border: 2px solid color-mix(in srgb, var(--primary) 38%, var(--line));
  box-shadow:
    inset 0 0 0 6px color-mix(in srgb, var(--primary) 5%, transparent),
    0 14px 30px color-mix(in srgb, var(--dark) 8%, transparent);
  aspect-ratio: auto;
  min-height: 0;
  height: auto;
  overflow: hidden;
}
.page-certs main .grid .card:nth-child(2n) {
  border-radius: 24px 40px 24px 40px;
}
.page-certs main .grid,
.page-certs main .split,
.page-certs main .three-item-grid {
  align-items: stretch;
}
.page-certs main .split > * {
  min-width: 0;
}
.page-certs .page-hero {
  border-radius: 0;
}

/* SERVICES — clipped clinical tiles */
.page-services main .card {
  border-radius: 4px 34px 4px 34px;
  border: 0;
  border-inline-start: 6px solid var(--primary);
  box-shadow: 0 18px 40px color-mix(in srgb, var(--dark) 8%, transparent);
}
.page-services main .grid .card:nth-child(2n) {
  border-radius: 34px 4px 34px 4px;
  border-inline-start: 0;
  border-inline-end: 6px solid var(--primary);
}

/* SERVICE DETAILS — infusion panel */
.page-servicedetails main .card {
  border-radius: 20px 20px 54px 20px;
  border: 1px solid var(--line);
  position: relative;
}
.page-servicedetails main .card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 22px;
  width: 52px;
  height: 5px;
  background: var(--primary);
  border-radius: 0 0 8px 8px;
}
.page-servicedetails main .grid .card:nth-child(2n) {
  border-radius: 20px 54px 20px 20px;
}

/* PRICING — medicine blister */
.page-pricing main .card {
  border-radius: 40px 40px 12px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 28%, var(--line));
  box-shadow: 0 18px 45px color-mix(in srgb, var(--dark) 8%, transparent);
  background:
    radial-gradient(
      circle at 88% 14%,
      color-mix(in srgb, var(--primary) 11%, transparent) 0 30px,
      transparent 31px
    ),
    var(--surface-2);
}
.page-pricing main .grid .card:nth-child(2n) {
  border-radius: 12px 40px 40px 12px;
}

/* BLOG — journal notes */
.page-blog main .card {
  border-radius: 0 28px 0 28px;
  border: 1px solid var(--line);
  box-shadow: 10px 10px 0 color-mix(in srgb, var(--primary) 6%, transparent);
}
.page-blog main .grid .card:nth-child(2n) {
  border-radius: 28px 0 28px 0;
  box-shadow: -8px 10px 0 color-mix(in srgb, var(--primary) 5%, transparent);
}

/* BLOG DETAILS — reading paper (aligned) */
.page-blogdetails main .card {
  border-radius: 12px;
  border-inline-start: 6px solid var(--primary);
  box-shadow: 10px 10px 0 color-mix(in srgb, var(--primary) 7%, transparent);
  background: linear-gradient(
    90deg,
    color-mix(in srgb, var(--primary) 4%, var(--surface-2)) 0 44px,
    var(--surface-2) 44px
  );
  overflow: hidden;
  min-width: 0;
}
.page-blogdetails main .grid,
.page-blogdetails main .split,
.page-blogdetails main .three-item-grid {
  align-items: stretch;
}
.page-blogdetails main .split > *,
.page-blogdetails main .grid > * {
  min-width: 0;
}
.page-blogdetails .page-hero {
  border-right: 0;
}

/* CONTACT — map-pin panels */
.page-contact main .card {
  border-radius: 52px 14px 52px 14px;
  border: 1px solid var(--line);
  box-shadow: 0 16px 38px color-mix(in srgb, var(--dark) 8%, transparent);
}
.page-contact main .grid .card:nth-child(2n) {
  border-radius: 14px 52px 14px 52px;
}

/* AUTH — secure access cards */
.page-login main .card {
  border-radius: 12px 56px 12px 56px;
  border-top: 5px solid var(--primary);
}
.page-register main .card {
  border-radius: 56px 12px 56px 12px;
  border-bottom: 5px solid var(--primary);
}
.page-forgot main .card {
  border-radius: 50px 50px 12px 12px;
  border-inline-start: 5px solid var(--primary);
}

/* PATIENT DASHBOARD — health passport */
.page-patientdash .metric {
  border-radius: 30px 8px 30px 8px;
  border: 1px solid var(--line);
  border-inline-start: 5px solid var(--primary);
  box-shadow: none;
}
.page-patientdash .metric:nth-child(even) {
  border-radius: 8px 30px 8px 30px;
  border-inline-start: 1px solid var(--line);
  border-inline-end: 5px solid var(--primary);
}
.page-patientdash .card {
  border-radius: 28px 8px 28px 8px;
}

/* ADMIN DASHBOARD — lab-console modules */
.page-admindash .metric {
  border-radius: 8px 8px 26px 26px;
  border-top: 5px solid var(--primary);
  box-shadow: 0 10px 26px color-mix(in srgb, var(--dark) 6%, transparent);
}
.page-admindash .card {
  border-radius: 8px;
  border-left: 3px solid var(--primary);
}

/* 404 — diagnostic alert */
.page-error404 main .card {
  border-radius: 6px 60px 6px 60px;
  border: 2px dashed color-mix(in srgb, var(--primary) 55%, var(--line));
  box-shadow: 16px 16px 0 color-mix(in srgb, var(--primary) 7%, transparent);
}

/* COMING SOON — monitor panel */
.page-comingsoon main .card {
  border-radius: 64px 12px 64px 12px;
  border: 1px solid color-mix(in srgb, var(--primary) 40%, var(--line));
  box-shadow: 0 0 0 10px color-mix(in srgb, var(--primary) 4%, transparent);
}

/* Exact three-item responsive composition: 2 across + centered 1 beneath. */
@media (max-width: 1024px) {
  .three-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    justify-content: center;
    justify-items: stretch;
  }
  .three-item-grid > :nth-child(3):last-child {
    grid-column: 1 / -1;
    width: calc((100% - 24px) / 2);
    max-width: 100%;
    justify-self: center;
  }
  .hero-grid {
    gap: 34px;
  }
  .hero-visual {
    min-height: 430px;
  }
  .hero-visual > img {
    width: 100%;
    height: 410px;
    margin-inline: auto;
  }
  .section {
    padding: 72px 0;
  }
  .section-sm {
    padding: 48px 0;
  }

  .nav {
    gap: 12px;
  }
  .nav-actions {
    gap: 8px;
  }
  .nav-actions .btn {
    padding-inline: 14px;
  }
  .split {
    gap: 32px;
  }
  .bento {
    gap: 16px;
  }
  .footer-grid {
    gap: 28px;
  }
  .page-services main > .section:nth-of-type(2) .grid > *:nth-child(3n + 2),
  .page-blog main > .section:nth-of-type(4) .grid > *:nth-child(odd) {
    transform: none !important;
  }
}

@media (max-width: 800px) {
  .nav-actions > a.btn {
    display: none;
  }
  .nav-actions {
    gap: 6px;
  }
  .brand {
    font-size: 1.22rem;
  }
  .brand-mark {
    width: 31px;
    height: 31px;
  }
  .hero-grid {
    gap: 26px;
  }
  .hero-visual {
    min-height: 390px;
  }
  .hero-visual > img {
    height: 370px;
  }
  .dash-top {
    flex-wrap: wrap;
  }
  .dash-top > * {
    min-width: 0;
  }
  .table-wrap {
    max-width: 100%;
  }
}

@media (max-width: 640px) {
  h1 {
    font-size: clamp(2.05rem, 11vw, 3.15rem);
    letter-spacing: -0.04em;
  }
  h2 {
    font-size: clamp(1.7rem, 8.2vw, 2.45rem);
  }
  h3 {
    font-size: 1.15rem;
  }
  .lead {
    font-size: 1rem;
  }
  .container {
    width: min(100% - 24px, var(--container));
  }
  .section {
    padding: 54px 0;
  }
  .section-sm {
    padding: 38px 0;
  }

  .page-hero .lead {
    max-width: 100%;
  }

  .hero-grid {
    gap: 24px;
  }
  .hero-visual {
    min-height: 330px;
  }
  .hero-visual > img {
    height: 310px;
    border-radius: 24px 24px 70px 24px;
  }
  .floating-card {
    max-width: 66%;
    font-size: 0.82rem;
    padding: 11px 12px;
  }
  .float-top {
    top: 10px;
  }
  .float-bottom {
    left: 8px;
    bottom: 4px;
  }
  .search-shell {
    padding: 10px;
    border-radius: 16px;
  }
  .search-shell input,
  .search-shell select {
    padding: 11px;
  }
  .card {
    padding: 20px;
  }
  .cta-panel {
    padding: 26px 20px;
    border-radius: 26px;
  }
  .three-item-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    justify-items: stretch;
  }
  .three-item-grid > * {
    min-width: 0;
  }
  .three-item-grid > :nth-child(3):last-child {
    grid-column: 1/-1;
    width: calc((100% - 12px) / 2);
    max-width: 100%;
    justify-self: center;
  }
  .three-item-grid .card {
    padding: 16px;
  }
  .three-item-grid h3 {
    font-size: 1.02rem;
  }
  .three-item-grid .quote {
    font-size: 1rem;
  }
  .three-item-grid .iconbox {
    width: 42px;
    height: 42px;
    border-radius: 12px;
  }
  .grid-4 {
    grid-template-columns: 1fr;
  }
  .stats-strip .grid-4 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .split,
  .bento,
  .form-grid {
    grid-template-columns: 1fr !important;
  }
  .bento .card:first-child {
    grid-row: auto;
  }
  .image-frame {
    border-radius: 22px;
  }
  .image-frame img {
    min-height: 220px;
    object-fit: cover;
  }
  .package-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }
  .package-meta span {
    padding: 8px;
    font-size: 0.78rem;
  }
  .process-item {
    padding-left: 62px;
  }
  .process-item::before {
    width: 44px;
    height: 44px;
  }
  .process-item::after {
    left: 21px;
    top: 48px;
  }
  .timeline {
    padding: 12px 4px;
  }
  .timeline-step {
    min-width: 124px;
    font-size: 0.82rem;
  }
  .metric-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
  }
  .metric {
    padding: 16px;
  }
  .metric strong {
    font-size: 1.45rem;
  }
  .dash-main {
    padding: 14px;
  }
  .dash-top {
    gap: 10px;
    margin-bottom: 18px;
  }
  .dash-top h1 {
    font-size: 1.9rem;
  }
  .footer {
    padding: 48px 0 18px;
    margin-top: 48px;
  }
  .footer-grid {
    gap: 24px;
  }
  .footer-bottom {
    font-size: 0.82rem;
  }
  .page-certs main .card {
    border-radius: 20px !important;
    aspect-ratio: auto !important;
  }
  .page-certs main .grid .card:nth-child(2n) {
    border-radius: 20px 32px 20px 32px !important;
  }
  .page-login main .card,
  .page-register main .card,
  .page-forgot main .card {
    box-shadow: 10px 10px 0 color-mix(in srgb, var(--primary) 7%, transparent);
  }
  .mobile-menu {
    padding: 12px 0 16px;
    gap: 4px;
  }
  .mobile-menu > a {
    padding: 12px 14px;
    font-size: 0.95rem;
    border-radius: 10px;
  }
  .mobile-home-group {
    gap: 6px;
  }
  /* Soften extreme card radii on small screens while keeping page identity */
  .page-home1 main .card {
    border-radius: 18px 6px 18px 6px;
  }
  .page-home1 .package-card:nth-child(even) {
    border-radius: 6px 18px 6px 18px;
  }
  .page-about main .card {
    border-radius: 0 22px 0 22px;
  }
  .page-about main .grid .card:nth-child(even) {
    border-radius: 22px 0 22px 0;
  }
  .page-tests main .card {
    border-radius: 8px;
  }
  .page-collection main .card {
    border-radius: 32px 10px 32px 10px;
  }
  .page-collection main .grid .card:nth-child(2n) {
    border-radius: 10px 32px 10px 32px;
  }
  .page-services main .card {
    border-radius: 4px 24px 4px 24px;
  }
  .page-services main .grid .card:nth-child(2n) {
    border-radius: 24px 4px 24px 4px;
  }
  .page-pricing main .card {
    border-radius: 28px 28px 10px 10px;
  }
  .page-pricing main .grid .card:nth-child(2n) {
    border-radius: 10px 28px 28px 10px;
  }
  .page-blog main .card {
    border-radius: 0 20px 0 20px;
  }
  .page-blog main .grid .card:nth-child(2n) {
    border-radius: 20px 0 20px 0;
  }
  .page-contact main .card {
    border-radius: 36px 12px 36px 12px;
  }
  .page-error404 main .card {
    border-radius: 6px 40px 6px 40px;
  }
  .page-comingsoon main .card {
    border-radius: 40px 10px 40px 10px;
  }
}

@media (max-width: 420px) {
  .container {
    width: min(100% - 18px, var(--container));
  }
  .nav {
    height: 64px;
    justify-content: space-between;
  }
  .nav-actions {
    gap: 5px;
    margin-left: auto;
  }
  .icon-btn {
    width: 38px;
    height: 38px;
  }
  .brand {
    font-size: 1.08rem;
  }
  .brand-mark {
    width: 28px;
    height: 28px;
  }
  .three-item-grid {
    gap: 9px !important;
  }
  .three-item-grid .card {
    padding: 13px;
    border-radius: 16px;
  }
  .three-item-grid h3 {
    font-size: 0.94rem;
    margin-bottom: 10px;
  }
  .three-item-grid p {
    font-size: 0.86rem;
    line-height: 1.45;
  }
  .three-item-grid > :nth-child(3):last-child {
    width: calc((100% - 9px) / 2);
    max-width: 100%;
  }
  .metric-grid {
    grid-template-columns: 1fr;
  }
  .stats-strip .grid-4 {
    grid-template-columns: 1fr 1fr;
  }
  .hero-actions {
    gap: 9px;
  }
  .hero-actions .btn {
    min-height: 44px;
    padding: 10px 15px;
  }
  .mobile-menu > a {
    padding: 11px 12px;
    font-size: 0.92rem;
  }
  .mobile-home-group {
    grid-template-columns: 1fr 1fr;
    gap: 6px;
  }
  .mobile-home-group span {
    grid-column: 1/-1;
    margin-bottom: 2px;
  }
  .mobile-home-group a {
    padding: 10px 8px !important;
    font-size: 0.88rem;
  }
}

/* =========================================================
   RESPONSIVE BUG FIXES — preserve existing design/code
   Fix stacked bento cards inheriting equal desktop row heights.
========================================================= */
@media (max-width: 640px) {
  .bento {
    grid-template-rows: auto !important;
    grid-auto-rows: auto !important;
    align-items: start;
  }
  .bento > .card,
  .bento > * {
    grid-row: auto !important;
    height: auto !important;
    min-height: 0;
    align-self: start;
  }
}

/* Final mobile icon safety + three-item polish */
@media (max-width: 1024px) {
  .nav-actions {
    margin-left: auto !important;
  }
  .icon-btn {
    min-width: 40px;
    min-height: 40px;
  }
}
@media (max-width: 640px) {
  .three-item-grid > :nth-child(3):last-child {
    width: calc((100% - 12px) / 2);
    justify-self: center;
  }
}
@media (max-width: 420px) {
  .nav-actions {
    gap: 4px;
  }
  .icon-btn {
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
  }
}



/* Final targeted responsive alignment fixes */
.home2-quality-icon,
.home2-quality-title i {
  color: var(--primary) !important;
}

.home2-quality-title i {
  display: inline-block;
  margin-right: 8px;
  font-size: 1rem;
  vertical-align: middle;
}

@media (min-width: 641px) and (max-width: 1024px) {
  /* Home 2: third confidence card centered on tablet */
  .page-home2 .home2-quality-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-items: stretch;
  }

  .page-home2 .home2-quality-grid > .card:nth-child(3) {
    grid-column: 1 / -1;
    width: min(100%, calc((100% - 24px) / 2));
    justify-self: center;
  }

  /* Services: third overview card centered on tablet */
  .page-services .service-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-services .service-overview-grid > .service-overview-card:nth-child(3) {
    grid-column: 1 / -1;
    width: min(100%, calc((100% - 24px) / 2));
    justify-self: center;
  }

  /* About: third team card centered on tablet */
  .page-about .team-photo-section .asset-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-about .team-photo-section .asset-photo-grid > .asset-photo-card:nth-child(3) {
    grid-column: 1 / -1;
    width: min(100%, calc((100% - 24px) / 2));
    justify-self: center;
  }

  /* Blog: third featured article centered on tablet */
  .page-blog .blog-photo-section .asset-photo-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-blog .blog-photo-section .asset-photo-grid > .asset-photo-card:nth-child(3) {
    grid-column: 1 / -1;
    width: min(100%, calc((100% - 24px) / 2));
    justify-self: center;
  }
}

/* About Us: center the team section heading on desktop only */
@media (min-width: 1025px) {
  .page-about .team-photo-section .section-heading {
    text-align: center;
    margin-left: auto;
    margin-right: auto;
  }

  .page-about .team-photo-section .section-heading .eyebrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .page-about .team-photo-section .section-heading h2,
  .page-about .team-photo-section .section-heading .lead {
    margin-left: auto;
    margin-right: auto;
  }
}
