/*
Theme Name: Vitamed 1
Description: Тема сайту діагностичного центру Vitamed 1 (vitamed.od.ua).
Version: 1.3
Text Domain: vitamed
*/

/* Montserrat (SIL OFL 1.1), self-hosted variable font — see assets/fonts/LICENSE.txt */
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("assets/fonts/montserrat-cyrillic-ext.woff2") format("woff2");
  unicode-range: U+0460-052F, U+1C80-1C8A, U+20B4, U+2DE0-2DFF, U+A640-A69F, U+FE2E-FE2F; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("assets/fonts/montserrat-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("assets/fonts/montserrat-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "Montserrat"; font-style: normal; font-weight: 300 800; font-display: swap;
  src: url("assets/fonts/montserrat-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --blue: #2654A1;
  --blue-dark: #1A3C78;
  --coral: #ED6C55;
  --yellow: #FDCD73;
  --teal: #03B2B4;
  --ink: #1C2740;
  --muted: #5A6580;
  --bg: #FFFFFF;
  --bg-soft: #F3F6FB;
  --bg-warm: #FFF8EC;
  --line: #E2E8F2;
  --radius: 20px;
  --radius-sm: 12px;
  --wrap: 1180px;
  --shadow: 0 1px 2px rgba(28,39,64,.04), 0 8px 24px rgba(28,39,64,.06);
  --shadow-lg: 0 2px 4px rgba(28,39,64,.05), 0 22px 48px rgba(28,39,64,.12);
  --ease: cubic-bezier(.2,.7,.2,1);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: "Montserrat", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.65;
  font-size: 17px;
  font-weight: 450;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: var(--blue); text-underline-offset: .18em; }
:focus-visible { outline: 3px solid var(--teal); outline-offset: 2px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.15; color: var(--blue); margin: 0 0 .55em; letter-spacing: -.015em; }
h1 { font-size: clamp(2.1rem, 4.6vw, 3.4rem); font-weight: 800; }
h2 { font-size: clamp(1.55rem, 2.8vw, 2.15rem); font-weight: 800; }
h3 { font-size: 1.15rem; font-weight: 700; letter-spacing: 0; }
p { margin: 0 0 1em; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--blue); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 12px; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }
.section { padding: 84px 0; }
.section--soft { background: var(--bg-soft); }
.section--warm { background: var(--bg-warm); }
.eyebrow { color: var(--coral); font-weight: 700; font-size: .9rem; letter-spacing: .04em; margin: 0 0 .6em; display: flex; align-items: center; gap: 10px; }
.eyebrow::before { content: ""; width: 28px; height: 10px; background: currentColor;
  -webkit-mask: url("assets/wave.svg") repeat-x left center / auto 100%; mask: url("assets/wave.svg") repeat-x left center / auto 100%; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 36em; }

/* Wave ornament, built from the logo's sine mark */
.wave {
  height: 22px;
  background: var(--wave-color, var(--teal));
  -webkit-mask: url("assets/wave.svg") repeat-x left center / auto 100%;
          mask: url("assets/wave.svg") repeat-x left center / auto 100%;
}
.wave--coral { --wave-color: var(--coral); }
.wave--yellow { --wave-color: var(--yellow); }
.wave--blue { --wave-color: var(--blue); }
.wave-divider { height: 14px; opacity: .9; }

/* Header */
.topbar { background: var(--blue); color: #E6EDF8; font-size: .86rem; }
.topbar .wrap { display: flex; flex-wrap: wrap; gap: 6px 22px; justify-content: space-between; padding-top: 7px; padding-bottom: 7px; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar__phones { display: flex; flex-wrap: wrap; gap: 4px 18px; }

.site-header { position: sticky; top: 0; z-index: 50; background: rgba(255,255,255,.92); backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px); border-bottom: 1px solid transparent; transition: border-color .25s, box-shadow .25s; }
.site-header.is-scrolled { border-color: var(--line); box-shadow: 0 6px 20px rgba(28,39,64,.06); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; min-height: 76px; position: relative; }
.brand { display: flex; flex-direction: column; text-decoration: none; flex: none; }
.brand img { height: 34px; width: auto; display: block; }
.brand span { color: var(--coral); font-weight: 600; font-size: .8rem; margin-top: 2px; }

.nav { display: flex; align-items: center; }
.nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 2px; }
.nav a { display: block; padding: 9px 13px; border-radius: 999px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem; transition: background .2s, color .2s; }
.nav a:hover, .nav .current-menu-item > a, .nav .current-page-ancestor > a { background: var(--bg-soft); color: var(--blue); }
.nav-toggle { display: none; background: none; border: 0; padding: 10px; cursor: pointer; border-radius: 10px; }
.nav-toggle span { display: block; width: 24px; height: 2.5px; background: var(--blue); margin: 5px 0; border-radius: 2px; transition: transform .25s var(--ease), opacity .2s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

.lang { list-style: none; display: flex; gap: 2px; margin: 0 0 0 10px; padding: 3px; border-radius: 999px; background: var(--bg-soft); }
.nav .lang a { padding: 6px 10px; font-size: .78rem; font-weight: 700; color: var(--muted); }
.nav .lang a.is-current { background: var(--blue); color: #fff; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 8px; padding: 14px 26px; border-radius: 999px; background: var(--coral); color: #fff; font-weight: 700; text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 700; transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(237,108,85,.32); }
.btn--ghost { background: transparent; color: var(--blue); box-shadow: inset 0 0 0 2px var(--blue); }
.btn--ghost:hover { background: var(--blue); color: #fff; box-shadow: inset 0 0 0 2px var(--blue), 0 10px 24px rgba(38,84,161,.22); }

/* Hero */
.hero { position: relative; overflow: hidden; background: linear-gradient(180deg, #fff 0%, var(--bg-soft) 100%); isolation: isolate; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding-top: 80px; padding-bottom: 88px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.hero__stats { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; padding: 0; list-style: none; }
.hero__stats li { background: #fff; border-radius: var(--radius-sm); padding: 12px 16px; box-shadow: var(--shadow); font-size: .85rem; color: var(--muted); line-height: 1.3; }
.hero__stats b { display: block; color: var(--blue); font-size: 1.25rem; font-weight: 800; }

/* Brand pattern: rows of waves drifting slowly, like the clinic's print materials */
.pattern { --h: 64px; --tile: calc(var(--h) / 2); display: grid; gap: 16px; overflow: hidden; border-radius: 28px; padding: 26px 0; background: #fff; box-shadow: var(--shadow-lg); }
.pattern .wave { height: var(--h); width: calc(100% + var(--tile) * 12); animation: drift 38s linear infinite; will-change: transform; }
.pattern .wave:nth-child(even) { animation-direction: reverse; animation-duration: 46s; }
@keyframes drift { to { transform: translateX(calc(var(--tile) * -12)); } }

/* Soft background pattern for page heads */
.page-head { position: relative; overflow: hidden; background: var(--bg-soft); padding: 56px 0 44px; }
.page-head::after { content: ""; position: absolute; right: -40px; top: 0; bottom: 0; width: min(40%, 420px); opacity: .5;
  background: linear-gradient(180deg, #E5F6F6 0 25%, #FDECE8 25% 50%, #FFF4DE 50% 75%, #E7EDF8 75%);
  -webkit-mask: url("assets/wave.svg") repeat left top / 30px 60px; mask: url("assets/wave.svg") repeat left top / 30px 60px; pointer-events: none; }
.page-head .wrap { position: relative; z-index: 1; }
.page-head h1 { margin: 0; }
.page-head__sub { color: var(--muted); margin: 10px 0 0; }
.crumbs { font-size: .85rem; margin-bottom: 10px; color: var(--muted); }
.crumbs a { color: var(--muted); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; }
.card { position: relative; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 28px 24px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: inherit; transition: transform .25s var(--ease), box-shadow .25s, border-color .25s; overflow: hidden; }
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); border-color: transparent; }
.card__abbr { font-size: 2.3rem; font-weight: 800; color: var(--coral); line-height: 1; letter-spacing: -.02em; }
.card p { color: var(--muted); margin: 0; }
.card .wave { height: 14px; margin-top: auto; transform-origin: left; transition: transform .35s var(--ease); }
.card:hover .wave { transform: scaleY(1.35); }
.card__more { font-weight: 700; color: var(--blue); font-size: .9rem; }

/* Features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 20px; }
.feature { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.feature__num { font-size: 2.5rem; font-weight: 800; color: var(--teal); line-height: 1; margin-bottom: 14px; letter-spacing: -.02em; }
.feature p { color: var(--muted); margin: 0; }

/* Prices */
.price-tools { display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; margin-bottom: 34px; }
.price-search { width: 100%; max-width: 420px; padding: 13px 20px; border: 1px solid var(--line); border-radius: 999px; font: inherit; background: #fff; transition: border-color .2s, box-shadow .2s; }
.price-search:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 4px rgba(3,178,180,.15); }
.price-nav { display: flex; flex-wrap: wrap; gap: 8px; }
.price-nav a { padding: 8px 16px; border-radius: 999px; background: var(--bg-soft); color: var(--blue); font-weight: 700; text-decoration: none; transition: background .2s, color .2s; }
.price-nav a:hover { background: var(--blue); color: #fff; }
.price-group { margin-bottom: 52px; scroll-margin-top: 100px; }
.price-group h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 14px; }
.price-group h2 small { color: var(--muted); font-size: .95rem; font-weight: 500; letter-spacing: 0; }
.price-table { width: 100%; border-collapse: separate; border-spacing: 0; background: #fff; border-radius: var(--radius-sm); overflow: hidden; box-shadow: 0 0 0 1px var(--line); margin-bottom: 18px; font-variant-numeric: tabular-nums; }
.price-table th { text-align: left; padding: 12px 18px; background: var(--blue); color: #fff; font-weight: 700; font-size: .9rem; }
.price-table th.price { text-align: right; }
.price-table td { padding: 13px 18px; border-bottom: 1px solid var(--line); vertical-align: top; }
.price-table tr:last-child td { border-bottom: 0; }
.price-table tbody tr { transition: background .15s; }
.price-table tbody tr:hover { background: #F8FAFE; }
.price-table td.price { text-align: right; white-space: nowrap; font-weight: 700; color: var(--blue); }
.price-table td.price--we { color: var(--coral); }
.price-empty { color: var(--muted); background: var(--bg-soft); border-radius: var(--radius-sm); padding: 18px 20px; }
.price-disclaimer { color: var(--muted); font-size: .9rem; }

/* Content pages */
.entry { max-width: 820px; }
.entry > * + * { margin-top: 1em; }
.entry h2 { margin-top: 1.7em; }
.entry ul { padding-left: 1.2em; }
.entry li + li { margin-top: .4em; }
.entry li::marker { color: var(--coral); }
.entry .is-style-note { background: var(--bg-warm); border-left: 5px solid var(--yellow); border-radius: var(--radius-sm); padding: 16px 20px; }
.entry .is-style-note p { margin: 0; }
.entry p.lead { font-size: 1.15rem; color: var(--ink); }
.entry ul.facts { padding: 0; }
.entry .facts li + li { margin-top: 0; }
.entry .is-style-more { margin-top: 2.2em; padding-top: 1.2em; border-top: 1px solid var(--line); color: var(--muted); font-size: .95rem; }
.layout-aside { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 48px; align-items: start; }
.aside-card { position: sticky; top: 100px; background: #fff; border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 26px; }
.aside-card h3 { margin-bottom: .7em; }
.aside-card .btn { width: 100%; justify-content: center; margin-top: 12px; }
.aside-phone { text-align: center; color: var(--muted); font-size: .9rem; margin: 6px 0 0; }

/* CT procedures */
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 12px; margin: 0 0 32px; padding: 0; list-style: none; }
.facts li { background: var(--bg-soft); border-radius: var(--radius-sm); padding: 14px 16px; line-height: 1.35; }
.facts span { display: block; font-size: .78rem; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.facts b { color: var(--blue); }
.mini-prices { list-style: none; margin: 0; padding: 0; }
.mini-prices li { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: .95rem; }
.mini-prices li:last-child { border-bottom: 0; }
.mini-prices b { color: var(--blue); white-space: nowrap; }
.mini-prices em { font-style: normal; color: var(--coral); font-weight: 700; white-space: nowrap; }
.catalog-group { margin-top: 44px; }
.catalog-group h3 { color: var(--muted); font-size: .85rem; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.catalog a { display: flex; justify-content: space-between; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 15px 18px; text-decoration: none; color: var(--ink); font-weight: 600; transition: border-color .2s, transform .2s var(--ease), box-shadow .2s; }
.catalog a::after { content: "→"; color: var(--coral); transition: transform .2s var(--ease); }
.catalog a:hover { border-color: var(--teal); transform: translateY(-2px); box-shadow: var(--shadow); }
.catalog a:hover::after { transform: translateX(3px); }

/* Contacts */
.contact-grid { display: grid; grid-template-columns: 1fr 1.3fr; gap: 30px; align-items: stretch; }
.contact-box { background: #fff; border-radius: var(--radius); padding: 30px; box-shadow: var(--shadow); }
.contact-box a { text-decoration: none; font-weight: 700; }
.contact-box ul { list-style: none; padding: 0; margin: 0 0 18px; display: grid; gap: 6px; }
.map { width: 100%; min-height: 380px; border: 0; border-radius: var(--radius); background: var(--bg-soft); }
.contacts-hero { position: relative; }
.contacts-hero .map { display: block; height: 540px; border-radius: 0; }
.contacts-hero .wrap { position: absolute; inset: 0; pointer-events: none; display: flex; align-items: center; }
.contact-card { pointer-events: auto; background: #fff; border-radius: var(--radius); padding: 30px; width: 410px; max-width: 100%; box-shadow: var(--shadow-lg); }
.contact-card h2 { font-size: 1.35rem; }
.contact-row { display: flex; gap: 14px; align-items: flex-start; margin: 14px 0; }
.contact-ico { flex: 0 0 40px; height: 40px; border-radius: 12px; background: var(--bg-soft); display: grid; place-items: center; }
.contact-ico svg { width: 20px; height: 20px; fill: var(--coral); }
.phone-list { display: grid; gap: 2px; }
.phone-list a, .contact-card a:not(.btn) { color: var(--blue); font-weight: 700; text-decoration: none; font-size: 1.05rem; }
.contact-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.contact-actions .btn { padding: 12px 20px; }
.routes { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 20px; }
.route { position: relative; background: var(--bg-soft); border-radius: var(--radius); padding: 28px 28px 28px 86px; }
.route__num { position: absolute; left: 24px; top: 26px; width: 44px; height: 44px; border-radius: 50%; background: var(--coral); color: #fff; font-weight: 800; display: grid; place-items: center; font-size: 1.2rem; }
.route p { color: var(--muted); margin: 0; }

/* Footer */
.site-footer { background: var(--blue-dark); color: #CFDAEE; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 34px; padding-top: 56px; padding-bottom: 36px; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer img { height: 30px; width: auto; margin-bottom: 14px; }
.site-footer .copy { grid-column: 1 / -1; border-top: 1px solid rgba(255,255,255,.14); padding-top: 18px; font-size: .84rem; color: #AFC0DE; }

/* Scroll reveal (only when JS has marked the page; content stays visible without JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.js .reveal-d1 { transition-delay: .08s; } .js .reveal-d2 { transition-delay: .16s; } .js .reveal-d3 { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}

@media (max-width: 960px) {
  .layout-aside { grid-template-columns: 1fr; }
  .aside-card { position: static; }
}

@media (max-width: 860px) {
  body { font-size: 16px; }
  .hero .wrap, .contact-grid, .site-footer .wrap { grid-template-columns: 1fr; }
  .hero .wrap { padding-top: 48px; padding-bottom: 56px; gap: 32px; }
  .pattern { --h: 34px; padding: 16px 0; gap: 6px; border-radius: 20px; }
  .nav-toggle { display: block; }
  .nav { position: absolute; left: -20px; right: -20px; top: 100%; background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 16px 30px rgba(28,39,64,.1); display: none; flex-direction: column; align-items: stretch; }
  .nav.is-open { display: flex; }
  .nav ul { flex-direction: column; padding: 10px 20px; }
  .nav a { padding: 12px 14px; font-size: 1rem; }
  .lang { margin: 0 20px 18px; width: max-content; }
  .section { padding: 56px 0; }
  .topbar .wrap > span:first-child { display: none; }
  .contacts-hero .map { height: 340px; }
  .contacts-hero .wrap { position: static; display: block; margin-top: -60px; }
  .contact-card { width: 100%; padding: 24px; }
  .page-head { padding: 40px 0 32px; }
  .page-head::after { width: 45%; opacity: .35; }
  .price-table, .price-table thead, .price-table tbody { display: block; width: 100%; }
  .price-table thead tr { display: block; }
  .price-table thead th { display: block; }
  .price-table thead th.price { display: none; }
  .price-table tr { display: grid; grid-template-columns: 1fr auto; border-bottom: 1px solid var(--line); }
  .price-table tbody tr:last-child { border-bottom: 0; }
  .price-table tbody tr { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .price-table td { border-bottom: 0; padding: 10px 14px; min-width: 0; }
  .price-table td:first-child { grid-column: 1 / -1; padding-bottom: 0; }
  .price-table td.price { text-align: left; white-space: nowrap; font-size: 1rem; }
  .price-table td.price:only-of-type, .price-table td.price:last-child:nth-child(2) { grid-column: 1 / -1; }
  .price-table td.price[data-label]::before { content: attr(data-label); display: block; font-size: .75rem; font-weight: 600; color: var(--muted); }
}
