/* ABDS Builder Theme — базові стилі: змінні, типографіка за замовчуванням, шапка, підвал, кнопка «вгору».
   Оформлення блоків конструктора лежить у kit-core/kit/skin.css. */
:root {
  --bg: #110b0d;
  --bg-soft: #191012;
  --panel: rgba(255, 255, 255, 0.07);
  --panel-strong: rgba(255, 255, 255, 0.12);
  --text: #fff8f2;
  --muted: #cdbdb5;
  --accent: #ffb36a;
  --accent-2: #f05f57;
  --gold: #ffd36b;
  --gold-2: #f4b942;
  --line: rgba(255, 255, 255, 0.14);
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.35);
  --radius: 28px;
  --container: 1240px;
  --section-frame-width: min(calc(100vw - 32px), 1880px);
  --section-inner-width: min(calc(100% - 64px), 1480px);
  --header-height: 78px;
  --parallax-y: 0px; }
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-height) + 18px); }
body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.55;
  text-rendering: optimizeLegibility;
  overflow-x: hidden; }
body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 18% 8%, rgba(240, 95, 87, .22), transparent 32rem),
    radial-gradient(circle at 86% 22%, rgba(255, 179, 106, .14), transparent 26rem);
  z-index: -1; }
a { color: inherit; text-decoration: none; }
img, video { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; }
.container { width: min(calc(100% - 32px), var(--container)); margin-inline: auto; }
.skip-link { position: absolute; left: -999px; top: 12px; background: var(--accent); color: #1a0d08; padding: 10px 14px; border-radius: 999px; z-index: 20; }
.skip-link:focus { left: 12px; }
.site-header {
  position: sticky;
  top: var(--wp-admin--admin-bar--height, 0px);
  z-index: 80;
  background: rgba(17, 11, 13, .86);
  border-bottom: 1px solid rgba(255,255,255,.10);
  backdrop-filter: blur(18px);
  transition: background .25s ease, border-color .25s ease, backdrop-filter .25s ease; }
.site-header.is-scrolled {
  background: rgba(12, 7, 8, .92);
  border-color: rgba(255,211,107,.18); }
.admin-bar .site-header { top: 32px; }
.header-inner { min-height: var(--header-height); display: flex; align-items: center; justify-content: space-between; gap: 22px; }
.brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 800; letter-spacing: -.03em; }
.brand-logo {
  width: auto;
  max-width: 220px;
  height: clamp(34px, 5vw, 52px);
  object-fit: contain; }
.footer-logo { height: 48px; }
.brand-mark {
  width: 38px; height: 38px; border-radius: 50%;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: #1a0d08;
  box-shadow: 0 10px 28px rgba(240, 95, 87, .28); }
.main-nav { display: none; align-items: center; gap: clamp(12px, 3.5vw - 23px, 24px); color: var(--muted); font-size: 14px; white-space: nowrap; }
.main-nav a:hover { color: var(--text); }
.nav-cta { color: #1b0d08 !important; background: linear-gradient(135deg, var(--gold), var(--accent)); padding: 10px 18px; border-radius: 999px; font-weight: 900; box-shadow: 0 12px 34px rgba(255,211,107,.18); }
.nav-cta, button { transition: transform .22s ease, box-shadow .22s ease, filter .22s ease, border-color .22s ease; }
.nav-cta:hover { transform: translateY(-3px) scale(1.02); filter: brightness(1.08); box-shadow: 0 18px 44px rgba(255,211,107,.30); }
.nav-toggle { background: var(--panel); border: 1px solid var(--line); color: var(--text); border-radius: 14px; padding: 9px 12px; }
h1, h2, h3, p { overflow-wrap: anywhere; }
h1 {
  margin: 0;
  font-size: clamp(42px, 11vw, 104px);
  line-height: .92;
  letter-spacing: -.08em;
  max-width: 920px; }
h2 { margin: 0; font-size: clamp(34px, 6vw, 70px); line-height: .98; letter-spacing: -.06em; }
h3 { margin: 0 0 10px; font-size: clamp(20px, 2vw, 26px); line-height: 1.08; letter-spacing: -.035em; }
p { color: var(--muted); margin: 0; }
button:active, .nav-cta:active { transform: translateY(1px) scale(.965); }
details { background: linear-gradient(135deg, rgba(255,255,255,.075), rgba(255,255,255,.04)); border: 1px solid var(--line); border-radius: 26px; padding: 22px 24px; }
summary { cursor: pointer; font-weight: 800; }
details p { margin-top: 12px; }
.site-footer { padding: 48px 0 28px; border-top: 1px solid var(--line); background: #0c0708; }
.footer-grid { display: grid; gap: 28px; }
.footer-title { font-size: 16px; letter-spacing: 0; margin-bottom: 12px; }
.footer-links, .footer-contacts { display: grid; gap: 8px; align-content: start; color: var(--muted); }
.copyright { margin-top: 34px; color: var(--muted); font-size: 13px; }
.back-to-top {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 74;
  width: 50px;
  height: 50px;
  display: grid;
  place-items: center;
  border: 1px solid rgba(255,211,107,.46);
  border-radius: 50%;
  background: rgba(17,11,13,.88);
  color: var(--gold);
  font-size: 22px;
  box-shadow: 0 16px 44px rgba(0,0,0,.38);
  backdrop-filter: blur(14px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(14px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease; }
body.show-back-to-top .back-to-top { opacity: 1; visibility: visible; transform: translateY(0); }
@media (min-width: 700px) {
  .footer-grid { grid-template-columns: 1.35fr repeat(3, minmax(0, .8fr)); }
}
/* Меню в один рядок — від 1024 px. Якщо пунктів більше, ніж уміщається (це перевіряє theme.js),
   шапка отримує клас is-compact і показує кнопку меню на будь-якій ширині. */
@media (min-width: 1024px) {
  .nav-toggle { display: none; }
  .main-nav { display: flex; }
  .site-header.is-compact .nav-toggle { display: inline-block; }
  .site-header.is-compact .main-nav { display: none; }
  .site-header.is-compact .main-nav.is-open {
    position: fixed;
    top: calc(var(--header-height) + var(--wp-admin--admin-bar--height, 0px) + 12px);
    left: 16px;
    right: 16px;
    display: grid;
    gap: 2px;
    max-height: calc(100svh - var(--header-height) - var(--wp-admin--admin-bar--height, 0px) - 28px);
    overflow-y: auto;
    padding: 16px;
    background: rgba(17,11,13,.97);
    border: 1px solid rgba(255,211,107,.22);
    border-radius: 22px;
    backdrop-filter: blur(18px);
    box-shadow: 0 26px 90px rgba(0,0,0,.45); }
  .site-header.is-compact .main-nav.is-open a { padding: 12px; }
}
@media (max-width: 1023px) {
  .main-nav.is-open {
    position: fixed;
    top: calc(var(--header-height) + var(--wp-admin--admin-bar--height, 0px) + 12px);
    left: 16px;
    right: 16px;
    display: grid;
    gap: 2px;
    max-height: calc(100svh - var(--header-height) - var(--wp-admin--admin-bar--height, 0px) - 28px);
    overflow-y: auto;
    padding: 16px;
    background: rgba(17,11,13,.97);
    border: 1px solid rgba(255,211,107,.22);
    border-radius: 22px;
    backdrop-filter: blur(18px);
    box-shadow: 0 26px 90px rgba(0,0,0,.45); }
  .admin-bar .main-nav.is-open { top: calc(var(--header-height) + 46px + 12px); }
  .main-nav.is-open a { padding: 12px; }
}
@media (max-width: 979px) {
  :root { --header-height: 72px; }
  .admin-bar .site-header { top: 46px; }
  .brand-logo { max-width: 168px; }
  body { padding-bottom: 0; }
  .back-to-top { right: 14px; bottom: 76px; width: 46px; height: 46px; }
}
@media (max-width: 699px) {
  .container {
    width: calc(100% - 20px);
    max-width: calc(100% - 20px); }
  h1, h2, h3, p, li, a, span, strong, label {
    max-width: 100%;
    overflow-wrap: anywhere;
    word-break: normal; }
  button, input, select, textarea { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; animation: none !important; }
}

/* поточна сторінка в меню */
.main-nav a[aria-current="page"]:not(.nav-cta) { color: var(--text); }

/* ---------- запасний шаблон: пошук, архіви, запис без документа конструктора ---------- */
.abds-plain { padding: clamp(32px, 6vw, 80px) 0 clamp(48px, 8vw, 104px); }
.abds-plain__in { max-width: 820px; }
.abds-plain__title { font-size: clamp(30px, 3.4vw + 17px, 54px); line-height: 1.08; letter-spacing: -.024em; max-width: none; margin-bottom: clamp(20px, 3vw, 32px); }
.abds-plain__body { font-size: clamp(17px, .25vw + 16px, 19px); line-height: 1.7; }
.abds-plain__body p { margin-bottom: 1.05em; color: #e6d9d1; }
.abds-plain__body :is(h2, h3) { margin: 1.5em 0 .5em; font-size: clamp(22px, 1.4vw + 17px, 32px); line-height: 1.15; letter-spacing: -.018em; }
.abds-plain__body a { color: var(--gold); text-decoration: underline; text-underline-offset: 4px; }
.abds-plain__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.abds-plain__list li { display: grid; gap: 4px; padding: 16px 18px; border: 1px solid var(--line); border-radius: 20px; background: var(--panel); }
.abds-plain__list a { font-weight: 700; }
.abds-plain__list span { color: var(--muted); font-size: 13px; }
.abds-plain .nav-links { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 24px; }
.abds-plain .page-numbers { display: inline-grid; place-items: center; min-width: 44px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line); border-radius: 999px; }
.abds-plain .page-numbers.current { border-color: var(--accent); color: var(--accent); }

/* шапка й підвал на ПК тієї ж ширини, що й блоки сторінки */
@media (min-width: 1280px) { .container { width: min(calc(100% - 64px), 1480px); } }

/* кнопка «вгору» не ховається під кнопкою чату: стоїть над нею (на телефоні це робить оформлення блоків) */
.abds-has-chat .back-to-top { right: 25px; bottom: calc(var(--abds-chat-bottom, 20px) + 76px); }

