/* ООВ «Мустанг Транс» — стилі сайту. Без фреймворків, mobile-first. */
:root {
  --navy-900: #0b1524;
  --navy-800: #0f1b2d;
  --navy-700: #16263f;
  --navy-600: #22385a;
  --red: #d91f2a;
  --red-700: #b3141e;
  --ink: #142033;
  --muted: #5b6678;
  --line: #e2e7ef;
  --bg: #ffffff;
  --bg-alt: #f4f6fa;
  --ok: #157f3d;
  --ok-bg: #e7f6ec;
  --warn: #8a5a00;
  --warn-bg: #fff6e0;
  --bad: #b3141e;
  --bad-bg: #fdecee;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 10px 30px rgba(11, 21, 36, .08);
  --shadow-lg: 0 24px 60px rgba(11, 21, 36, .18);
  --font: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --container: 1180px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--red-700); text-underline-offset: 3px; }
a:hover { color: var(--red); }
h1, h2, h3 { line-height: 1.2; margin: 0 0 .6em; color: var(--navy-800); letter-spacing: -.01em; }
h1 { font-size: clamp(30px, 5vw, 50px); font-weight: 800; }
h2 { font-size: clamp(24px, 3.2vw, 34px); font-weight: 750; }
h3 { font-size: 20px; font-weight: 700; }
p { margin: 0 0 1em; }
address { font-style: normal; }
:focus-visible { outline: 3px solid #174ea6; outline-offset: 2px; border-radius: 4px; }
.hero :focus-visible, .stats :focus-visible, .site-footer :focus-visible, .cta :focus-visible { outline-color: #ffd166; }
.hero-card :focus-visible { outline-color: #174ea6; }
[hidden] { display: none !important; }
[id] { scroll-margin-top: 84px; }

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 860px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip-link { position: absolute; left: 12px; top: -60px; background: var(--navy-800); color: #fff; padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 12px; color: #fff; }
.nowrap { white-space: nowrap; }
.mono { font-family: var(--mono); letter-spacing: .02em; }

/* Кнопки */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 10px 20px; border-radius: 999px; border: 2px solid transparent;
  font: 600 16px/1.2 var(--font); text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background .15s, color .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--red); color: #fff; }
.btn-primary:hover { background: var(--red-700); color: #fff; }
.btn-ghost { border-color: var(--navy-800); color: var(--navy-800); background: transparent; }
.btn-ghost:hover { background: var(--navy-800); color: #fff; }
.btn-light { background: #fff; color: var(--navy-800); border-color: #fff; }
.btn-light:hover { background: transparent; color: #fff; }
.btn-lg { min-height: 54px; padding: 14px 26px; font-size: 17px; }

/* Шапка */
.site-header { position: sticky; top: 0; z-index: 50; background: #fff; border-bottom: 1px solid var(--line); }
.header-inner { display: flex; align-items: center; gap: 16px; min-height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--navy-800); flex-shrink: 0; }
.brand img { width: 54px; height: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-text strong { font-size: 18px; font-weight: 800; }
.brand-text small { font-size: 12px; color: var(--muted); }
.brand-light { color: #fff; }
.brand-light .brand-text small { color: #b7c2d4; }

.nav-toggle { margin-left: auto; width: 46px; height: 46px; border: 0; background: transparent; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.nav-toggle-bar, .nav-toggle-bar::before, .nav-toggle-bar::after { display: block; width: 24px; height: 2px; background: var(--navy-800); border-radius: 2px; position: relative; transition: transform .2s, background .2s; }
.nav-toggle-bar::before, .nav-toggle-bar::after { content: ""; position: absolute; left: 0; }
.nav-toggle-bar::before { top: -7px; }
.nav-toggle-bar::after { top: 7px; }
.nav-open .nav-toggle-bar { background: transparent; }
.nav-open .nav-toggle-bar::before { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle-bar::after { transform: translateY(-7px) rotate(-45deg); }

.site-nav { display: none; }
/* Поведение без JavaScript — в nojs.css (подключается через <noscript>). */
.nav-open .site-nav {
  display: block; position: fixed; inset: 68px 0 0 0; background: #fff; overflow-y: auto; padding: 12px 16px 32px;
}
.site-nav ul { list-style: none; margin: 0; padding: 0; }
.site-nav > ul > li > a, .sub-toggle {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 14px 4px; border: 0; border-bottom: 1px solid var(--line); background: none;
  font: 600 18px/1.3 var(--font); color: var(--navy-800); text-decoration: none; cursor: pointer; text-align: left;
}
.site-nav a[aria-current="page"] { color: var(--red); }
.sub { display: none; padding: 4px 0 8px 12px !important; }
.has-sub.is-open .sub { display: block; }
.has-sub.is-open .sub-toggle svg { transform: rotate(180deg); }
.sub a { display: block; padding: 10px 4px; color: var(--ink); text-decoration: none; font-size: 16px; }
.nav-actions { display: grid; gap: 10px; margin-top: 20px; }

@media (min-width: 1280px) and (hover: hover) {
  .has-sub:hover .sub { display: block; }
}
@media (min-width: 1280px) {
  .nav-toggle { display: none; }
  .site-nav, .nav-open .site-nav { display: flex; position: static; align-items: center; gap: 18px; margin-left: auto; padding: 0; overflow: visible; background: none; }
  .site-nav > ul { display: flex; gap: 2px; }
  .site-nav > ul > li { position: relative; }
  .site-nav > ul > li > a, .sub-toggle { padding: 10px 12px; border: 0; font-size: 15px; gap: 6px; width: auto; border-radius: 8px; }
  .site-nav > ul > li > a:hover, .sub-toggle:hover { background: var(--bg-alt); }
  .has-sub.is-active > .sub-toggle { color: var(--red); }
  .sub { position: absolute; top: calc(100% + 6px); left: 0; min-width: 300px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow-lg); padding: 8px !important; }
  .has-sub.is-open .sub { display: block; }
  .has-sub::after { content: ""; position: absolute; left: 0; right: 0; top: 100%; height: 8px; }
  .sub a { padding: 9px 12px; border-radius: 8px; font-size: 15px; }
  .sub a:hover { background: var(--bg-alt); }
  .nav-actions { display: flex; margin: 0; gap: 8px; }
  .nav-actions .btn { min-height: 42px; padding: 8px 16px; font-size: 15px; }
}

/* Головний екран */
.hero { position: relative; color: #fff; background: var(--navy-800); overflow: hidden; }
.hero-bg {
  position: absolute; inset: 0;
  /* Собственный фон без сторонних фото: градиент + диагональный узор. */
  background:
    radial-gradient(900px 500px at 85% 20%, rgba(217,31,42,.22), transparent 60%),
    radial-gradient(700px 500px at 10% 110%, rgba(34,56,90,.9), transparent 70%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='46' height='46'%3E%3Cpath d='M0 46L46 0' stroke='%231a2a44' stroke-width='2'/%3E%3C/svg%3E"),
    linear-gradient(160deg, #0b1524 0%, #13223a 100%);
}
.hero-inner { position: relative; display: grid; gap: 32px; padding-top: 48px; padding-bottom: 56px; }
.hero h1 { color: #fff; }
.hero .accent { display: block; color: #ff6b73; font-size: .62em; font-weight: 700; margin-top: .25em; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 13px; font-weight: 700; color: var(--red); margin-bottom: 10px; }
.hero .eyebrow { color: #ff8a90; }
.lead { font-size: 19px; color: var(--muted); max-width: 680px; }
.hero .lead { color: #d3dbe8; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.hero-card { background: #fff; color: var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-lg); align-self: center; }
.hero-card-title { font-size: 22px; margin-bottom: 4px; }
.hero-card-text { color: var(--muted); font-size: 15px; margin-bottom: 14px; }
@media (min-width: 960px) {
  .hero-inner { grid-template-columns: 1.15fr .85fr; padding-top: 80px; padding-bottom: 88px; gap: 56px; }
}

/* Цифри */
.stats { background: var(--navy-700); color: #fff; }
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; padding-top: 20px; padding-bottom: 20px; }
.stat { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 10px; }
.stat strong { font-size: 32px; font-weight: 800; line-height: 1.1; }
.stat span { color: #b7c2d4; font-size: 15px; }

/* Секції */
.section { padding: 64px 0; }
.section-alt { background: var(--bg-alt); }
.section-head { margin-bottom: 28px; }
.cards { display: grid; gap: 18px; }
@media (min-width: 760px) { .cards-3 { grid-template-columns: repeat(3, 1fr); } }
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.card-link { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); transition: transform .15s, box-shadow .15s, border-color .15s; }
.card-link:hover { transform: translateY(-3px); box-shadow: var(--shadow-lg); border-color: #c9d2e0; color: var(--ink); }
.card-link p { color: var(--muted); flex: 1; }
.card-icon { width: 52px; height: 52px; border-radius: 12px; display: grid; place-items: center; background: var(--bad-bg); color: var(--red); margin-bottom: 14px; }
.card-more { color: var(--red-700); font-weight: 600; }

.split { display: grid; gap: 36px; }
@media (min-width: 960px) { .split { grid-template-columns: 1fr 1fr; gap: 56px; } .split-center { align-items: center; } }
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0 0 24px; }
.steps > li { counter-increment: step; position: relative; padding: 0 0 18px 56px; min-height: 40px; }
.steps > li::before {
  content: counter(step); position: absolute; left: 0; top: -2px; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; background: var(--navy-800); color: #fff; font-weight: 700;
}
.steps-plain > li { padding-bottom: 12px; }
.why { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }
.checklist { list-style: none; padding: 0; margin: 0 0 20px; }
.checklist li { position: relative; padding: 6px 0 6px 32px; }
.checklist li::before {
  content: ""; position: absolute; left: 0; top: 10px; width: 20px; height: 20px; border-radius: 50%;
  background: var(--ok-bg) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='M5 10.5l3 3 7-7' fill='none' stroke='%23157f3d' stroke-width='2.2'/%3E%3C/svg%3E") center/14px no-repeat;
}

/* Сповіщення */
.notice { border-radius: var(--radius-sm); padding: 14px 18px; margin: 18px 0; border-left: 4px solid; }
.notice-warn { background: var(--warn-bg); border-color: #e0a100; color: #4d3500; }
.notice-danger { background: var(--bad-bg); border-color: var(--red); color: #5c0a10; }

/* Форма перевірки */
.check-label { display: block; font-weight: 600; font-size: 15px; margin-bottom: 6px; }
.check-row { display: flex; flex-direction: column; gap: 10px; }
.check-input {
  width: 100%; min-height: 52px; padding: 12px 16px; border: 2px solid #7d8aa0; border-radius: 12px;
  font: 600 17px/1.2 var(--mono); letter-spacing: .03em; text-transform: uppercase; color: var(--ink); background: #fff;
}
.check-input::placeholder { text-transform: none; font-family: var(--font); font-weight: 400; letter-spacing: 0; color: #8b95a6; font-size: 15px; }
.check-input:focus { border-color: var(--navy-600); outline: none; box-shadow: 0 0 0 4px rgba(34,56,90,.15); }
.check-submit { min-height: 52px; border-radius: 12px; }
.check-hint { font-size: 13px; color: var(--muted); margin: 8px 0 0; }
@media (min-width: 560px) { .check-row { flex-direction: row; } .check-submit { flex-shrink: 0; } }
.check-form.is-compact .check-row { flex-direction: column; }
.check-results, .check-results-static { margin-top: 16px; }
.check-results:empty { margin-top: 0; }
.check-panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); margin: 8px 0 40px; }
.is-loading .check-submit { opacity: .7; pointer-events: none; }

.result-list { display: grid; gap: 12px; }
.result-card { border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 18px; background: #fff; border-left: 5px solid var(--ok); }
.result-card.is-pending { border-left-color: #e0a100; }
.result-card.is-annulled { border-left-color: var(--bad); }
.result-head { margin-bottom: 10px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 999px; font-size: 13px; font-weight: 700; }
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-wait { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-muted { background: #eef1f6; color: #3d4757; }
.result-card.is-unknown { border-left-color: #8b95a6; }
.result-grid { display: grid; grid-template-columns: 1fr; gap: 8px 20px; margin: 0; }
@media (min-width: 560px) { .result-grid { grid-template-columns: 1fr 1fr; } }
.check-form.is-compact .result-grid { grid-template-columns: 1fr; }
.result-grid dt { font-size: 13px; color: var(--muted); }
.result-grid dd { margin: 0; font-weight: 600; word-break: break-word; }
.result-pdf { margin: 14px 0 0; }
.result-pdf .btn { white-space: normal; text-align: center; }

/* Внутрішні сторінки */
.page-head { background: var(--bg-alt); border-bottom: 1px solid var(--line); padding: 32px 0 28px; margin-bottom: 36px; }
.crumbs { font-size: 14px; color: var(--muted); margin-bottom: 10px; }
.crumbs a { color: var(--muted); }
.content-grid { display: grid; gap: 32px; margin-bottom: 48px; }
@media (min-width: 960px) { .content-grid { grid-template-columns: minmax(0, 1fr) 340px; gap: 48px; align-items: start; } }
.prose { max-width: 760px; }
.prose h2 { margin-top: 1.6em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 1.2em; }
.prose li { margin-bottom: .45em; }
.prose.small { font-size: 16px; color: var(--muted); }
.law-list li { margin-bottom: .9em; }
.columns-2 { columns: 1; }
@media (min-width: 700px) { .columns-2 { columns: 2; column-gap: 32px; } .columns-2 li { break-inside: avoid; } }
.sidebar { display: grid; gap: 18px; }
.side-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow); }
.side-title { font-size: 18px; margin: 4px 0 12px; }
.side-box .side-title:not(:first-child) { margin-top: 18px; }

.doc { display: flex; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius-sm); text-decoration: none; color: var(--ink); margin-bottom: 10px; background: #fff; transition: border-color .15s, box-shadow .15s; }
.doc:hover { border-color: #c9d2e0; box-shadow: var(--shadow); color: var(--ink); }
.doc-ext { flex-shrink: 0; width: 48px; height: 48px; border-radius: 10px; display: grid; place-items: center; background: var(--navy-800); color: #fff; font: 700 12px/1 var(--font); }
.doc-body { display: flex; flex-direction: column; min-width: 0; }
.doc-title { font-weight: 600; font-size: 15px; line-height: 1.35; }
.doc-meta { font-size: 13px; color: var(--muted); }

.cta { display: grid; gap: 16px; background: var(--navy-800); color: #fff; border-radius: var(--radius); padding: 28px; margin: 24px 0 56px; }
.cta-title { color: #fff; font-size: 22px; margin-bottom: 6px; }
.cta p { color: #c8d1df; margin: 0; }
.cta-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.sidebar .cta { margin: 0; padding: 22px; }
@media (min-width: 900px) { .content-grid + .container .cta, .container > .cta { grid-template-columns: 1fr auto; align-items: center; } }

/* Лабораторії */
.lab-filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: var(--bg-alt); border-radius: var(--radius-sm); padding: 14px; margin-bottom: 24px; }
.lab-filter label { font-weight: 600; }
.lab-filter select, .lab-filter input { min-height: 46px; padding: 8px 12px; border: 2px solid #7d8aa0; border-radius: 10px; font: 16px var(--font); background: #fff; }
.lab-filter input { flex: 1 1 220px; }
.table-title { font-size: 20px; margin-top: 28px; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); margin-bottom: 16px; }
.lab-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.lab-table th { background: var(--navy-800); color: #fff; text-align: left; padding: 10px 14px; font-weight: 600; white-space: nowrap; }
.lab-table td { padding: 10px 14px; border-top: 1px solid var(--line); vertical-align: top; }
.lab-table tr:nth-child(even) td { background: #fafbfd; }
.lab-table td:first-child { font-weight: 600; min-width: 150px; }
@media (max-width: 640px) {
  .lab-table thead { display: none; }
  .lab-table tr { display: block; padding: 10px 14px; border-top: 1px solid var(--line); }
  .lab-table td { display: block; padding: 2px 0; border: 0; background: none !important; }
  .lab-table td:nth-child(2) { color: var(--muted); font-size: 14px; }
}
.lab-empty { padding: 16px; }

.atestat-figure { margin: 0; }
.atestat-figure img { border: 1px solid var(--line); border-radius: var(--radius-sm); box-shadow: var(--shadow); max-width: 600px; width: 100%; }
.atestat-figure figcaption { color: var(--muted); font-size: 14px; margin-top: 8px; }

/* Контакти й карта */
.contact-big { list-style: none; padding: 0; margin: 0 0 20px; display: grid; gap: 12px; }
.contact-big li { display: grid; gap: 2px; }
.contact-big span { font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.contact-big a { font-size: 20px; font-weight: 700; color: var(--navy-800); text-decoration: none; }
.contact-big a:hover { color: var(--red); }
.hours { margin: 0; display: grid; gap: 4px; }
.hours div { display: flex; justify-content: space-between; gap: 16px; }
.hours dt { color: inherit; opacity: .8; }
.hours dd { margin: 0; font-weight: 600; }
.hours-dark { max-width: 380px; background: var(--bg-alt); border-radius: var(--radius-sm); padding: 14px 18px; }
.map-wrap { border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); min-height: 320px; background: var(--bg-alt); }
.map-wrap iframe { width: 100%; height: 100%; min-height: 360px; border: 0; display: block; }
.map-placeholder { min-height: 320px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 12px; padding: 24px; text-align: center; color: var(--muted); }
.map-placeholder svg { color: var(--red); }
.map-placeholder p { margin: 0; max-width: 360px; }

/* Підвал */
.site-footer { background: var(--navy-900); color: #c8d1df; padding: 48px 0 0; }
.footer-grid { display: grid; gap: 28px; }
@media (min-width: 760px) { .footer-grid { grid-template-columns: 1.3fr 1fr 1fr 1fr; } }
.footer-title { color: #fff; font-size: 16px; margin-bottom: 12px; }
.footer-note { font-size: 14px; margin-top: 14px; }
.site-footer a { color: #e6ebf3; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.contact-list, .footer-links { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15px; }
.site-footer .hours { font-size: 15px; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,.1); margin-top: 36px; padding-top: 18px; padding-bottom: 90px; font-size: 14px; color: #8d99ad; }
@media (min-width: 760px) { .footer-bottom { padding-bottom: 22px; } }

.fab-call {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center; background: var(--red); color: #fff; box-shadow: 0 10px 24px rgba(217,31,42,.45);
}
.fab-call:hover { background: var(--red-700); color: #fff; }
@media (min-width: 1280px) { .fab-call { display: none; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .fab-call, .cta, .sidebar, .check-form { display: none !important; }
}
