:root {
  --ink: #102033;
  --muted: #5d6b78;
  --line: #dde6ee;
  --surface: #ffffff;
  --soft: #f6faf9;
  --teal: #007c7f;
  --teal-dark: #07575c;
  --green: #5a9367;
  --coral: #df6b57;
  --gold: #c89539;
  --shadow: 0 18px 45px rgba(16, 32, 51, 0.11);
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

html,
body {
  max-width: 100%;
  overflow-x: hidden;
}

body {
  margin: 0;
  font-family: "Segoe UI", Arial, Helvetica, sans-serif;
  color: var(--ink);
  background: var(--surface);
  line-height: 1.6;
}

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

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

.topbar {
  background: var(--ink);
  color: #fff;
  font-size: 14px;
}

.topbar-inner,
.nav-inner,
.section-inner {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
}

.topbar-inner {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 8px 0;
}

.topbar strong {
  color: #ffe1d7;
}

.navbar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: rgba(255, 255, 255, 0.96);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.nav-inner {
  min-height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.brand-row {
  /*flex: 0 1 360px;*/
  min-width: 260px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-weight: 800;
  font-size: clamp(16px, 1.7vw, 20px);
  line-height: 1.15;
  max-width: 100%;
}

.brand-mark {
  flex: 0 0 46px;
  width: 46px;
  height: 46px;
  border-radius: 8px;
  display: grid;
  place-items: center;
  background: var(--teal);
  color: white;
  font-size: 13px;
  letter-spacing: 0.5px;
  line-height: 1;
}

.brand span:last-child {
  display: block;
  max-width: 300px;
  overflow-wrap: anywhere;
}

.nav-inner > .btn {
  flex: 0 0 auto;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}

.menu-toggle:focus-visible {
  outline: 3px solid rgba(0, 124, 127, 0.22);
  outline-offset: 2px;
}

.nav-links {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 700;
  color: #314253;
}

.nav-links a {
  padding: 9px 8px;
  border-radius: 8px;
  white-space: nowrap;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--teal-dark);
  background: #edf7f6;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 11px 18px;
  border-radius: 8px;
  border: 1px solid transparent;
  font-weight: 800;
  text-align: center;
  white-space: normal;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

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

.btn-primary {
  background: var(--teal);
  color: white;
  box-shadow: 0 10px 24px rgba(0, 127, 134, 0.24);
}

.btn-primary:hover {
  background: var(--teal-dark);
}

.btn-light {
  background: #fff;
  color: var(--teal-dark);
}

.btn-outline {
  border-color: var(--line);
  color: var(--ink);
  background: #fff;
}

.hero {
  min-height: 640px;
  position: relative;
  display: grid;
  align-items: center;
  overflow: hidden;
  background: #102033;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(13, 31, 48, 0.94) 0%, rgba(13, 31, 48, 0.82) 42%, rgba(13, 31, 48, 0.26) 76%),
    url("hospital-hero.png") center / cover no-repeat;
}

.hero::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 96px;
  background: linear-gradient(180deg, rgba(255,255,255,0), #fff);
}

.hero-content,
.page-hero-content {
  position: relative;
  z-index: 1;
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  color: #fff;
}

.hero-content {
  padding: 74px 0 96px;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: var(--teal-dark);
  font-size: 14px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.hero .eyebrow,
.page-hero .eyebrow,
.appointment .eyebrow {
  color: #bce9e5;
}

.hero h1 {
  max-width: 760px;
  margin: 0;
  font-size: clamp(38px, 6.2vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  max-width: 650px;
  margin: 22px 0 0;
  color: #e7f1f3;
  font-size: clamp(17px, 2vw, 20px);
}

.hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-top: 32px;
}

.quick-panel {
  position: relative;
  z-index: 2;
  width: min(1180px, calc(100% - 32px));
  margin: -58px auto 0;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
  border-radius: 8px;
  overflow: hidden;
}

.quick-item {
  padding: 26px;
  border-right: 1px solid var(--line);
}

.quick-item:last-child {
  border-right: 0;
}

.quick-item span {
  color: var(--teal);
  font-weight: 900;
  font-size: 26px;
  line-height: 1;
}

.quick-item h3 {
  margin: 12px 0 4px;
  font-size: 18px;
}

.quick-item p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
}

section {
  padding: 84px 0;
}

.page-hero {
  min-height: 310px;
  display: grid;
  align-items: center;
  background:
    linear-gradient(90deg, rgba(16, 32, 51, 0.95), rgba(0, 127, 134, 0.74)),
    url("hospital-hero.png") center / cover no-repeat;
}

.page-hero h1,
.section-head h2,
.appointment h2 {
  margin: 0;
  font-size: clamp(31px, 4.4vw, 48px);
  line-height: 1.12;
  letter-spacing: 0;
}

.page-hero p {
  max-width: 680px;
  margin: 16px 0 0;
  color: #e7f1f3;
  font-size: 18px;
}

.section-head {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 28px;
  margin-bottom: 34px;
}

.section-head p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
}

.grid-2 {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 46px;
  align-items: center;
}

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

.grid-4 {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 18px;
}

.grid-2 > *,
.grid-3 > *,
.grid-4 > *,
.appointment-grid > *,
.contact-grid > *,
.footer-grid > *,
form > * {
  min-width: 0;
}

.copy p {
  color: var(--muted);
  margin: 0 0 18px;
}

.band {
  background: var(--soft);
}

.card,
.department,
.service,
.doctor,
.package,
.post,
.feature {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.card,
.department,
.service,
.doctor,
.package,
.post {
  padding: 24px;
  min-height: 100%;
  box-shadow: 0 10px 26px rgba(16, 32, 51, 0.05);
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.card:hover,
.department:hover,
.service:hover,
.doctor:hover,
.package:hover,
.post:hover {
  transform: translateY(-3px);
  border-color: #b9d5d5;
  box-shadow: 0 18px 38px rgba(16, 32, 51, 0.1);
}

.feature {
  display: flex;
  gap: 14px;
  padding: 18px;
}

.feature b,
.department-icon,
.avatar {
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: white;
  font-weight: 900;
}

.feature b {
  flex: 0 0 38px;
  height: 38px;
  background: var(--teal);
  font-size: 18px;
}

.department-icon {
  width: 48px;
  height: 48px;
  margin-bottom: 18px;
  background: var(--teal);
}

.avatar {
  width: 76px;
  height: 76px;
  margin-bottom: 18px;
  background: linear-gradient(135deg, var(--teal), var(--green));
  font-size: 26px;
}

.card h3,
.department h3,
.doctor h3,
.service h3,
.package h3,
.post h3,
.feature h3 {
  margin: 0 0 6px;
  font-size: 19px;
  line-height: 1.25;
}

.card p,
.department p,
.doctor p,
.service p,
.package p,
.post p,
.feature p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
  line-height: 1.62;
  overflow-wrap: anywhere;
}

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

.stat {
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft);
}

.stat strong {
  display: block;
  font-size: 30px;
  color: var(--teal-dark);
  line-height: 1;
}

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

.service {
  border-top: 4px solid var(--green);
}

.doctor-meta,
.tag-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 16px;
}

.doctor[id] {
  scroll-margin-top: 110px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 5px 10px;
  border-radius: 999px;
  background: #eef5f7;
  color: #385261;
  font-size: 13px;
  font-weight: 700;
}

.appointment {
  background: var(--ink);
  color: white;
}

.appointment-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 42px;
  align-items: start;
}

.appointment p {
  color: #dbe7ea;
  margin: 0 0 24px;
}

.emergency-box {
  border-left: 5px solid var(--coral);
  padding: 20px 22px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 8px;
}

.emergency-box strong {
  display: block;
  font-size: 28px;
  color: #fff;
  overflow-wrap: anywhere;
}

form {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  padding: 24px;
  border-radius: 8px;
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 7px;
  font-weight: 800;
  font-size: 14px;
}

input,
select,
textarea {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  font: inherit;
  color: var(--ink);
  background: #fff;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--teal);
  box-shadow: 0 0 0 4px rgba(0, 124, 127, 0.12);
}

textarea {
  min-height: 112px;
  resize: vertical;
}

.full {
  grid-column: 1 / -1;
}

.price {
  margin: 18px 0;
  font-size: 30px;
  font-weight: 900;
  color: var(--teal-dark);
}

.package ul,
.check-list {
  margin: 14px 0 0;
  padding-left: 20px;
  color: var(--muted);
}

.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 36px;
  align-items: stretch;
}

.contact-list {
  display: grid;
  gap: 14px;
}

.map {
  min-height: 360px;
  border-radius: 8px;
  border: 1px solid var(--line);
  position: relative;
  overflow: hidden;
  background: #eef5f7;
}

.map iframe {
  width: 100%;
  height: 100%;
  min-height: 360px;
  display: block;
  border: 0;
}

.map-link {
  position: absolute;
  right: 14px;
  bottom: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 9px 13px;
  border-radius: 8px;
  background: var(--teal);
  color: white;
  font-size: 13px;
  font-weight: 800;
  text-align: center;
  box-shadow: 0 10px 24px rgba(16, 32, 51, 0.22);
}

.notice {
  display: none;
  padding: 14px 16px;
  border-radius: 8px;
  background: #e8f5f2;
  color: var(--teal-dark);
  font-weight: 800;
}

.notice.show {
  display: block;
}

footer {
  background: #0b1724;
  color: #dce8ed;
  padding: 44px 0 24px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 34px;
}

footer h3 {
  color: white;
  margin: 0 0 12px;
  font-size: 18px;
}

footer p,
footer a {
  color: #b8c7cf;
  margin: 0 0 8px;
  display: block;
  font-size: 14px;
}

.copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.12);
  padding-top: 18px;
  color: #96a9b3;
  font-size: 14px;
}

@media (max-width: 980px) {
  .topbar-inner,
  .nav-inner,
  .section-inner,
  .hero-content,
  .page-hero-content,
  .quick-panel {
    width: min(100% - 28px, 1180px);
  }

  .nav-inner {
    align-items: stretch;
    padding: 16px 0;
    flex-direction: column;
    gap: 0;
    position: relative;
  }

  .brand-row {
    width: 100%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
  }

  .brand span:last-child {
    max-width: min(560px, calc(100vw - 122px));
  }

  .menu-toggle {
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border-color: #cfe0e3;
    background: #f7fbfb;
    box-shadow: 0 8px 18px rgba(16, 32, 51, 0.08);
  }

  .nav-links {
    display: none;
    width: 100vw;
    flex-direction: column;
    align-items: stretch;
    gap: 6px;
    margin: 16px calc(50% - 50vw) 0;
    padding: 16px max(14px, calc((100vw - 1180px) / 2 + 14px));
    border-top: 1px solid var(--line);
    border-bottom: 1px solid var(--line);
    background: linear-gradient(180deg, #ffffff 0%, #f5fbfa 100%);
    box-shadow: 0 20px 36px rgba(16, 32, 51, 0.14);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links a {
    width: 100%;
    padding: 13px 16px;
    border: 1px solid transparent;
    white-space: normal;
    background: rgba(255, 255, 255, 0.72);
  }

  .nav-links a:hover,
  .nav-links a.active {
    border-color: #cfe5e3;
    background: #e9f7f5;
  }

  .menu-toggle[aria-expanded="true"] {
    border-color: var(--teal);
    background: var(--teal);
    color: #fff;
  }

  .nav-inner > .btn {
    display: none;
    width: 100vw;
    margin: 0 calc(50% - 50vw);
    border-radius: 0;
    min-height: 52px;
    box-shadow: none;
  }

  .nav-links.open + .btn {
    display: inline-flex;
  }

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

  .grid-2,
  .appointment-grid,
  .contact-grid {
    grid-template-columns: 1fr;
  }

  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .topbar {
    font-size: 13px;
  }

  .topbar-inner,
  .nav-inner,
  .section-inner,
  .hero-content,
  .page-hero-content,
  .quick-panel {
    width: min(100% - 24px, 1180px);
  }

  .topbar-inner {
    align-items: flex-start;
    flex-direction: column;
    gap: 6px;
  }

  .hero {
    min-height: 560px;
  }

  .brand {
    font-size: 15px;
    gap: 9px;
  }

  .brand span:last-child {
    max-width: calc(100vw - 118px);
  }

  .brand-mark {
    flex-basis: 42px;
    width: 42px;
    height: 42px;
    font-size: 12px;
  }

  .hero::before {
    background:
      linear-gradient(90deg, rgba(13, 31, 48, 0.96), rgba(13, 31, 48, 0.78)),
      url("hospital-hero.png") center / cover no-repeat;
  }

  .hero p {
    font-size: 17px;
  }

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

  .hero-actions .btn,
  .tag-row .btn,
  form .btn {
    width: 100%;
  }

  .quick-panel,
  .grid-3,
  .grid-4,
  .stats,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .quick-item {
    border-right: 0;
    border-bottom: 1px solid var(--line);
  }

  .quick-item:last-child {
    border-bottom: 0;
  }

  form {
    grid-template-columns: 1fr;
    padding: 18px;
  }

  section {
    padding: 64px 0;
  }

  .card,
  .department,
  .service,
  .doctor,
  .package,
  .post {
    padding: 20px;
  }

  .feature {
    padding: 16px;
  }

  .emergency-box {
    padding: 16px 18px;
  }

  .emergency-box strong {
    font-size: 22px;
  }

  .map {
    min-height: 300px;
  }

  .map iframe {
    min-height: 300px;
  }
}

@media (max-width: 380px) {
  .brand {
    font-size: 14px;
  }

  .brand-mark {
    flex-basis: 38px;
    width: 38px;
    height: 38px;
  }

  .menu-toggle {
    width: 40px;
    height: 40px;
  }

  .hero h1 {
    font-size: 34px;
  }

  .page-hero h1,
  .section-head h2,
  .appointment h2 {
    font-size: 29px;
  }
}
