:root {
  --ink: #0b2529;
  --deep: #063f3d;
  --teal: #00766f;
  --teal-2: #005f59;
  --mint: #e6f4ef;
  --mist: #f6faf8;
  --paper: #ffffff;
  --line: #d9e8e2;
  --muted: #5f7478;
  --gold: #dca64a;
  --rose: #a2463d;
  --shadow: 0 24px 70px rgba(8, 43, 45, 0.12);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
}
body, input, select, textarea, button { font: inherit; }
a { color: inherit; text-decoration: none; }
p, h1, h2, h3 { margin: 0; }
p { color: var(--muted); line-height: 1.65; }

.top-note {
  display: flex;
  justify-content: center;
  gap: 14px;
  padding: 9px 18px;
  color: rgba(255,255,255,0.82);
  background: var(--deep);
  font-size: 13px;
}
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 16px clamp(18px, 5vw, 72px);
  background: rgba(255,255,255,0.94);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(16px);
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  min-width: max-content;
}
.brand-mark {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: linear-gradient(135deg, var(--teal), var(--deep));
  box-shadow: 0 10px 28px rgba(0, 118, 111, 0.22);
  font-weight: 900;
}
.brand strong { display: block; font-size: 17px; line-height: 1.1; }
.brand small { display: block; color: var(--muted); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; }
.main-nav {
  display: flex;
  justify-content: center;
  gap: 24px;
  color: #496369;
  font-size: 14px;
}
.main-nav a { padding: 8px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover, .main-nav a.active { color: var(--teal); border-color: var(--teal); }
.header-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 16px;
  background: white;
  color: var(--ink);
  cursor: pointer;
  font-weight: 800;
}
.button.primary {
  color: white;
  background: var(--teal);
  border-color: var(--teal);
}
.button.primary:hover { background: var(--teal-2); }
.button.dark { color: white; background: var(--deep); border-color: var(--deep); }
.button.text { border-color: transparent; background: transparent; color: var(--teal); }
.button.full { width: 100%; }

.page-hero {
  padding: clamp(52px, 8vw, 108px) clamp(18px, 5vw, 72px);
  background:
    linear-gradient(90deg, rgba(255,255,255,0.94) 0%, rgba(255,255,255,0.84) 46%, rgba(255,255,255,0.16) 100%),
    url("/hero-clinic.png") center right / cover no-repeat;
  border-bottom: 1px solid var(--line);
}
.home-hero {
  min-height: 720px;
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(360px, 0.7fr);
  align-items: end;
  gap: 44px;
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 32px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 5px 10px;
  color: var(--teal-2);
  background: rgba(255,255,255,0.82);
  font-size: 13px;
  font-weight: 800;
  margin-bottom: 18px;
}
h1 {
  max-width: 860px;
  font-size: clamp(46px, 7.2vw, 88px);
  line-height: 0.95;
  letter-spacing: 0;
}
.page-title h1 {
  max-width: 900px;
  font-size: clamp(42px, 6vw, 72px);
}
.hero-copy > p, .page-title > p {
  max-width: 630px;
  margin-top: 22px;
  font-size: 20px;
}
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 30px;
}
.hero-panel {
  align-self: stretch;
  display: grid;
  align-content: end;
  gap: 12px;
}
.glass-card {
  border: 1px solid rgba(217,232,226,0.9);
  border-radius: 8px;
  padding: 20px;
  background: rgba(255,255,255,0.88);
  box-shadow: var(--shadow);
  backdrop-filter: blur(14px);
}
.glass-card strong { display: block; font-size: 20px; }
.hero-stat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 28px;
}
.hero-stat-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: rgba(255,255,255,0.78);
}
.hero-stat-grid strong { display: block; color: var(--teal); font-size: 21px; }
.hero-stat-grid span { color: var(--muted); font-size: 13px; }

.section {
  padding: clamp(54px, 7vw, 92px) clamp(18px, 5vw, 72px);
}
.section.alt { background: var(--mist); border-block: 1px solid var(--line); }
.section-head {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 24px;
  margin-bottom: 26px;
}
h2 { font-size: clamp(32px, 4.6vw, 58px); line-height: 1; }
h3 { font-size: 21px; margin-bottom: 8px; }
.lead { max-width: 760px; font-size: 19px; }

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}
.service-tile {
  display: grid;
  min-height: 360px;
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
  transition: transform 160ms ease, box-shadow 160ms ease;
}
.service-tile:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.service-image {
  min-height: 160px;
  background:
    linear-gradient(135deg, rgba(0,118,111,0.08), rgba(220,166,74,0.16)),
    url("/hero-clinic.png") center / cover no-repeat;
}
.service-tile:nth-child(2) .service-image { background-position: 70% center; }
.service-tile:nth-child(3) .service-image { background-position: right center; }
.service-body { display: grid; align-content: start; gap: 12px; padding: 22px; }
.service-body small { color: var(--teal); font-weight: 850; }

.split {
  display: grid;
  grid-template-columns: minmax(0, 0.78fr) minmax(360px, 1fr);
  gap: clamp(28px, 5vw, 72px);
  align-items: start;
}
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 22px;
  background: white;
}
.panel.shadow { box-shadow: var(--shadow); }
.stack { display: grid; gap: 14px; }
.check-list {
  display: grid;
  gap: 12px;
  margin-top: 22px;
}
.check-list div {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 10px;
  align-items: start;
}
.check-list span {
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 6px;
  color: white;
  background: var(--teal);
  font-size: 13px;
  font-weight: 900;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.wide { grid-column: 1 / -1; }
label {
  display: grid;
  gap: 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
input, select, textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 10px 12px;
  color: var(--ink);
  background: white;
}
textarea { min-height: 96px; resize: vertical; }
fieldset {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
}
legend { padding: 0 6px; font-weight: 900; }
fieldset label {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 8px 0;
  color: var(--ink);
  font-weight: 550;
}
fieldset input { width: auto; min-height: 0; }
.slot-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  gap: 9px;
  min-height: 54px;
  margin: 18px 0;
}
.slot-button {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 12px;
  background: var(--mist);
  text-align: left;
  cursor: pointer;
}
.slot-button.active {
  border-color: var(--teal);
  background: var(--mint);
  color: var(--teal-2);
}
.status { min-height: 22px; margin-top: 10px; color: var(--muted); font-size: 13px; }
.status.ok { color: var(--teal); }
.status.error { color: var(--rose); }

.doctor-grid, .cards-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}
.doctor-card, .info-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
  background: white;
}
.doctor-avatar {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  background: var(--deep);
  font-weight: 900;
  margin-bottom: 14px;
}
.meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.pill {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 6px 9px;
  color: var(--muted);
  background: var(--mist);
  font-size: 12px;
  font-weight: 800;
}

.portal-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow: hidden;
  background: white;
}
.portal-nav {
  padding: 20px;
  border-right: 1px solid var(--line);
  background: var(--mist);
}
.portal-main { padding: 24px; min-width: 0; }
.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin: 18px 0 24px;
}
.summary-grid div {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 16px;
}
.summary-grid strong { display: block; color: var(--teal); font-size: 30px; }
.summary-grid span { color: var(--muted); }
.timeline { display: grid; gap: 10px; }
.timeline-item {
  display: grid;
  grid-template-columns: 92px 1fr;
  gap: 14px;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.timeline-date {
  display: grid;
  place-items: center;
  border-radius: 7px;
  color: var(--teal-2);
  background: var(--mint);
  font-weight: 900;
  text-align: center;
}
.timeline-date span { display: block; font-size: 12px; }

.faq-list {
  display: grid;
  gap: 12px;
}
.faq-item {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 18px;
  background: white;
}
.hours-list { display: grid; gap: 8px; }
.hours-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.footer {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
  padding: 34px clamp(18px, 5vw, 72px);
  color: rgba(255,255,255,0.78);
  background: var(--deep);
}
.footer .brand small, .footer .brand strong { color: white; }

@media (max-width: 1040px) {
  .site-header { grid-template-columns: 1fr; }
  .main-nav { justify-content: flex-start; overflow: auto; }
  .header-actions { justify-content: flex-start; }
  .home-hero, .split, .portal-shell { grid-template-columns: 1fr; }
  .service-grid, .doctor-grid, .cards-grid { grid-template-columns: 1fr; }
  .portal-nav { border-right: 0; border-bottom: 1px solid var(--line); }
}
@media (max-width: 680px) {
  .top-note { flex-direction: column; text-align: center; gap: 3px; }
  .header-actions, .hero-actions { flex-direction: column; align-items: stretch; }
  .form-grid, .summary-grid, .hero-stat-grid { grid-template-columns: 1fr; }
  h1 { font-size: 44px; }
  .page-hero { background-position: center; }
  .footer { grid-template-columns: 1fr; }
}
