:root {
  --ink: #233142;
  --muted: #627084;
  --brand: #2f9bb3;
  --brand-dark: #18758b;
  --accent: #e85f72;
  --soft: #f4fbfd;
  --line: #dceaf0;
  --white: #ffffff;
  --shadow: 0 18px 45px rgba(25, 80, 100, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  font-family: Tahoma, Arial, sans-serif;
  line-height: 1.65;
  background: var(--white) url("../img/background-child.png") no-repeat fixed center bottom / min(760px, 90vw);
}

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

a {
  color: var(--brand-dark);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.container {
  width: min(1120px, calc(100% - 32px));
  margin-inline: auto;
}

.topbar {
  background: var(--brand-dark);
  color: var(--white);
  font-size: 0.94rem;
}

.topbar .container {
  display: flex;
  justify-content: flex-end;
  gap: 22px;
  padding: 8px 0;
  flex-wrap: wrap;
}

.topbar a {
  color: var(--white);
}

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

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

.logo img {
  height: 64px;
  width: auto;
}

.nav {
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav a {
  color: #111827;
  padding: 10px 12px;
  border-radius: 8px;
  font-size: 1.02rem;
}

.nav a[aria-current="page"],
.nav a:hover {
  color: var(--brand-dark);
  background: var(--soft);
  text-decoration: none;
}

.menu-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
  cursor: pointer;
}

.menu-toggle span {
  display: block;
  width: 21px;
  height: 2px;
  margin: 5px auto;
  background: var(--ink);
}

.hero {
  min-height: 500px;
  display: grid;
  align-items: center;
  color: var(--white);
  background: linear-gradient(rgba(15, 45, 55, 0.58), rgba(15, 45, 55, 0.58)), url("../img/hero-medical.jpg") center / cover;
}

.hero h1 {
  max-width: 900px;
  margin: 0;
  font-size: clamp(2.1rem, 5vw, 4rem);
  line-height: 1.12;
  text-wrap: balance;
}

.hero p {
  max-width: 760px;
  margin: 20px 0 0;
  font-size: clamp(1.05rem, 2vw, 1.35rem);
}

.page-title {
  background: var(--soft);
  border-bottom: 1px solid var(--line);
  padding: 46px 0;
}

.page-title h1 {
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
}

.section {
  padding: 64px 0;
}

.section.alt {
  background: rgba(244, 251, 253, 0.92);
}

.intro {
  max-width: 860px;
  margin: 0 auto 34px;
  text-align: center;
  font-size: 1.12rem;
}

.grid {
  display: grid;
  gap: 22px;
}

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

.grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.card {
  background: rgba(255, 255, 255, 0.94);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 24px;
}

.service-list {
  list-style: none;
  padding: 0;
  margin: 0;
  columns: 2;
  column-gap: 42px;
}

.service-list li {
  break-inside: avoid;
  margin: 0 0 14px;
  padding-left: 22px;
  position: relative;
}

.service-list li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.75em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
}

.team-card {
  padding: 0;
  overflow: hidden;
}

.team-card img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}

.team-card h2,
.team-card h3 {
  margin: 0;
  padding: 16px 18px 20px;
  font-size: 1rem;
  line-height: 1.35;
}

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

.gallery a {
  overflow: hidden;
  border-radius: 8px;
  background: var(--white);
  box-shadow: var(--shadow);
}

.gallery img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  transition: transform 180ms ease;
}

.gallery a:hover img {
  transform: scale(1.035);
}

.contact-data {
  font-size: 1.05rem;
}

.contact-data h2 {
  margin-top: 0;
}

.map {
  width: 100%;
  min-height: 380px;
  border: 0;
  border-radius: 8px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 18px;
  padding: 12px 18px;
  color: var(--white);
  background: var(--brand-dark);
  border-radius: 8px;
  font-weight: 700;
}

.button:hover {
  background: var(--brand);
  text-decoration: none;
}

.site-footer {
  color: var(--white);
  background: #1f5260;
  padding: 46px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.8fr 1.1fr;
  gap: 28px;
  align-items: start;
}

.site-footer h2 {
  margin: 0 0 14px;
  font-size: 1.2rem;
}

.site-footer a {
  color: var(--white);
}

.footer-photo {
  max-width: 220px;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.25);
}

.footer-map {
  width: 100%;
  min-height: 260px;
  border: 0;
  border-radius: 8px;
}

.copyright {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.24);
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.78);
}

@media (max-width: 860px) {
  .topbar .container {
    justify-content: center;
  }

  .menu-toggle {
    display: block;
  }

  .nav {
    position: absolute;
    left: 16px;
    right: 16px;
    top: 88px;
    display: none;
    flex-direction: column;
    align-items: stretch;
    padding: 14px;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 8px;
    box-shadow: var(--shadow);
  }

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

  .nav a {
    padding: 12px;
  }

  .grid.two,
  .grid.three,
  .footer-grid {
    grid-template-columns: 1fr;
  }

  .service-list {
    columns: 1;
  }

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

@media (max-width: 560px) {
  .topbar .container {
    gap: 8px 14px;
    font-size: 0.86rem;
  }

  .header-inner {
    min-height: 78px;
  }

  .logo img {
    height: 56px;
  }

  .nav {
    top: 78px;
  }

  .hero {
    min-height: 430px;
  }

  .section {
    padding: 46px 0;
  }

  .gallery {
    grid-template-columns: 1fr;
  }
}
