/* Shared base for all company sites. Theme files override the custom properties only.
   No web fonts and no third-party resources (RK-P7): the system font stack is used. */
:root {
  --brand: #1f5f99;
  --brand-ink: #ffffff;
  --accent: #2e8540;
  --bg: #ffffff;
  --bg-soft: #f4f6f8;
  --ink: #1b1f24;
  --muted: #5b6672;
  --line: #d9dee4;
  --focus: #ffbf47;
  --radius: 10px;
  --wrap: 1120px;
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
  --head-font: var(--font);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; font: 400 1.0625rem/1.6 var(--font); color: var(--ink); background: var(--bg); }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
h1, h2, h3 { font-family: var(--head-font); line-height: 1.25; margin: 1.6em 0 0.6em; }
h1 { font-size: clamp(1.6rem, 1.1rem + 2.2vw, 2.4rem); margin-top: 0.8em; }
h2 { font-size: clamp(1.3rem, 1.05rem + 1vw, 1.7rem); }
h3 { font-size: 1.15rem; }
p, ul, ol { margin: 0 0 1em; }
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }

.skip { position: absolute; left: -9999px; top: 0; background: var(--focus); color: #000; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }
.dev-banner { background: #b3261e; color: #fff; text-align: center; font-size: 0.875rem; padding: 4px 16px; }

/* Header and navigation: without JS the menu is always visible; site.js turns it into a
   toggle on narrow screens. */
.site-header { background: var(--brand); color: var(--brand-ink); position: sticky; top: 0; z-index: 5; box-shadow: 0 1px 0 rgba(0,0,0,.08); }
.bar { display: flex; align-items: center; gap: 16px; min-height: 64px; flex-wrap: wrap; }
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.brand img { width: auto; height: 40px; }
#site-nav { margin-left: auto; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.nav, .langs { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px; }
.nav a, .langs a { display: block; padding: 8px 12px; border-radius: 6px; color: inherit; text-decoration: none; transition: background-color .15s; }
.nav a:hover, .langs a:hover { background: rgba(255,255,255,.16); }
.nav a[aria-current], .langs a[aria-current] { background: rgba(255,255,255,.24); font-weight: 600; }
.langs a { font-size: .9rem; text-transform: uppercase; }
.menu-btn { margin-left: auto; font: inherit; color: inherit; background: transparent; border: 1px solid rgba(255,255,255,.6); border-radius: 6px; padding: 6px 14px; cursor: pointer; }
@media (max-width: 860px) {
  .js .menu-btn { display: block; }
  .js #site-nav { display: none; width: 100%; padding-bottom: 12px; flex-direction: column; align-items: stretch; }
  .js #site-nav.open { display: flex; }
  .js .nav { flex-direction: column; }
}
/* Desktop: a menu item never breaks inside, the row wraps between items (zt en, 2026-10-24). */
@media (min-width: 861px) { .menu-btn { display: none !important; } .nav a { white-space: nowrap; } }
/* Language switch on multilingual sites: smaller than the menu, set apart from it, lightly outlined
   buttons (as on rdsoft, 2026-10-25). Colours follow the header text colour (currentColor). */
.langs { gap: 4px; }
.langs a { font-size: .72rem; letter-spacing: .08em; padding: 4px 8px; border-radius: 4px; opacity: .8; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 20%, transparent); }
.langs a:hover { opacity: 1; background: color-mix(in srgb, currentColor 8%, transparent); }
.langs a[aria-current] { opacity: 1; background: transparent; font-weight: 600; box-shadow: inset 0 0 0 1px color-mix(in srgb, currentColor 60%, transparent); }
@media (min-width: 861px) {
  #site-nav { gap: 28px; }
  .langs { padding-left: 18px; border-left: 1px solid color-mix(in srgb, currentColor 22%, transparent); }
}
@media (max-width: 860px) { .js .langs { margin-top: 8px; padding: 10px 12px 0; border-top: 1px solid color-mix(in srgb, currentColor 18%, transparent); } }

main { padding-bottom: 48px; }
.lead { font-size: 1.2rem; color: var(--muted); max-width: 46em; }

.hero { margin: 24px 0 28px; border-radius: var(--radius); overflow: hidden; position: relative; background: linear-gradient(120deg, var(--brand), var(--accent)); color: #fff; }
.hero-text { padding: clamp(24px, 4vw, 48px); }
.hero .lead { color: rgba(255,255,255,.92); margin: 0; }
.hero.has-img { color: var(--ink); background: var(--bg-soft); }
.hero.has-img .lead { color: var(--muted); }
.hero.has-img .hero-img { width: 100%; max-height: 460px; object-fit: cover; }
.hero h1 { margin: 0 0 .3em; }

.slider { position: relative; margin: 24px 0; border-radius: var(--radius); overflow: hidden; background: var(--bg-soft); }
.slides { list-style: none; margin: 0; padding: 0; display: flex; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.slides::-webkit-scrollbar { display: none; }
.slide { flex: 0 0 100%; scroll-snap-align: start; }
.slide img { width: 100%; aspect-ratio: 16 / 9; max-height: 520px; object-fit: cover; }
.slider-nav button { position: absolute; top: 50%; transform: translateY(-50%); width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(0,0,0,.45); color: #fff; font-size: 1.6rem; line-height: 1; cursor: pointer; }
.slider-nav .prev { left: 12px; } .slider-nav .next { right: 12px; }

.figure { margin: 24px 0; }
.figure img { border-radius: var(--radius); }
.figure figcaption { color: var(--muted); font-size: .9rem; margin-top: 6px; }
.figure.small { max-width: 320px; }
@media (min-width: 700px) { .figure.float { float: right; margin: 0 0 16px 24px; max-width: 40%; } }
main::after { content: ""; display: block; clear: both; }

.table-wrap { overflow-x: auto; margin: 16px 0 24px; }
table { border-collapse: collapse; width: 100%; font-size: .975rem; }
caption { text-align: left; font-weight: 600; padding: 0 0 8px; }
th, td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
thead th { background: var(--bg-soft); font-weight: 600; }
tbody tr:hover { background: #fafbfc; }

.contacts { display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); margin: 16px 0 24px; }
.contact { border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.contact h3 { margin: 0 0 8px; font-size: 1.05rem; }
.contact ul { list-style: none; margin: 0; padding: 0; }
.contact li { margin: 4px 0; }
.c-label { color: var(--muted); }

.cards { list-style: none; margin: 16px 0 24px; padding: 0; display: grid; gap: 16px; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }
/* cols: fixed number of columns on wide screens (pharmex products 4 × 3, 2026-10-24). */
@media (min-width: 861px) { .cards.c4 { grid-template-columns: repeat(4, 1fr); } .cards.c3 { grid-template-columns: repeat(3, 1fr); } }
.card { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: #fff; }
.card img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card h3 { margin: 12px 16px 6px; font-size: 1.05rem; }
.card p { margin: 0 16px 16px; color: var(--muted); }

.gallery { list-style: none; padding: 0; margin: 16px 0 24px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); }
.gallery img { border-radius: 8px; aspect-ratio: 1; object-fit: cover; width: 100%; }

/* Expandable cards (details block). */
.xcards { display: grid; gap: 12px; margin: 16px 0 24px; }
.xcard { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.xcard > summary { list-style: none; cursor: pointer; padding: 14px 52px 14px 18px; position: relative; display: flex; flex-direction: column; gap: 2px; }
.xcard > summary::-webkit-details-marker { display: none; }
.xcard > summary::after { content: "+"; position: absolute; right: 18px; top: 50%; transform: translateY(-50%); font-size: 1.6rem; line-height: 1; color: var(--brand); }
.xcard[open] > summary::after { content: "\2212"; }
.xcard > summary:hover { background: var(--bg-soft); }
.xcard > summary:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.xc-title { font-weight: 700; font-size: 1.1rem; }
.xc-sub { color: var(--muted); }
.xc-rows { margin: 0; padding: 4px 18px 16px; border-top: 1px solid var(--line); }
.xc-rows > div { padding-top: 12px; }
.xc-rows dt { font-weight: 600; }
.xc-rows dd { margin: 4px 0 0; }
.xc-rows dd p { margin: 0; }
.xc-rows dd ul { margin: 6px 0 0; }
.notice { border-left: 4px solid var(--accent); background: var(--bg-soft); padding: 16px 20px; border-radius: 0 var(--radius) var(--radius) 0; margin: 24px 0; }
.notice h2 { margin-top: 0; font-size: 1.2rem; }
.notice p:last-child { margin-bottom: 0; }

.pv-frame { display: block; width: 100%; min-height: 900px; border: 0; margin: 16px 0 24px; }
.file { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.file .ext { font-size: .72rem; font-weight: 700; border: 1px solid currentColor; border-radius: 4px; padding: 0 4px; }
.file-list { padding-left: 1.1em; }
.file-list li { margin: 6px 0; }
.docs td.files { white-space: nowrap; }
.links li { margin: 6px 0; }

.video { margin: 24px 0; }
.video-play { position: relative; display: block; width: 100%; padding: 0; border: 0; background: #000; color: #fff; cursor: pointer; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 9; }
.video-play img { width: 100%; height: 100%; object-fit: cover; opacity: .7; }
.play-label { position: absolute; inset: auto 0 0 0; padding: 14px 18px; background: rgba(0,0,0,.6); font-size: 1.05rem; text-align: left; }
.video iframe { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--radius); }
.video figcaption { color: var(--muted); font-size: .85rem; margin-top: 6px; }

.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; padding: 24px 0; }
.site-footer p { margin: 0 0 6px; }

@media print { .site-header, .site-footer, .dev-banner, .slider-nav { display: none; } }

/* Catalogue and body map (ZT-4, PX-4, ZN-P3). */
.cat-controls { display: flex; flex-wrap: wrap; gap: 12px 20px; align-items: flex-end; margin: 16px 0; padding: 16px; background: var(--bg-soft); border-radius: var(--radius); }
.cat-controls label { display: flex; flex-direction: column; gap: 4px; font-size: .9rem; color: var(--muted); }
.cat-controls input, .cat-controls select { font: inherit; color: var(--ink); padding: 8px 10px; border: 1px solid var(--line); border-radius: 6px; min-width: 200px; background: #fff; }
.cat-count { margin: 0 0 0 auto; }
.cat-item[hidden] { display: none; }
.card-noimg { aspect-ratio: 4 / 3; background: var(--bg-soft); }
.bodymap { display: grid; gap: 24px; grid-template-columns: minmax(180px, 280px) 1fr; align-items: start; margin: 16px 0 32px; }
@media (max-width: 640px) { .bodymap { grid-template-columns: 1fr; } .bodymap svg { max-width: 220px; margin: 0 auto; } }
.bodymap svg { width: 100%; height: auto; }
.bodymap .zone polygon { fill: var(--accent); fill-opacity: 0; stroke: none; transition: fill-opacity .15s; cursor: pointer; }
.bodymap .zone:hover polygon, .bodymap .zone:focus polygon, .bodymap .zone.active polygon { fill-opacity: .35; }
.bodymap-legend { margin: 0; padding-left: 1.2em; }
.bodymap-legend li { margin: 6px 0; }
.bodymap-legend a.active { font-weight: 700; }
.cat-list { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); }
.cat-list .card h3 { font-size: 1rem; }

/* Zdorovye (zt.com.ua): white header with the blue logo. */
:root { --brand: #2468ca; --accent: #1b8fd6; --bg-soft: #f2f6fb; }
.site-zt .site-header { background: #fff; color: #1b1f24; border-bottom: 3px solid #2468ca; }
.site-zt .brand img { height: 48px; }
/* ZT-K9 (Tetiana, 2026-10-28): the menu is three outlined buttons of equal width spread over the header. */
.site-zt .nav a { border: 1.5px solid #2468ca; color: #2468ca; text-align: center; }
.site-zt .nav a:hover { background: #e7effa; }
.site-zt .nav a[aria-current] { background: #2468ca; color: #fff; }
.site-zt .menu-btn { border-color: #2468ca; color: #2468ca; }
.site-zt .brand { flex-shrink: 0; }
/* 861–1023 px: three equal buttons would wrap into three lines, so the "Menu" button is used up to 1023 px, as on phones. */
@media (min-width: 861px) and (max-width: 1023px) {
  html.js body.site-zt .menu-btn { display: block !important; }
  .js .site-zt #site-nav { display: none; width: 100%; padding-bottom: 12px; flex-direction: column; align-items: stretch; }
  .js .site-zt #site-nav.open { display: flex; }
  .js .site-zt .nav { flex-direction: column; }
  .js .site-zt .langs { margin-top: 8px; padding: 10px 12px 0; border-left: 0; border-top: 1px solid #e3e6ee; }
}
@media (max-width: 1023px) { .js .site-zt .nav { gap: 8px; } }
@media (min-width: 1024px) {
  .site-zt .bar { gap: 24px; flex-wrap: nowrap; padding-top: 12px; padding-bottom: 12px; }
  .site-zt #site-nav { flex: 1; min-width: 0; margin-left: 0; gap: 20px; flex-wrap: nowrap; }
  .site-zt .nav { flex: 1; min-width: 0; gap: 12px; flex-wrap: nowrap; }
  .site-zt .nav li { flex: 1 1 0; min-width: 0; display: flex; }
  .site-zt .nav a { flex: 1; display: flex; align-items: center; justify-content: center; padding: 8px 12px; white-space: normal; line-height: 1.25; font-size: .95rem; }
  .site-zt .langs { flex-wrap: nowrap; padding-left: 12px; gap: 3px; }
}
.site-zt .docs td:first-child { min-width: 22em; }
