:root {
  --red: #c8102e;
  --red-dark: #9e0c24;
  --ink: #1f2937;
  --muted: #6b7280;
  --line: #e5e7eb;
  --bg: #f5f6f8;
  --card: #ffffff;
  --radius: 12px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
}

a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }

.container { max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* Header */
.topbar {
  background: var(--red-dark);
  color: #fff;
  font-size: 14px;
}
.topbar .container {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 24px;
  justify-content: flex-end;
  padding-top: 6px;
  padding-bottom: 6px;
}
.topbar a { color: #fff; }
.topbar span { display: inline-flex; align-items: center; gap: 6px; }
.topbar svg { width: 15px; height: 15px; }

.site-header { background: #fff; border-bottom: 1px solid var(--line); }
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 18px 0;
  color: var(--ink);
}
.brand:hover { text-decoration: none; }
.brand img { width: 72px; height: 72px; }
.brand small {
  display: block;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
}
.brand strong { display: block; font-size: 22px; line-height: 1.25; }

/* Nav */
.nav { background: var(--red); position: sticky; top: 0; z-index: 10; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; }
.nav a, .nav .dropdown > button {
  display: block;
  color: #fff;
  padding: 14px 16px;
  font-size: 15px;
  font-weight: 500;
  background: none;
  border: 0;
  font-family: inherit;
  cursor: pointer;
}
.nav a:hover, .nav a.active, .nav .dropdown > button:hover {
  background: var(--red-dark);
  text-decoration: none;
}
.nav .dropdown { position: relative; }
.nav .dropdown ul {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 240px;
  background: #fff;
  box-shadow: 0 10px 24px rgba(0,0,0,.12);
  border-radius: 0 0 8px 8px;
  flex-direction: column;
  overflow: hidden;
}
.nav .dropdown:hover ul, .nav .dropdown.open ul { display: flex; }
.nav .dropdown ul a { color: var(--ink); padding: 11px 16px; }
.nav .dropdown ul a:hover { background: var(--bg); }

.menu-toggle {
  display: none;
  background: none;
  border: 0;
  color: #fff;
  font-size: 16px;
  font-family: inherit;
  padding: 14px 0;
  cursor: pointer;
  align-items: center;
  gap: 8px;
}
.menu-toggle svg { width: 22px; height: 22px; }

/* Hero */
.hero {
  background:
    radial-gradient(circle at 85% 20%, rgba(255,255,255,.16) 0 120px, transparent 121px),
    radial-gradient(circle at 75% 85%, rgba(255,255,255,.10) 0 70px, transparent 71px),
    linear-gradient(120deg, var(--red-dark), var(--red) 60%, #e2485f);
  color: #fff;
  padding: 56px 0;
}
.hero .container { display: flex; align-items: center; justify-content: space-between; gap: 32px; }
.hero h1 { margin: 0 0 12px; font-size: 32px; line-height: 1.2; }
.hero p { margin: 0; max-width: 560px; opacity: .95; }
.hero .hero-icon { width: 150px; height: 150px; flex-shrink: 0; opacity: .9; }
.hero .actions { margin-top: 22px; display: flex; flex-wrap: wrap; gap: 12px; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 18px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 15px;
  background: #fff;
  color: var(--red);
}
.btn:hover { text-decoration: none; filter: brightness(.96); }
.btn.outline { background: transparent; color: #fff; border: 1.5px solid rgba(255,255,255,.8); }
.btn svg { width: 18px; height: 18px; }

.page-title {
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 28px 0;
}
.page-title h1 { margin: 0; font-size: 26px; }

/* Layout */
.layout {
  display: grid;
  grid-template-columns: 1fr 320px;
  gap: 28px;
  padding: 32px 20px 48px;
}
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.card + .card { margin-top: 20px; }
.card h2 { margin-top: 0; font-size: 20px; }
.card h3 {
  margin: 0 0 14px;
  font-size: 16px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--red);
  display: inline-block;
}

.sidebar .card { padding: 20px; }
.sidebar ul { list-style: none; margin: 0; padding: 0; }

.doc-mini { display: flex; align-items: center; gap: 12px; padding: 8px 0; color: var(--ink); }
.doc-mini + .doc-mini { border-top: 1px solid var(--line); }
.doc-mini:hover { text-decoration: none; color: var(--red); }

.avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: #fde8eb;
  color: var(--red);
  display: grid;
  place-items: center;
  flex-shrink: 0;
}
.avatar svg { width: 24px; height: 24px; }

.info-row { display: flex; gap: 10px; margin-bottom: 10px; }
.info-row svg { width: 18px; height: 18px; flex-shrink: 0; color: var(--red); margin-top: 3px; }

/* Feature tiles */
.tiles { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; margin-top: 20px; }
.tile {
  display: block;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  color: var(--ink);
  transition: transform .15s, box-shadow .15s;
}
.tile:hover { text-decoration: none; transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0,0,0,.07); }
.tile .avatar { margin-bottom: 12px; }
.tile strong { display: block; margin-bottom: 4px; }
.tile span { color: var(--muted); font-size: 14px; }

/* Doctors page */
.doctors { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
.doctor {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  text-align: center;
}
.doctor .photo {
  background: linear-gradient(135deg, #fde8eb, #fff);
  padding: 28px 0 20px;
  color: var(--red);
}
.doctor .photo svg { width: 96px; height: 96px; }
.doctor .body { padding: 18px 20px 22px; }
.doctor h2 { margin: 0 0 4px; font-size: 19px; }
.doctor p { margin: 0; color: var(--muted); }

/* Tables */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 12px 14px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: top; }
th { background: #fbe9ec; color: var(--red-dark); font-weight: 600; }
tr:last-child td { border-bottom: 0; }

.note { color: var(--muted); font-size: 14px; }

/* Vaccine schedule */
.vaccine-table { min-width: 640px; table-layout: fixed; font-size: 14px; }
.vaccine-table th, .vaccine-table td { border: 1px solid var(--line); padding: 0; }
.vaccine-table thead th {
  background: #475569;
  color: #fff;
  height: 120px;
  vertical-align: bottom;
  text-align: center;
  padding: 10px 0;
}
.vaccine-table thead th span {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  white-space: nowrap;
  font-size: 13px;
}
.vaccine-table thead th.corner {
  width: 128px;
  text-align: left;
  padding: 10px 12px;
  font-size: 16px;
}
.vaccine-table tbody th {
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  padding: 9px 12px;
  white-space: nowrap;
}
.vaccine-table tbody tr:nth-child(even) th,
.vaccine-table tbody tr:nth-child(even) td:not(.dose) { background: #f9fafb; }
.vaccine-table td { text-align: center; }
.vaccine-table td.dose { color: #fff; font-weight: 700; letter-spacing: .04em; }
.vaccine-table tr:last-child td { border-bottom: 1px solid var(--line); }

.hepb { background: #2c3a8c; }
.bcg { background: #d9232e; }
.besli { background: #3aa54a; }
.kpa { background: #f39a1e; }
.kkk { background: #f2d500; }
.vaccine-table td.kkk { color: #3f3a00; }
.dortlu { background: #e5177b; }
.opa { background: #8e2a64; }
.td { background: #1b87cf; }
.hepa { background: #9b5fb0; }
.suc { background: #16a394; }
.rapel { background: #94a3b8; }

.legend { list-style: none; padding: 0; margin: 18px 0 12px; display: grid; gap: 6px; font-size: 14px; }
.legend li { display: flex; align-items: flex-start; gap: 8px; }
.legend strong { white-space: nowrap; }
.vaccine-table tbody th, .vaccine-table thead th.corner { position: sticky; left: 0; z-index: 1; }
.legend .swatch { width: 14px; height: 14px; border-radius: 3px; flex-shrink: 0; margin-top: 4px; }

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

/* Footer */
.site-footer { background: #1f2937; color: #d1d5db; padding: 36px 0 20px; font-size: 15px; }
.site-footer .cols { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 28px; }
.site-footer h4 { color: #fff; margin: 0 0 12px; font-size: 16px; }
.site-footer a { color: #d1d5db; }
.site-footer ul { list-style: none; padding: 0; margin: 0; }
.site-footer li { margin-bottom: 6px; }
.site-footer .copy {
  border-top: 1px solid #374151;
  margin-top: 28px;
  padding-top: 16px;
  font-size: 13px;
  color: #9ca3af;
  text-align: center;
}

@media (max-width: 900px) {
  .layout { grid-template-columns: minmax(0, 1fr); }
  .topbar .container { justify-content: center; }
  .tiles { grid-template-columns: 1fr 1fr; }
  .site-footer .cols { grid-template-columns: 1fr; }
  .hero .hero-icon { display: none; }
}

@media (max-width: 720px) {
  .menu-toggle { display: inline-flex; }
  .nav ul.menu { display: none; flex-direction: column; padding-bottom: 8px; }
  .nav.open ul.menu { display: flex; }
  .nav .dropdown ul { position: static; box-shadow: none; background: rgba(0,0,0,.12); border-radius: 0; display: flex; }
  .nav .dropdown ul a { color: #fff; padding-left: 32px; }
  .nav .dropdown ul a:hover { background: var(--red-dark); }
  .brand img { width: 56px; height: 56px; }
  .brand strong { font-size: 18px; }
  .hero { padding: 40px 0; }
  .hero h1 { font-size: 25px; }
  .tiles, .doctors { grid-template-columns: 1fr; }
}
