/* ===== Дизайн-система «Синій довіра» ===== */
:root {
  --bg: #f2f4fc;
  --card: #ffffff;
  --ink: #0b1f3a;
  --muted: #5a6b82;
  --faint: #8a97a8;
  --blue: #1e50e6;
  --blue2: #5b7cff;
  --line: #e4e8f4;
  --green: #22c55e;
  --tint: #e9eeff;
  --tint-warm: #fdefe6;
  --radius: 20px;
  --shadow: 0 22px 50px rgba(11, 31, 58, .10);
  --shadow-lg: 0 30px 60px rgba(11, 31, 58, .12);

  /* Кольори категорій */
  --c-civil: #2563eb;
  --c-family: #db2777;
  --c-labor: #d97706;
  --c-criminal: #dc2626;
  --c-auto: #0d9488;
  --c-realty: #16a34a;
  --c-business: #7c3aed;
  --c-process: #0891b2;
  --c-military: #4d7c0f;
  --c-admin: #475569;
  --c-social: #4338ca;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--ink);
  line-height: 1.6;
  font-weight: 300;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

h1, h2, h3, .disp {
  font-family: 'Bricolage Grotesque', 'Inter', sans-serif;
  letter-spacing: -.02em;
  font-weight: 600;
}

a { color: var(--blue); text-decoration: none; }
::selection { background: var(--blue); color: #fff; }

.container { max-width: 1160px; margin: 0 auto; padding: 0 28px; }

/* ===== Шапка ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 70;
  background: rgba(245, 246, 248, .82);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  transition: transform .32s ease;
  will-change: transform;
}
.site-header.hidden { transform: translateY(-100%); }

/* Шкала прогресу гортання сторінки */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 90;
  width: 100%;
  height: 3px;
  transform: scaleX(0);
  transform-origin: left center;
  background: linear-gradient(90deg, var(--blue), var(--blue2));
  pointer-events: none;
}
.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 0;
}
.brand {
  display: flex;
  align-items: center;
  gap: 11px;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 800;
  font-size: 1.15rem;
  color: var(--ink);
}
.brand-mark {
  width: 36px;
  height: 36px;
  flex-shrink: 0;
  border-radius: 10px;
  overflow: hidden;
}
.brand-mark img { width: 100%; height: 100%; }

.site-nav { display: flex; gap: 6px; align-items: center; }
.site-nav a {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 400;
  padding: 9px 15px;
  border-radius: 10px;
  transition: color .2s, background .2s;
}
.site-nav a:hover { color: var(--ink); background: #e8ebf2; }
.site-nav .nav-cta { background: var(--ink); color: #fff; font-weight: 500; }
.site-nav .nav-cta:hover { background: var(--blue); color: #fff; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 8px;
}
.nav-toggle span { width: 22px; height: 2px; background: var(--ink); border-radius: 2px; }

/* ===== Кнопки ===== */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 500;
  font-size: .96rem;
  padding: 15px 30px;
  border-radius: 12px;
  transition: transform .2s, box-shadow .2s, background .2s;
}
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 34px rgba(30, 80, 230, .35); }
.btn-ghost { background: var(--card); border: 1px solid var(--line); color: var(--ink); }
.btn-ghost:hover { border-color: var(--blue2); color: var(--blue); }
.link-underline {
  color: var(--ink);
  font-weight: 500;
  font-size: .92rem;
  padding-bottom: 3px;
  border-bottom: 2px solid var(--blue);
}
.link-underline:hover { color: var(--blue); }

/* ===== Головний екран ===== */
.hero { padding: 8px 0 72px; position: relative; overflow: hidden; }
.hero::before {
  content: "";
  position: absolute;
  inset: -30% -10% auto -10%;
  height: 150%;
  z-index: 0;
  background:
    radial-gradient(38% 46% at 18% 20%, rgba(37, 99, 235, .16), transparent 70%),
    radial-gradient(34% 40% at 88% 12%, rgba(219, 39, 119, .12), transparent 70%),
    radial-gradient(40% 48% at 70% 88%, rgba(124, 58, 237, .12), transparent 72%);
  animation: heromesh 14s ease-in-out infinite alternate;
}
@keyframes heromesh { to { transform: translate3d(0, 18px, 0) scale(1.05); } }
.hero-inner { position: relative; z-index: 1; }
.hero-inner {
  display: grid;
  grid-template-columns: 1.15fr .85fr;
  gap: 56px;
  align-items: center;
}
.pill {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 100px;
  padding: 7px 16px;
  font-size: .82rem;
  color: var(--muted);
  margin-bottom: 26px;
}
.pill i {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--green); box-shadow: 0 0 10px var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse { 50% { opacity: .4; } }

.hero h1 {
  font-size: clamp(2.8rem, 5.6vw, 4.4rem);
  font-weight: 800;
  line-height: 1.02;
  margin-bottom: 22px;
}
.hero h1 .accent { color: var(--blue); }
.hero-lead { color: var(--muted); max-width: 44ch; margin-bottom: 34px; font-size: 1.08rem; }
.hero-actions { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; }

/* Візуальний кластер */
.hero-visual { position: relative; }
.visual-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 24px;
  padding: 32px;
  box-shadow: var(--shadow-lg);
}
.visual-card .photo {
  aspect-ratio: 4 / 5;
  border-radius: 16px;
  object-fit: cover;
  object-position: center 20%;
  width: 100%;
  margin-bottom: 32px;
  background: linear-gradient(135deg, var(--blue), var(--blue2));
}
.visual-card h3 { font-size: 1.3rem; font-weight: 600; margin-bottom: 14px; }
.visual-card p { color: var(--muted); font-size: .9rem; }
/* Пігулки-переваги під hero */
.hero-feats { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.hero-feats li {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: .9rem; color: var(--ink);
  background: var(--card); border: 1px solid var(--line);
  padding: 8px 15px; border-radius: 999px;
}
.hero-feats li::before { content: "✓"; color: var(--blue); font-weight: 700; }

/* Форма заявки в блоці контактів */
.lead-form { margin-top: 22px; display: grid; gap: 10px; }
.lead-form input, .lead-form textarea {
  width: 100%; padding: 12px 15px; border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .08);
  color: #fff; font-family: inherit; font-size: .95rem;
}
.lead-form input::placeholder, .lead-form textarea::placeholder { color: #aeb9cc; }
.lead-form input:focus, .lead-form textarea:focus { outline: none; border-color: var(--blue2); background: rgba(255, 255, 255, .12); }
.lead-form textarea { resize: vertical; min-height: 88px; }
.lead-form button { margin-top: 4px; }
.form-ok { display: none; color: #6ee7a0; font-size: .9rem; margin-top: 10px; }
.contacts-divider { color: #8b98ad; font-size: .85rem; margin: 20px 0 0; }

/* ===== Секції ===== */
.section { padding: 56px 0; border-top: 1px solid var(--line); }
.section.tint {
  border-top: none;
  background: linear-gradient(180deg, var(--tint), transparent 70%);
}
.section.tint-warm {
  border-top: none;
  background: linear-gradient(180deg, var(--tint-warm), transparent 70%);
}
.section-head { margin-bottom: 32px; }
.section-kicker {
  display: inline-block;
  font-size: .78rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--blue);
  font-weight: 600;
  margin-bottom: 14px;
}
.section-title { font-size: clamp(1.9rem, 3.5vw, 2.6rem); font-weight: 600; margin-bottom: 12px; }
.section-sub { color: var(--muted); max-width: 60ch; }

/* ===== Про мене ===== */
.about-grid { display: grid; grid-template-columns: 1.3fr .7fr; gap: 56px; align-items: start; }
.about-text p { margin-bottom: 18px; color: var(--muted); }
.about-text p:first-child { color: var(--ink); font-size: 1.14rem; }
.about-list { list-style: none; display: flex; flex-direction: column; gap: 16px; }
.about-list li {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px 22px;
}
.about-list .t { display: block; font-weight: 600; margin-bottom: 3px; }
.about-list .d { color: var(--muted); font-size: .9rem; }

/* ===== Послуги ===== */
.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 26px;
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--blue2); }
.card .ic {
  width: 46px; height: 46px;
  border-radius: 12px;
  background: rgba(30, 80, 230, .1);
  color: var(--blue);
  display: grid; place-items: center;
  font-size: 1.2rem;
  margin-bottom: 18px;
}
.card h3 { font-size: 1.2rem; font-weight: 600; margin-bottom: 9px; }
.card p { color: var(--muted); font-size: .93rem; }

/* ===== Статті ===== */
.articles { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.article-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 32px;
  color: var(--ink);
  transition: transform .25s, box-shadow .25s, border-color .25s;
}
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow); border-color: var(--blue2); }
.article-card .date {
  display: inline-block;
  background: rgba(30, 80, 230, .08);
  color: var(--blue);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 16px;
}
.article-card h3 { font-size: 1.32rem; font-weight: 600; margin-bottom: 10px; }
.article-card p { color: var(--muted); font-size: .93rem; margin-bottom: 18px; }
.article-card .more { color: var(--blue); font-weight: 600; font-size: .9rem; }
.article-card .more span { display: inline-block; transition: transform .25s; }
.article-card:hover .more span { transform: translateX(6px); }

/* ===== Контакти ===== */
.contacts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: start; }
.contacts-card {
  background: var(--ink);
  color: #fff;
  border-radius: 28px;
  padding: 48px;
}
.contacts-card h2 { color: #fff; margin-bottom: 12px; }
.contacts-card p { color: #aeb9cc; margin-bottom: 28px; max-width: 46ch; }
.contacts-card .btn-primary { background: var(--blue); }
.social-row { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.social-btn {
  display: inline-flex; align-items: center; gap: 9px;
  padding: 10px 16px; border-radius: 999px;
  background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff; font-size: .92rem; font-weight: 500;
  transition: background .18s ease, border-color .18s ease, transform .18s ease;
}
.social-btn .dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; }
.social-btn:hover { transform: translateY(-2px); border-color: transparent; }
.social-btn:hover .dot { color: #fff; }
.sb-wa .dot { color: #25d366; } .sb-wa:hover { background: #25d366; }
.sb-vb .dot { color: #7360f2; } .sb-vb:hover { background: #7360f2; }
.sb-tg .dot { color: #229ed9; } .sb-tg:hover { background: #229ed9; }
.sb-ig .dot { color: #e4405f; }
.sb-ig:hover { background: linear-gradient(45deg, #f09433, #dc2743, #bc1888); }

/* ===== Плаваючі кнопки швидкого зв'язку ===== */
.fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 60;
  display: flex; flex-direction: column; gap: 14px;
}
.fab-btn {
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; border: none; padding: 0; cursor: pointer;
  box-shadow: 0 10px 26px rgba(11, 31, 58, .28);
  transition: transform .18s ease, box-shadow .18s ease, filter .18s ease;
}
.fab-btn svg { width: 24px; height: 24px; fill: currentColor; }
.fab-btn:hover { transform: translateY(-3px) scale(1.06); box-shadow: 0 14px 32px rgba(11, 31, 58, .34); filter: brightness(1.05); }
.fab-group { display: flex; flex-direction: column; gap: 14px; margin-bottom: 14px; }
.fab:not(.open) .fab-group { display: none; }
.fab.open .fab-group .fab-btn { animation: fabPop .22s ease backwards; }
.fab.open .fab-group .fab-btn:nth-child(1) { animation-delay: .02s; }
.fab.open .fab-group .fab-btn:nth-child(2) { animation-delay: .05s; }
.fab.open .fab-group .fab-btn:nth-child(3) { animation-delay: .08s; }
.fab.open .fab-group .fab-btn:nth-child(4) { animation-delay: .11s; }
@keyframes fabPop { from { opacity: 0; transform: translateY(14px) scale(.5); } to { opacity: 1; transform: none; } }
.fab-toggle svg { transition: transform .22s ease; }
.fab.open .fab-toggle svg { transform: rotate(135deg); }
.fab-toggle { background: var(--blue); }
.fab-call { background: #0d9488; }
.fab-tg { background: #229ed9; }
.fab-wa { background: #25d366; }
.fab-vb { background: #7360f2; }
.fab-top { background: #e5462f; }
@media (max-width: 620px) {
  .fab { right: 14px; bottom: 14px; gap: 11px; }
  .fab-btn { width: 46px; height: 46px; }
  .fab-btn svg { width: 22px; height: 22px; }
}
.contact-lines { display: flex; flex-direction: column; }
.contact-item {
  display: flex;
  gap: 16px;
  align-items: flex-start;
  padding: 18px 0;
  border-bottom: 1px solid var(--line);
}
.contact-item:first-child { padding-top: 0; }
.ci-ico { flex-shrink: 0; color: var(--blue); margin-top: 2px; }
.ci-ico svg { width: 26px; height: 26px; display: block; }
.contact-item .label {
  display: block;
  font-family: 'Bricolage Grotesque', sans-serif;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
  margin-bottom: 4px;
}
.contact-item .value {
  font-size: 1.02rem;
  font-weight: 400;
  color: var(--muted);
  line-height: 1.45;
}
a.value:hover { color: var(--blue); }
.contact-map {
  margin-top: 22px;
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
  line-height: 0;
}
.contact-map iframe { width: 100%; height: 240px; border: 0; display: block; filter: grayscale(.15); }

/* Тематичні хаби + перелінки */
.cat-group-head h2 a { color: inherit; text-decoration: none; }
.cat-group-head h2 a:hover { color: var(--blue); }
.hub-others { margin-top: 40px; display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.hub-others-label { color: var(--muted); font-size: .92rem; margin-right: 4px; }
.hub-others a.cat { text-decoration: none; transition: transform .15s ease; }
.hub-others a.cat:hover { transform: translateY(-2px); }
.article-page p a { color: var(--blue); text-decoration: none; border-bottom: 1px solid var(--tint); }
.article-page p a:hover { border-bottom-color: var(--blue); }
/* Клікабельні картки «Послуги» → тематичні хаби */
a.card { text-decoration: none; color: inherit; display: block; }
.card .more { display: inline-flex; align-items: center; gap: 6px; margin-top: 16px; color: var(--blue); font-weight: 600; font-size: .9rem; }
.card .more span { display: inline-block; transition: transform .25s; }
a.card:hover .more span { transform: translateX(5px); }

/* Honeypot — приховане поле-пастка для ботів */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; pointer-events: none; }

/* ===== Підвал ===== */
.site-footer { border-top: 1px solid var(--line); padding: 30px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  color: var(--faint);
  font-size: .85rem;
}
.footer-inner .brand { font-size: 1rem; }

/* ===== Поява при скролі ===== */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .pill i { animation: none; }
}

/* ===== Сторінка статті ===== */
.article-page { max-width: 720px; margin: 0 auto; padding: 64px 28px 96px; }
.back-link {
  display: inline-block;
  font-size: .85rem;
  font-weight: 500;
  color: var(--muted);
  margin-bottom: 40px;
}
.back-link:hover { color: var(--blue); }
.article-page .date {
  display: inline-block;
  background: rgba(30, 80, 230, .08);
  color: var(--blue);
  border-radius: 100px;
  padding: 6px 14px;
  font-size: .78rem;
  font-weight: 600;
  margin-bottom: 20px;
}
.article-page h1 { font-size: clamp(2rem, 5vw, 2.9rem); font-weight: 700; line-height: 1.1; margin-bottom: 36px; }
.article-page h2 { font-size: 1.5rem; font-weight: 600; margin: 44px 0 14px; }
.article-page p { margin-bottom: 20px; color: #33425a; }
.article-page ul, .article-page ol { margin: 0 0 20px 22px; color: #33425a; }
.article-page li { margin-bottom: 8px; }
.article-page strong { color: var(--ink); font-weight: 600; }
.article-note {
  background: var(--card);
  border: 1px solid var(--line);
  border-left: 3px solid var(--blue);
  border-radius: 14px;
  padding: 22px 24px;
  margin-top: 48px;
  color: var(--muted);
  font-size: .92rem;
}

/* ===== Адаптивність ===== */
@media (max-width: 880px) {
  .hero { padding: 12px 0 56px; }
  .hero-inner { grid-template-columns: 1fr; gap: 64px; }
  .hero-visual { max-width: 420px; }
  .about-grid { grid-template-columns: 1fr; gap: 36px; }
  .cards { grid-template-columns: 1fr; }
  .articles { grid-template-columns: 1fr; }
  .contacts-grid { grid-template-columns: 1fr; gap: 28px; }
  .contacts-card { padding: 36px; }
  .section { padding: 44px 0; }
}
@media (max-width: 620px) {
  .site-nav {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    padding: 16px 24px 24px;
    gap: 8px;
  }
  .site-nav.open { display: flex; }
  .site-nav a { padding: 12px 15px; }
  .nav-toggle { display: flex; }
}

/* ===== Кольорові іконки послуг ===== */
.card:nth-child(1) .ic { background: rgba(37,99,235,.12);  color: var(--c-civil); }
.card:nth-child(2) .ic { background: rgba(8,145,178,.12);  color: var(--c-process); }
.card:nth-child(3) .ic { background: rgba(22,163,74,.12);  color: var(--c-realty); }
.card:nth-child(4) .ic { background: rgba(219,39,119,.12); color: var(--c-family); }
.card:nth-child(5) .ic { background: rgba(124,58,237,.12); color: var(--c-business); }
.card:nth-child(6) .ic { background: rgba(220,38,38,.12);  color: var(--c-criminal); }
.card:nth-child(7) .ic { background: rgba(77,124,15,.12);  color: var(--c-military); }
.card:nth-child(8) .ic { background: rgba(71,85,105,.12);  color: var(--c-admin); }
.card:nth-child(9) .ic { background: rgba(67,56,202,.12);  color: var(--c-social); }

/* Кольорові ліві межі карток-переваг */
.about-list li { border-left: 3px solid var(--blue2); }
.about-list li:nth-child(1) { border-left-color: var(--c-civil); }
.about-list li:nth-child(2) { border-left-color: var(--c-business); }
.about-list li:nth-child(3) { border-left-color: var(--c-realty); }

/* ===== Кольорові теги категорій ===== */
.cat {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  border-radius: 100px;
  padding: 5px 13px;
  font-size: .76rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.cat::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.cat-civil    { color: var(--c-civil);    background: rgba(37,99,235,.10); }
.cat-family   { color: var(--c-family);   background: rgba(219,39,119,.10); }
.cat-labor    { color: var(--c-labor);    background: rgba(217,119,6,.12); }
.cat-criminal { color: var(--c-criminal); background: rgba(220,38,38,.10); }
.cat-auto     { color: var(--c-auto);     background: rgba(13,148,136,.12); }
.cat-realty   { color: var(--c-realty);   background: rgba(22,163,74,.12); }
.cat-business { color: var(--c-business); background: rgba(124,58,237,.10); }
.cat-process  { color: var(--c-process);  background: rgba(8,145,178,.12); }
.cat-military { color: var(--c-military); background: rgba(77,124,15,.12); }
.cat-admin    { color: var(--c-admin);    background: rgba(71,85,105,.12); }
.cat-social   { color: var(--c-social);   background: rgba(67,56,202,.10); }

/* Верхня кольорова смужка на картці статті */
.article-card { position: relative; overflow: hidden; }
.article-card::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 4px;
  background: var(--accent-c, var(--blue));
  transform: scaleX(0); transform-origin: left; transition: transform .35s;
}
.article-card:hover::before { transform: scaleX(1); }
.ac-civil    { --accent-c: var(--c-civil); }
.ac-family   { --accent-c: var(--c-family); }
.ac-labor    { --accent-c: var(--c-labor); }
.ac-criminal { --accent-c: var(--c-criminal); }
.ac-auto     { --accent-c: var(--c-auto); }
.ac-realty   { --accent-c: var(--c-realty); }
.ac-business { --accent-c: var(--c-business); }
.ac-process  { --accent-c: var(--c-process); }
.ac-military { --accent-c: var(--c-military); }
.ac-admin    { --accent-c: var(--c-admin); }
.ac-social   { --accent-c: var(--c-social); }

.articles-more { margin-top: 40px; text-align: center; }

/* ===== Сторінка каталогу статей ===== */
.catalog-hero {
  padding: 72px 0 40px;
  position: relative;
  overflow: hidden;
}
.catalog-hero::before {
  content: "";
  position: absolute; inset: -40% -10% auto -10%; height: 160%; z-index: 0;
  background:
    radial-gradient(36% 44% at 20% 18%, rgba(37,99,235,.16), transparent 70%),
    radial-gradient(32% 40% at 85% 15%, rgba(124,58,237,.13), transparent 70%);
}
.catalog-hero .container { position: relative; z-index: 1; }
.catalog-hero h1 { font-size: clamp(2.2rem, 5vw, 3.4rem); font-weight: 800; margin-bottom: 14px; }
.catalog-hero p { color: var(--muted); max-width: 56ch; font-size: 1.08rem; }

.catalog-search {
  width: 100%;
  max-width: 560px;
  margin-top: 26px;
  padding: 14px 20px;
  font: inherit;
  font-size: 1rem;
  color: var(--ink);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  position: relative;
  z-index: 1;
  box-shadow: var(--shadow);
}
.catalog-search::placeholder { color: var(--muted); }
.catalog-search:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 4px rgba(37, 99, 235, .12); }

.no-results { color: var(--muted); font-size: 1.05rem; padding: 30px 4px; }

.dl-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 16px;
  padding: 10px 18px;
  border-radius: 12px;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  font-size: .92rem;
  text-decoration: none;
  transition: .2s;
}
.dl-btn:hover { background: var(--blue2); transform: translateY(-2px); }
.docs-note {
  margin-top: 40px;
  padding: 20px 24px;
  border-radius: 14px;
  background: rgba(217, 119, 6, .07);
  border: 1px solid rgba(217, 119, 6, .2);
  color: var(--muted);
  font-size: .95rem;
  line-height: 1.6;
}
.docs-note a { color: var(--blue); font-weight: 600; }

/* ===== Смуга «Замовити дзвінок» ===== */
.callback-band { background: linear-gradient(135deg, #0e1e3a, #172d52); color: #fff; padding: 32px 0; }
.callback-inner { display: flex; align-items: center; justify-content: space-between; gap: 32px; flex-wrap: nowrap; }
.callback-text { flex: 1 1 auto; min-width: 0; }
.callback-text h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 4px; }
.callback-text p { color: #c4cfe0; font-size: .98rem; max-width: 52ch; }
.callback-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; flex: 0 0 auto; }
.callback-form input[type="text"], .callback-form input[type="tel"] {
  padding: 12px 16px; border-radius: 12px; border: 1px solid rgba(255, 255, 255, .18);
  background: rgba(255, 255, 255, .10); color: #fff; font-family: inherit; font-size: .95rem; width: 160px;
}
.callback-form input::placeholder { color: #aeb9cc; }
.callback-form input:focus { outline: none; border-color: var(--blue2); background: rgba(255, 255, 255, .15); }
.callback-form button { white-space: nowrap; }
.callback-form .form-ok { flex-basis: 100%; margin-top: 8px; }

/* ===== Спливаюче вікно «Замовити дзвінок» ===== */
.cb-modal { position: fixed; inset: 0; z-index: 200; display: none; align-items: center; justify-content: center; padding: 20px; }
.cb-modal.open { display: flex; }
.cb-backdrop { position: absolute; inset: 0; background: rgba(11, 31, 58, .55); backdrop-filter: blur(2px); }
.cb-card {
  position: relative; z-index: 1; width: 100%; max-width: 400px;
  background: var(--card); border-radius: 20px; padding: 32px 28px 28px;
  box-shadow: var(--shadow-lg); animation: cbIn .3s ease;
}
@keyframes cbIn { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.cb-close {
  position: absolute; top: 10px; right: 14px; width: 34px; height: 34px;
  border: none; background: transparent; font-size: 1.9rem; line-height: 1;
  color: var(--muted); cursor: pointer; border-radius: 8px; transition: .2s;
}
.cb-close:hover { color: var(--ink); background: rgba(11, 31, 58, .06); }
.cb-card h3 { font-size: 1.4rem; font-weight: 700; color: var(--ink); margin-bottom: 8px; }
.cb-card > p { color: var(--muted); font-size: .95rem; line-height: 1.5; margin-bottom: 18px; }
.cb-form { display: grid; gap: 10px; }
.cb-form input[type="text"], .cb-form input[type="tel"] {
  width: 100%; padding: 12px 15px; border-radius: 12px; border: 1px solid var(--line);
  font-family: inherit; font-size: .95rem; color: var(--ink); background: #fff;
}
.cb-form input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgba(37, 99, 235, .12); }
.cb-form button { margin-top: 4px; }
.cb-ok { display: none; color: #16a34a; font-size: .9rem; margin: 4px 0 0; }

/* ===== Банер згоди на cookie ===== */
.cookie-banner {
  position: fixed; left: 20px; bottom: 20px; z-index: 210;
  max-width: 380px; width: calc(100% - 40px);
  background: var(--card); border: 1px solid var(--line); border-radius: 16px;
  box-shadow: var(--shadow-lg); padding: 18px 20px; animation: cbIn .3s ease;
}
.cookie-banner p { font-size: .9rem; color: var(--muted); line-height: 1.5; margin: 0 0 14px; }
.cookie-banner a { color: var(--blue); font-weight: 600; }
.cookie-actions { display: flex; gap: 10px; }
.cookie-actions .btn { padding: 9px 18px; font-size: .9rem; }
@media (max-width: 520px) { .cookie-banner { left: 12px; right: 12px; bottom: 12px; width: auto; } }
@media (max-width: 860px) {
  .callback-inner { flex-wrap: wrap; }
  .callback-form { width: 100%; }
  .callback-form input[type="text"], .callback-form input[type="tel"] { flex: 1 1 160px; width: auto; }
}

.cat-filter { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; position: relative; z-index: 1; }
.cat-filter button {
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  border-radius: 100px;
  padding: 9px 18px;
  font: inherit;
  font-size: .88rem;
  cursor: pointer;
  transition: .2s;
}
.cat-filter button:hover { color: var(--ink); border-color: var(--blue2); }
.cat-filter button.active { background: var(--ink); color: #fff; border-color: var(--ink); }

.catalog { padding: 32px 0 60px; }
.cat-group { margin-bottom: 56px; }
.cat-group-head {
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 24px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.cat-group-head h2 { font-size: 1.5rem; font-weight: 700; }
.cat-group-head .count { color: var(--faint); font-size: .9rem; margin-left: auto; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.mini-card {
  display: flex; flex-direction: column;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 24px 22px;
  color: var(--ink);
  transition: transform .22s, box-shadow .22s, border-color .22s;
}
.mini-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--blue2); }
.mini-card h3 { font-size: 1.08rem; font-weight: 600; margin: 12px 0 8px; line-height: 1.3; }
.mini-card p { color: var(--muted); font-size: .88rem; flex: 1; }
.mini-card .more { color: var(--blue); font-weight: 600; font-size: .85rem; margin-top: 14px; }

@media (max-width: 880px) {
  .cat-grid { grid-template-columns: 1fr; }
}

/* ===== SEO-елементи статей ===== */
.crumbs {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
  font-size: .82rem; color: var(--faint); margin-bottom: 26px;
}
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--blue); }
.crumbs .cur { color: var(--faint); }
.crumbs span { color: var(--line); }

.article-page .cat { margin-bottom: 16px; }
.meta-line { color: var(--faint); font-size: .88rem; margin: 14px 0 30px; }
.meta-line span { white-space: nowrap; }

.tldr {
  background: var(--tint);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 22px 26px;
  margin-bottom: 36px;
}
.tldr strong {
  display: block; color: var(--ink); font-weight: 700;
  font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; margin-bottom: 10px;
}
.tldr ul { margin: 0 0 0 20px; color: #33425a; }
.tldr li { margin-bottom: 6px; }

/* FAQ */
.faq { display: flex; flex-direction: column; gap: 12px; margin: 8px 0 8px; }
.faq details {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 4px 22px;
  transition: border-color .2s;
}
.faq details[open] { border-color: var(--blue2); }
.faq summary {
  cursor: pointer; list-style: none;
  font-weight: 600; color: var(--ink);
  padding: 18px 30px 18px 0; position: relative;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 2px; top: 50%; transform: translateY(-50%);
  font-size: 1.4rem; color: var(--blue); font-weight: 400; transition: transform .2s;
}
.faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.faq details p { margin: 0 0 18px; color: #33425a; }

/* Читайте також */
.related { margin-top: 56px; padding-top: 8px; }
.related h2 { font-size: 1.4rem; margin-bottom: 20px; }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.related-card {
  background: var(--card); border: 1px solid var(--line); border-radius: 14px;
  padding: 20px; color: var(--ink); transition: transform .2s, box-shadow .2s, border-color .2s;
}
.related-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--blue2); }
.related-card .cat { margin-bottom: 10px; }
.related-card h3 { font-size: 1rem; font-weight: 600; line-height: 1.3; }

@media (max-width: 760px) {
  .related-grid { grid-template-columns: 1fr; }
}
