/* ==========================================================================
   Медика — основни стилове
   Цветове и размери следват макетите „Вариант 4“, „Изследвания и цени“,
   „Диагностични панели“.
   ========================================================================== */

:root {
  color-scheme: light dark; /* Сайтът има свой тъмен вариант (хедъра) — браузърът не го затъмнява сам (виж inc/setup.php). */
  --c-ink: #190F49;
  --c-navy: #0E2A74;
  --c-navy-btn: #09206E;
  --c-accent: #285DAB;
  --c-ring: #275FAC;
  --c-teal: #3D8A9C;
  --c-text: #4B4A68;
  --c-muted: #6B6A86;
  --c-line: #E1E5F2;
  --c-line-2: #E6E8F3;
  --c-line-3: #EEF0F7;
  --c-soft: #F6F7FC;
  --c-soft-2: #EEF1FA;
  --c-soft-3: #F1F3FB;
  --c-soft-4: #FBFBFE;
  --c-chip-line: #C9CFE6;
  --c-on-dark: #DCE3F5;
  --c-on-dark-2: #C3CCEB;
  --c-foot-text: #C9CCEB;
  --c-foot-label: #9DB6F0;
  --c-foot-bottom: #120A38;
  --c-foot-bottom-text: #A9ACD6;
  --c-warn-bg: #FFF6E0;
  --c-warn-text: #5A4300;

  --font: 'Montserrat', 'Segoe UI', Arial, sans-serif;
  /* На iPhone в хоризонтално положение — не по-малко от изреза на екрана (viewport-fit=cover в header.php). */
  --gutter: max(clamp(20px, 4vw, 64px), env(safe-area-inset-left, 0px), env(safe-area-inset-right, 0px));
  --max: 1440px;
  --max-inner: 1312px;
  --text-col: 800px;
}

/* ---------- База ---------- */

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
/* Залепената лента с категории не бива да закрива елемента на фокус (WCAG 2.4.11). */
html:has(.cat-chips-wrap) { scroll-padding-top: 130px; }
@media (max-width: 1100px) { html:has(.cat-chips-wrap) { scroll-padding-top: 90px; } }

body {
  color-scheme: light; /* Полетата, бутоните и т.н. остават светли и в тъмен режим — тъмен е само хедърът. */
  margin: 0;
  background: #FFFFFF;
  color: var(--c-text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

[hidden] { display: none !important; }

img, svg, video, iframe { max-width: 100%; }
img { height: auto; }

a { color: var(--c-accent); }
a:hover { color: var(--c-ink); }
/* Телефонът не се разделя на два реда („062/ 614“ и „161“). */
a[href^="tel:"] { white-space: nowrap; }

:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.on-dark :focus-visible { outline-color: #FFFFFF; }

button { font: inherit; }

.sr-only,
.screen-reader-text {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.skip-link:focus {
  position: fixed !important;
  top: 12px; left: 12px;
  width: auto; height: auto;
  margin: 0; padding: 12px 20px;
  clip: auto;
  z-index: 1000;
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--c-ink);
  font-weight: 700;
  box-shadow: 0 8px 24px rgba(25, 15, 73, 0.2);
}

.wrap {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.tabular { font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }

@media (max-width: 720px) {
  .hide-sm { display: none !important; }
}

/* ---------- Бутони ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
  padding: 0 26px;
  border: 0;
  border-radius: 999px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 700;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s, color .15s, box-shadow .15s;
}
.btn--light { background: #FFFFFF; color: var(--c-ink); }
.btn--light:hover { background: var(--c-soft-2); color: var(--c-ink); }
.btn--accent { background: var(--c-accent); color: #FFFFFF; }
.btn--accent:hover { background: var(--c-ink); color: #FFFFFF; }
/* Бутоните на слайдовете: бели, с полупрозрачен бял пръстен, за да се откроят на тъмносиния фон.
   „Резултати online“ на първия слайд (.btn--ring) е с главни букви и по-широки разстояния.
   Ако за текста има картинка, бутонът е картинка (.btn--img, medica_slide_button() в inc/helpers.php),
   за да остане бял и в тъмния режим на Samsung Internet. */
.hero .btn--light { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.24); }
.hero .btn--light:hover { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.36); }
.hero .btn:focus-visible { outline-offset: 8px; }
.btn--ring {
  min-height: 52px;
  padding: 0 30px;
  background: #FFFFFF;
  box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.24);
  color: var(--c-navy);
  font-weight: 700;
  letter-spacing: 0.08em;
}
.btn--ring:hover { background: var(--c-soft-2); color: var(--c-ink); box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.36); }
/* Картинката е с пръстена (6 px наоколо) — отрицателното поле запазва размера на бутона. */
.btn.btn--img,
.hero .btn.btn--img:hover { min-height: 0; padding: 0; background: none; box-shadow: none; }
.btn--img img { display: block; max-width: none; margin: -6px; }
.btn--img:hover img { filter: brightness(0.94); }
.btn--outline {
  min-height: 48px;
  padding: 0 24px;
  border: 2px solid var(--c-accent);
  background: transparent;
  color: var(--c-accent);
  font-size: 14px;
  letter-spacing: 0.08em;
}
.btn--outline:hover { background: var(--c-accent); color: #FFFFFF; }

.link-light {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 5px;
}
.link-light:hover { color: var(--c-on-dark); }

/* ---------- Горна лента ---------- */

.topbar { background: var(--c-navy); color: #FFFFFF; font-size: 14px; }
.topbar .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0 20px;
}
.topbar__contacts { display: flex; align-items: center; gap: 22px; }
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 44px;
  color: #FFFFFF;
  text-decoration: none;
}
.topbar a:hover { color: var(--c-on-dark); text-decoration: underline; text-underline-offset: 4px; }
.topbar__phone { font-weight: 600; font-variant-numeric: tabular-nums; }
.topbar__results { font-weight: 700; }

/* ---------- Хедър и меню ---------- */

.site-header {
  position: relative;
  z-index: 20;
  background: #FFFFFF;
  border-bottom: 1px solid var(--c-line-2);
}
.site-header__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 14px;
  padding-bottom: 14px;
}
/* Черно — филтърът в логото го показва тъмносиньо (#190F49), а при затъмняване от браузъра излиза бяло (inc/helpers.php). */
.site-logo { display: block; flex: none; color: #000000; text-decoration: none; }
.site-logo img,
.site-logo__svg { display: block; height: clamp(38px, 4vw, 48px); width: auto; }

.menu-toggle {
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 14px;
  background: var(--c-soft-3);
  color: var(--c-ink);
  cursor: pointer;
}
.menu-toggle .icon-close { display: none; }
.menu-toggle[aria-expanded="true"] { background: var(--c-ink); color: #FFFFFF; }
.menu-toggle[aria-expanded="true"] .icon-menu { display: none; }
.menu-toggle[aria-expanded="true"] .icon-close { display: block; }

/* Основните страници в хедъра (header.php) — само на широк екран; всичко останало е в менюто. */
.header-nav { display: none; }
@media (min-width: 1200px) { /* По-тясно — не се побират до логото и бутоните. */
  .header-nav { display: block; flex: 1; min-width: 0; }
  .header-nav ul { list-style: none; margin: 0; padding: 0; display: flex; justify-content: center; gap: clamp(18px, 2.4vw, 40px); }
  .header-nav a { display: block; padding: 10px 2px; font-size: 15px; font-weight: 700; color: var(--c-ink); text-decoration: none; white-space: nowrap; box-shadow: inset 0 -3px 0 transparent; }
  .header-nav a:hover { color: var(--c-accent); }
  .header-nav a[aria-current="page"] { color: var(--c-accent); box-shadow: inset 0 -3px 0 var(--c-accent); }
}

/* Търсене в хедъра: иконка до менюто, отваря поле под хедъра (details — работи и без JavaScript). */
.site-header__actions { display: flex; align-items: center; gap: 10px; }
/* Бутон „Резултати“ — само на компютър и таблет (на телефон е в долната лента). */
.header-results {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 14px;
  background: var(--c-accent);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.header-results:hover,
.header-results[aria-current="page"] { background: var(--c-ink); color: #FFFFFF; }
@media (max-width: 720px) { .header-results { display: none; } }
.header-search__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border-radius: 14px;
  background: var(--c-soft-3);
  color: var(--c-ink);
  list-style: none;
  cursor: pointer;
}
.header-search__btn::-webkit-details-marker { display: none; }
.header-search__btn::marker { content: ""; }
.header-search[open] > .header-search__btn { background: var(--c-ink); color: #FFFFFF; }
.header-search__form {
  position: absolute;
  z-index: 5;
  left: 0;
  right: 0;
  top: 100%;
  background: #FFFFFF;
  border-top: 3px solid var(--c-accent);
  box-shadow: 0 24px 48px rgba(25, 15, 73, 0.14);
}
.header-search__row { display: flex; gap: 10px; padding-top: 16px; padding-bottom: 16px; }
.header-search__row input {
  flex: 1 1 auto;
  min-width: 0;
  height: 48px;
  padding: 0 18px;
  border: 1.5px solid var(--c-chip-line);
  border-radius: 999px;
  font: inherit;
  font-size: 16px; /* 16px — iOS не увеличава страницата при писане */
  color: var(--c-ink);
}
.header-search__row input:focus { outline: 3px solid var(--c-ring); outline-offset: 1px; border-color: var(--c-accent); }
.header-search__row .btn { flex: none; min-height: 48px; }

/* Лента с бързи връзки отдолу — само на телефон. */
.mobile-bar { display: none; }
@media (max-width: 720px) {
  .mobile-bar {
    position: fixed;
    z-index: 40;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    /* Над чертичката на iPhone и навътре от заоблените ъгли — иначе „Цени“ и „Обади се“ се отрязват. */
    padding: 0 max(4px, env(safe-area-inset-right)) env(safe-area-inset-bottom) max(4px, env(safe-area-inset-left));
    background: #FFFFFF;
    border-top: 1px solid var(--c-line);
    box-shadow: 0 -6px 20px rgba(25, 15, 73, 0.08);
  }
  .mobile-bar a {
    flex: 1 1 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end; /* Надписите — на една линия, и под кръглия бутон. */
    gap: 3px;
    min-height: 60px;
    padding: 6px 2px 9px;
    font-size: 12px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--c-ink);
    text-decoration: none;
  }
  .mobile-bar a[aria-current="page"] { color: var(--c-accent); box-shadow: inset 0 3px 0 var(--c-accent); }
  /* „Резултати“ — в средата, в кръгче, което леко се подава над лентата. */
  .mobile-bar .mobile-bar__main { color: var(--c-accent); }
  .mobile-bar__circle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 54px;
    height: 54px;
    margin-top: -24px;
    border: 4px solid #FFFFFF;
    border-radius: 50%;
    background: var(--c-accent);
    color: #FFFFFF;
    /* Тънка линия около белия пръстен, като горната линия на лентата — кръгът е отделен от страницата. */
    box-shadow: 0 0 0 1px var(--c-line), 0 6px 14px rgba(40, 93, 171, 0.35);
  }
  .mobile-bar .mobile-bar__main[aria-current="page"] { box-shadow: none; }
  .mobile-bar__main[aria-current="page"] .mobile-bar__circle { background: var(--c-ink); }
  body { padding-bottom: calc(60px + env(safe-area-inset-bottom)); }
  .header-search__row .btn { padding-left: 18px; padding-right: 18px; }
}

.site-nav {
  position: absolute;
  left: 0;
  right: 0;
  top: 100%;
  background: #FFFFFF;
  border-top: 3px solid var(--c-accent);
  box-shadow: 0 24px 48px rgba(25, 15, 73, 0.14);
}
.site-nav .wrap {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-top: 24px;
  padding-bottom: 28px;
}
.site-nav__results {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 56px;
  padding: 0 22px;
  border-radius: 999px;
  background: var(--c-accent);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-decoration: none;
}
.site-nav__results:hover { background: var(--c-ink); color: #FFFFFF; }

.menu-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  column-gap: 32px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.menu-grid .sub-menu { margin: 0; padding: 0 0 0 14px; list-style: none; }
.menu-link {
  display: flex;
  align-items: center;
  min-height: 52px;
  padding: 0 10px;
  border-bottom: 1px solid var(--c-line-3);
  font-size: 16px;
  font-weight: 600;
  color: var(--c-ink);
  text-decoration: none;
}
.menu-link:hover { background: var(--c-soft-3); color: var(--c-ink); }
.current-menu-item > .menu-link,
.menu-link[aria-current="page"] { font-weight: 800; color: var(--c-accent); }

/* Без JavaScript менюто е видимо под хедъра. */
.no-js .menu-toggle { display: none; }
.no-js .site-nav { display: block !important; position: static; box-shadow: none; }

/* Телефон и таблет в тъмен режим: тъмносин хедър с бялото лого (header.php). Тъмният фон и бялото лого
   остават четливи и когато браузърът (напр. Samsung Internet) сам затъмни страницата.
   На компютър хедърът остава бял с тъмносиньото лого и в тъмен режим. Телефонът се познава по ширината:
   телефоните на Samsung отчитат екрана си като мишка (hover: hover), затова само (hover: none) не стига. */
@media (prefers-color-scheme: dark) and (max-width: 1024px), (prefers-color-scheme: dark) and (hover: none) {
  .topbar { background: #0A1F57; }
  .site-header { background: var(--c-navy); border-bottom-color: rgba(255, 255, 255, 0.12); }
  .site-logo { color: #FFFFFF; }
  .site-header__bar :focus-visible { outline-color: #FFFFFF; }
  .menu-toggle,
  .header-search__btn { background: rgba(255, 255, 255, 0.14); color: #FFFFFF; }
  .menu-toggle[aria-expanded="true"],
  .header-search[open] > .header-search__btn { background: #FFFFFF; color: var(--c-ink); }
  .header-results { background: #FFFFFF; color: var(--c-navy); }
  .header-results:hover,
  .header-results[aria-current="page"] { background: var(--c-soft-2); color: var(--c-ink); }
  .header-nav a,
  .header-nav a:hover,
  .header-nav a[aria-current="page"] { color: #FFFFFF; }
  .header-nav a[aria-current="page"] { box-shadow: inset 0 -3px 0 #FFFFFF; }
}

/* ---------- Двойна вълна в ъгъла на хедърите (medica_corner_wave()) ---------- */
/* Като вълните на клиентската карта. Ъгълът е прав, без бяло под него — по желание.
   Размерът е от --r на хедъра (.hero, .page-hero). */

.corner-wave {
  position: absolute;
  right: 0;
  bottom: 0;
  width: calc(var(--r) * 2.4);
  height: calc(var(--r) * 1.5);
  pointer-events: none;
}
.corner-wave__light { fill: #FFFFFF; fill-opacity: 0.10; }
.corner-wave__line { fill: var(--c-teal); }

/* ---------- Начална страница: карусел ---------- */

.hero {
  --r: clamp(90px, 14vw, 220px); /* Размер на вълната в ъгъла. */
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  background:
    radial-gradient(900px 420px at 12% 0%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 70%),
    linear-gradient(120deg, var(--c-ink) 0%, var(--c-navy) 52%, var(--c-accent) 100%);
}
/* На много тесен телефон вълната е по-ниска, за да минава под бутона за пауза. */
@media (max-width: 379px) {
  .hero .corner-wave { height: var(--r); }
}
.hero__slides { position: relative; }

.slide { min-height: 540px; display: flex; align-items: center; }
.slide[hidden] { display: none; }
.js .slide.is-entering { animation: medicaFadeUp .6s ease both; }
@keyframes medicaFadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: none; }
}

.slide__inner {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(48px, 6vw, 72px) clamp(36px, 8vw, 140px) clamp(100px, 9vw, 120px) var(--gutter);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 40px 56px;
}
.slide__body {
  flex: 1 1 380px;
  min-width: 0;
  max-width: 560px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}
.slide__tag {
  align-self: flex-start;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.14);
  font-size: 13px;
  font-weight: 600;
  color: #FFFFFF;
}
.slide__title {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 44px);
  font-weight: 800;
  line-height: 1.12;
  color: #FFFFFF;
  text-wrap: balance;
}
.slide__text { margin: 0; font-size: 16px; line-height: 1.65; color: var(--c-on-dark); }
.slide__note { margin: 0; font-size: 13px; line-height: 1.5; color: var(--c-on-dark-2); }
.slide__body > .btn { align-self: flex-start; margin-top: 4px; }

.slide--intro .slide__inner { flex-direction: column; align-items: stretch; gap: 22px; }
.slide--intro .slide__title { max-width: 760px; font-size: clamp(28px, 3.8vw, 50px); letter-spacing: 0.01em; }
.slide--intro .slide__text { max-width: 560px; }
.slide__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 28px;
  margin-top: 10px;
  padding-left: 7px;
}

.slide__visual {
  flex: 0 1 380px;
  min-width: 0;
  display: flex;
  justify-content: center;
}
.slide__visual--card { padding: 20px; }
.slide__visual--ribbon { flex-basis: 300px; }
.slide__visual--ribbon svg { display: block; width: 100%; max-width: 220px; height: auto; }
.slide__visual--diabetes { flex-basis: 300px; }
.slide__visual--diabetes svg { display: block; width: 100%; max-width: 260px; height: auto; font-family: var(--font); }
.slide__visual--map svg { display: block; width: 100%; max-width: 380px; height: auto; font-family: var(--font); }
.slide__visual--image img { display: block; width: 100%; max-width: 420px; border-radius: 20px; box-shadow: 0 30px 60px rgba(9, 10, 40, 0.35); }
.slide__visual--chips {
  flex-basis: 400px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-content: center;
  gap: 10px;
}
.hero-chip {
  padding: 9px 16px;
  border-radius: 999px;
  border: 1.5px solid rgba(255, 255, 255, 0.6);
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 600;
}
.hero-chip:nth-child(odd) {
  padding: 10px 16px;
  border: 0;
  background: #FFFFFF;
  color: var(--c-ink);
  font-weight: 700;
}

.hero__controls {
  position: absolute;
  left: 0;
  right: 0;
  bottom: clamp(22px, 3vw, 34px);
  pointer-events: none;
}
.hero__controls .wrap { display: flex; align-items: center; gap: 2px; }
.hero__controls button {
  pointer-events: auto;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  background: transparent;
  color: #FFFFFF;
  cursor: pointer;
}
.hero__arrow,
.hero__pause { width: 44px; }
.hero__arrow--prev { margin-left: -12px; }
.hero__dot { min-width: 30px; padding: 0 3px; }
.hero__dot span {
  display: block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: 2px solid #FFFFFF;
  background: transparent;
  transition: width .3s;
}
.hero__dot[aria-current="true"] span { width: 26px; background: #FFFFFF; }
.hero__pause .icon-play { display: none; }
.hero__pause.is-paused .icon-play { display: block; }
.hero__pause.is-paused .icon-pause { display: none; }
.no-js .hero__controls { display: none; }

/* Снимка на клиентската карта (template-parts/client-card.php). Заоблянето е като ъглите в самата снимка (57 от 1189 × 757 px),
   за да следва сянката формата ѝ. Снимката е плътна — тъмният режим не я променя. Изправена (не наклонена) — по желание. */
.card-picture { display: contents; }
.card-photo {
  display: block;
  width: 100%;
  max-width: 360px;
  height: auto;
  border-radius: 4.8% / 7.5%;
  box-shadow: 0 30px 60px rgba(9, 10, 40, 0.35);
}
.card-photo--small {
  max-width: 300px;
  box-shadow: 0 20px 40px rgba(25, 15, 73, 0.18);
}

.brand-stripe { display: flex; }
.brand-stripe span:first-child { flex: 7; background: var(--c-accent); }
.brand-stripe span:last-child { flex: 3; background: var(--c-teal); }

/* ---------- Начална страница: промоции и Карта Медика ---------- */

.section-soft {
  background: var(--c-soft);
  padding: clamp(64px, 8vw, 104px) var(--gutter);
}
.section-soft__inner {
  max-width: var(--max-inner);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px 24px;
}
.section-head__text { display: flex; flex-direction: column; gap: 6px; }
.section-head h2 {
  margin: 0;
  font-size: clamp(26px, 2.6vw, 34px);
  font-weight: 800;
  line-height: 1.15;
  color: var(--c-ink);
}
.section-head p { margin: 0; font-size: 15px; color: var(--c-muted); }

.promo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 20px;
}
.promo-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: #FFFFFF;
}
.bars { display: flex; gap: 4px; }
.bars span { height: 4px; border-radius: 2px; }
.bars span:first-child { width: 28px; background: var(--c-accent); }
.bars span:last-child { width: 10px; background: var(--c-teal); }
.promo-card__head { display: flex; flex-direction: column; gap: 4px; }
.promo-card h3 { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--c-ink); }
.promo-card h3 a { color: inherit; text-decoration: none; }
.promo-card h3 a:hover { text-decoration: underline; }
/* С линк (medica_promo_url) — цялата карта води към описанието на изследването. */
.promo-card--link { position: relative; transition: border-color .15s, box-shadow .15s; }
.promo-card--link h3 a::after { content: ""; position: absolute; inset: 0; border-radius: inherit; }
.promo-card--link:hover { border-color: var(--c-chip-line); box-shadow: 0 10px 24px rgba(25, 15, 73, 0.08); }
.promo-card--link:has(a:focus-visible) { outline: 3px solid var(--c-ring); outline-offset: 2px; }
.promo-card--link h3 a:focus-visible { outline: none; }
.promo-card__chev { margin-left: 4px; vertical-align: -2px; color: var(--c-accent); }
.promo-card__desc { font-size: 13px; color: var(--c-muted); }
.promo-card__foot {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--c-line-3);
  display: flex;
  flex-wrap: wrap; /* В тесните карти (4 в ред) цените минават под „Промо цена“, вдясно. */
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 8px;
}
.promo-card__label { font-size: 12px; font-weight: 600; color: var(--c-muted); white-space: nowrap; }
.promo-card__prices { display: flex; align-items: baseline; gap: 8px; margin-left: auto; }
.promo-card__old { font-size: 16px; font-weight: 600; color: var(--c-muted); text-decoration: line-through; font-variant-numeric: tabular-nums; white-space: nowrap; }
.promo-card__price {
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
  color: var(--c-ink);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.card-box {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 32px 56px;
  padding: clamp(28px, 4vw, 48px);
  border: 1px solid var(--c-line);
  border-radius: 20px;
  background: var(--c-soft-2);
}
.card-box__visual { flex: 0 1 320px; min-width: 0; display: flex; justify-content: center; padding: 16px; }
.card-box__body { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.card-box h3 { margin: 0; font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; line-height: 1.2; color: var(--c-ink); }
.card-box p { margin: 0; }
.card-box strong { color: var(--c-ink); }
.card-box__note { font-size: 12px; line-height: 1.55; color: var(--c-muted); }
.card-box .btn { align-self: flex-start; margin-top: 4px; }

/* Лента с факти под карусела */
.trust { background: #FFFFFF; border-bottom: 1px solid var(--c-line-2); }
.trust__list {
  list-style: none;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  gap: 8px 0;
  padding-top: 18px;
  padding-bottom: 18px;
}
.trust__item { min-width: 0; }
.trust__item + .trust__item { border-left: 1px solid var(--c-line-2); }
.trust__inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 100%;
  padding: 8px 20px;
  border-radius: 14px;
  color: inherit;
  text-decoration: none;
}
a.trust__inner:hover .trust__value { color: var(--c-accent); }
.trust__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--c-soft-2);
  color: var(--c-accent);
}
.trust__text { min-width: 0; display: flex; flex-direction: column; }
.trust__value { font-size: 22px; font-weight: 800; line-height: 1.15; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.trust__label { font-size: 13px; line-height: 1.35; color: var(--c-muted); }
@media (max-width: 1040px) {
  .trust__list { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .trust__item:nth-child(odd) { border-left: 0; }
  .trust__item:last-child:nth-child(odd) { grid-column: 1 / -1; } /* Нечетен брой — последният на цял ред. */
}
/* На телефон „11 манипулационни“ не се побира в половин ред — първият факт е на цял ред, останалите по два. */
@media (min-width: 481px) and (max-width: 600px) {
  .trust__item:first-child { grid-column: 1 / -1; }
  .trust__item:nth-child(even) { border-left: 0; }
  .trust__item:nth-child(odd):not(:first-child) { border-left: 1px solid var(--c-line-2); }
  .trust__item:last-child:nth-child(odd):not(:first-child) { grid-column: auto; }
  .trust__item:last-child:nth-child(even) { grid-column: 1 / -1; }
}
@media (max-width: 480px) {
  .trust__inner { gap: 10px; padding: 8px 10px; }
  .trust__icon { width: 36px; height: 36px; }
  .trust__icon .icon { width: 18px; height: 18px; }
  .trust__value { font-size: 18px; }
  .trust__label { font-size: 12px; }
  /* Тесен телефон — по един факт на ред („Домашни посещения“ не се побира в половин ред). */
  .trust__list { grid-template-columns: minmax(0, 1fr); gap: 0; }
  .trust__item + .trust__item { border-left: 0; border-top: 1px solid var(--c-line-3); }
}

/* Прозорец „Домашно посещение“ (template-parts/home-visit-dialog.php) */
html:has(.call-dialog[open]) { overflow: hidden; }
.call-dialog {
  width: min(440px, calc(100% - 32px));
  max-height: calc(100% - 32px);
  padding: 0;
  border: 0;
  border-radius: 20px;
  background: #FFFFFF;
  color: var(--c-text);
  box-shadow: 0 30px 70px rgba(25, 15, 73, 0.30);
}
.call-dialog::backdrop { background: rgba(25, 15, 73, 0.55); }
.call-dialog__box { position: relative; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; padding: 28px; }
.call-dialog__close-form { position: absolute; top: 12px; right: 12px; margin: 0; }
.call-dialog__close {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 0;
  border-radius: 50%;
  background: var(--c-soft-3);
  color: var(--c-ink);
  cursor: pointer;
}
.call-dialog__close:hover { background: var(--c-soft-2); }
.call-dialog__icon {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 16px;
  background: var(--c-soft-2);
  color: var(--c-accent);
}
.call-dialog h2 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--c-ink); }
.call-dialog p { margin: 0; font-size: 15px; line-height: 1.55; }
.call-dialog__price strong { color: var(--c-ink); }
.call-dialog__phones { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.call-dialog__phones a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-size: 24px;
  font-weight: 800;
  color: var(--c-ink);
  text-decoration: none;
  font-variant-numeric: tabular-nums;
}
.call-dialog__phones a .icon { color: var(--c-accent); }
.call-dialog__phones a:hover { color: var(--c-accent); }
.call-dialog .call-dialog__hours { font-size: 13px; color: var(--c-muted); }
.call-dialog__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; width: 100%; }
.call-dialog__actions .btn { flex: 1 1 160px; padding: 0 16px; white-space: nowrap; }
@media (max-width: 480px) {
  .call-dialog__box { padding: 24px 20px 20px; }
  .call-dialog__phones a { font-size: 21px; }
}

/* Как протича изследването */
.steps-section { background: #FFFFFF; padding: clamp(56px, 7vw, 96px) var(--gutter); }
.steps-section__inner { max-width: var(--max-inner); margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr));
  gap: 20px;
}
.step {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 24px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: var(--c-soft-4);
}
.step__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 4px; }
.step__num {
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--c-navy);
  color: #FFFFFF;
  font-size: 17px;
  font-weight: 800;
}
.step__icon { flex: none; display: inline-flex; color: var(--c-teal); }
.step h3 { margin: 0; display: flex; align-items: center; gap: 8px; font-size: 17px; font-weight: 700; line-height: 1.35; color: var(--c-ink); }
.step p { margin: 0; font-size: 14px; }
.step__link { margin-top: auto; padding-top: 6px; display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; text-decoration: none; }
.step__link:hover { text-decoration: underline; }
/* Номерът, заглавието, текстът и линкът — на едни и същи редове във всички карти, дори когато заглавие с иконката е на два реда. */
@supports (grid-template-rows: subgrid) {
  .step { display: grid; grid-row: span 4; grid-template-rows: subgrid; row-gap: 10px; }
  .step__link { margin-top: 0; align-self: end; }
}

.checklist { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.checklist li { display: flex; gap: 10px; align-items: flex-start; }
.checklist .icon { flex: none; margin-top: 2px; color: var(--c-accent); }

/* ---------- Лента с европейските лога ---------- */

.eu-strip { background: #FFFFFF; border-top: 1px solid var(--c-line-2); }
.eu-strip .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 14px 28px;
  padding-top: 24px;
  padding-bottom: 24px;
}
.eu-strip img { display: block; flex: 0 1 440px; min-width: 0; width: 100%; max-width: 440px; height: auto; }
/* Лентата е във футъра (тъмен), затова цветът и рамката на фокуса се задават наново. */
.site-footer .eu-strip a { flex: 0 1 420px; min-width: 0; font-size: 13px; line-height: 1.5; color: var(--c-muted); text-decoration: none; }
.site-footer .eu-strip a:hover { color: var(--c-ink); text-decoration: underline; }
.site-footer .eu-strip :focus-visible { outline-color: var(--c-accent); }

/* ---------- Футър ---------- */

.site-footer { background: var(--c-ink); color: var(--c-foot-text); }
.brand-stripe { height: 6px; }
.site-footer__main {
  display: flex;
  flex-direction: column;
  gap: clamp(48px, 5vw, 64px);
  padding-top: clamp(56px, 7vw, 88px);
  padding-bottom: clamp(48px, 6vw, 64px);
}
.site-footer a { color: #FFFFFF; text-decoration: none; }
.site-footer a:hover { color: #FFFFFF; text-decoration: underline; text-underline-offset: 4px; }
.footer-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: 40px 72px;
}
.footer-about { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.footer-about img { display: block; height: 46px; width: auto; align-self: flex-start; }
.footer-logo { align-self: flex-start; border-radius: 6px; transition: opacity .15s; }
.footer-logo:hover { opacity: .85; }
.footer-logo:focus-visible { outline: 3px solid #FFFFFF; outline-offset: 4px; }
.footer-about p { margin: 0; max-width: 30em; font-size: 14px; line-height: 1.65; }
.footer-col { flex: 0 1 auto; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.footer-col a { padding: 2px 0; } /* поне 24px височина за пръст (WCAG 2.5.8) */
.footer-col--phones { gap: 4px; }
.footer-label { font-size: 12px; font-weight: 700; color: var(--c-foot-label); }
.footer-phone-main { font-size: 30px; font-weight: 800; line-height: 1.15; font-variant-numeric: tabular-nums; }
.footer-phone { font-size: 16px; font-weight: 700; font-variant-numeric: tabular-nums; }
.footer-col .strong { font-weight: 700; }

/* Град и временно съобщение в картите на манипулационните (страница „Контакти“) */
.point__city { font-size: 12px; font-weight: 700; color: var(--c-foot-label); }
.point__notice {
  align-self: flex-start;
  margin-top: 2px;
  padding: 3px 10px;
  border-radius: 8px;
  background: var(--c-warn-bg);
  color: var(--c-warn-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.45;
}

.site-footer__bottom { background: var(--c-foot-bottom); }
.site-footer__bottom .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 24px;
  padding-top: 18px;
  padding-bottom: 18px;
  font-size: 13px;
  color: var(--c-foot-bottom-text);
}
.site-footer__bottom .meta { display: flex; flex-wrap: wrap; gap: 8px 20px; }
.site-footer__bottom a { color: var(--c-foot-bottom-text); text-decoration: underline; }
.site-footer__bottom a:hover { color: #FFFFFF; }

/* ---------- Хедър на вътрешните страници ---------- */

/* Същият цветен фон като на началната страница — тъмносиньо към синьо. */
.page-hero {
  --r: clamp(70px, 10vw, 160px); /* Размер на вълната в ъгъла. */
  position: relative;
  overflow: hidden;
  color: #FFFFFF;
  background:
    radial-gradient(700px 320px at 10% 0%, rgba(255, 255, 255, 0.10), rgba(255, 255, 255, 0) 70%),
    linear-gradient(120deg, var(--c-ink) 0%, var(--c-navy) 55%, var(--c-accent) 100%);
}
.page-hero__inner {
  position: relative;
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(28px, 4vw, 48px) clamp(40px, 8vw, 140px) clamp(48px, 6vw, 72px) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.crumbs { font-size: 13px; color: var(--c-on-dark-2); }
.crumbs a { color: var(--c-on-dark); }
.crumbs a:hover { color: #FFFFFF; }
.page-hero h1 {
  margin: 0;
  font-size: clamp(28px, 3.4vw, 42px);
  font-weight: 800;
  line-height: 1.15;
  color: #FFFFFF;
  text-wrap: balance;
}
/* Тесен телефон — дълги думи в заглавието („Антифосфолипиден“, „трансглутаминаза“) да не опират в ръба. */
@media (max-width: 400px) {
  .page-hero h1 { font-size: 25px; }
}
@media (max-width: 340px) {
  .page-hero h1 { font-size: 21px; }
}
.page-hero__intro { margin: 0; max-width: 46em; font-size: 16px; line-height: 1.6; color: var(--c-on-dark); }
.page-hero__intro a { color: #FFFFFF; text-underline-offset: 3px; } /* Като пътя горе — синият линк не се чете на тъмния фон. */
.page-hero__note { margin: 0; font-size: 14px; color: var(--c-on-dark-2); }
.page-hero__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 13px; color: var(--c-on-dark-2); }
.page-hero .tag { border-color: transparent; }

/* Снимка до заглавието — страниците за „Карта Медика“ (аргумент visual на medica_page_hero()).
   На телефон е под въведението; „wide“ — само на широк екран (там, където в хедъра има търсачка). */
.page-hero__visual { display: flex; justify-content: center; padding: 12px 0 8px; }
.page-hero__visual .card-photo { max-width: 280px; }
.page-hero__visual--wide { display: none; }
@media (min-width: 1024px) {
  .page-hero--visual .page-hero__inner { min-height: 340px; justify-content: center; padding-right: calc(clamp(40px, 8vw, 140px) + 420px); }
  .page-hero__visual,
  .page-hero__visual--wide { display: block; position: absolute; top: 50%; right: clamp(40px, 8vw, 140px); width: 380px; padding: 0; transform: translateY(-50%); }
  .page-hero__visual .card-photo { max-width: 380px; margin: 0 auto; }
  .page-hero__visual--wide .card-photo { max-width: 300px; }
}

/* Търсачката върху тъмния фон */
.page-hero .search-field input { border-color: #FFFFFF; }
/* На телефон списъкът под търсачката трябва да се вижда още на първия екран. */
@media (max-width: 720px) {
  .page-hero:has(.price-search) .page-hero__inner { padding-bottom: 32px; }
}
.tag {
  display: inline-flex;
  align-items: center;
  padding: 3px 12px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1px solid var(--c-line);
  font-size: 12px;
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
}
a.tag:hover { border-color: var(--c-ink); color: var(--c-ink); }

/* ---------- Съдържание на страници и публикации ---------- */

.page-body {
  max-width: var(--max);
  margin: 0 auto;
  padding: clamp(32px, 5vw, 56px) var(--gutter) clamp(56px, 7vw, 88px);
}
.page-body--tight { padding-top: 24px; }

.entry-content { font-size: 16px; line-height: 1.7; }
.entry-content--after { margin-top: 48px; }
.entry-content > * { max-width: var(--text-col); margin-top: 0; margin-bottom: 1.1em; }
.entry-content > .alignwide,
.entry-content > .medica-cards,
.entry-content > .medica-steps,
.entry-content > .medica-job,
.entry-content > .medica-callout,
.entry-content > .wp-block-columns,
.entry-content > .wp-block-table,
.entry-content > .tablepress,
.entry-content > [id^="tablepress-"],
.entry-content > .dataTables_wrapper { max-width: var(--max-inner); }
.entry-content > .alignfull { max-width: none; }
.entry-content > :last-child { margin-bottom: 0; }

.entry-content h2,
.entry-content h3,
.entry-content h4 { color: var(--c-ink); line-height: 1.25; text-wrap: balance; }
.entry-content h2 { margin: 1.8em 0 0.6em; font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; }
.entry-content h3 { margin: 1.6em 0 0.5em; font-size: 19px; font-weight: 700; }
.entry-content h4 { margin: 1.4em 0 0.4em; font-size: 16px; font-weight: 700; }
.entry-content > h2:first-child,
.entry-content > h3:first-child { margin-top: 0; }
.entry-content strong { color: var(--c-ink); }
.entry-content .lead { font-size: 18px; line-height: 1.6; color: var(--c-ink); }
.entry-content a { text-underline-offset: 3px; }
.entry-content ul,
.entry-content ol { padding-left: 1.3em; }
.entry-content li { margin-bottom: 0.35em; }
.entry-content li::marker { color: var(--c-accent); }
.entry-content blockquote {
  margin-left: 0;
  padding: 16px 22px;
  border-left: 4px solid var(--c-accent);
  border-radius: 0 14px 14px 0;
  background: var(--c-soft);
  color: var(--c-ink);
}
.entry-content hr,
.entry-content .wp-block-separator { border: 0; border-top: 1px solid var(--c-line); margin: 2em 0; }
.entry-content img { border-radius: 16px; }
.entry-content figcaption { font-size: 13px; color: var(--c-muted); }
.entry-content .has-small-font-size,
.entry-content small { font-size: 13px; color: var(--c-muted); }

.wp-block-button__link,
.entry-content .wp-element-button {
  display: inline-flex;
  align-items: center;
  min-height: 50px;
  padding: 0 26px;
  border-radius: 999px;
  background: var(--c-accent);
  color: #FFFFFF;
  font-size: 15px;
  font-weight: 700;
  text-decoration: none;
}
.wp-block-button__link:hover { background: var(--c-ink); color: #FFFFFF; }
.wp-block-button.is-style-outline > .wp-block-button__link {
  border: 2px solid var(--c-accent);
  background: transparent;
  color: var(--c-accent);
}
.wp-block-button.is-style-outline > .wp-block-button__link:hover { background: var(--c-accent); color: #FFFFFF; }

/* Таблици (вкл. TablePress) */
.entry-content table,
.tablepress {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
  background: #FFFFFF;
}
.wp-block-table { overflow-x: auto; }
.entry-content th,
.entry-content td,
.tablepress th,
.tablepress td {
  padding: 11px 14px;
  border: 0;
  border-bottom: 1px solid var(--c-line-3);
  text-align: left;
  vertical-align: top;
}
@media (max-width: 480px) {
  .entry-content th,
  .entry-content td { padding: 10px 6px; font-size: 13.5px; -webkit-hyphens: auto; hyphens: auto; } /* Safari разбира само с -webkit- */
}
.entry-content thead th,
.tablepress thead th,
.tablepress tfoot th {
  background: var(--c-soft-2);
  color: var(--c-ink);
  font-weight: 700;
}
.tablepress td:last-child { white-space: nowrap; font-weight: 700; color: var(--c-ink); font-variant-numeric: tabular-nums; }
.tablepress tbody tr:hover > td { background: var(--c-soft-4); }
.dataTables_wrapper .dataTables_filter input,
.dataTables_wrapper .dataTables_length select {
  min-height: 42px;
  padding: 0 14px;
  border: 1.5px solid var(--c-chip-line);
  border-radius: 999px;
  font: inherit;
}

/* Въпроси и отговори (блок „Details“) */
.wp-block-details {
  margin-bottom: 10px;
  border: 1px solid var(--c-line);
  border-radius: 14px;
  background: #FFFFFF;
}
.wp-block-details summary {
  padding: 16px 18px;
  font-weight: 700;
  color: var(--c-ink);
  cursor: pointer;
}
.wp-block-details[open] summary { border-bottom: 1px solid var(--c-line-3); }
.wp-block-details > :not(summary) { margin: 14px 18px; }

/* Стилове за блоковете в началното съдържание */
.medica-cards {
  display: grid !important;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 16px;
}
.medica-cards > * { margin: 0 !important; }
.medica-card {
  padding: 22px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: #FFFFFF;
}
.medica-card > * { margin: 0 0 6px; }
.medica-card > :last-child { margin-bottom: 0; }
.medica-card h3,
.medica-card h4 { margin-top: 0; font-size: 16px; font-weight: 700; color: var(--c-ink); }
.medica-card p { font-size: 14px; color: var(--c-muted); }
.medica-callout {
  padding: clamp(24px, 3vw, 40px);
  border: 1px solid var(--c-line);
  border-radius: 20px;
  background: var(--c-soft-2);
}
.medica-callout > *,
.entry-content .medica-callout > :first-child { margin-top: 0; }
.medica-callout > :last-child { margin-bottom: 0; }
/* Място в чернова, което лабораторията трябва да потвърди — да се вижда, ако остане при публикуване. */
.entry-content mark.medica-todo { padding: 0 0.25em; border-radius: 4px; background: #FFE58A; color: #3D2E00; }
.entry-content .medica-checklist,
.test-sec--when ul { list-style: none; padding-left: 0; }
.entry-content .medica-checklist li,
.test-sec--when li { position: relative; padding-left: 30px; margin-bottom: 0.55em; }
.entry-content .medica-checklist li::before,
.test-sec--when li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.2em;
  width: 20px;
  height: 20px;
  background: var(--c-accent);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Номерирани стъпки като карти (напр. „С направление от НЗОК“) */
.entry-content .medica-steps {
  counter-reset: medica-step;
  list-style: none;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
  gap: 16px;
}
.entry-content .medica-steps > li {
  counter-increment: medica-step;
  margin: 0;
  padding: 22px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: var(--c-soft-4);
  font-size: 15px;
  line-height: 1.6;
}
.entry-content .medica-steps > li::before {
  content: counter(medica-step);
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  margin-bottom: 12px;
  border-radius: 50%;
  background: var(--c-navy);
  color: #FFFFFF;
  font-size: 16px;
  font-weight: 800;
}
.entry-content .medica-steps > li > strong:first-child { font-size: 17px; line-height: 1.35; }
/* Накратко — три карти с отметка; разпъват се на цялата ширина */
.medica-cards--facts { grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr)); }
.medica-cards--facts .medica-card strong { display: inline-flex; align-items: center; gap: 8px; margin-bottom: 4px; font-size: 17px; }
.medica-cards--facts .medica-card strong::before {
  content: "";
  flex: none;
  width: 22px;
  height: 22px;
  background: var(--c-teal);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
/* Числа (напр. „Диабетът в числа“ в новините) — голямо число и текст под него, без отметка. */
.medica-cards--stats { grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); }
.medica-cards--stats .medica-card strong { display: block; margin-bottom: 6px; font-size: clamp(22px, 2.6vw, 30px); font-weight: 800; line-height: 1.1; color: var(--c-accent); }
.medica-cards--stats .medica-card p { font-size: 15px; color: var(--c-text); }
.medica-cards--two { grid-template-columns: repeat(auto-fit, minmax(min(100%, 340px), 1fr)); }
.medica-card--accent { border-top: 4px solid var(--c-teal); }
.medica-cards--facts .medica-card p,
.medica-cards--two .medica-card p,
.entry-content .medica-cards--two .medica-card ul { font-size: 15px; color: var(--c-text); }
.entry-content .medica-cards--two .medica-card ul { margin: 0; padding-left: 1.2em; }
.entry-content .medica-cards--two .medica-card li { margin-bottom: 0.45em; }
/* „С направление от НЗОК“ — високоспециализираните изследвания: код по НЗОК и име, линк към описанието (medica_nzok_tests()). */
.entry-content .medica-cards--nzok .medica-card h4 { margin-bottom: 8px; }
.entry-content .medica-cards--nzok ul.medica-nzok-tests { margin: 0; padding: 0; list-style: none; } /* Без отстъпа на списъците в .medica-cards--two. */
.entry-content .medica-cards--nzok .medica-nzok-tests li { margin: 0; border-top: 1px solid var(--c-line-3); }
.entry-content .medica-cards--nzok .medica-nzok-tests li:first-child { border-top: 0; }
.entry-content .medica-nzok-tests a { display: flex; align-items: baseline; gap: 12px; padding: 8px 0; color: var(--c-ink); text-decoration: none; }
.entry-content .medica-nzok-tests a:hover .nzok-name { text-decoration: underline; text-underline-offset: 3px; }
.nzok-code { flex: none; min-width: 3.6em; padding: 1px 6px; border-radius: 6px; background: var(--c-soft-2); font-size: 13px; font-weight: 700; color: var(--c-accent); text-align: center; font-variant-numeric: tabular-nums; }
.nzok-name { font-size: 15px; line-height: 1.45; }
.entry-content .medica-chips { list-style: none; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.entry-content .medica-chips li {
  margin: 0;
  padding: 6px 14px;
  border: 1.5px solid var(--c-chip-line);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 600;
}
.entry-content .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 10px; }
/* „Кариери“ — карта на позицията: цветна лента горе, иконка, три цветни карти */
.medica-job {
  position: relative;
  overflow: hidden;
  padding: clamp(24px, 3.4vw, 40px);
  border: 1px solid var(--c-line);
  border-radius: 22px;
  background: #FFFFFF;
  box-shadow: 0 18px 40px rgba(25, 15, 73, 0.06);
}
.medica-job::before { content: ""; position: absolute; inset: 0 0 auto; height: 6px; background: linear-gradient(90deg, var(--c-accent), var(--c-teal) 55%, #F2B63D); }
.entry-content .medica-job > * { margin: 0 0 18px; }
.entry-content .medica-job > :last-child { margin-bottom: 0; }
.entry-content .medica-job > h3 { display: flex; align-items: center; gap: 14px; font-size: clamp(21px, 2.2vw, 26px); font-weight: 800; }
.medica-job > h3::before {
  content: "";
  flex: none;
  width: 50px;
  height: 50px;
  border-radius: 15px;
  background: var(--c-soft-2) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23285DAB' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='7' width='18' height='13' rx='2'/%3E%3Cpath d='M8.5 7V5.5A1.5 1.5 0 0 1 10 4h4a1.5 1.5 0 0 1 1.5 1.5V7M3 12.5h18'/%3E%3C/svg%3E") center / 26px no-repeat;
}
.entry-content .medica-job .medica-chips li { border-color: transparent; background: var(--c-soft-2); }
.medica-cards--job { grid-template-columns: repeat(auto-fit, minmax(min(100%, 250px), 1fr)); }
.medica-card[class*="tone--"] { border-color: transparent; background: var(--tone-soft); }
.entry-content .medica-card[class*="tone--"] h4 { display: flex; align-items: flex-start; gap: 10px; margin: 0 0 12px; font-size: 17px; color: var(--tone); }
/* Точката — до първия ред, когато заглавието е на два */
.medica-card[class*="tone--"] h4::before { content: ""; flex: none; width: 10px; height: 10px; margin-top: 0.33em; border-radius: 50%; background: var(--tone-icon); box-shadow: 0 0 0 4px var(--tone-mid); }
.entry-content .medica-card .medica-checklist { margin: 0; }
.entry-content .medica-card .medica-checklist li { font-size: 15px; line-height: 1.55; color: var(--c-text); }
.entry-content .medica-card[class*="tone--"] .medica-checklist li::before { background: var(--tone-icon); }
@media (max-width: 600px) {
  .medica-job { padding: 22px 18px; border-radius: 18px; }
  .medica-job > h3::before { width: 42px; height: 42px; border-radius: 12px; background-size: 22px; }
  .medica-cards--facts { gap: 10px; }
  .medica-cards--facts .medica-card { padding: 14px 16px; }
  /* Номерът вляво от текста — по-кратки карти на телефон */
  .entry-content .medica-steps { gap: 12px; }
  .entry-content .medica-steps > li { position: relative; padding: 18px 18px 18px 64px; }
  .entry-content .medica-steps > li::before { position: absolute; left: 16px; top: 16px; margin: 0; }
}

.alignleft { float: left; margin: 0 1.5em 1em 0; }
.alignright { float: right; margin: 0 0 1em 1.5em; }
.aligncenter { margin-left: auto; margin-right: auto; }

/* ---------- Ценоразпис ---------- */

.price-search { display: flex; flex-direction: column; gap: 10px; max-width: 880px; margin-top: 10px; }
.search-field { position: relative; }
.search-field > .icon { position: absolute; left: 20px; top: 19px; color: var(--c-ink); pointer-events: none; }
.search-field input {
  width: 100%;
  height: 60px;
  padding: 0 60px 0 54px;
  border: 2px solid var(--c-ink);
  border-radius: 999px;
  background: #FFFFFF;
  font: inherit;
  font-size: 16px;
  color: var(--c-ink);
  -webkit-appearance: none;
  appearance: none;
}
.search-field input::placeholder { color: var(--c-muted); opacity: 1; }
.search-field input::-webkit-search-cancel-button { display: none; }
.search-field__clear {
  position: absolute;
  right: 8px;
  top: 8px;
  width: 44px;
  height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 50%;
  background: var(--c-soft-2);
  color: var(--c-ink);
  cursor: pointer;
}
/* Таксата за вземане на материал — един ред над списъка */
.list-fee {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin: 0 0 14px;
  font-size: 13px;
  line-height: 1.5;
  color: var(--c-muted);
}
.list-fee .icon { flex: none; margin-top: 1px; color: var(--c-accent); }
.list-fee strong { color: var(--c-ink); }
.list-head__link {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
}
.list-head__link:hover { text-decoration: underline; }

/* Синьо каре към „Диагностични панели“ (цялото каре е линк), след списъка */
.list-banner { margin-top: 28px; }
.packages-banner {
  min-width: 0;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px 20px;
  padding: 18px 20px;
  border-radius: 16px;
  background: linear-gradient(120deg, var(--c-navy) 0%, var(--c-accent) 100%);
  color: #FFFFFF;
  text-decoration: none;
  transition: box-shadow .15s;
}
.packages-banner:hover { color: #FFFFFF; box-shadow: 0 14px 30px rgba(14, 42, 116, 0.25); }
.packages-banner__icon {
  flex: none;
  width: 48px;
  height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.14);
}
.packages-banner__text { flex: 1 1 220px; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.packages-banner__title { font-size: 17px; font-weight: 800; line-height: 1.3; }
.packages-banner__sub { font-size: 14px; line-height: 1.5; color: var(--c-on-dark); }
.packages-banner .btn { flex: none; min-height: 44px; padding: 0 20px; font-size: 13px; letter-spacing: 0.08em; }
.packages-banner:hover .btn { background: var(--c-soft-2); }
/* Същото каре на „Диагностични панели“ — с поле за търсене в отделните изследвания. */
.tests-banner__form { flex: 1 1 100%; display: flex; flex-wrap: wrap; gap: 10px; }
.tests-banner__form input {
  flex: 1 1 200px;
  min-width: 0;
  height: 44px;
  padding: 0 18px;
  border: 0;
  border-radius: 999px;
  font: inherit;
  font-size: 16px; /* iOS не увеличава страницата при писане */
  color: var(--c-ink);
}
.tests-banner__form input:focus { outline: 3px solid #FFFFFF; outline-offset: 2px; }
.tests-banner__form .btn { gap: 6px; }

/* Лентата с категориите остава залепена горе, докато се превърта списъкът. */
.cat-chips-wrap {
  position: sticky;
  top: 0;
  z-index: 15;
  margin-top: 12px;
  padding: 12px 0;
  background: #FFFFFF;
  box-shadow: 0 1px 0 var(--c-line-2);
}
.cat-chips-wrap .chip { min-height: 36px; padding: 0 14px; font-size: 13px; }
/* Под 1100px категориите са на един ред, който се плъзга встрани, за да не заемат половин екран. */
@media (max-width: 1100px) {
  .cat-chips-wrap .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
  .cat-chips-wrap .chips::-webkit-scrollbar { display: none; }
}
.admin-bar .cat-chips-wrap { top: 32px; }
@media (max-width: 782px) { .admin-bar .cat-chips-wrap { top: 46px; } }
@media (max-width: 600px) { .admin-bar .cat-chips-wrap { top: 0; } }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  flex: none;
  min-height: 42px;
  padding: 0 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  border: 1.5px solid var(--c-chip-line);
  background: #FFFFFF;
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  cursor: pointer;
}
.chip:hover { border-color: var(--c-ink); }
.chip__count { font-weight: 500; color: var(--c-muted); }
.chip[aria-pressed="true"] { background: var(--c-ink); border-color: var(--c-ink); color: #FFFFFF; }
.chip[aria-pressed="true"] .chip__count { color: var(--c-foot-text); }
.no-js .cat-chips-wrap,
.no-js .sort-chips,
.no-js .price-search { display: none; }
@media (max-width: 720px) {
  .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 4px; }
  .chips::-webkit-scrollbar { display: none; }
}

.list-section { padding-top: clamp(16px, 2vw, 22px); padding-bottom: clamp(56px, 7vw, 88px); }
.list-section--panels { padding-top: 28px; }
.list-section--panels .list-head { margin-bottom: 14px; }
.list-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  margin-bottom: 12px;
}
.list-head h2 { margin: 0; font-size: 20px; font-weight: 800; line-height: 1.3; color: var(--c-ink); }
.list-head__note { font-size: 13px; color: var(--c-muted); }
.notice-warn {
  margin: 0 0 12px;
  padding: 12px 16px;
  border-radius: 12px;
  background: var(--c-warn-bg);
  color: var(--c-warn-text);
  font-size: 14px;
  line-height: 1.5;
}
.list-foot { margin: 18px 0 0; font-size: 14px; }
.list-foot a { font-weight: 700; }

.price-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 440px), 1fr));
  align-items: start;
  gap: 10px;
}
.price-row {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: #FFFFFF;
}
.price-row__text { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.price-row__name { font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--c-ink); }
.price-row__meta { font-size: 12px; line-height: 1.4; color: var(--c-muted); }
.price-row__price,
.price-item__price {
  flex: none;
  font-size: 15px;
  font-weight: 800;
  color: var(--c-ink);
  white-space: nowrap;
  text-align: right;
  font-variant-numeric: tabular-nums;
}
/* Цени с карта: цената без карта (зачеркната) над цената с карта и „Безплатно“ — medica_price_html(), prices.js. */
.price-old { display: block; font-size: 12px; font-weight: 600; line-height: 1.2; color: var(--c-muted); text-decoration: line-through; }
.price-free { color: #1C6B3C; }

/* Акордеони (панели) */
.acc {
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: #FFFFFF;
  overflow: hidden;
}
.acc[open] { grid-column: 1 / -1; }
.acc > summary {
  min-height: 62px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 18px;
  list-style: none;
  cursor: pointer;
}
.acc > summary::-webkit-details-marker { display: none; }
.acc > summary:hover .acc__title { text-decoration: underline; text-underline-offset: 3px; }
.acc__title { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--c-ink); }
.acc__chev { flex: none; color: var(--c-ink); transition: transform .2s; }
.acc[open] .acc__chev { transform: rotate(180deg); }
.price-item {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--c-line-3);
}
.price-item__name { flex: 0 1 auto; min-width: 0; font-size: 15px; font-weight: 600; line-height: 1.4; color: var(--c-ink); }
.price-item { position: relative; gap: 4px; }
.price-item .price-item__price { margin-left: auto; padding-left: 12px; }

/* Ценоразпис: всички изследвания, разделени по категории */
.price-sections { display: flex; flex-direction: column; gap: 20px; }
.price-section {
  padding: 18px 22px 8px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: #FFFFFF;
  scroll-margin-top: 80px;
}
.price-section__head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 4px 16px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--c-ink);
}
.price-section__head h3 { flex: 1 1 auto; margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--c-ink); }
/* Заглавието на раздела е бутон, който свива списъка (prices.js). */
.price-section__toggle {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  min-height: 32px;
  padding: 0;
  border: 0;
  background: none;
  font: inherit;
  color: inherit;
  text-align: left;
  cursor: pointer;
}
.price-section__toggle:hover .price-section__name { color: var(--c-accent); }
.price-section__chev { flex: none; transition: transform .2s; }
.price-section__toggle[aria-expanded="false"] .price-section__chev { transform: rotate(-90deg); }
.price-section.is-collapsed { padding-bottom: 18px; }
.price-section.is-collapsed .price-section__head { padding-bottom: 0; border-bottom: 0; }
.no-js .price-section__chev { display: none; }
.price-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 420px), 1fr));
  column-gap: 40px;
}
.price-list .price-item:hover .price-item__name { color: var(--c-accent); }
/* Изследване с описание: името е линк, но изглежда като обикновен текст (подчертава се при посочване). */
.price-item__link { color: inherit; text-decoration: none; }
.price-item__link:hover,
.price-item__link:focus-visible {
  color: var(--c-accent);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

/* Материал за изследването: иконка „i“ с изскачащо поле (inc/samples.php) */
.price-row { position: relative; }
.price-row__line { display: flex; align-items: center; gap: 4px; }
.sample { flex: none; }
/* „i“ — дискретен кръг с тънък син контур (18 px); мястото за натискане остава 24 px. Кръгът е рамка на
   иконката, а нарисуваният в нея кръг е скрит. */
.sample__btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin: -2px 0;
  color: var(--c-accent);
  list-style: none;
  cursor: pointer;
}
.sample__btn .icon {
  box-sizing: border-box;
  width: 18px;
  height: 18px;
  padding: 1px;
  border: 1.5px solid currentColor;
  border-radius: 50%;
  background: #FFFFFF;
  transition: background-color .15s, color .15s;
}
.sample__btn .icon circle { display: none; }
.sample__btn::-webkit-details-marker { display: none; }
.sample__btn::marker { content: ""; }
.sample__btn:hover .icon { background: var(--c-soft-2); }
.sample[open] > .sample__btn { color: #FFFFFF; }
.sample[open] > .sample__btn .icon { border-color: var(--c-accent); background: var(--c-accent); }
.sample__pop {
  position: absolute;
  z-index: 10; /* под лентата с категории (15) */
  left: 0;
  top: calc(100% - 4px);
  width: min(360px, 100%);
  padding: 14px 16px;
  border: 2px solid var(--c-accent); /* Синя рамка като на „i“ — полето е ясно отделено от редовете под него. */
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: 0 16px 36px rgba(25, 15, 73, 0.18);
  font-size: 14px;
  font-weight: 400;
  line-height: 1.45;
  color: var(--c-ink);
}
.sample__title { margin: 0 0 8px; font-size: 12.5px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--c-navy); } /* Тъмносиньо — да се отличава от текста под него. */
.sample__item { display: flex; gap: 10px; margin: 0; }
.sample__item + .sample__item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-line-3); }
.sample__item strong { display: block; font-weight: 700; }
.sample__tube { display: block; color: var(--c-muted); }
/* Цветна точка: при епруветките — цветът на капачката (изписан и в текста), при другите материали — цвят по вида материал. */
.sample__cap {
  flex: none;
  width: 14px;
  height: 14px;
  margin-top: 3px;
  border: 1px solid rgba(25, 15, 73, 0.2);
  border-radius: 50%;
  background: var(--c-soft-2);
}
.sample__cap--edta { background: #8E6FC9; }
.sample__cap--serum { background: linear-gradient(135deg, #D9443A 50%, #F2C230 50%); }
.sample__cap--citrate { background: #7CC4E8; }
.sample__cap--heparin { background: #3FA45B; }
.sample__cap--metals { background: #2C4DB0; } /* Епруветка за микроелементи — тъмносиня */
.sample__cap--blood_culture { background: #7A1F2B; }
.sample__cap--capillary { background: #E0524A; }
.sample__cap--urine,
.sample__cap--urine24 { background: #F4C531; }
.sample__cap--feces { background: #8A5A35; }
.sample__cap--perianal { background: #C9A27A; }
.sample__cap--swab_genital,
.sample__cap--swab_throat,
.sample__cap--swab_np,
.sample__cap--swab { background: #EF8A3D; }
.sample__cap--nasal_smear { background: #9AA3B8; }
.sample__cap--sputum { background: #9DAA4E; }
.sample__cap--semen,
.sample__cap--prostate { background: #DDD5C4; }
.sample__cap--pap { background: #E26FA5; }
/* Същите точки пред категориите на „Изследвания и цени“ — цветът на епруветката. */
.cap-dots { display: inline-flex; gap: 3px; margin-right: 6px; vertical-align: -1px; }
.cap-dots .sample__cap { width: 12px; height: 12px; margin-top: 0; }
.price-section__head .cap-dots { margin-right: 8px; vertical-align: 0; }
.price-section__head .cap-dots .sample__cap { width: 14px; height: 14px; }
.chip[aria-pressed="true"] .sample__cap { border-color: rgba(255, 255, 255, 0.6); }
.sample__title--prep { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--c-line-3); }
.sample__prep { margin: 0; }
.sample__about { margin: 0; }
.sample__about + .sample__title { margin-top: 12px; padding-top: 10px; border-top: 1px solid var(--c-line-3); }
.sample__more { display: inline-flex; align-items: center; gap: 4px; margin-top: 12px; font-weight: 700; color: var(--c-accent); }
@media (max-width: 720px) {
  .price-section { padding: 14px 16px 4px; }
  .price-section.is-collapsed { padding-bottom: 14px; }
  .price-sections { gap: 12px; }
}

/* Панели */
.list-head__text { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; }
.sort-chips .chip { min-height: 38px; padding: 0 14px; font-size: 13px; }
.panel { transition: border-color .15s, box-shadow .15s; scroll-margin-top: 12px; }
.panel__count { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 0; font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--c-muted); }
/* „спестявате 9,20 €“ и цената поотделно (зачеркната) — medica_panel_info(). */
.panel__save { margin-left: 8px; padding: 1px 8px; border-radius: 999px; background: #E3F4EA; color: #1C6B3C; font-weight: 700; }
.panel__old { font-size: 13px; font-weight: 600; line-height: 1; color: var(--c-muted); text-decoration: line-through; font-variant-numeric: tabular-nums; }
.panel:hover { border-color: var(--c-chip-line); box-shadow: 0 10px 24px rgba(25, 15, 73, 0.06); }
.panel[open] { border-color: var(--c-ink); box-shadow: 0 16px 36px rgba(25, 15, 73, 0.10); }
.panel > summary { min-height: 72px; gap: 16px; padding: 14px 18px; justify-content: flex-start; }
.panel__head { flex: 1 1 auto; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.panel__hint { font-size: 13px; font-weight: 600; line-height: 1.45; color: var(--c-accent); }
/* Цена с етикет — като в картите с промоциите на началната страница */
.panel__price {
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}
.panel__price-label { font-size: 12px; font-weight: 600; line-height: 1; color: var(--c-muted); }
.panel__price-value {
  font-size: 22px;
  font-weight: 800;
  line-height: 1;
  color: var(--c-ink);
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
/* На телефон — по-ниски редове: без етикета „Цена“, по-малки отстъпи. */
@media (max-width: 720px) {
  .panel > summary { min-height: 0; gap: 10px; padding: 12px 12px 12px 16px; }
  .panel .acc__title { font-size: 15px; }
  .panel__head { gap: 2px; }
  .panel__price-label { display: none; }
  .panel__price-value { font-size: 18px; }
  .panel__body { padding: 12px 16px 16px; gap: 14px; }
}
.panel__body {
  border-top: 1px solid var(--c-line-3);
  padding: 16px 18px 20px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: var(--c-soft-4);
}
.panel__group { display: flex; flex-direction: column; gap: 8px; }
.panel__group-title { font-size: 13px; font-weight: 700; color: var(--c-ink); }
/* Изследванията в панела — компактни „хапчета“ един до друг, вместо по едно на ред. */
.panel-list,
.param-chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.panel-list li,
.param-chips .panel-item {
  padding: 5px 11px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: #FFFFFF;
  font-size: 13px;
  line-height: 1.4;
  color: var(--c-ink);
}
.param-chips .panel-item { border-color: transparent; background: var(--c-soft-2); }
.panel-list .icon { display: none; }
/* Показател с описание — цялото „хапче“ води към „Научи повече“ (medica_panel_item_url). */
.panel-list li:has(> a) { padding: 0; }
.panel-list li > a { display: block; padding: 5px 11px; border-radius: inherit; color: inherit; text-decoration: none; }
.panel-list li:has(> a):hover,
.param-chips a.panel-item:hover { border-color: var(--c-accent); color: var(--c-accent); }
.param-chips a.panel-item { text-decoration: none; }
.panel__tip { display: flex; align-items: center; gap: 6px; margin: 2px 0 0; font-size: 12.5px; color: var(--c-muted); }
.panel__tip .icon { flex: none; color: var(--c-accent); }
.panel-list li > a:focus-visible,
.param-chips a.panel-item:focus-visible { outline: 3px solid var(--c-ring); outline-offset: 1px; }
/* Кръвна картина / урина — свит ред, който се отваря с показателите. */
.panel__sub > summary {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: #FFFFFF;
  list-style: none;
  cursor: pointer;
}
.panel__sub > summary::-webkit-details-marker { display: none; }
.panel__sub > summary:hover { border-color: var(--c-chip-line); }
.panel__sub-chev { transition: transform .2s; }
.panel__sub[open] .panel__sub-chev { transform: rotate(180deg); }
.panel__sub { display: block; } /* details като flex контейнер не работи навсякъде */
.panel__sub .param-chips { margin-top: 8px; }
/* Намереното при търсене */
.panel-list li.is-match { border-color: #E8C34A; background: #FFF3C4; font-weight: 700; }
.param-chips .panel-item.is-match { background: var(--c-accent); color: #FFFFFF; font-weight: 600; }

/* ---------- Цветове на категориите (новини, „Кариери“) ---------- */

/* --tone — текст (контраст поне 4,5:1 върху --tone-soft), --tone-icon — иконки, --tone-soft / --tone-mid — светлият фон. */
.tone--blue   { --tone: #285DAB; --tone-icon: #2F6BC4; --tone-soft: #EAF0FB; --tone-mid: #C9DAF6; }
.tone--teal   { --tone: #2C6E7C; --tone-icon: #2F8C8F; --tone-soft: #E3F3F1; --tone-mid: #BDE3DE; }
.tone--sun    { --tone: #8A5A00; --tone-icon: #D98A12; --tone-soft: #FFF3D6; --tone-mid: #FFDF8F; }
.tone--berry  { --tone: #B0306A; --tone-icon: #D0457F; --tone-soft: #FCE9F1; --tone-mid: #F6C3D9; }
.tone--violet { --tone: #5B44B2; --tone-icon: #6A52C8; --tone-soft: #EFEBFB; --tone-mid: #D6CCF5; }
.tone--green  { --tone: #2A7247; --tone-icon: #2F8A55; --tone-soft: #E5F4EA; --tone-mid: #BFE3CB; }
.tag--tone { border-color: transparent; background: var(--tone-soft); color: var(--tone); }
a.tag--tone:hover { border-color: var(--tone); color: var(--tone); }

/* ---------- Новини ---------- */

/* Категориите като цветни бутони над списъка */
.news-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 24px; }
.news-filter__chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 42px;
  padding: 0 18px;
  border: 1.5px solid var(--tone-mid, var(--c-line));
  border-radius: 999px;
  background: var(--tone-soft, #FFFFFF);
  color: var(--tone, var(--c-ink));
  font-size: 14px;
  font-weight: 700;
  text-decoration: none;
}
.news-filter__chip .icon { color: var(--tone-icon, currentColor); }
.news-filter__chip:hover { border-color: var(--tone, var(--c-ink)); color: var(--tone, var(--c-ink)); }
.news-filter__chip[aria-current="page"] { border-color: var(--tone, var(--c-ink)); background: var(--tone, var(--c-ink)); color: #FFFFFF; }
.news-filter__chip[aria-current="page"] .icon { color: #FFFFFF; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: 22px;
}
.news-card {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid var(--c-line);
  border-radius: 18px;
  background: #FFFFFF;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}
.news-card:hover { border-color: var(--tone-mid, var(--c-chip-line)); box-shadow: 0 18px 36px rgba(25, 15, 73, 0.10); transform: translateY(-3px); }
.news-card:has(a:focus-visible) { outline: 3px solid var(--c-ring); outline-offset: 2px; }
.news-card__media { aspect-ratio: 16 / 9; background: var(--tone-soft, var(--c-soft-2)); }
.news-card__media img { display: block; width: 100%; height: 100%; object-fit: cover; }
/* Без снимка — светло цветно поле с иконката на категорията */
.news-card__cover {
  position: relative;
  height: 132px;
  overflow: hidden;
  background: linear-gradient(135deg, var(--tone-soft) 0%, var(--tone-mid) 100%);
}
.news-card__cover::before,
.news-card__cover::after { content: ""; position: absolute; border-radius: 50%; }
.news-card__cover::before { right: -46px; bottom: -86px; width: 200px; height: 200px; border: 20px solid rgba(255, 255, 255, 0.55); }
.news-card__cover::after { right: 128px; top: -24px; width: 64px; height: 64px; background: rgba(255, 255, 255, 0.45); }
.news-card__icon {
  position: absolute;
  left: 24px;
  bottom: 22px;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 60px;
  height: 60px;
  border-radius: 18px;
  background: #FFFFFF;
  color: var(--tone-icon);
  box-shadow: 0 10px 22px rgba(25, 15, 73, 0.10);
}
.news-card__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 20px 24px 24px; }
.news-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: 12.5px; font-weight: 600; color: var(--c-muted); }
.news-card__meta time { display: inline-flex; align-items: center; gap: 6px; }
.news-card__meta time .icon { color: var(--tone-icon, var(--c-accent)); }
.news-card__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.35; color: var(--c-ink); }
.news-card__title a { color: inherit; text-decoration: none; transition: color .15s; }
.news-card__title a::after { content: ""; position: absolute; inset: 0; }
.news-card:hover .news-card__title a { color: var(--tone, var(--c-accent)); }
.news-card__excerpt { margin: 0; font-size: 14px; line-height: 1.6; }
.news-card__more { margin-top: auto; padding-top: 4px; display: inline-flex; align-items: center; gap: 6px; font-size: 14px; font-weight: 700; color: var(--tone, var(--c-accent)); }
.news-card__more .icon { transition: transform .15s; }
.news-card:hover .news-card__more .icon { transform: translateX(3px); }
@media (prefers-reduced-motion: reduce) {
  .news-card,
  .news-card__more .icon { transition: none; }
  .news-card:hover { transform: none; }
}
/* Най-новата — голяма карта на два стълба; на телефон е като останалите */
@media (min-width: 800px) {
  .news-card--wide { grid-column: span 2; display: grid; grid-template-columns: minmax(220px, 40%) 1fr; }
  .news-card--wide .news-card__cover,
  .news-card--wide .news-card__media { height: auto; min-height: 270px; aspect-ratio: auto; }
  .news-card--wide .news-card__cover::before { width: 280px; height: 280px; right: -70px; bottom: -120px; border-width: 26px; }
  .news-card--wide .news-card__icon { left: 50%; top: 50%; bottom: auto; width: 100px; height: 100px; border-radius: 30px; transform: translate(-50%, -50%); }
  .news-card--wide .news-card__icon .icon { width: 46px; height: 46px; }
  .news-card--wide .news-card__body { gap: 12px; padding: 30px 34px 32px; }
  .news-card--wide .news-card__title { font-size: clamp(21px, 2vw, 25px); }
  .news-card--wide .news-card__excerpt { font-size: 15px; }
}
@media (max-width: 600px) {
  .news-card__cover { height: 112px; }
  .news-card__icon { width: 52px; height: 52px; border-radius: 16px; bottom: 18px; left: 20px; }
  .news-card__body { padding: 18px 20px 22px; }
}

/* Под новината — „Още новини“ върху светъл фон */
.more-news { border-top: 1px solid var(--c-line-3); background: linear-gradient(180deg, var(--c-soft) 0%, #FFFFFF 100%); }
.more-news__title { margin: 0 0 22px; font-size: clamp(22px, 2.2vw, 28px); font-weight: 800; line-height: 1.25; color: var(--c-ink); }

.pagination { margin-top: 32px; }
.pagination .nav-links { display: flex; flex-wrap: wrap; gap: 6px; }
.pagination .page-numbers {
  min-width: 44px;
  height: 44px;
  padding: 0 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--c-line);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--c-ink);
  font-weight: 700;
  text-decoration: none;
}
.pagination .page-numbers.current { background: var(--c-ink); border-color: var(--c-ink); color: #FFFFFF; }
.pagination a.page-numbers:hover { border-color: var(--c-ink); }

.post-figure { max-width: var(--text-col); margin: 0 0 28px; }
.post-figure img { display: block; width: 100%; border-radius: 16px; }
.back-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 36px;
  font-weight: 700;
  text-decoration: none;
}
.empty-state { padding: 32px; border: 1px dashed var(--c-chip-line); border-radius: 16px; text-align: center; }

/* ---------- Описание на изследване ---------- */

.tag--loinc { gap: .35em; font-variant-numeric: tabular-nums; } /* flex маха интервала след <abbr> */
.tag--loinc abbr { text-decoration: none; }
.tag--price { background: #2C6E7C; color: #FFFFFF; } /* по-тъмен тюркоаз — контраст 5,8:1 с бял текст */
/* Отворено от „С направление от НЗОК“ — вместо цена (medica_nzok_view()). */
.tag--nzok { background: #E3F4EA; color: #1C6B3C; font-weight: 700; white-space: nowrap; }
.test-card--nzok { border-color: #BFE3CC; background: #F4FBF6; }
.test-card__link { font-size: 14px; font-weight: 700; }
.tag--tube { gap: 6px; } /* Епруветката — цветът на капачката */
.tag--tube .sample__cap { width: 12px; height: 12px; margin-top: 0; }
.test-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 340px;
  align-items: start;
  gap: 24px 48px;
}
.test-aside { position: sticky; top: 24px; display: flex; flex-direction: column; gap: 16px; }
.test-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 22px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: #FFFFFF;
}
.test-card--soft { background: var(--c-soft-2); }
.test-card h2 { margin: 0; font-size: 18px; font-weight: 800; line-height: 1.3; color: var(--c-ink); }
.test-card p { margin: 0; font-size: 14px; line-height: 1.55; }
.test-prices { list-style: none; margin: 0; padding: 0; }
.test-prices li {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--c-line-3);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.4;
  color: var(--c-ink);
}
.test-prices li span:last-child { flex: none; font-weight: 800; white-space: nowrap; }
.test-card .test-card__note { font-size: 13px; color: var(--c-muted); }
.test-card .btn { align-self: flex-start; }
.test-links { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; font-size: 14px; font-weight: 700; }
.test-content table { font-size: 14px; }
.test-content th,
.test-content td { padding: 10px 12px; }
.test-content td:nth-child(n+3) { white-space: nowrap; font-variant-numeric: tabular-nums; } /* LOINC */
.page-hero__meta--codes { margin-top: -6px; }
.page-hero__meta--codes .tag--loinc { padding: 2px 10px; border: 1px solid rgba(255, 255, 255, 0.35); background: transparent; color: var(--c-on-dark); font-weight: 600; }

/* Бързи връзки към разделите */
.test-toc { margin-bottom: 32px; }
.test-toc__list { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.entry-content .test-toc__list li { margin: 0; }
.test-toc a {
  display: inline-flex;
  align-items: center;
  min-height: 38px;
  padding: 0 14px;
  border: 1.5px solid var(--c-chip-line);
  border-radius: 999px;
  background: #FFFFFF;
  color: var(--c-ink);
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.test-toc a:hover { border-color: var(--c-ink); }

/* Разделите — с иконка и линия между тях */
.test-content h2 { display: flex; align-items: center; gap: 12px; scroll-margin-top: 20px; }
.test-content > .test-sec > h2:first-child,
.test-practical h2 { margin-top: 0; }
.test-sec__icon {
  flex: none;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: var(--c-soft-2);
  color: var(--c-accent);
}
.test-content > :is(.test-sec, .test-practical) + :is(.test-sec, .test-practical) { margin-top: 36px; padding-top: 32px; border-top: 1px solid var(--c-line-3); }
.test-content > :is(.test-sec, .test-practical) + .medica-callout { margin-top: 36px; }
.test-sec > :last-child { margin-bottom: 0; }

/* Подготовка и проба — две карти една до друга */
.test-practical { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr)); gap: 16px; }
.test-practical .test-sec { padding: 22px; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-soft-4); }
.test-practical h2 { font-size: 20px; margin-bottom: 12px; }
.test-practical .test-sec__icon { width: 36px; height: 36px; background: #FFFFFF; }
.test-practical p,
.test-practical li { font-size: 15px; line-height: 1.6; }
.test-practical ul { list-style: none; padding-left: 0; }
.test-practical li { margin-bottom: 12px; }

/* Какво може да означава резултатът — всяко тълкуване в отделна карта */
.test-sec--results ul { list-style: none; padding-left: 0; display: grid; gap: 10px; }
.entry-content .test-sec--results li {
  margin: 0;
  padding: 14px 16px 14px 20px;
  border: 1px solid var(--c-line);
  border-radius: 12px;
  background: #FFFFFF;
  box-shadow: inset 4px 0 0 var(--c-accent);
}
.test-res > strong:first-child { display: block; margin-bottom: 2px; }
.test-sep { display: none; }

/* Изследванията поотделно (inc/test-info.php) — карта за всяко, води към отделната му страница.
   Бутоните (.test-item-index) — „Включва“ и „Често се назначава заедно с“ на отделната страница. */
.test-item-index { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.entry-content .test-item-index li { margin: 0; }
.test-item-index a {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  padding: 0 12px;
  border-radius: 999px;
  background: var(--c-soft-2);
  color: var(--c-ink);
  font-size: 13.5px;
  font-weight: 600;
  text-decoration: none;
}
.test-item-index a:hover { background: var(--c-soft-3); }
.entry-content ul.test-items { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); gap: 12px; }
.test-item {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 18px 20px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: #FFFFFF;
  scroll-margin-top: 20px;
  transition: border-color .15s, box-shadow .15s;
}
.entry-content .test-items .test-item { margin: 0; }
.test-item:hover { border-color: var(--c-chip-line); box-shadow: 0 10px 24px rgba(25, 15, 73, 0.08); }
.test-item:has(.test-item__link:focus-visible) { outline: 3px solid var(--c-ring); outline-offset: 2px; }
.test-item__link:focus-visible { outline: none; }
.test-item:target,
.test-item.is-target { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-ring); }
.test-item--pack { background: var(--c-soft-4); }
.test-item__top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.entry-content .test-item h3 { margin: 0; font-size: 18px; line-height: 1.3; }
.test-item__link { color: var(--c-ink); text-decoration: none; }
.test-item__link::after { content: ""; position: absolute; inset: 0; border-radius: inherit; } /* Цялата карта е линк. */
.test-item:hover .test-item__link { text-decoration: underline; text-underline-offset: 3px; }
.test-item__top .tag { flex: none; margin-top: 2px; }
.entry-content .test-item__lead { margin: 6px 0 0; font-size: 15px; line-height: 1.55; color: var(--c-text); }
.test-item__toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: auto; padding-top: 10px; font-size: 14px; font-weight: 700; color: var(--c-accent); }

/* Отделната страница на изследване (single-medica_test-item.php) */
.page-hero .tag--lg { padding: 5px 14px; font-size: 16px; font-weight: 800; } /* Цената — първото, което се търси. */
.test-single > :is(.test-sec, .test-practical) + :is(.test-sec, .test-practical) { margin-top: 30px; padding-top: 28px; }
.test-single > :is(.test-sec, .test-practical) + .medica-callout,
.test-single > .medica-callout + :is(.test-sec, .test-practical) { margin-top: 30px; }
.test-practical--three { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.test-practical--three h2 { font-size: 18px; }
.entry-content .test-fact { font-size: 17px; font-weight: 700; color: var(--c-ink); } /* Кога е готов резултатът */
/* Повишени / понижени стойности — малка стрелка пред заглавието. */
.test-res__arrow { display: inline-grid; place-items: center; width: 22px; height: 22px; margin-right: 8px; border-radius: 7px; background: var(--c-soft-2); color: var(--c-accent); vertical-align: -5px; }
/* Сгъваеми карти (medica_test_drop()): изследванията в пакет, „Изчислява се от“, показателите на ПКК. */
.entry-content .test-sec__intro { font-size: 14.5px; color: var(--c-muted); }
.test-drops { display: grid; gap: 10px; margin-top: 14px; }
.test-drop { border: 1px solid var(--c-line); border-radius: 14px; background: #FFFFFF; scroll-margin-top: 20px; transition: border-color .15s; }
.test-drop[open] { border-color: var(--c-chip-line); }
.test-drop:target { border-color: var(--c-accent); box-shadow: 0 0 0 3px var(--c-ring); }
.test-drop__head { display: block; padding: 14px 18px; list-style: none; cursor: pointer; }
.test-drop__head::-webkit-details-marker { display: none; }
.test-drop__head::marker { content: ""; }
.test-drop__name { display: block; font-size: 16.5px; font-weight: 700; line-height: 1.35; color: var(--c-ink); }
.test-drop__head:hover .test-drop__name { text-decoration: underline; text-underline-offset: 3px; }
.test-drop__unit { font-size: 13px; font-weight: 600; color: var(--c-muted); white-space: nowrap; }
.test-drop__lead { display: block; margin-top: 4px; font-size: 14.5px; line-height: 1.5; color: var(--c-text); }
.test-drop__toggle { display: inline-flex; align-items: center; gap: 4px; margin-top: 6px; font-size: 13.5px; font-weight: 700; color: var(--c-accent); }
.test-drop__toggle .icon { transition: transform .2s; }
.test-drop[open] .test-drop__toggle .icon { transform: rotate(180deg); }
.test-drop__less,
.test-drop[open] .test-drop__more { display: none; }
.test-drop[open] .test-drop__less { display: inline; }
.test-drop__body { padding: 2px 18px 16px; border-top: 1px solid var(--c-line-3); }
.entry-content .test-drop__label { margin: 14px 0 4px; font-size: 12px; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; color: var(--c-navy); }
.entry-content .test-drop__body p,
.entry-content .test-drop__body li { font-size: 15px; line-height: 1.6; }
.entry-content .test-drop__body p { margin: 0; }
.entry-content .test-drop__body ul { margin: 0; padding-left: 1.2em; }
.entry-content .test-drop__body ul.test-drop__res { display: grid; gap: 10px; margin-top: 12px; padding-left: 0; list-style: none; }
.entry-content .test-drop__res li { margin: 0; }
.test-drop__res strong { display: block; margin-bottom: 2px; color: var(--c-ink); }
.entry-content .test-drop__note { margin-top: 12px; padding: 10px 14px; border-radius: 10px; background: var(--c-soft-2); font-size: 14px; }
.test-drop__foot { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--c-line-3); }
.test-drop__link { display: inline-flex; align-items: center; gap: 4px; font-size: 14px; font-weight: 700; }
@media (max-width: 720px) {
  .test-drop__head { padding: 12px 14px; }
  .test-drop__body { padding: 2px 14px 14px; }
  .test-drop__name { font-size: 15.5px; }
}
@media (prefers-reduced-motion: reduce) { .test-drop__toggle .icon { transition: none; } }
.test-note__title { display: flex; align-items: center; gap: 8px; font-weight: 800; color: var(--c-ink); }
.entry-content .test-note__title { margin-bottom: 6px; }
.test-note__title .icon { flex: none; color: var(--c-accent); }
.test-practical .sample__item + .sample__item { margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--c-line); }
.entry-content .test-sec__hint { margin-top: 8px; font-size: 14px; color: var(--c-muted); }
.test-content > .medica-callout + :is(.test-sec, .test-practical) { margin-top: 36px; }
.entry-content .test-sec .test-item-index { margin-top: 4px; }
.entry-content > .test-back { margin-top: 40px; }
.test-back a { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; text-decoration: none; }
.test-back a:hover { text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 720px) {
  .test-item { padding: 16px; }
  .entry-content .test-item h3 { font-size: 17px; }
  .entry-content .test-item__lead { font-size: 14.5px; line-height: 1.5; }
  .test-item-index a { min-height: 32px; font-size: 13px; }
  /* LOINC кодовете в хедъра са за лекари — на телефон са в „Показатели“; на отделното изследване остават. */
  .page-hero__meta--codes:not(.page-hero__meta--item) { display: none; }
  /* Подготовка, проба и срок — една обща карта с редове вместо три високи карти. */
  .test-practical--three { gap: 0; border: 1px solid var(--c-line); border-radius: 16px; background: var(--c-soft-4); overflow: hidden; }
  .test-practical--three .test-sec { padding: 16px; border: 0; border-radius: 0; background: none; }
  .test-practical--three .test-sec + .test-sec { border-top: 1px solid var(--c-line); }
  .test-practical--three h2 { margin-bottom: 6px; font-size: 16px; }
  .test-practical--three .test-sec__icon { width: 30px; height: 30px; border-radius: 9px; }
  .test-single > :is(.test-sec, .test-practical) + :is(.test-sec, .test-practical) { margin-top: 24px; padding-top: 22px; }
}

@media (max-width: 1100px) {
  .test-layout { grid-template-columns: minmax(0, 1fr); } /* иначе таблиците разтягат колоната на телефон */
  .test-aside { position: static; }
}
@media (max-width: 720px) {
  .test-toc { margin-bottom: 24px; }
  .test-toc__list { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 calc(-1 * var(--gutter)); padding: 0 var(--gutter) 4px; }
  .test-toc__list::-webkit-scrollbar { display: none; }
  .test-sec__icon { width: 36px; height: 36px; border-radius: 10px; }
}
/* Показатели на телефон — всеки ред като карта: име и LOINC отгоре, описанието отдолу. */
@media (max-width: 600px) {
  .test-content .wp-block-table { overflow: visible; }
  .test-content table,
  .test-content tbody { display: block; }
  .test-content thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .test-content tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 2px 12px; padding: 12px 2px; border-bottom: 1px solid var(--c-line-3); }
  .test-content td { display: block; padding: 0; border: 0; font-size: 14px; line-height: 1.5; }
  .test-content td:nth-child(1) { grid-column: 1; grid-row: 1; font-weight: 700; color: var(--c-ink); }
  .test-content td:nth-child(2) { grid-column: 1 / -1; color: var(--c-text); }
  .test-content td:nth-child(3) { grid-column: 2; grid-row: 1; font-size: 12.5px; color: var(--c-muted); text-align: right; }
  .test-content td:nth-child(3)::before { content: "LOINC "; font-weight: 700; }
}

/* ---------- Резултати ---------- */

.results-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 20px;
  max-width: var(--max-inner);
  margin-top: 28px;
}
.result-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: clamp(24px, 3vw, 32px);
  border: 1px solid var(--c-line);
  border-radius: 20px;
  background: #FFFFFF;
}
.result-card__label { font-size: 12px; font-weight: 700; letter-spacing: 0.06em; color: var(--c-accent); text-transform: uppercase; }
.result-card__towns { margin: 0; font-size: 17px; font-weight: 700; line-height: 1.45; color: var(--c-ink); }
.result-card .btn { align-self: flex-start; margin-top: auto; }

/* „Къде са данните за вход?“ — рисунка на талона и стъпките */
.talon-help {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 28px 48px;
  max-width: var(--text-col);
  margin-top: 36px;
  padding: clamp(22px, 3vw, 32px);
  border-radius: 20px;
  background: var(--c-soft-2);
}
/* Талонът — като истинския: бланка със синьо-лилав печат и залепен термоетикет с данните за вход. */
.talon {
  --talon-ink: #1F2C9C;
  --talon-print: linear-gradient(90deg, #1F2C9C 0%, #2A33A6 55%, #7E4BC0 100%);
  flex: 0 0 270px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 18px 16px 12px;
  border-radius: 4px;
  background: #FFFFFF;
  box-shadow: 0 12px 28px rgba(25, 15, 73, 0.16);
  transform: rotate(-2deg);
  font-family: Arial, Helvetica, sans-serif;
  color: var(--talon-ink);
  text-align: center;
}
.talon__logo {
  display: block;
  width: 82%;
  aspect-ratio: 5136 / 1392;
  background: var(--talon-print);
  -webkit-mask: url("../img/logo.svg") center / contain no-repeat;
  mask: url("../img/logo.svg") center / contain no-repeat;
}
.talon__addr { font-size: 11px; line-height: 1.35; color: #2A2F6E; }
.talon__tel { font-size: 11px; font-weight: 700; color: #141A5C; }
.talon__hours {
  position: relative;
  align-self: stretch;
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-top: 8px;
  padding: 12px 10px 8px;
  border: 1.5px dotted #6C72A8;
  border-radius: 8px;
  font-size: 11px;
}
.talon__hours-title { position: absolute; top: -8px; left: 50%; transform: translateX(-50%); padding: 0 6px; background: #FFFFFF; font-size: 12px; font-weight: 700; text-transform: uppercase; white-space: nowrap; }
.talon__hours-sub { font-size: 10px; font-weight: 700; text-transform: uppercase; }
.talon__hours-row { display: flex; justify-content: space-between; gap: 8px; color: #2A2F6E; }
.talon__big { margin-top: 4px; font-size: 30px; font-weight: 700; line-height: 1; letter-spacing: .02em; text-transform: uppercase; color: var(--talon-ink); }
.talon__for { font-size: 12px; font-weight: 700; color: transparent; background: var(--talon-print); -webkit-background-clip: text; background-clip: text; }
/* Залепеният етикет — термопечат, леко изместен като на снимката */
.talon__sticker {
  align-self: stretch;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  margin: 6px -6px 0 -4px;
  padding: 8px 10px 10px;
  border-top: 2px solid var(--talon-ink);
  border-radius: 0 0 6px 6px;
  background: #FAFAF7;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
  font-family: "Courier New", ui-monospace, monospace;
  color: #1A1A1A;
  text-align: left;
}
.talon__mono { font-size: 10px; white-space: nowrap; overflow: hidden; max-width: 100%; }
.talon__box { display: grid; grid-template-columns: 1fr 1fr; width: 100%; border: 1.5px solid #1A1A1A; }
.talon__name { grid-column: 1 / -1; padding: 3px 6px; border-bottom: 1px solid #1A1A1A; font-size: 11px; }
.talon__cell { position: relative; display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 4px 4px 5px; }
.talon__cell + .talon__cell { border-left: 1.5px solid #1A1A1A; }
.talon__label { font-size: 10px; }
.talon__cell strong { padding: 0 4px; border-radius: 3px; background: #FFF0A8; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.talon__num {
  position: absolute;
  top: -9px;
  left: -7px;
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--c-accent);
  color: #FFFFFF;
  font-family: Montserrat, Arial, sans-serif;
  font-size: 11px;
  font-weight: 800;
}
.talon__barcode { display: block; width: 58%; height: 30px; fill: #111111; }
.talon__caption { align-self: flex-end; margin-top: 2px; font-family: Montserrat, Arial, sans-serif; font-size: 10px; color: var(--c-muted); }
/* Снимката на талона (template-results.php) — плътна, тъмният режим не я променя. */
.talon--img { display: block; flex-basis: 220px; padding: 0; overflow: hidden; }
.talon--img img { display: block; width: 100%; height: auto; }
.talon-help__text { flex: 1 1 280px; min-width: 0; }
.talon-help h2 { margin: 0 0 12px; font-size: 22px; font-weight: 800; line-height: 1.25; color: var(--c-ink); }
.talon-help__steps { margin: 0; padding-left: 22px; display: flex; flex-direction: column; gap: 8px; }
.talon-help__steps strong { color: var(--c-ink); }
.talon-help__note { margin: 14px 0 0; font-size: 14px; }
.talon-help__note a { font-weight: 700; white-space: nowrap; }
@media (max-width: 560px) {
  .talon { flex-basis: auto; width: 100%; max-width: 290px; margin: 0 auto; transform: none; }
  .talon--img { max-width: 230px; }
}

/* ---------- Контакти ---------- */

.contact-top {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: 20px;
  max-width: var(--max-inner);
}
.contact-card {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: clamp(24px, 3vw, 36px);
  border: 1px solid var(--c-line);
  border-radius: 20px;
  background: var(--c-soft-2);
}
.contact-card h2 { margin: 0; font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--c-ink); }
.contact-line { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.contact-line .icon { flex: none; margin-top: 3px; color: var(--c-accent); }
.contact-line a { font-weight: 700; color: var(--c-ink); text-decoration: none; font-variant-numeric: tabular-nums; }
.contact-line a:hover { text-decoration: underline; }
.contact-map { min-height: 320px; overflow: hidden; border: 1px solid var(--c-line); border-radius: 20px; background: var(--c-soft-2); }
.contact-map iframe { display: block; width: 100%; height: 100%; min-height: 320px; border: 0; }

.section-title { margin: clamp(40px, 5vw, 64px) 0 18px; font-size: 22px; font-weight: 800; line-height: 1.2; color: var(--c-ink); }
.points-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr));
  gap: 16px;
  max-width: var(--max-inner);
}
.point-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px 22px;
  border: 1px solid var(--c-line);
  border-radius: 16px;
  background: #FFFFFF;
  font-size: 14px;
}
.point-card .point__city { color: var(--c-accent); }
.point-card__address { font-size: 16px; font-weight: 700; line-height: 1.35; color: var(--c-ink); text-decoration: none; }
.point-card__address:hover { text-decoration: underline; }
.point-card__note { color: var(--c-muted); font-size: 13px; }
.point-card__hours { display: flex; gap: 8px; align-items: flex-start; font-variant-numeric: tabular-nums; }
.point-card__hours .icon { flex: none; margin-top: 3px; color: var(--c-muted); }
.point-card[hidden] { display: none; }
.points-filter { margin: 0 0 16px; }
.point-status { display: flex; align-items: center; gap: 8px; margin: 2px 0; font-size: 13px; font-weight: 700; }
.point-status__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.point-status.is-open { color: #1C6B43; }
.point-status.is-soon { color: #8A5300; }
.point-status.is-closed { color: var(--c-muted); }
.point-card__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 8px; }
.point-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 40px;
  padding: 0 14px;
  border: 1.5px solid var(--c-chip-line);
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: var(--c-ink);
  text-decoration: none;
}
.point-btn:hover { border-color: var(--c-accent); background: var(--c-soft-2); }
.point-btn .icon { color: var(--c-accent); }

/* ---------- 404 ---------- */

.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; margin-top: 8px; }

/* ---------- Достъпност: намалено движение ---------- */

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

/* ---------- Печат ---------- */

@media print {
  .topbar, .site-header, .hero__controls, .eu-strip, .site-footer, .price-search, .cat-chips-wrap, .mobile-bar { display: none !important; }
  .panel__body { display: flex !important; }
}
