/* ===========================================================
   VALIKHNOVSKI-STYLE CLINIC TEMPLATE — shared design system
   Signature motif: ECG / vital-sign pulse line used as section
   dividers and hero ambience — ties directly to a surgical clinic.
   =========================================================== */

:root {
  /* Color */
  --ink: #343a40;          /* charcoal gray, header/footer/hero base */
  --ink-soft: #3d444b;     /* card / panel on dark */
  --teal: #0b7488;         /* primary accent — replaces red everywhere except emergency */
  --teal-dark: #085a6a;    /* hover / pressed */
  --steel: #2b5f82;        /* secondary accent, gradients */
  --red: #e2001a;          /* reserved ONLY for emergency / 24-7 badges */
  --red-dark: #a8000f;
  --paper: #f8f9fa;        /* ivory white content bg */
  --paper-dim: #e0e0e0;    /* platinum, alternating section bg */
  --slate: #55585c;        /* secondary text on light */
  --slate-200: #9a9da2;
  --line: #d8dadc;         /* hairline on light */
  --line-dark: #464c52;    /* hairline on dark */
  --pulse: #0b7488;        /* floating CTA now teal, not green */
  --white: #ffffff;

  /* Type */
  --f-display: "Oswald", "Arial Narrow", sans-serif;
  --f-body: "Manrope", "Segoe UI", sans-serif;

  /* Layout */
  --maxw: 1240px;
  --pad: clamp(20px, 4vw, 64px);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--f-body);
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
button { font-family: inherit; cursor: pointer; }

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- Top utility bar ---------- */
.topbar {
  background: var(--teal);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.topbar .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 9px;
  padding-bottom: 9px;
  flex-wrap: wrap;
}
.topbar .tb-left { display: flex; align-items: center; gap: 8px; }
.topbar .tb-phones { display: flex; gap: 18px; }
.topbar .tb-phones a:hover { text-decoration: underline; }
.topbar .tb-right { display: flex; align-items: center; gap: 14px; }
.topbar .tb-social { display: flex; gap: 12px; }
.topbar .tb-social svg { width: 16px; height: 16px; opacity: 0.9; transition: opacity .15s; }
.topbar .tb-social a:hover svg { opacity: 1; }
.topbar .tb-lang { border: 1px solid rgba(255,255,255,.5); border-radius: 4px; padding: 2px 8px; font-size: 12px; }

/* ---------- Header ---------- */
.site-header {
  background: var(--ink);
  border-bottom: 1px solid var(--line-dark);
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  padding-bottom: 18px;
  gap: 24px;
}
.logo {
  color: var(--white);
  font-family: var(--f-display);
  font-size: 22px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.1;
}
.logo span {
  display: block;
  font-family: var(--f-body);
  font-size: 10px;
  letter-spacing: 0.22em;
  color: var(--teal);
  font-weight: 700;
  margin-top: 3px;
}
.main-nav { display: flex; align-items: center; gap: 30px; flex-wrap: wrap; }
.main-nav a {
  color: #cfd0d3;
  font-size: 13.5px;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  transition: color .15s;
}
.main-nav a:hover, .main-nav a.active { color: var(--white); }
.main-nav a.active { border-bottom: 2px solid var(--teal); padding-bottom: 4px; }
.btn-record {
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  font-size: 13.5px;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  padding: 12px 22px;
  border-radius: 4px;
  border: none;
  white-space: nowrap;
  transition: background .15s;
}
.btn-record:hover { background: var(--teal-dark); }
.burger { display: none; }

/* ---------- Hero (big, homepage) ---------- */
.hero {
  position: relative;
  background: linear-gradient(165deg, #2a2e33 0%, var(--ink) 60%);
  color: var(--white);
  overflow: hidden;
}
.hero .wrap { position: relative; z-index: 2; padding-top: 90px; padding-bottom: 90px; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
}
.hero-eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 22px;
}
.hero-eyebrow .dot {
  width: 8px; height: 8px; border-radius: 50%; background: var(--red);
  animation: pulse-dot 1.6s ease-in-out infinite;
}
@keyframes pulse-dot { 0%,100%{ opacity:1; transform:scale(1);} 50%{ opacity:.35; transform:scale(1.4);} }
@keyframes ecg-scroll { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.hero h1 {
  font-family: var(--f-display);
  text-transform: uppercase;
  font-weight: 700;
  font-size: clamp(38px, 6vw, 68px);
  line-height: 1.04;
  letter-spacing: 0.01em;
  margin: 0 0 26px;
  max-width: 900px;
}
.hero p.lead {
  font-size: 18px;
  line-height: 1.6;
  color: #cfd0d3;
  max-width: 560px;
  margin: 0 0 36px;
}
.hero .cta-row { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }

/* Vitals monitor panel — hero signature element */
.vitals-panel {
  background: var(--ink-soft);
  border: 1px solid var(--line-dark);
  border-radius: 10px;
  padding: 26px 28px 28px;
  position: relative;
}
.vitals-head {
  display: flex; align-items: center; justify-content: space-between;
  font-family: var(--f-display); text-transform: uppercase; letter-spacing: .1em;
  font-size: 11.5px; color: var(--slate-200);
  border-bottom: 1px solid var(--line-dark); padding-bottom: 16px; margin-bottom: 18px;
}
.vitals-head .live { display: flex; align-items: center; gap: 7px; color: #33d17a; }
.vitals-head .live .dot { width: 7px; height: 7px; border-radius: 50%; background: #33d17a; animation: pulse-dot 1.6s ease-in-out infinite; }
.vitals-reading { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.vitals-reading b { font-family: var(--f-display); font-size: 40px; color: var(--teal); line-height: 1; }
.vitals-reading span { font-size: 12px; color: var(--slate-200); text-transform: uppercase; letter-spacing: .04em; }
.vitals-reading small { font-size: 13px; color: #c8c9cd; }
.vitals-ecg { width: 100%; height: 54px; margin: 10px 0 4px; overflow: hidden; }
.vitals-ecg svg { width: 200%; height: 100%; animation: ecg-scroll 7s linear infinite; }
.vitals-stats {
  display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px;
  margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-dark);
}
.vitals-stats div b { display: block; font-family: var(--f-display); font-size: 21px; color: var(--white); }
.vitals-stats div span { font-size: 10.5px; color: var(--slate-200); text-transform: uppercase; letter-spacing: .04em; }

.btn-primary {
  display: inline-block;
  background: var(--teal);
  color: var(--white);
  font-weight: 700;
  font-size: 14px;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  padding: 17px 34px;
  border-radius: 4px;
  border: none;
  transition: background .15s, transform .15s;
}
.btn-primary:hover { background: var(--teal-dark); transform: translateY(-1px); }
.btn-ghost {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--white); font-weight: 600; font-size: 14px;
  border-bottom: 1px solid rgba(255,255,255,.4); padding-bottom: 3px;
}
.btn-ghost:hover { border-color: var(--white); }

/* ---------- Page hero (inner pages, smaller) ---------- */
.page-hero {
  background: var(--ink);
  color: var(--white);
  padding: 64px 0 46px;
  position: relative;
  overflow: hidden;
}
.page-hero::after {
  content: "";
  position: absolute; right: -10%; top: -30%;
  width: 480px; height: 480px; border-radius: 50%;
  background: radial-gradient(circle, rgba(11,116,136,.18), transparent 70%);
}
.page-hero .crumb {
  font-size: 12px; letter-spacing: .1em; text-transform: uppercase;
  color: #9a9da2; margin-bottom: 14px;
}
.page-hero .crumb a:hover { color: var(--white); }
.page-hero h1 {
  font-family: var(--f-display); text-transform: uppercase;
  font-size: clamp(30px, 4.4vw, 46px); font-weight: 700; margin: 0; letter-spacing: .01em;
}
.page-hero p { color: #c8c9cd; max-width: 620px; margin: 16px 0 0; line-height: 1.6; }

/* ---------- Section basics ---------- */
section { padding: 88px 0; }
section.dim { background: var(--paper-dim); }
section.on-dark { background: var(--ink); color: var(--white); }
.section-head { max-width: 640px; margin-bottom: 48px; }
.eyebrow {
  font-size: 12.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase;
  color: var(--teal); margin: 0 0 12px;
}
h2.h-title {
  font-family: var(--f-display); text-transform: uppercase;
  font-size: clamp(26px, 3.6vw, 40px); line-height: 1.12; font-weight: 700; margin: 0;
}
.section-head p { color: var(--slate); font-size: 16.5px; line-height: 1.65; margin: 16px 0 0; }
.on-dark .section-head p { color: #c8c9cd; }

/* ---------- Stats bar ---------- */
.stats {
  background: var(--ink);
  color: var(--white);
  padding: 46px 0;
}
.stats .wrap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.stat b {
  display: block; font-family: var(--f-display); font-size: 40px; color: var(--teal);
}
.stat span { font-size: 13px; color: #b7b9bd; letter-spacing: .02em; }

/* ---------- Services as a triage protocol list (not generic icon cards) ---------- */
.protocol-list { border-top: 1px solid var(--line); }
.protocol-row {
  display: grid;
  grid-template-columns: 168px 1fr 32px;
  gap: 28px;
  align-items: center;
  padding: 30px 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left .18s, background .18s;
}
.protocol-row:hover { padding-left: 14px; background: rgba(11,116,136,.03); }
.protocol-cat {
  font-size: 11px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase;
  padding: 7px 14px; border-radius: 20px; width: fit-content;
}
.protocol-cat.urgent  { background: rgba(226,0,26,.1); color: var(--red); }
.protocol-cat.planned { background: rgba(11,116,136,.1); color: var(--teal); }
.protocol-cat.support { background: rgba(85,88,92,.12); color: var(--slate); }
.protocol-row h3 {
  font-family: var(--f-display); text-transform: uppercase; font-size: 18px;
  margin: 0 0 6px; letter-spacing: .02em;
}
.protocol-row p { margin: 0; color: var(--slate); font-size: 14.5px; line-height: 1.55; max-width: 560px; }
.protocol-arrow { color: var(--teal); font-size: 20px; text-align: right; transition: transform .18s; }
.protocol-row:hover .protocol-arrow { transform: translateX(4px); }
@media (max-width: 720px) {
  .protocol-row { grid-template-columns: 1fr; gap: 10px; }
  .protocol-arrow { display: none; }
}
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px; }
.card-service {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 32px 28px;
  transition: transform .18s, box-shadow .18s, border-color .18s;
}
.card-service:hover { transform: translateY(-4px); box-shadow: 0 16px 32px rgba(18,19,22,.08); border-color: transparent; }
.card-service .ic {
  width: 46px; height: 46px; border-radius: 50%;
  background: rgba(11,116,136,.08); color: var(--teal);
  display: flex; align-items: center; justify-content: center; margin-bottom: 20px;
}
.card-service .ic svg { width: 22px; height: 22px; }
.card-service h3 { font-family: var(--f-display); text-transform: uppercase; font-size: 18px; margin: 0 0 10px; letter-spacing: .02em; }
.card-service p { color: var(--slate); font-size: 14.5px; line-height: 1.6; margin: 0 0 16px; }
.card-service .more { font-size: 13px; font-weight: 700; color: var(--teal); text-transform: uppercase; letter-spacing: .03em; }
.card-service.emergency { border-color: var(--red); position: relative; }
.card-service.emergency::before {
  content: "24/7"; position: absolute; top: -12px; right: 20px;
  background: var(--red); color: var(--white); font-family: var(--f-display);
  font-size: 11px; letter-spacing: .08em; padding: 5px 10px; border-radius: 3px;
}

/* ---------- About preview split ---------- */
.split {
  display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center;
}
.doctor-frame {
  background: var(--ink); border-radius: 8px; aspect-ratio: 4/5;
  display: flex; align-items: center; justify-content: center; position: relative; overflow: hidden;
}
.doctor-frame .silhouette { width: 46%; opacity: .85; }
.doctor-frame::after {
  content: "ФОТО ЛІКАРЯ"; position: absolute; bottom: 18px; left: 18px;
  font-size: 11px; letter-spacing: .12em; color: #8d8f93; text-transform: uppercase;
}
.split .credentials { margin-top: 26px; display: grid; gap: 12px; }
.split .credentials li { display: flex; gap: 12px; font-size: 14.5px; color: var(--slate); line-height: 1.5; }
.split .credentials svg { flex: none; width: 18px; height: 18px; color: var(--teal); margin-top: 2px; }

/* ---------- Testimonial / quote strip ---------- */
.quote-strip {
  background: var(--paper-dim);
  border-left: 4px solid var(--teal);
  padding: 34px 38px;
  border-radius: 4px;
  font-size: 18px;
  line-height: 1.6;
  font-style: italic;
  color: var(--ink);
}
.quote-strip cite { display: block; margin-top: 16px; font-style: normal; font-weight: 700; font-size: 13.5px; letter-spacing: .04em; text-transform: uppercase; color: var(--slate); }

/* ---------- CTA banner ---------- */
.cta-banner {
  background: linear-gradient(120deg, var(--teal) 0%, var(--teal-dark) 100%);
  color: var(--white);
  padding: 60px 0;
  text-align: center;
}
.cta-banner h2 { font-family: var(--f-display); text-transform: uppercase; font-size: clamp(24px,3.4vw,36px); margin: 0 0 14px; }
.cta-banner p { margin: 0 0 30px; color: rgba(255,255,255,.9); }
.cta-banner .btn-primary { background: var(--white); color: var(--teal); }
.cta-banner .btn-primary:hover { background: #f2f2f2; }

/* ---------- Footer ---------- */
.site-footer { background: var(--ink); color: #c8c9cd; padding: 64px 0 28px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1.1fr; gap: 40px; }
.footer-grid h4 { color: var(--white); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin: 0 0 18px; }
.footer-grid li { margin-bottom: 10px; font-size: 14px; }
.footer-grid a:hover { color: var(--white); }
.footer-logo { font-family: var(--f-display); color: var(--white); font-size: 20px; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 14px; }
.footer-grid p { font-size: 14px; line-height: 1.6; color: #9a9da2; }
.footer-bottom {
  border-top: 1px solid var(--line-dark); margin-top: 48px; padding-top: 22px;
  display: flex; justify-content: space-between; align-items: center; font-size: 12.5px; color: #7d8085; flex-wrap: wrap; gap: 12px;
}

/* ---------- Floating contact button ---------- */
.fab {
  position: fixed; right: 26px; bottom: 26px; z-index: 50;
  width: 74px; height: 74px; border-radius: 50%;
  background: var(--pulse); color: var(--white);
  display: flex; align-items: center; justify-content: center; text-align: center;
  font-size: 11px; font-weight: 800; letter-spacing: .02em; text-transform: uppercase; line-height: 1.25;
  box-shadow: 0 10px 26px rgba(31,170,89,.4);
  border: none;
}
.fab::before {
  content: ""; position: absolute; inset: -6px; border-radius: 50%;
  border: 2px solid var(--pulse); opacity: .5; animation: fab-ring 2.2s ease-out infinite;
}
@keyframes fab-ring { 0% { transform: scale(.9); opacity:.6;} 100% { transform: scale(1.35); opacity: 0; } }

/* ---------- Contact form (contacts page) ---------- */
.form-panel { background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 40px; }
.form-row { margin-bottom: 20px; }
.form-row label { display: block; font-size: 13px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--slate); margin-bottom: 8px; }
.form-row input, .form-row textarea {
  width: 100%; border: 1px solid var(--line); border-radius: 4px; padding: 13px 14px;
  font-family: var(--f-body); font-size: 14.5px; background: var(--paper);
}
.form-row input:focus, .form-row textarea:focus { outline: 2px solid var(--teal); outline-offset: 1px; }
.form-row textarea { resize: vertical; min-height: 120px; }

.info-list { display: grid; gap: 22px; }
.info-item { display: flex; gap: 16px; }
.info-item .ic { flex: none; width: 44px; height: 44px; border-radius: 50%; background: rgba(11,116,136,.08); color: var(--teal); display: flex; align-items: center; justify-content: center; }
.info-item .ic svg { width: 20px; height: 20px; }
.info-item h4 { margin: 0 0 4px; font-size: 15px; text-transform: uppercase; letter-spacing: .02em; }
.info-item p, .info-item a { margin: 0; color: var(--slate); font-size: 14.5px; line-height: 1.55; }
.map-frame { background: var(--paper-dim); border: 1px dashed var(--line); border-radius: 8px; height: 320px; display: flex; align-items: center; justify-content: center; color: var(--slate-200); font-size: 13px; text-transform: uppercase; letter-spacing: .08em; margin-top: 26px; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .main-nav { display: none; }
  .burger { display: inline-flex; background: none; border: none; color: var(--white); font-size: 24px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .stats .wrap { grid-template-columns: repeat(2, 1fr); }
  .grid-3 { grid-template-columns: 1fr; }
  .grid-2 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  .footer-grid { grid-template-columns: 1fr; }
  .topbar .tb-phones { display: none; }
  .fab { width: 62px; height: 62px; font-size: 10px; }
}
