/* =============================================
   ДНК-ЛАБС — Main Stylesheet
   Design: Modern Medical / Clinical
   Font:   Inter (Google Fonts)
   Palette: Deep Blue + Teal accent
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
  --primary:        #1D4ED8;
  --primary-dark:   #1E3A8A;
  --primary-light:  #3B82F6;
  --accent:         #0D9488;
  --accent-light:   #14B8A6;
  --bg:             #F8FAFC;
  --bg-subtle:      #F1F5F9;
  --white:          #FFFFFF;
  --text:           #0F172A;
  --text-muted:     #64748B;
  --border:         #E2E8F0;
  --border-strong:  #CBD5E1;
  --card-shadow:    0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.04);
  --card-shadow-hover: 0 4px 12px rgba(0,0,0,.10), 0 12px 32px rgba(0,0,0,.08);
  --radius:         8px;
  --radius-lg:      14px;
  --nav-height:     52px;
  --focus-ring:     0 0 0 3px rgba(29,78,216,.3);
  --transition:     150ms ease;
  --transition-md:  220ms ease;
  --container:      1200px;
}

/* ── RESET ───────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: 'Inter', 'Segoe UI', system-ui, sans-serif;
  font-size: 15px;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

a {
  color: var(--primary);
  text-decoration: none;
  transition: color var(--transition);
}
a:hover { color: var(--primary-dark); text-decoration: underline; }

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
  outline: none;
  box-shadow: var(--focus-ring);
  border-radius: 4px;
}

ul { list-style: none; }
img { max-width: 100%; display: block; }

h1, h2, h3, h4, h5 {
  font-family: 'Inter', system-ui, sans-serif;
  font-weight: 700;
  line-height: 1.2;
  color: var(--text);
  letter-spacing: -0.02em;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

/* ── SKIP LINK ───────────────────────────────── */
.skip-link {
  position: absolute;
  top: -100%;
  left: 16px;
  background: var(--primary);
  color: #fff;
  padding: 8px 16px;
  border-radius: 0 0 var(--radius) var(--radius);
  font-size: 14px;
  font-weight: 600;
  z-index: 9999;
  transition: top var(--transition);
  text-decoration: none;
}
.skip-link:focus { top: 0; color: #fff; text-decoration: none; }

/* ── HEADER ──────────────────────────────────── */
.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--border);
  box-shadow: 0 1px 8px rgba(0,0,0,.06);
}

.header-top {
  display: flex;
  align-items: center;
  gap: 24px;
  padding-top: 14px;
  padding-bottom: 14px;
}

.logo-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  flex-shrink: 0;
}
.logo-wrap:hover { text-decoration: none; }

.logo-circle {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  font-weight: 800;
  font-size: 14px;
  letter-spacing: -0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.logo-text strong {
  display: block;
  font-size: 17px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.03em;
  line-height: 1.1;
}
.logo-text span {
  font-size: 11px;
  color: var(--text-muted);
  font-weight: 400;
  letter-spacing: 0.02em;
  text-transform: uppercase;
}

.header-contacts {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.header-contacts svg { color: var(--primary); flex-shrink: 0; }

.header-search {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1px solid var(--border-strong);
  border-radius: 8px;
  overflow: hidden;
  background: var(--bg);
  flex-shrink: 0;
}
.header-search input {
  border: none;
  background: transparent;
  padding: 8px 14px;
  font-size: 13px;
  font-family: inherit;
  color: var(--text);
  width: 200px;
  outline: none;
}
.header-search input::placeholder { color: var(--text-muted); }
.header-search button {
  background: transparent;
  border: none;
  padding: 8px 12px;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  transition: color var(--transition);
}
.header-search button:hover { color: var(--primary); }

/* ── NAV ─────────────────────────────────────── */
.main-nav {
  background: var(--primary-dark);
  border-top: 1px solid rgba(255,255,255,.08);
}

.nav-inner {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  display: flex;
  align-items: stretch;
  height: var(--nav-height);
}

.nav-item {
  position: relative;
  display: flex;
  align-items: stretch;
}

.nav-item > a {
  display: flex;
  align-items: center;
  padding: 0 18px;
  color: rgba(255,255,255,.85);
  font-size: 13.5px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: background var(--transition), color var(--transition);
  letter-spacing: 0.01em;
  border-bottom: 3px solid transparent;
}
.nav-item > a:hover {
  background: rgba(255,255,255,.08);
  color: #fff;
  text-decoration: none;
  border-bottom-color: var(--accent-light);
}
.nav-item > a.active,
.nav-item > a[aria-current="page"] {
  color: #fff;
  background: rgba(255,255,255,.1);
  border-bottom-color: var(--accent-light);
}

/* Dropdown */
.has-dropdown { position: relative; }
.dropdown {
  display: none;
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) var(--radius);
  box-shadow: 0 8px 32px rgba(0,0,0,.12);
  min-width: 260px;
  z-index: 200;
  padding: 6px 0;
}
.has-dropdown:hover .dropdown { display: block; }
.dropdown a {
  display: block;
  padding: 9px 20px;
  font-size: 13.5px;
  color: var(--text);
  font-weight: 500;
  border-left: 3px solid transparent;
  transition: all var(--transition);
}
.dropdown a:hover {
  background: var(--bg-subtle);
  color: var(--primary);
  border-left-color: var(--primary);
  text-decoration: none;
}

/* Sub-nav strip */
.sub-nav {
  background: linear-gradient(90deg, var(--primary), var(--accent));
  padding: 7px 0;
  font-size: 12px;
  font-weight: 600;
  color: rgba(255,255,255,.9);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── PAGE HERO ───────────────────────────────── */
.page-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 60%, var(--accent) 100%);
  padding: 44px 0 40px;
  position: relative;
  overflow: hidden;
}
.page-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='30' cy='30' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.page-hero .container { position: relative; }
.page-hero h1 {
  color: #fff;
  font-size: clamp(22px, 4vw, 32px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

/* ── HOME HERO ───────────────────────────────── */
.home-hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 55%, var(--accent) 100%);
  padding: 80px 0 72px;
  position: relative;
  overflow: hidden;
}
.home-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.04'%3E%3Ccircle cx='40' cy='40' r='2'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.home-hero .container { position: relative; }
.home-hero h1 {
  color: #fff;
  font-size: clamp(28px, 5vw, 46px);
  font-weight: 800;
  letter-spacing: -0.04em;
  margin-bottom: 20px;
  max-width: 700px;
}
.home-hero .lead {
  color: rgba(255,255,255,.82);
  font-size: 16px;
  line-height: 1.7;
  max-width: 640px;
  font-weight: 400;
}
.home-hero .lead strong { color: #fff; font-weight: 600; }

/* ── MAIN CONTENT ────────────────────────────── */
.page-body {
  padding: 48px 0 64px;
  background: var(--bg);
  flex: 1;
}

/* ── STATS BAR ───────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.stat-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  position: relative;
  overflow: hidden;
  transition: box-shadow var(--transition-md), transform var(--transition-md);
}
.stat-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.stat-item:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}

.stat-num {
  display: block;
  font-size: 36px;
  font-weight: 800;
  color: var(--primary);
  letter-spacing: -0.04em;
  line-height: 1;
  margin-bottom: 8px;
}
.stat-label {
  font-size: 13px;
  color: var(--text-muted);
  font-weight: 500;
  line-height: 1.4;
}

/* ── SECTION TITLE ───────────────────────────── */
.section-title {
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: -0.02em;
  margin: 40px 0 16px;
  padding-left: 14px;
  border-left: 4px solid var(--accent);
}

/* ── CARDS ───────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px;
  margin-bottom: 20px;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition-md);
}
.card:hover { box-shadow: var(--card-shadow-hover); }

.card-title {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 16px;
  letter-spacing: -0.01em;
}

/* ── INFO ROWS ───────────────────────────────── */
.info-row {
  display: flex;
  gap: 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
}
.info-row:last-child { border-bottom: none; }

.info-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-muted);
  min-width: 190px;
  flex-shrink: 0;
  padding-top: 1px;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 11.5px;
}
.info-value {
  font-size: 14px;
  color: var(--text);
  line-height: 1.5;
}

/* ── SERVICES GRID ───────────────────────────── */
.services-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 40px;
}

.service-item {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 16px 20px;
  text-align: center;
  box-shadow: var(--card-shadow);
  transition: all var(--transition-md);
  cursor: default;
}
.service-item:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
  border-color: var(--primary-light);
}
.service-item:hover .service-icon { background: var(--primary); color: #fff; }

.service-icon {
  width: 52px;
  height: 52px;
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 14px;
  transition: all var(--transition-md);
}
.service-item p {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

/* ── BUTTONS ─────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  border: none;
  text-decoration: none;
  transition: all var(--transition);
  min-height: 40px;
  letter-spacing: 0.01em;
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: #fff;
  box-shadow: 0 2px 8px rgba(29,78,216,.3);
}
.btn-primary:hover {
  background: linear-gradient(135deg, var(--primary-dark), #172554);
  color: #fff;
  box-shadow: 0 4px 16px rgba(29,78,216,.4);
  transform: translateY(-1px);
}

.btn-accent {
  background: linear-gradient(135deg, var(--accent), #0f766e);
  color: #fff;
  box-shadow: 0 2px 8px rgba(13,148,136,.3);
}
.btn-accent:hover {
  background: linear-gradient(135deg, #0f766e, #115e59);
  color: #fff;
  box-shadow: 0 4px 16px rgba(13,148,136,.4);
  transform: translateY(-1px);
}

.btn-sm { padding: 6px 14px; font-size: 12.5px; min-height: 32px; }

/* ── TABLES ──────────────────────────────────── */
.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 14px;
}
.data-table th {
  background: var(--bg-subtle);
  padding: 12px 16px;
  text-align: left;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border-strong);
}
.data-table td {
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.data-table tbody tr:last-child td { border-bottom: none; }
.data-table tbody tr:hover { background: var(--bg-subtle); }

/* ── PRICE TABLE ─────────────────────────────── */
.price-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
}
.price-table th {
  background: var(--bg-subtle);
  padding: 11px 16px;
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border-strong);
}
.price-table th:last-child { text-align: right; }
.price-table th:nth-child(2),
.price-table td:nth-child(2) { white-space: nowrap; }
.price-table th:nth-child(3),
.price-table td:nth-child(3) { white-space: nowrap; text-align: center; }
.price-table td {
  padding: 11px 16px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.price-table tbody tr:last-child td { border-bottom: none; }
.price-table tbody tr:hover { background: #F0F7FF; }
.price-val {
  text-align: right;
  font-weight: 700;
  color: var(--primary);
  white-space: nowrap;
  font-size: 14px;
}
.price-subhead {
  background: linear-gradient(90deg, var(--bg-subtle), var(--white)) !important;
  font-size: 11.5px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 10px 16px !important;
  border-bottom: 1px solid var(--border) !important;
}

/* Price category buttons */
.price-cat {
  padding: 7px 16px;
  border-radius: 20px;
  border: 1.5px solid var(--border-strong);
  background: var(--white);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: inherit;
  color: var(--text-muted);
  transition: all var(--transition);
}
.price-cat:hover { border-color: var(--primary); color: var(--primary); }
.price-cat.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* ── CONTACT GRID ────────────────────────────── */
.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
@media (max-width: 768px) { .contact-grid { grid-template-columns: 1fr; } }

/* ── CONTACT FORM ────────────────────────────── */
.contact-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.contact-form label {
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: -6px;
}
.contact-form input,
.contact-form textarea {
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  padding: 10px 14px;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: border-color var(--transition), box-shadow var(--transition);
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--primary-light);
  box-shadow: var(--focus-ring);
}
.contact-form textarea { min-height: 120px; resize: vertical; }

/* ── MAP PLACEHOLDER ─────────────────────────── */
.map-placeholder {
  height: 200px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 14px;
  font-weight: 500;
  gap: 8px;
}

/* ── FOOTER ──────────────────────────────────── */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,.8);
  padding: 48px 0 0;
}

.footer-inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 40px;
  padding-bottom: 40px;
}
@media (max-width: 768px) {
  .footer-inner { grid-template-columns: 1fr; gap: 28px; }
}

.footer-col h4 {
  color: #fff;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-bottom: 16px;
}
.footer-col p {
  font-size: 13.5px;
  line-height: 1.7;
  color: rgba(255,255,255,.65);
}
.footer-col ul li { margin-bottom: 8px; }
.footer-col ul a {
  color: rgba(255,255,255,.7);
  font-size: 13.5px;
  transition: color var(--transition);
}
.footer-col ul a:hover { color: #fff; text-decoration: none; }

.footer-contact-line {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13.5px;
  color: rgba(255,255,255,.75);
  margin-bottom: 6px;
}
.footer-contact-line svg { opacity: .7; flex-shrink: 0; }
.footer-contact-line a { color: rgba(255,255,255,.85); }
.footer-contact-line a:hover { color: #fff; text-decoration: underline; }

.subscribe-row {
  display: flex;
  gap: 8px;
  margin-top: 12px;
  margin-bottom: 16px;
}
.subscribe-row input {
  flex: 1;
  padding: 9px 14px;
  border: 1.5px solid rgba(255,255,255,.2);
  border-radius: var(--radius);
  background: rgba(255,255,255,.08);
  color: #fff;
  font-size: 13px;
  font-family: inherit;
  outline: none;
  transition: border-color var(--transition);
}
.subscribe-row input::placeholder { color: rgba(255,255,255,.4); }
.subscribe-row input:focus { border-color: var(--accent-light); }

.footer-social {
  display: flex;
  gap: 8px;
}
.social-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 8px;
  background: rgba(255,255,255,.1);
  color: rgba(255,255,255,.8);
  font-size: 11px;
  font-weight: 700;
  text-decoration: none;
  transition: all var(--transition);
  letter-spacing: 0;
}
.social-btn:hover {
  background: var(--accent);
  color: #fff;
  text-decoration: none;
}

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding: 16px 0;
  text-align: center;
  font-size: 12.5px;
  color: rgba(255,255,255,.45);
}

/* ── MANAGEMENT / STAFF CARDS ────────────────── */
.mgmt-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin-bottom: 32px;
}
.mgmt-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px 24px 24px;
  box-shadow: var(--card-shadow);
  transition: box-shadow var(--transition-md), transform var(--transition-md);
  position: relative;
  overflow: hidden;
}
.mgmt-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--primary), var(--accent));
}
.mgmt-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-3px);
}
.mgmt-avatar {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--bg-subtle), var(--border));
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 16px;
  color: var(--text-muted);
}
.mgmt-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 4px;
  line-height: 1.3;
}
.mgmt-role {
  font-size: 12.5px;
  color: var(--accent);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 12px;
}
.mgmt-info {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.6;
}
.mgmt-info a { color: var(--primary); }

/* ── NEWS CARD ───────────────────────────────── */
.news-empty {
  text-align: center;
  padding: 64px 24px;
  color: var(--text-muted);
}
.news-empty svg { margin: 0 auto 16px; opacity: .35; }
.news-empty p { font-size: 15px; }

/* ── EDUCATION TABLE ─────────────────────────── */
.edu-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13.5px;
  margin-bottom: 0;
}
.edu-table th {
  background: var(--bg-subtle);
  padding: 11px 14px;
  font-size: 11px;
  font-weight: 700;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  border-bottom: 2px solid var(--border-strong);
  text-align: left;
}
.edu-table td {
  padding: 11px 14px;
  border-bottom: 1px solid var(--border);
  vertical-align: middle;
}
.edu-table tbody tr:last-child td { border-bottom: none; }
.edu-table tbody tr:hover { background: var(--bg-subtle); }

/* ── UTILITY ─────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.mb-16 { margin-bottom: 16px; }

/* ── HOME TABS ───────────────────────────────── */
.home-tabs {
  display: flex;
  gap: 4px;
  margin: 0 0 28px;
  background: var(--bg-subtle);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 5px;
}

.home-tab {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border: none;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  color: var(--text-muted);
  background: transparent;
  transition: all var(--transition-md);
  white-space: nowrap;
}
.home-tab:hover {
  color: var(--primary);
  background: rgba(29,78,216,.06);
}
.home-tab.active {
  background: var(--white);
  color: var(--primary);
  box-shadow: 0 1px 4px rgba(0,0,0,.08), 0 0 0 1px var(--border);
}
.home-tab svg { flex-shrink: 0; }

.tab-panel[hidden] { display: none; }
.tab-panel { animation: tabFadeIn .18s ease; }
@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── EDUCATION PROGRAM CARDS ─────────────────── */
.edu-prog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
  margin-bottom: 32px;
}
.edu-prog-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 24px 20px 20px;
  box-shadow: var(--card-shadow);
  display: flex;
  flex-direction: column;
  gap: 8px;
  transition: box-shadow var(--transition-md), transform var(--transition-md);
  position: relative;
  overflow: hidden;
}
.edu-prog-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--accent), var(--primary));
}
.edu-prog-card:hover {
  box-shadow: var(--card-shadow-hover);
  transform: translateY(-2px);
}
.edu-prog-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  background: var(--bg-subtle);
  color: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 4px;
}
.edu-prog-type {
  font-size: 11px;
  font-weight: 700;
  color: var(--accent);
  text-transform: uppercase;
  letter-spacing: 0.06em;
}
.edu-prog-name {
  font-size: 15px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.3;
}
.edu-prog-details {
  list-style: none;
  padding: 0;
  margin: 4px 0 8px;
}
.edu-prog-details li {
  font-size: 13px;
  color: var(--text-muted);
  padding: 3px 0 3px 14px;
  position: relative;
}
.edu-prog-details li::before {
  content: '·';
  position: absolute;
  left: 4px;
  color: var(--accent);
  font-weight: 700;
}

/* ── DOC LIST ────────────────────────────────── */
.doc-item {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--border);
}
.doc-item:last-child { border-bottom: none; }
.doc-name {
  font-size: 14px;
  color: var(--text);
  line-height: 1.6;
  flex: 1;
}

/* ── HAMBURGER BUTTON ────────────────────────── */
.nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border: 1.5px solid var(--border-strong);
  background: var(--white);
  cursor: pointer;
  color: var(--text);
  border-radius: var(--radius);
  flex-shrink: 0;
  margin-left: auto;
  padding: 0;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.nav-toggle:hover {
  background: var(--bg-subtle);
  border-color: var(--primary-light);
  color: var(--primary);
}

/* ── RESPONSIVE ──────────────────────────────── */
@media (max-width: 900px) {
  .header-search { display: none; }
}

/* ── MOBILE HEADER ───────────────────────────── */
@media (max-width: 768px) {
  /* Branded dark-blue header */
  .site-header {
    background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
    border-bottom: none;
    box-shadow: 0 2px 20px rgba(0,0,0,.22);
  }

  .header-top {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  /* White logo text */
  .logo-text strong { color: #fff; }
  .logo-text span   { color: rgba(255,255,255,.6); }

  /* Frosted-glass logo badge */
  .logo-circle {
    background: rgba(255,255,255,.15);
    border: 1.5px solid rgba(255,255,255,.28);
  }

  /* White hamburger button */
  .nav-toggle {
    color: #fff;
    border-color: rgba(255,255,255,.28);
    background: rgba(255,255,255,.1);
    margin-left: auto;
  }
  .nav-toggle:hover {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.5);
  }

  .header-contacts { display: none; }
  .header-search   { display: none; }
  .nav-toggle      { display: flex; }
  .sub-nav         { display: none; }
}

/* ── MOBILE NAV DRAWER ───────────────────────── */
@media (max-width: 768px) {
  .main-nav {
    display: none;
    background: var(--white);
    border-top: 3px solid var(--primary);
    box-shadow: 0 16px 48px rgba(0,0,0,.14);
  }
  .main-nav.nav-open {
    display: block;
    animation: mobileNavIn .18s ease;
  }
  @keyframes mobileNavIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
  }

  .nav-inner {
    flex-direction: column;
    height: auto;
    padding: 0;
  }
  .nav-item {
    display: block;
    width: 100%;
  }

  /* ── Top-level links ── */
  .nav-item > a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    padding: 15px 20px;
    border-bottom: 1px solid var(--border);
    white-space: normal;
    letter-spacing: 0;
    gap: 10px;
  }
  .nav-item > a:hover {
    background: var(--bg-subtle);
    color: var(--primary);
    text-decoration: none;
  }
  .nav-item > a.active,
  .nav-item > a[aria-current="page"] {
    color: var(--primary);
    font-weight: 700;
    background: #EFF6FF;
    border-left: 3px solid var(--primary);
    padding-left: 17px;
  }

  /* ── Chevron for dropdown parent ── */
  .nav-chevron {
    flex-shrink: 0;
    color: var(--text-muted);
    transition: transform .2s ease, color .15s ease;
  }
  .has-dropdown.is-open > a { color: var(--primary); background: #EFF6FF; }
  .has-dropdown.is-open > a .nav-chevron {
    transform: rotate(180deg);
    color: var(--primary);
  }

  /* ── Dropdown accordion — hidden until .is-open ── */
  /* Override desktop :hover rule — on mobile only JS controls visibility */
  .has-dropdown:hover .dropdown { display: none; }
  .dropdown {
    position: static;
    display: none;
    box-shadow: none;
    border: none;
    border-radius: 0;
    min-width: 0;
    background: var(--bg-subtle);
    padding: 0;
    border-bottom: 1px solid var(--border);
  }
  .has-dropdown.is-open .dropdown { display: block; }

  .dropdown a {
    display: block;
    padding: 11px 20px 11px 36px;
    font-size: 13.5px;
    font-weight: 400;
    color: var(--text);
    border-left: none;
    border-top: 1px solid var(--border);
    background: transparent;
    transition: background var(--transition), color var(--transition);
    position: relative;
  }
  .dropdown a::before {
    content: '';
    position: absolute;
    left: 21px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: var(--border-strong);
    transition: background var(--transition);
  }
  .dropdown a:hover {
    background: #EFF6FF;
    color: var(--primary);
    text-decoration: none;
  }
  .dropdown a:hover::before { background: var(--primary); }

  /* ── Other mobile fixes ── */
  .info-row { flex-direction: column; gap: 4px; }
  .info-label { min-width: 0; }

  /* Table overflow wrappers */
  .data-table, .edu-table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }

  /* Collapse Биоматериал + Срок columns on mobile without breaking colspan rows */
  .price-table th:nth-child(2), .price-table td:nth-child(2),
  .price-table th:nth-child(3), .price-table td:nth-child(3) {
    width: 0; max-width: 0; padding: 0 !important; border: 0 !important;
    overflow: hidden; white-space: nowrap; color: transparent; font-size: 0;
  }

  .doc-item { flex-direction: column; gap: 8px; align-items: flex-start; }

  .container { padding: 0 16px; }

  /* ── Page body spacing on mobile ── */
  .page-body { padding: 24px 0 48px; }

  /* ── Page hero smaller on mobile ── */
  .page-hero { padding: 28px 0 24px; }
  .page-hero h1 { font-size: clamp(18px, 5vw, 26px); }

  /* ── Card stacking ── */
  .mgmt-grid { grid-template-columns: 1fr; }
  .contact-grid { grid-template-columns: 1fr; gap: 20px; }

  /* ── Section title spacing ── */
  .section-title { margin: 24px 0 14px; font-size: 17px; }

  /* ── Home tabs: stack vertically on small tablet ── */
  .home-tab { font-size: 13px; padding: 10px 14px; }

  /* ── Education program cards ── */
  .edu-prog-grid { grid-template-columns: 1fr; }
}

@media (max-width: 640px) {
  /* ── Hero ── */
  .home-hero {
    padding: 24px 0 28px;
  }
  .home-hero h1 {
    font-size: clamp(20px, 6.5vw, 26px);
    letter-spacing: -0.03em;
    margin-bottom: 12px;
  }
  .home-hero .lead {
    font-size: 14px;
    line-height: 1.65;
    color: rgba(255,255,255,.8);
  }

  /* ── Stats: single horizontal strip ── */
  .stats-bar {
    display: flex;
    flex-direction: row;
    gap: 0;
    background:
      linear-gradient(90deg, var(--primary), var(--accent)) top / 100% 3px no-repeat,
      var(--white);
    border: 1px solid var(--border);
    border-top: none;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    box-shadow: 0 4px 16px rgba(0,0,0,.07);
    overflow: hidden;
    margin-bottom: 24px;
  }
  .stat-item {
    flex: 1;
    min-width: 0;
    border: none;
    border-radius: 0;
    box-shadow: none;
    padding: 16px 8px 14px;
  }
  .stat-item + .stat-item { border-left: 1px solid var(--border); }
  .stat-item::before { display: none; }
  .stat-item:hover { transform: none; box-shadow: none; }
  .stat-num {
    font-size: 22px;
    letter-spacing: -0.03em;
    margin-bottom: 4px;
  }
  .stat-label { font-size: 10px; line-height: 1.35; }

  /* ── Section title ── */
  .section-title { margin-top: 20px; font-size: 16px; }

  /* ── Content spacing ── */
  .services-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .page-body { padding: 20px 0 36px; }
  .card { padding: 16px; margin-bottom: 14px; }
  .card-title { margin-bottom: 12px; }

  /* ── Home tabs ── */
  .home-tabs { margin-bottom: 20px; }
  .home-tab { font-size: 12.5px; padding: 9px 10px; gap: 5px; }
  .home-tab svg { width: 15px; height: 15px; }

  /* ── Buttons ── */
  .btn { min-height: 38px; padding: 9px 16px; font-size: 13.5px; }

  /* ── Contact card inline layout → stack ── */
  .card[style*="justify-content:space-between"] {
    flex-direction: column !important;
    align-items: flex-start !important;
  }

  /* ── Footer ── */
  .footer-inner { gap: 24px; }
  .footer-col h4 { margin-bottom: 12px; }
  .subscribe-row { flex-wrap: wrap; }
  .subscribe-row input { min-width: 0; }

  /* ── Management / staff grid ── */
  .mgmt-grid { grid-template-columns: 1fr; gap: 14px; }

  /* ── Price category buttons wrap ── */
  .price-cats { flex-wrap: wrap; gap: 8px; }
}

/* ═══════════════════════════════════════════════
   VISUALLY IMPAIRED MODE  (ГОСТ Р 52872-2019)
   ═══════════════════════════════════════════════ */

/* ── Toggle button & panel wrapper ───────────── */
.vi-panel-wrap {
  position: relative;
  flex-shrink: 0;
}

.vi-toggle-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  background: var(--bg-subtle);
  border: 1.5px solid var(--border-strong);
  border-radius: var(--radius);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background var(--transition), border-color var(--transition), color var(--transition);
}
.vi-toggle-btn:hover,
.vi-toggle-btn.vi-active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}
.vi-toggle-btn svg { flex-shrink: 0; }

/* Mobile: white-on-dark button to match the dark gradient header */
@media (max-width: 768px) {
  .vi-toggle-btn {
    background: rgba(255,255,255,.1);
    border-color: rgba(255,255,255,.28);
    color: #fff;
  }
  .vi-toggle-btn:hover,
  .vi-toggle-btn.vi-active {
    background: rgba(255,255,255,.22);
    border-color: rgba(255,255,255,.5);
    color: #fff;
  }
}

/* ── Drop-down settings panel ─────────────────── */
.vi-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: var(--white);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  box-shadow: 0 8px 32px rgba(0,0,0,.16);
  padding: 16px;
  min-width: 268px;
  z-index: 400;
}
.vi-panel[hidden] { display: none; }

/* On very small screens open left-aligned */
@media (max-width: 480px) {
  .vi-panel { right: auto; left: 0; }
}

.vi-group { margin-bottom: 14px; }
.vi-group:last-of-type { margin-bottom: 0; }

.vi-label {
  display: block;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 7px;
}

.vi-btn-group {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.vi-btn {
  padding: 5px 11px;
  border: 1.5px solid var(--border-strong);
  border-radius: 6px;
  background: var(--bg-subtle);
  color: var(--text);
  font-family: inherit;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  line-height: 1.4;
  transition: all var(--transition);
}
.vi-btn:hover { border-color: var(--primary); color: var(--primary); }
.vi-btn[aria-pressed="true"] {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
}

/* Contrast preset buttons have their own distinctive look */
.vi-contrast-bw-btn { background: #fff; color: #000; border-color: #000; }
.vi-contrast-wb-btn { background: #000; color: #fff; border-color: #555; }
.vi-contrast-by-btn { background: #ffff00; color: #000; border-color: #888600; }
.vi-contrast-bw-btn[aria-pressed="true"],
.vi-contrast-wb-btn[aria-pressed="true"],
.vi-contrast-by-btn[aria-pressed="true"] {
  box-shadow: 0 0 0 2px var(--primary);
}

.vi-reset-btn {
  display: block;
  width: 100%;
  margin-top: 14px;
  padding: 7px 12px;
  border: 1.5px dashed var(--border-strong);
  border-radius: 6px;
  background: transparent;
  color: var(--text-muted);
  font-family: inherit;
  font-size: 12px;
  cursor: pointer;
  transition: all var(--transition);
}
.vi-reset-btn:hover { border-color: var(--primary); color: var(--primary); }

/* ── Font-size overrides ──────────────────────── */
html[data-vi-font="md"] body  { font-size: 18px !important; }
html[data-vi-font="lg"] body  { font-size: 22px !important; }

html[data-vi-font="md"] p,
html[data-vi-font="md"] li,
html[data-vi-font="md"] td,
html[data-vi-font="md"] th,
html[data-vi-font="md"] span:not(.vi-label):not(.stat-num),
html[data-vi-font="md"] .info-value,
html[data-vi-font="md"] .card-title,
html[data-vi-font="md"] .footer-col p { font-size: 18px !important; }

html[data-vi-font="lg"] p,
html[data-vi-font="lg"] li,
html[data-vi-font="lg"] td,
html[data-vi-font="lg"] th,
html[data-vi-font="lg"] span:not(.vi-label):not(.stat-num),
html[data-vi-font="lg"] .info-value,
html[data-vi-font="lg"] .card-title,
html[data-vi-font="lg"] .footer-col p { font-size: 22px !important; }

/* ── Letter-spacing override ─────────────────── */
html[data-vi-spacing="wide"] body,
html[data-vi-spacing="wide"] p,
html[data-vi-spacing="wide"] li,
html[data-vi-spacing="wide"] a,
html[data-vi-spacing="wide"] td,
html[data-vi-spacing="wide"] .info-value,
html[data-vi-spacing="wide"] .nav-item > a { letter-spacing: 0.12em !important; }

/* ── Contrast mode: Чёрный/Белый (high-contrast) */
html[data-vi-contrast="bw"] {
  --primary:       #000088;
  --primary-dark:  #000066;
  --primary-light: #0000BB;
  --accent:        #005500;
  --accent-light:  #007700;
  --bg:            #FFFFFF;
  --bg-subtle:     #F0F0F0;
  --white:         #FFFFFF;
  --text:          #000000;
  --text-muted:    #111111;
  --border:        #000000;
  --border-strong: #000000;
  --card-shadow:   0 0 0 1px #000;
  --card-shadow-hover: 0 0 0 2px #000;
}
/* Footer bg uses var(--text) — stays black, footer text (hardcoded rgba white) stays readable */

/* ── Contrast mode: Белый/Чёрный ─────────────── */
html[data-vi-contrast="wb"] {
  --primary:       #88CCFF;
  --primary-dark:  #66AADD;
  --primary-light: #AADDFF;
  --accent:        #88FFAA;
  --accent-light:  #AAFFCC;
  --bg:            #000000;
  --bg-subtle:     #111111;
  --white:         #000000;
  --text:          #FFFFFF;
  --text-muted:    #CCCCCC;
  --border:        #444444;
  --border-strong: #666666;
  --card-shadow:   0 0 0 1px #444;
  --card-shadow-hover: 0 0 0 2px #666;
}
/* Footer background would become white (var(--text)=#fff) — force dark */
html[data-vi-contrast="wb"] .site-footer  { background: #1a1a1a !important; }
/* Nav: var(--primary-dark) becomes light blue — force dark */
html[data-vi-contrast="wb"] .main-nav     { background: #111111 !important; }
html[data-vi-contrast="wb"] .nav-item > a { color: #ffffff !important; }
html[data-vi-contrast="wb"] .dropdown     { background: #1a1a1a !important; border-color: #444 !important; }
html[data-vi-contrast="wb"] .dropdown a   { color: #cccccc !important; }
html[data-vi-contrast="wb"] .dropdown a:hover { color: #fff !important; background: #333 !important; }

/* ── Contrast mode: Чёрный/Жёлтый ───────────── */
html[data-vi-contrast="by"] {
  --primary:       #000066;
  --primary-dark:  #000044;
  --primary-light: #0000AA;
  --accent:        #004400;
  --accent-light:  #006600;
  --bg:            #FFFF00;
  --bg-subtle:     #FFFFAA;
  --white:         #FFFF00;
  --text:          #000000;
  --text-muted:    #333333;
  --border:        #000000;
  --border-strong: #000000;
  --card-shadow:   0 0 0 1px #000;
  --card-shadow-hover: 0 0 0 2px #000;
}
html[data-vi-contrast="by"] body { background: #FFFF00 !important; }
/* Footer bg = var(--text) = #000 — black footer, white text stays readable */

/* ═══════════════════════════════════════════════
   PERSONAL DATA CONSENT CHECKBOX
   ═══════════════════════════════════════════════ */

.consent-check {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  font-size: 12px;
  line-height: 1.5;
  cursor: pointer;
  margin-top: 10px;
}
.consent-check input[type="checkbox"] {
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  margin-top: 2px;
  accent-color: var(--accent-light);
  cursor: pointer;
}

/* Footer context (dark background) */
.site-footer .consent-check       { color: rgba(255,255,255,.6); }
.site-footer .consent-check a     { color: var(--accent-light); text-decoration: underline; }
.site-footer .consent-check a:hover { color: #fff; }

/* Contact form context (light card) */
.contact-form .consent-check      { color: var(--text-muted); margin-bottom: 12px; }
.contact-form .consent-check a    { color: var(--primary); }
