:root {
  --color-dental-red: #c6422f;
  --color-dental-navy: #123f66;
  --color-dental-cream: #fac978;
  --color-dental-yellow: #ffd525;
  --color-dental-blue: #79b5eb;
  --color-dental-pale-blue: #c7dfef;
  --color-dental-steel: #4c8899;
  --color-dental-teal: #006284;
  --color-beauty-cream: #efd6bd;
  --color-beauty-tan: #c3a58a;
  --color-beauty-taupe: #a99079;
  --color-beauty-olive: #81765d;

  --color-ink: var(--color-dental-navy);
  --color-muted: #6f746b;
  --color-primary: var(--color-dental-teal);
  --color-primary-dark: var(--color-dental-navy);
  --color-secondary: var(--color-beauty-taupe);
  --color-highlight: var(--color-dental-yellow);
  --color-coral: var(--color-dental-red);
  --color-surface: #ffffff;
  --color-soft: #eff7fb;
  --color-warm: #f4e2cf;
  --color-line: #d9e4e8;
  --shadow-soft: 0 18px 50px rgba(18, 63, 102, 0.12);
  --shadow-card: 0 10px 26px rgba(18, 63, 102, 0.1);
  --radius: 8px;
  --header-height: 86px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  color: var(--color-ink);
  font-family: "Noto Sans Thai", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: #fff;
  line-height: 1.65;
}

body.is-locked {
  overflow: hidden;
}

img {
  display: block;
  max-width: 100%;
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
select {
  font: inherit;
}

button {
  cursor: pointer;
}

.skip-link {
  position: fixed;
  left: 16px;
  top: -80px;
  z-index: 1000;
  padding: 10px 14px;
  color: #fff;
  background: var(--color-primary-dark);
  border-radius: var(--radius);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 16px;
}

.container {
  width: min(1180px, calc(100% - 40px));
  margin-inline: auto;
  padding-inline: 0;
}

.top-strip {
  color: #fff;
  background: var(--color-primary-dark);
  font-size: 0.86rem;
}

.top-strip-inner,
.top-strip-left,
.top-strip-right {
  display: flex;
  align-items: center;
  gap: 18px;
}

.top-strip-inner {
  justify-content: space-between;
  min-height: 38px;
}

.top-strip a,
.top-strip span {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.top-strip svg {
  width: 15px;
  height: 15px;
}

.language-switch {
  min-width: 44px;
  height: 28px;
  color: #fff;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.25);
  border-radius: 999px;
}

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.95);
  border-bottom: 1px solid rgba(220, 232, 233, 0.9);
  backdrop-filter: blur(18px);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: var(--header-height);
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  flex: 0 0 auto;
}

.brand-logo-image {
  display: block;
  width: 196px;
  height: auto;
  max-height: 44px;
  object-fit: contain;
}

.brand-mark {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  color: #fff;
  font-size: 1.55rem;
  font-weight: 800;
  background: linear-gradient(135deg, var(--color-dental-red), var(--color-primary-dark));
  border-radius: 8px;
  box-shadow: 0 10px 22px rgba(0, 111, 127, 0.22);
  overflow: hidden;
}

.brand-mark-logo img {
  width: 68px;
  height: 68px;
  object-fit: contain;
  transform: translateY(-5px);
}

.brand-text {
  display: grid;
  line-height: 1.12;
}

.brand-text strong {
  font-size: 1.15rem;
  letter-spacing: 0;
}

.brand-text small {
  color: var(--color-muted);
  font-size: 0.78rem;
  text-transform: uppercase;
}

.main-nav {
  display: flex;
  align-items: center;
  gap: 22px;
  color: #334d55;
  font-weight: 600;
  font-size: 0.98rem;
}

.main-nav>a,
.nav-dropdown-toggle {
  position: relative;
  padding-block: 28px;
}

.main-nav>a::after,
.nav-dropdown-toggle::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 22px;
  height: 2px;
  background: var(--color-secondary);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform 0.2s ease;
}

.main-nav>a:hover::after,
.main-nav>a:focus-visible::after,
.nav-dropdown:hover .nav-dropdown-toggle::after,
.nav-dropdown.is-open .nav-dropdown-toggle::after,
.nav-dropdown-toggle:focus-visible::after {
  transform: scaleX(1);
}

.nav-dropdown {
  position: relative;
}

.nav-dropdown-toggle {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: inherit;
  font-weight: 700;
  background: transparent;
  border: 0;
}

.nav-dropdown-toggle svg {
  width: 15px;
  height: 15px;
  stroke-width: 2.4;
  transition: transform 0.18s ease;
}

.nav-dropdown:hover .nav-dropdown-toggle svg,
.nav-dropdown.is-open .nav-dropdown-toggle svg {
  transform: rotate(180deg);
}

.nav-dropdown-menu {
  position: absolute;
  top: calc(100% - 12px);
  left: 50%;
  z-index: 120;
  display: grid;
  grid-template-columns: repeat(2, minmax(230px, 1fr));
  gap: 8px;
  width: min(560px, calc(100vw - 40px));
  padding: 14px;
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid var(--color-line);
  border-top: 3px solid var(--color-secondary);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, 10px);
  transition: opacity 0.16s ease, transform 0.16s ease;
}

.nav-dropdown-menu-compact {
  grid-template-columns: 1fr;
  width: min(360px, calc(100vw - 40px));
}

.nav-dropdown:hover .nav-dropdown-menu,
.nav-dropdown:focus-within .nav-dropdown-menu,
.nav-dropdown.is-open .nav-dropdown-menu {
  opacity: 1;
  pointer-events: auto;
  transform: translate(-50%, 0);
}

.nav-dropdown-menu a {
  display: grid;
  grid-template-columns: 36px 1fr;
  gap: 10px;
  align-items: start;
  padding: 12px;
  color: var(--color-ink);
  background: #fff;
  border: 1px solid transparent;
  border-radius: 8px;
  transition: background 0.16s ease, border-color 0.16s ease, transform 0.16s ease;
}

.nav-dropdown-menu a:hover,
.nav-dropdown-menu a:focus-visible {
  background: var(--color-soft);
  border-color: var(--color-line);
  transform: translateY(-1px);
}

.nav-dropdown-menu i {
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  color: #fff;
  font-size: 0.92rem;
  background: var(--color-primary);
  border-radius: 8px;
}

.nav-dropdown-menu strong,
.nav-dropdown-menu small {
  display: block;
}

.nav-dropdown-menu strong {
  font-size: 0.96rem;
  line-height: 1.35;
}

.nav-dropdown-menu small {
  margin-top: 2px;
  color: var(--color-muted);
  font-size: 0.78rem;
  line-height: 1.45;
}

.header-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.header-actions .icon-button,
.header-actions .menu-toggle,
.header-actions .header-appointment {
  height: 46px;
  min-height: 46px;
}

.header-actions .icon-button,
.header-actions .menu-toggle {
  width: 46px;
  flex: 0 0 46px;
}

.icon-button,
.menu-toggle,
.floating-actions button,
.floating-actions a {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 42px;
  color: var(--color-primary-dark);
  background: #f4fbfb;
  border: 1px solid var(--color-line);
  border-radius: 8px;
}

.icon-button svg,
.menu-toggle svg,
.button svg,
.text-link svg,
.floating-actions svg {
  width: 19px;
  height: 19px;
}

.menu-toggle {
  display: none;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 44px;
  padding: 10px 18px;
  border: 1px solid transparent;
  border-radius: 8px;
  font-weight: 700;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease;
}

.button:hover {
  transform: translateY(-1px);
}

.button-primary {
  color: #fff;
  background: var(--color-primary);
  box-shadow: 0 14px 28px rgba(0, 111, 127, 0.22);
}

.button-primary:hover {
  background: var(--color-primary-dark);
}

.button-outline {
  color: var(--color-primary-dark);
  background: #fff;
  border-color: #b8d7d8;
}

.button-light {
  color: var(--color-primary-dark);
  background: rgba(255, 255, 255, 0.9);
}

.button-small {
  min-height: 38px;
  padding: 8px 14px;
  font-size: 0.92rem;
}

.hero {
  position: relative;
  min-height: 640px;
  overflow: hidden;
  color: #fff;
}

.hero-slider,
.hero-slide,
.hero-shade {
  position: absolute;
  inset: 0;
}

.hero-slider {
  z-index: 0;
  overflow: hidden;
}

.hero-slide {
  background-position: center 24%;
  background-size: cover;
  opacity: 0;
  transform: scale(1.04);
  transition: opacity 0.8s ease, transform 4.8s ease;
}

.hero-slide.is-active {
  opacity: 1;
  transform: scale(1);
}

.hero-shade {
  z-index: 1;
  background:
    linear-gradient(360deg, rgba(18, 63, 102, 0.88) 0%, rgba(18, 63, 102, 0.66) 44%, rgba(18, 63, 102, 0.14) 100%),
    linear-gradient(0deg, rgba(0, 0, 0, 0.28), rgba(0, 0, 0, 0.08));
}

.hero-slider-button {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-grid;
  place-items: center;
  width: 46px;
  height: 54px;
  color: var(--color-primary-dark);
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid rgba(255, 255, 255, 0.75);
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(18, 63, 102, 0.18);
  transform: translateY(-50%);
  transition: background 0.18s ease, transform 0.18s ease;
}

.hero-slider-button:hover,
.hero-slider-button:focus-visible {
  background: #fff;
  transform: translateY(-50%) scale(1.03);
}

.hero-slider-button svg {
  width: 24px;
  height: 24px;
}

.hero-slider-prev {
  left: max(18px, calc((100vw - 1180px) / 2 - 72px));
}

.hero-slider-next {
  right: max(18px, calc((100vw - 1180px) / 2 - 72px));
}

.hero-slider-dots {
  display: none;
}

.hero-slider-dot {
  width: 9px;
  height: 9px;
  padding: 0;
  background: rgba(255, 255, 255, 0.48);
  border: 0;
  border-radius: 999px;
}

.hero-slider-dot.is-active {
  width: 28px;
  background: #fff;
}

.hero-slider.is-single+.hero-shade+.hero-slider-button,
.hero-slider.is-single+.hero-shade+.hero-slider-button+.hero-slider-button,
.hero-slider.is-single~.hero-slider-dots {
  display: none;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: grid;
  align-items: center;
  justify-items: center;
  min-height: 640px;
  padding-block: 176px 76px;
}

.hero-copy {
  width: min(900px, 100%);
  text-align: center;
  transform: translateY(52px);
}

.eyebrow,
.section-kicker {
  margin: 0 0 10px;
  color: var(--color-secondary);
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

.hero h1 {
  margin: 0;
  font-size: clamp(3.1rem, 7vw, 6rem);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero .eyebrow {
  color: var(--color-dental-cream);
}

.hero-lead {
  max-width: 640px;
  margin: 22px auto 0;
  font-size: 1.18rem;
  color: rgba(255, 255, 255, 0.91);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 12px;
  margin-top: 30px;
}

.hero-actions .button {
  width: 170px;
  white-space: nowrap;
}

.search-panel input,
.booking-panel input,
.booking-panel select,
.modal-card input,
.modal-card select {
  width: 100%;
  min-height: 46px;
  color: var(--color-ink);
  background: #fff;
  border: 1px solid #d5e3e5;
  border-radius: 8px;
  outline: 0;
}

.search-panel input:focus,
.booking-panel input:focus,
.booking-panel select:focus,
.modal-card input:focus,
.modal-card select:focus {
  border-color: var(--color-primary);
  box-shadow: 0 0 0 3px rgba(0, 111, 127, 0.12);
}

.quick-actions {
  position: relative;
  z-index: 5;
  margin-top: -20px;
  padding-bottom: 42px;
}

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.quick-action {
  display: grid;
  gap: 6px;
  min-height: 148px;
  padding: 22px;
  text-align: left;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.quick-action:hover,
.quick-action:focus-visible {
  border-color: #c7dce3;
  transform: translateY(-3px);
  box-shadow: 0 18px 34px rgba(18, 63, 102, 0.14);
}

button.quick-action {
  color: inherit;
}

.quick-action span {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  color: #fff;
  background: var(--color-primary);
  border-radius: 8px;
}

.quick-action svg {
  width: 21px;
  height: 21px;
}

.quick-action strong {
  font-size: 1.05rem;
}

.quick-action small {
  color: var(--color-muted);
  font-size: 0.9rem;
}

.section {
  padding: 86px 0;
}

.section-soft {
  background: var(--color-soft);
}

.section-intro {
  padding-top: 40px;
}

.intro-grid,
.section-heading,
.split-layout,
.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.7fr);
  gap: 38px;
  align-items: end;
}

.section-heading {
  margin-bottom: 34px;
}

.contact-layout {
  align-items: start;
}

.section h2 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3.15rem);
  line-height: 1.18;
  letter-spacing: 0;
}

.section-heading p,
.intro-grid p,
.section-note {
  margin: 0;
  color: var(--color-muted);
}

.text-link {
  display: inline-flex;
  align-items: center;
  justify-self: end;
  gap: 7px;
  color: var(--color-primary-dark);
  font-weight: 800;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 34px;
}

.stat {
  padding: 22px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 8px;
}

.stat strong {
  display: block;
  color: var(--color-primary);
  font-size: 2rem;
  line-height: 1;
}

.stat span {
  display: block;
  margin-top: 8px;
  color: var(--color-muted);
}

.service-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.service-card {
  min-height: 234px;
  padding: 28px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.service-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.service-card-icon {
  display: grid;
  place-items: center;
  width: 50px;
  height: 50px;
  color: #fff;
  background: var(--color-primary);
  border-radius: 8px;
}

.service-card-icon svg {
  width: 24px;
  height: 24px;
}

.service-card h3,
.center-card h3,
.package-card h3,
.journey-step h3,
.article-card h3,
.booking-panel h3,
.footer-grid h3 {
  margin: 18px 0 8px;
  line-height: 1.35;
}

.service-card p,
.center-card p,
.package-card p,
.journey-step p,
.contact-copy p,
.site-footer p {
  margin: 0;
  color: var(--color-muted);
}

.center-grid,
.package-grid,
.article-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.center-card,
.package-card,
.article-card {
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  box-shadow: 0 8px 22px rgba(20, 49, 58, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.center-card:hover,
.package-card:hover,
.package-card:focus-within,
.article-card:hover,
.article-card:focus-within {
  border-color: #c7dce3;
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.center-card img {
  width: 100%;
  aspect-ratio: 1.35 / 1;
  object-fit: cover;
}

.center-card img,
.package-card img,
.article-card img {
  transition: transform 0.28s ease;
}

.center-card:hover img,
.package-card:hover img,
.package-card:focus-within img,
.article-card:hover img,
.article-card:focus-within img {
  transform: scale(1.025);
}

.center-card-body,
.package-card-body,
.article-card-body {
  padding: 22px;
}

.segment {
  display: inline-flex;
  justify-self: end;
  padding: 4px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 8px;
}

.segment-button {
  min-width: 88px;
  min-height: 36px;
  color: var(--color-muted);
  background: transparent;
  border: 0;
  border-radius: 6px;
  font-weight: 700;
}

.segment-button.is-active {
  color: #fff;
  background: var(--color-primary);
}

.package-grid {
  grid-template-columns: repeat(4, 1fr);
}

.package-card {
  display: flex;
  flex-direction: column;
}

.package-card[hidden] {
  display: none;
}

.package-card img,
.article-card img {
  width: 100%;
  aspect-ratio: 1.25 / 1;
  object-fit: cover;
}

.package-card-body {
  display: flex;
  flex: 1;
  flex-direction: column;
}

.tag {
  display: inline-flex;
  align-self: flex-start;
  padding: 4px 10px;
  color: var(--color-primary-dark);
  font-size: 0.78rem;
  font-weight: 800;
  background: var(--color-soft);
  border-radius: 999px;
}

.price {
  margin: auto 0 16px;
  color: var(--color-coral);
  font-size: 1.05rem;
  font-weight: 800;
}

.section-split {
  --doctor-accent: var(--color-beauty-taupe);
  --doctor-panel: var(--color-warm);
  background: linear-gradient(90deg, #fff 0%, #fff 52%, var(--doctor-panel) 52%, var(--doctor-panel) 100%);
}

.section-split.is-dental {
  --doctor-accent: var(--color-dental-teal);
  --doctor-panel: var(--color-dental-pale-blue);
}

.split-layout {
  grid-template-columns: minmax(280px, 0.92fr) minmax(0, 1fr);
  align-items: center;
}

.split-media img {
  width: 100%;
  aspect-ratio: 1.05 / 1;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  transition: opacity 0.18s ease;
}

.split-copy p {
  color: var(--color-muted);
}

.doctor-list {
  display: grid;
  gap: 10px;
  margin: 26px 0;
}

.doctor-option {
  width: 100%;
  padding: 14px 16px;
  color: var(--color-ink);
  font: inherit;
  text-align: left;
  background: rgba(255, 255, 255, 0.78);
  border: 1px solid var(--color-line);
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.doctor-option:hover,
.doctor-option:focus-visible {
  border-color: var(--doctor-accent);
  transform: translateY(-2px);
}

.doctor-option:focus-visible {
  outline: 3px solid color-mix(in srgb, var(--doctor-accent) 35%, transparent);
  outline-offset: 2px;
}

.doctor-option.is-active {
  background: rgba(255, 255, 255, 0.94);
  border-color: var(--doctor-accent);
  box-shadow: inset 4px 0 0 var(--doctor-accent), 0 8px 20px rgba(18, 63, 102, 0.08);
}

.doctor-list strong,
.doctor-list span {
  display: block;
}

.doctor-list span {
  color: var(--color-muted);
  font-size: 0.93rem;
}

.journey-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.journey-step {
  min-height: 198px;
  padding: 24px;
  background: #fff;
  border: 1px solid var(--color-line);
  border-radius: 8px;
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s ease;
}

.journey-step:hover {
  border-color: #c7dce3;
  transform: translateY(-3px);
  box-shadow: var(--shadow-card);
}

.journey-step span {
  color: var(--color-secondary);
  font-size: 1.35rem;
  font-weight: 800;
}

.article-card time {
  color: var(--color-secondary);
  font-size: 0.88rem;
  font-weight: 700;
}

.article-card a {
  display: inline-flex;
  margin-top: 12px;
  color: var(--color-primary-dark);
  font-weight: 800;
}

.contact-section {
  color: #fff;
  background: var(--color-primary-dark);
}

.contact-section .section-kicker {
  color: var(--color-dental-cream);
}

.contact-copy p {
  color: rgba(255, 255, 255, 0.82);
}

.contact-list {
  display: grid;
  gap: 12px;
  margin-top: 26px;
}

.contact-list a,
.contact-list span {
  display: inline-flex;
  align-items: flex-start;
  gap: 10px;
  color: rgba(255, 255, 255, 0.94);
}

.contact-list svg {
  flex: 0 0 auto;
  width: 20px;
  height: 20px;
  margin-top: 3px;
  color: var(--color-dental-cream);
}

.booking-panel {
  display: grid;
  gap: 14px;
  padding: 28px;
  color: var(--color-ink);
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.booking-panel h3,
.modal-card h2,
.search-panel h2 {
  margin: 0;
}

.booking-panel label,
.modal-card label,
.search-panel label {
  display: grid;
  gap: 6px;
  color: #334d55;
  font-weight: 700;
}

.booking-panel input,
.booking-panel select,
.modal-card input,
.modal-card select,
.search-panel input {
  padding: 0 13px;
}

.form-note {
  margin: 0;
  color: var(--color-muted);
  font-size: 0.86rem;
}

.site-footer {
  color: rgba(255, 255, 255, 0.82);
  background: #0f304f;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 34px;
  padding: 56px 0 34px;
}

.brand-footer {
  color: #fff;
  margin-bottom: 16px;
}

.footer-grid h3 {
  color: #fff;
  margin-top: 0;
}

.footer-grid a {
  display: block;
  margin-bottom: 9px;
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  padding: 18px 0 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.9rem;
}

.search-layer,
.booking-modal {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(7, 29, 35, 0.66);
}

.search-layer[hidden],
.booking-modal[hidden] {
  display: none;
}

.search-panel,
.modal-card {
  position: relative;
  width: min(680px, 100%);
  max-height: calc(100vh - 40px);
  overflow: auto;
  padding: 30px;
  background: #fff;
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
}

.modal-card {
  width: min(520px, 100%);
}

.modal-card form {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.modal-card p {
  margin: 6px 0 0;
  color: var(--color-muted);
}

.search-panel-close,
.modal-card-close {
  position: absolute;
  top: 18px;
  right: 18px;
}

.search-panel-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 10px;
  margin-top: 8px;
}

.search-results {
  display: grid;
  gap: 10px;
  margin-top: 20px;
}

.search-result {
  padding: 14px 16px;
  background: var(--color-soft);
  border: 1px solid var(--color-line);
  border-radius: 8px;
}

.search-result strong {
  display: block;
}

.toast {
  position: fixed;
  right: 22px;
  bottom: 22px;
  z-index: 350;
  max-width: min(360px, calc(100vw - 44px));
  padding: 14px 16px;
  color: #fff;
  background: var(--color-primary-dark);
  border-radius: 8px;
  box-shadow: var(--shadow-soft);
  transform: translateY(130%);
  transition: transform 0.24s ease;
}

.toast.is-visible {
  transform: translateY(0);
}

.floating-actions {
  position: fixed;
  right: 18px;
  top: 52%;
  z-index: 90;
  display: grid;
  gap: 8px;
  transform: translateY(-50%);
}

.floating-actions button,
.floating-actions a {
  color: #fff;
  background: var(--color-primary);
  border-color: rgba(255, 255, 255, 0.18);
  box-shadow: 0 10px 22px rgba(0, 79, 92, 0.22);
}

@media (max-width: 1100px) {
  .main-nav {
    gap: 16px;
  }

  .header-appointment span {
    display: none;
  }

  .package-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 920px) {
  :root {
    --header-height: 74px;
  }

  .top-strip-inner {
    justify-content: center;
  }

  .top-strip-left {
    display: none;
  }

  .menu-toggle {
    display: inline-grid;
  }

  .main-nav {
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    max-height: calc(100vh - var(--header-height));
    overflow-y: auto;
    padding: 12px 20px 22px;
    background: #fff;
    border-bottom: 1px solid var(--color-line);
    box-shadow: var(--shadow-card);
  }

  .main-nav.is-open {
    display: flex;
  }

  .main-nav>a,
  .nav-dropdown-toggle {
    padding: 13px 0;
    border-bottom: 1px solid var(--color-line);
  }

  .main-nav>a::after,
  .nav-dropdown-toggle::after {
    display: none;
  }

  .nav-dropdown {
    display: grid;
  }

  .nav-dropdown-toggle {
    width: 100%;
    justify-content: space-between;
  }

  .nav-dropdown-menu,
  .nav-dropdown-menu-compact {
    position: static;
    display: none;
    width: 100%;
    grid-template-columns: 1fr;
    margin: 0;
    padding: 8px 0 10px;
    background: transparent;
    border: 0;
    opacity: 1;
    pointer-events: auto;
    transform: none;
    box-shadow: none;
  }

  .nav-dropdown:hover .nav-dropdown-menu {
    display: none;
  }

  .nav-dropdown.is-open .nav-dropdown-menu {
    display: grid;
    transform: none;
  }

  .nav-dropdown:focus-within .nav-dropdown-menu {
    transform: none;
  }

  .nav-dropdown-menu a {
    grid-template-columns: 32px 1fr;
    padding: 10px 0;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--color-line);
    border-radius: 0;
  }

  .nav-dropdown-menu a:hover,
  .nav-dropdown-menu a:focus-visible {
    background: transparent;
    border-color: var(--color-line);
    transform: none;
  }

  .nav-dropdown-menu i {
    width: 32px;
    height: 32px;
    font-size: 0.82rem;
  }

  .nav-dropdown-menu strong {
    font-size: 0.92rem;
  }

  .nav-dropdown-menu small {
    font-size: 0.74rem;
  }

  .hero,
  .hero-content {
    min-height: 590px;
  }

  .hero-slider-prev {
    left: 14px;
  }

  .hero-slider-next {
    right: 14px;
  }

  .hero-content {
    padding-block: 70px 150px;
  }

  .hero-copy {
    transform: translateY(24px);
  }

  .quick-actions-grid,
  .stats-row,
  .journey-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .service-grid,
  .center-grid,
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }

  .intro-grid,
  .section-heading,
  .split-layout,
  .contact-layout {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .text-link,
  .segment {
    justify-self: start;
  }

  .section-split {
    background: var(--doctor-panel);
  }

  .footer-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 680px) {
  .container {
    width: min(100% - 28px, 1180px);
  }

  .top-strip-right {
    width: 100%;
    justify-content: space-between;
    gap: 10px;
  }

  .top-strip-right a {
    font-size: 0.78rem;
  }

  .brand-mark {
    width: 42px;
    height: 42px;
  }

  .brand {
    flex: 1 1 auto;
    min-width: 0;
    gap: 8px;
  }

  .brand-logo-image {
    width: min(172px, 100%);
    max-height: 38px;
  }

  .header-inner {
    gap: 10px;
  }

  .brand-mark-logo img {
    width: 58px;
    height: 58px;
    transform: translateY(-4px);
  }

  .brand-text {
    min-width: 0;
  }

  .brand-text strong {
    font-size: 1rem;
    white-space: nowrap;
  }

  .brand-text small {
    font-size: 0.7rem;
  }

  .header-actions {
    flex: 0 0 auto;
    gap: 6px;
  }

  .header-actions .icon-button,
  .header-actions .menu-toggle {
    width: 42px;
    height: 42px;
    min-height: 42px;
    flex-basis: 42px;
  }

  .header-appointment {
    display: none;
  }

  .hero {
    min-height: clamp(585px, calc(100svh - 54px), 690px);
  }

  .hero-content {
    min-height: clamp(585px, calc(100svh - 54px), 690px);
    padding-block: 54px 188px;
  }

  .hero-copy {
    transform: translateY(92px);
  }

  .hero-slider-button {
    display: none;
  }

  .hero h1 {
    font-size: clamp(2.55rem, 14vw, 4rem);
  }

  .hero-lead {
    font-size: 1rem;
  }

  .hero-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .hero-actions .button {
    width: 100%;
  }

  .quick-actions {
    margin-top: -36px;
    padding-top: 0;
  }

  .quick-actions-grid,
  .stats-row,
  .service-grid,
  .center-grid,
  .package-grid,
  .journey-grid,
  .article-grid,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-action,
  .service-card,
  .journey-step {
    min-height: auto;
  }

  .section {
    padding: 58px 0;
  }

  .section-intro {
    padding-top: 30px;
  }

  .segment {
    width: 100%;
  }

  .segment-button {
    flex: 1;
    min-width: 0;
  }

  .search-panel-row {
    grid-template-columns: 1fr;
  }

  .footer-bottom {
    flex-direction: column;
  }

  .floating-actions {
    display: none;
  }

  .toast {
    right: 12px;
    bottom: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }
}
