/* ============================================================================
   Прохідський ліцей — оформлення публічної частини.
   Палітра й пластика перенесені з дизайну «Aero».
   ========================================================================== */

/* ── токени ──────────────────────────────────────────────────────────────── */
:root {
  --bg: #fffdf8;
  --surface: #ffffff;
  --text: #1d1a14;

  --accent: #bde08a;
  --accent-100: #fbfcf1; --accent-200: #f3f8de; --accent-300: #e6f0c4;
  --accent-400: #d2e7a5; --accent-500: #bde08a; --accent-600: #86a854;
  --accent-700: #688540; --accent-800: #4e6530; --accent-900: #374821;

  --accent2: #f0b877;
  --accent2-100: #fdf6ec; --accent2-200: #fbe9d3; --accent2-300: #f7d8b4;
  --accent2-400: #f3c894; --accent2-500: #f0b877; --accent2-600: #c8894a;
  --accent2-700: #a06c39; --accent2-800: #79512b; --accent2-900: #53371d;

  --n-100: #f8f5f0; --n-200: #efeae2; --n-300: #e2dcd1;
  --n-500: #9b9385; --n-600: #746d62; --n-700: #5a544a; --n-800: #38332c; --n-900: #1c1913;

  --line: rgba(56, 48, 36, 0.12);
  --shadow-sm: 0 1px 6px rgba(20, 22, 26, 0.07);
  --shadow-md: 0 6px 22px rgba(20, 22, 26, 0.10);
  --shadow-lg: 0 14px 44px rgba(189, 224, 138, 0.18);

  --r-sm: 10px; --r-md: 18px; --r-lg: 28px; --r-xl: 40px;

  --font-h: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --font-b: 'Manrope', 'Segoe UI', system-ui, sans-serif;

  --wrap: 1140px;
  --nav-h: 76px;
}

*, *::before, *::after { box-sizing: border-box; }

html {
  scroll-behavior: smooth; scroll-padding-top: calc(var(--nav-h) + 20px);
  -webkit-text-size-adjust: 100%;   /* iOS інакше збільшує текст у ландшафті */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 16.5px/1.65 var(--font-b);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, h4 { font-family: var(--font-h); font-weight: 700; line-height: 1.12; margin: 0; letter-spacing: -0.01em; }
p { margin: 0 0 1em; }
a { color: var(--accent-700); text-decoration-color: var(--accent-400); text-underline-offset: 3px; }
a:hover { color: var(--accent-800); }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 3px solid var(--accent-600); outline-offset: 3px; border-radius: 4px; }

.wrap { width: min(var(--wrap), 100% - 40px); margin-inline: auto; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; left: 12px; top: -70px; z-index: 200; background: var(--accent-700);
  color: #fff; padding: 12px 20px; border-radius: 0 0 12px 12px; transition: top .2s;
}
.skip-link:focus { top: 0; color: #fff; }

/* ── фонові плями ────────────────────────────────────────────────────────── */
.backdrop {
  position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(56, 48, 36, .07) 1.2px, transparent 1.2px);
  background-size: 30px 30px;
}
.backdrop b {
  position: absolute; border-radius: 999px; filter: blur(64px); display: block;
}
.backdrop b:nth-child(1) {
  top: -160px; left: -120px; width: 600px; height: 600px; opacity: .5;
  background: radial-gradient(circle, var(--accent-300), transparent 65%);
  animation: drift1 28s ease-in-out infinite;
}
.backdrop b:nth-child(2) {
  top: 40%; right: -200px; width: 680px; height: 680px; opacity: .45;
  background: radial-gradient(circle, var(--accent2-300), transparent 65%);
  animation: drift2 34s ease-in-out infinite;
}
@keyframes drift1 { 0%,100% { transform: none } 33% { transform: translate(110px,70px) scale(1.12) } 66% { transform: translate(-60px,130px) scale(.92) } }
@keyframes drift2 { 0%,100% { transform: none } 50% { transform: translate(-130px,-80px) scale(1.18) } }

.page { position: relative; z-index: 1; }

/* ── навігація ───────────────────────────────────────────────────────────── */
.nav {
  position: sticky; top: 14px; z-index: 60;
  width: min(1260px, 100% - 32px); margin: 14px auto 0;
  padding: 9px 10px 9px 16px;
  display: flex; align-items: center; gap: 18px;
  border-radius: 999px; border: 1px solid var(--line);
  background: rgba(255, 255, 255, .86);
  backdrop-filter: blur(20px) saturate(1.4); -webkit-backdrop-filter: blur(20px) saturate(1.4);
  box-shadow: 0 2px 10px rgba(20, 22, 26, .06), 0 12px 34px rgba(20, 22, 26, .05);
}

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; flex: none; }
.brand-mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent-400), var(--accent-600));
  color: #fff; font-family: var(--font-h); font-size: 18px; box-shadow: var(--shadow-sm);
}
.brand-text { display: flex; flex-direction: column; line-height: 1.18; }
.brand-name { font-family: var(--font-h); font-weight: 700; font-size: 15px; white-space: nowrap; }
.brand-sub { font-size: 11px; color: var(--n-600); white-space: nowrap; }

/* Список — без маркерів і власних відступів: інакше браузер малює крапки. */
.nav-menu {
  list-style: none; margin: 0 0 0 auto; padding: 0;
  display: flex; align-items: center; gap: 1px;
}
.nav-item { position: relative; }

.nav-link {
  display: flex; align-items: center; gap: 6px;
  padding: 10px 13px; border-radius: 999px;
  font-size: 14.5px; font-weight: 600; letter-spacing: -0.005em;
  color: var(--n-800); text-decoration: none; white-space: nowrap;
  transition: background .15s, color .15s;
}
.nav-link .chev { flex: none; opacity: .5; transition: transform .18s, opacity .18s; }
.nav-link:hover, .nav-link:focus-visible,
.nav-item:hover > .nav-link, .nav-item:focus-within > .nav-link {
  background: var(--accent-200); color: var(--accent-900);
}
.nav-item:hover > .nav-link .chev, .nav-item:focus-within > .nav-link .chev {
  transform: rotate(180deg); opacity: 1;
}
/* Поточний розділ — заливка плюс риска знизу, щоб читалося і без кольору. */
.nav-link[aria-current] {
  background: var(--accent-300); color: var(--accent-900); font-weight: 700;
}
.nav-link[aria-current]::before {
  content: ''; position: absolute; left: 15px; right: 15px; bottom: 3px;
  height: 2px; border-radius: 2px; background: var(--accent-700);
}

.nav-sep { width: 1px; height: 24px; background: var(--line); margin: 0 7px; flex: none; }

.nav-icon {
  display: flex; align-items: center; gap: 7px;
  height: 38px; padding: 0 13px; border-radius: 999px;
  color: var(--n-700); text-decoration: none; transition: background .15s, color .15s;
}
.nav-icon:hover, .nav-icon:focus-visible { background: var(--accent-200); color: var(--accent-900); }
.nav-icon-text { display: none; }        /* підпис потрібен лише в мобільному меню */

.nav-cta {
  display: inline-flex; align-items: center; height: 40px; padding: 0 20px;
  border-radius: 999px; background: var(--accent-500); color: var(--accent-900);
  font-weight: 700; font-size: 14.5px; text-decoration: none; white-space: nowrap;
  box-shadow: 0 2px 8px rgba(134, 168, 84, .3);
  transition: transform .15s, background .15s, box-shadow .15s;
}
.nav-cta:hover, .nav-cta:focus-visible {
  background: var(--accent-400); color: var(--accent-900);
  transform: translateY(-1px); box-shadow: 0 5px 14px rgba(134, 168, 84, .34);
}

/* ── випадне підменю ─────────────────────────────────────────────────────── */
.nav-drop {
  position: absolute; top: 100%; left: 50%; min-width: 300px; max-width: 380px;
  padding-top: 12px;                       /* «місток» під курсор, щоб меню не мигало */
  opacity: 0; visibility: hidden; transform: translate(-50%, -6px);
  transition: opacity .16s, transform .16s, visibility .16s;
}
.nav-item:hover > .nav-drop, .nav-item:focus-within > .nav-drop {
  opacity: 1; visibility: visible; transform: translate(-50%, 0);
}
.nav-drop-right { left: auto; right: 0; transform: translate(0, -6px); min-width: 230px; }
.nav-item:hover > .nav-drop-right, .nav-item:focus-within > .nav-drop-right {
  transform: translate(0, 0);
}
.nav-drop-right > ul { border-radius: var(--r-md); }
.nav-drop > ul {
  list-style: none; margin: 0; padding: 6px;
  background: #fff; border: 1px solid var(--line);
  border-radius: 0 0 var(--r-md) var(--r-md);
  box-shadow: 0 16px 40px rgba(20, 22, 26, .13);
  /* На низьких вікнах довгий список має прокручуватись, а не зникати за краєм. */
  max-height: calc(100vh - var(--nav-h) - 110px); overflow-y: auto;
}
.nav-drop a {
  display: block; padding: 10px 13px; border-radius: 10px;
  font-size: 14.5px; font-weight: 500; color: var(--n-800); text-decoration: none;
  transition: background .13s, color .13s, padding-left .13s;
}
.nav-drop > ul a:hover, .nav-drop > ul a:focus-visible {
  background: var(--accent-200); color: var(--accent-900); padding-left: 17px;
}

/* Шапка підменю — прямий вхід у сам розділ. */
.nav-drop-all {
  display: flex; align-items: flex-start; gap: 11px;
  padding: 13px 15px !important; border-radius: var(--r-md) var(--r-md) 0 0 !important;
  background: var(--accent-200); border: 1px solid var(--line); border-bottom: 0;
  box-shadow: 0 -2px 0 rgba(0,0,0,0);
}
.nav-drop-all:hover { background: var(--accent-300) !important; padding-left: 15px !important; }
.nav-drop-all > span:first-child { font-size: 19px; line-height: 1.1; flex: none; }
.nav-drop-all b { display: block; font-size: 14px; color: var(--accent-900); }
.nav-drop-all em {
  display: block; margin-top: 3px; font-style: normal;
  font-size: 12.5px; font-weight: 400; line-height: 1.4; color: var(--accent-800); opacity: .82;
}

/* ── бургер ──────────────────────────────────────────────────────────────── */
.burger {
  display: none; margin-left: auto; width: 44px; height: 44px; border-radius: 13px;
  border: 1px solid var(--line); background: #fff; cursor: pointer; padding: 0;
  align-items: center; justify-content: center; flex-direction: column; gap: 4px;
}
.burger i { display: block; width: 18px; height: 2px; background: var(--n-800); border-radius: 2px; transition: transform .2s, opacity .2s; }
.burger[aria-expanded="true"] i:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] i:nth-child(2) { opacity: 0; }
.burger[aria-expanded="true"] i:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Проміжні ширини: підтискаємо панель, поки не ввімкнеться бургер (1080px). */
@media (max-width: 1360px) {
  .nav { width: min(1260px, 100% - 24px); gap: 12px; }
  .nav-link { padding: 10px 10px; font-size: 14px; }
  .nav-icon { padding: 0 10px; }
  .nav-cta { padding: 0 16px; }
  .nav-sep { margin: 0 4px; }
}
@media (max-width: 1200px) {
  .brand-sub { display: none; }
  .brand-name { font-size: 14.5px; }
  .nav-link { padding: 10px 8px; font-size: 13.5px; }
}

/* ── кнопки ──────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 14px 26px;
  border-radius: 999px; font-weight: 700; font-size: 15.5px; text-decoration: none;
  border: 1px solid transparent; cursor: pointer; transition: transform .15s, box-shadow .15s, background .15s;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent-500); color: var(--accent-900); box-shadow: var(--shadow-md); }
.btn-primary:hover { background: var(--accent-400); color: var(--accent-900); }
.btn-ghost { background: #fff; color: var(--n-800); border-color: var(--line); box-shadow: var(--shadow-sm); }
.btn-ghost:hover { color: var(--accent-800); border-color: var(--accent-400); }
.btn-sm { padding: 9px 17px; font-size: 14px; }

/* ── бейджі та мітки ─────────────────────────────────────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 7px 15px; border-radius: 999px;
  background: #fff; border: 1px solid var(--line); font-size: 12.5px; font-weight: 700;
  letter-spacing: .04em; color: var(--n-700);
}
.pill-accent { background: var(--accent-200); border-color: transparent; color: var(--accent-800); }
.pill-accent2 { background: var(--accent2-200); border-color: transparent; color: var(--accent2-800); }

.eyebrow {
  display: inline-flex; align-items: center; gap: 10px; font-size: 12.5px; font-weight: 800;
  letter-spacing: .14em; text-transform: uppercase; color: var(--accent-700); margin-bottom: 14px;
}
.eyebrow::before { content: ''; width: 30px; height: 2px; background: var(--accent-500); border-radius: 2px; }

/* ── секції ──────────────────────────────────────────────────────────────── */
.section { padding: 76px 0; position: relative; }
.section-head { max-width: 720px; margin-bottom: 40px; }
.section-head h2 { font-size: clamp(28px, 4.2vw, 44px); }
.section-head .lead { margin-top: 14px; font-size: 17.5px; color: var(--n-700); }
.section-num {
  font-family: var(--font-h); font-size: 13px; color: var(--accent-600);
  letter-spacing: .2em; margin-bottom: 10px; display: block;
}

/* ── герой ───────────────────────────────────────────────────────────────── */
.hero { padding: 56px 0 20px; }
.hero-grid { display: grid; grid-template-columns: 1.05fr .95fr; gap: 52px; align-items: center; }
.hero-badges { display: flex; flex-wrap: wrap; gap: 9px; margin-bottom: 26px; }
.hero h1 { font-size: clamp(38px, 6.4vw, 68px); letter-spacing: -0.025em; }
.hero h1 .alt { color: var(--accent2-600); display: block; }
.hero-lead { margin-top: 22px; font-size: 18px; color: var(--n-700); max-width: 30em; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 13px; margin-top: 32px; }

.hero-photo { position: relative; }
.hero-photo .frame {
  border-radius: 999px 999px 40px 40px; overflow: hidden; aspect-ratio: 1/1;
  border: 10px solid #fff; box-shadow: var(--shadow-lg); background: var(--accent-200);
}
.hero-photo .frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-photo .frame.empty { display: grid; place-items: center; color: var(--accent-700); font-weight: 700; }
.stamp {
  position: absolute; left: -18px; bottom: 12px; width: 118px; height: 118px;
  border-radius: 999px; background: var(--accent2-200); border: 1px solid var(--accent2-300);
  display: grid; place-items: center; box-shadow: var(--shadow-sm);
}
.stamp svg { position: absolute; inset: 0; animation: spin 26s linear infinite; }
@keyframes spin { to { transform: rotate(360deg) } }

/* ── біжучий рядок ───────────────────────────────────────────────────────── */
.marquee {
  overflow: hidden; background: var(--accent-400); border-block: 1px solid var(--accent-600);
  padding: 15px 0; margin: 42px 0 0; --gap: 44px;
}
.marquee-track { display: flex; gap: var(--gap); width: max-content; animation: marquee 34s linear infinite; }
.marquee span {
  font-family: var(--font-h); font-size: 15px; letter-spacing: .16em;
  color: var(--accent-900); white-space: nowrap; padding-right: var(--gap);
}
@keyframes marquee { to { transform: translateX(-50%) } }

/* ── картки ──────────────────────────────────────────────────────────────── */
.grid { display: grid; gap: 22px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform .18s, box-shadow .18s;
  display: flex; flex-direction: column;
}
a.card { text-decoration: none; color: inherit; }
a.card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); color: inherit; }
.card h3 { font-size: 19px; margin-bottom: 9px; }
.card p { color: var(--n-700); font-size: 15px; margin: 0; }
.card-media { margin: -26px -26px 20px; border-radius: var(--r-lg) var(--r-lg) 0 0; overflow: hidden; aspect-ratio: 16/10; background: var(--accent-200); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }
.card-meta { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; font-size: 12.5px; color: var(--n-600); font-weight: 600; }
.card-foot { margin-top: auto; padding-top: 16px; font-weight: 700; font-size: 14.5px; color: var(--accent-700); }

.card-icon {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center;
  background: var(--accent-200); font-size: 24px; margin-bottom: 16px;
}

/* ── числа ───────────────────────────────────────────────────────────────── */
.numbers { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; }
.number {
  background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 28px 24px;
  box-shadow: var(--shadow-sm);
}
.number b { font-family: var(--font-h); font-size: clamp(36px, 5vw, 52px); line-height: 1; display: block; color: var(--accent-700); }
.number:nth-child(2) b { color: var(--accent2-700); }
.number:nth-child(4) b {
  background: linear-gradient(135deg, var(--accent-600), var(--accent2-600));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.number span { display: block; margin-top: 12px; font-size: 14.5px; color: var(--n-700); }

/* ── карусель ────────────────────────────────────────────────────────────── */
.carousel { position: relative; border-radius: var(--r-lg); overflow: hidden; border: 1px solid var(--line); background: #fff; box-shadow: var(--shadow-sm); }
.carousel-track { display: flex; transition: transform .55s cubic-bezier(.22, 1, .36, 1); }
.carousel-slide { min-width: 100%; }
.carousel-slide .ph { aspect-ratio: 16/9; background: var(--accent-200); display: grid; place-items: center; color: var(--accent-700); font-weight: 700; }
.carousel-slide .ph img { width: 100%; height: 100%; object-fit: cover; }
.carousel-cap { padding: 22px 26px 26px; }
.carousel-cap h3 { font-size: 20px; margin-bottom: 7px; }
.carousel-cap p { color: var(--n-700); font-size: 15px; margin: 0; }
.carousel-nav { display: flex; gap: 9px; justify-content: flex-end; padding: 0 26px 22px; }
.carousel-nav button {
  width: 42px; height: 42px; border-radius: 999px; border: 1px solid var(--line);
  background: #fff; cursor: pointer; font-size: 17px; color: var(--text); line-height: 1;
}
.carousel-nav button:hover { background: var(--accent-200); border-color: var(--accent-400); }
.carousel-dots { display: flex; gap: 7px; margin-right: auto; align-items: center; }
.carousel-dots button { width: 9px; height: 9px; padding: 0; border-radius: 999px; border: 0; background: var(--n-300); cursor: pointer; }
.carousel-dots button[aria-current="true"] { background: var(--accent-600); width: 24px; }

/* ── таймлайн ────────────────────────────────────────────────────────────── */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ''; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: var(--accent-300); border-radius: 2px; }
.tl-item { position: relative; padding-bottom: 30px; }
.tl-item::before {
  content: ''; position: absolute; left: -30px; top: 7px; width: 14px; height: 14px;
  border-radius: 999px; background: var(--accent-500); border: 3px solid var(--bg);
}
.tl-year { font-family: var(--font-h); font-size: 22px; color: var(--accent-700); }
.tl-item h3 { font-size: 17px; margin: 5px 0 6px; }
.tl-item p { color: var(--n-700); font-size: 15px; margin: 0; }

/* ── люди ────────────────────────────────────────────────────────────────── */
.person { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: var(--r-md); background: #fff; border: 1px solid var(--line); }
.person .ava { width: 58px; height: 58px; border-radius: 999px; flex: none; background: var(--accent-200); display: grid; place-items: center; overflow: hidden; font-weight: 800; color: var(--accent-800); }
.person .ava img { width: 100%; height: 100%; object-fit: cover; }
.person b { display: block; font-size: 15.5px; }
.person span { font-size: 13px; color: var(--n-600); }

/* ── хлібні крихти ───────────────────────────────────────────────────────── */
.crumbs { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: var(--n-600); padding: 26px 0 0; list-style: none; margin: 0; }
.crumbs li { display: flex; gap: 8px; align-items: center; }
.crumbs li + li::before { content: '→'; color: var(--n-300); }
.crumbs a { color: var(--n-700); text-decoration: none; }
.crumbs a:hover { color: var(--accent-700); }

/* ── стаття ──────────────────────────────────────────────────────────────── */
.page-head { padding: 22px 0 34px; }
.page-head h1 { font-size: clamp(30px, 5vw, 50px); }
.page-head .lead { margin-top: 16px; font-size: 18px; color: var(--n-700); max-width: 48em; }

.layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 46px; align-items: start; padding-bottom: 70px; }

.prose { font-size: 17px; line-height: 1.75; max-width: 74ch; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 27px; margin: 2em 0 .6em; }
.prose h3 { font-size: 21px; margin: 1.7em 0 .5em; }
.prose h4 { font-size: 18px; margin: 1.5em 0 .4em; }
.prose p, .prose ul, .prose ol { margin: 0 0 1.1em; }
.prose ul, .prose ol { padding-left: 1.35em; }
.prose li { margin-bottom: .4em; }
.prose img { border-radius: var(--r-md); box-shadow: var(--shadow-sm); margin: 1.4em 0; }
.prose blockquote {
  margin: 1.6em 0; padding: 18px 24px; border-left: 4px solid var(--accent-500);
  background: var(--accent-100); border-radius: 0 var(--r-md) var(--r-md) 0; color: var(--n-800);
}
.prose blockquote p:last-child { margin: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 1.4em 0; font-size: 15.5px; }
.prose :is(th, td) { border: 1px solid var(--line); padding: 10px 13px; text-align: left; }
.prose th { background: var(--accent-100); font-weight: 700; }
.prose a { font-weight: 600; }
.table-scroll { overflow-x: auto; }

.aside { position: sticky; top: calc(var(--nav-h) + 24px); display: flex; flex-direction: column; gap: 20px; }
.aside-box { background: #fff; border: 1px solid var(--line); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.aside-box h3 { font-size: 15px; text-transform: uppercase; letter-spacing: .08em; color: var(--n-600); margin-bottom: 14px; font-family: var(--font-b); font-weight: 800; }
.aside-nav { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.aside-nav a { display: block; padding: 9px 12px; border-radius: 11px; font-size: 14.5px; color: var(--n-800); text-decoration: none; }
.aside-nav a:hover { background: var(--accent-200); color: var(--accent-900); }
.aside-nav a[aria-current] { background: var(--accent-300); color: var(--accent-900); font-weight: 700; }

/* ── вкладення ───────────────────────────────────────────────────────────── */
.files { list-style: none; margin: 30px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.files a {
  display: flex; align-items: center; gap: 14px; padding: 14px 18px; background: #fff;
  border: 1px solid var(--line); border-radius: var(--r-md); text-decoration: none; color: inherit;
  box-shadow: var(--shadow-sm); transition: transform .15s, border-color .15s;
}
.files a:hover { transform: translateX(3px); border-color: var(--accent-400); }
.files .ext { width: 42px; height: 42px; border-radius: 11px; background: var(--accent2-200); color: var(--accent2-800); display: grid; place-items: center; font-size: 11px; font-weight: 800; flex: none; }
.files b { font-size: 15px; display: block; font-weight: 600; }
.files small { color: var(--n-600); font-size: 12.5px; }

/* ── стрічка новин ───────────────────────────────────────────────────────── */
.filters { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 30px; }
.filters a {
  padding: 8px 16px; border-radius: 999px; background: #fff; border: 1px solid var(--line);
  font-size: 14px; font-weight: 700; color: var(--n-700); text-decoration: none;
}
.filters a:hover { border-color: var(--accent-400); color: var(--accent-800); }
.filters a[aria-current] { background: var(--accent-500); border-color: transparent; color: var(--accent-900); }

.pager { display: flex; gap: 7px; justify-content: center; flex-wrap: wrap; margin-top: 44px; }
.pager a, .pager span {
  min-width: 42px; height: 42px; padding: 0 13px; border-radius: 12px; display: grid; place-items: center;
  background: #fff; border: 1px solid var(--line); text-decoration: none; color: var(--n-800); font-weight: 700; font-size: 14.5px;
}
.pager a:hover { border-color: var(--accent-400); color: var(--accent-800); }
.pager [aria-current] { background: var(--accent-500); border-color: transparent; color: var(--accent-900); }
.pager .gap { border: 0; background: none; }

/* ── галерея ─────────────────────────────────────────────────────────────── */
.photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.photos a { display: block; border-radius: var(--r-md); overflow: hidden; aspect-ratio: 4/3; background: var(--accent-200); box-shadow: var(--shadow-sm); }
.photos img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s; }
.photos a:hover img { transform: scale(1.05); }

.lightbox { position: fixed; inset: 0; z-index: 200; background: rgba(20, 18, 14, .92); display: none; place-items: center; padding: 28px; }
.lightbox[open], .lightbox.on { display: grid; }
.lightbox img { max-width: 100%; max-height: 86vh; border-radius: var(--r-md); }
.lightbox button {
  position: absolute; top: 20px; right: 20px; width: 46px; height: 46px; border-radius: 999px;
  border: 0; background: rgba(255,255,255,.16); color: #fff; font-size: 22px; cursor: pointer;
}
.lightbox .prev, .lightbox .next { top: 50%; transform: translateY(-50%); right: auto; }
.lightbox .prev { left: 20px; } .lightbox .next { right: 20px; }

/* ── порожній стан ───────────────────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 64px 26px; background: #fff; border: 1px dashed var(--n-300);
  border-radius: var(--r-lg); color: var(--n-600);
}
.empty-state h3 { font-size: 20px; margin-bottom: 10px; color: var(--text); }

/* ── підвал ──────────────────────────────────────────────────────────────── */
.footer { background: var(--n-900); color: var(--n-200); margin-top: 70px; padding: 62px 0 30px; position: relative; z-index: 1; }
.footer a { color: var(--accent-400); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 38px; }
.footer h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .1em; color: var(--accent-400); margin-bottom: 15px; font-family: var(--font-b); font-weight: 800; }
.footer ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 9px; }
.footer ul a { color: var(--n-200); text-decoration: none; font-size: 14.5px; }
.footer ul a:hover { color: var(--accent-400); }
.footer-brand p { color: var(--n-500); font-size: 14.5px; max-width: 34ch; }
.footer-bottom {
  margin-top: 42px; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.1);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  font-size: 13.5px; color: var(--n-500);
}

/* ── адаптив ─────────────────────────────────────────────────────────────── */
@media (max-width: 1000px) {
  .layout { grid-template-columns: 1fr; gap: 32px; }
  .aside { position: static; }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .numbers { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
/* Навігація йде в бургер раніше за макет: пунктів у меню багато,
   і на планшетах рядок стає тісним ще до перебудови сітки. */
@media (max-width: 1080px) {
  .burger { display: inline-flex; }
  .nav { gap: 12px; padding: 9px 9px 9px 14px; }
  .brand-sub { display: block; }

  .nav-menu {
    display: none; position: absolute; top: calc(100% + 12px); left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px; background: #fff;
    border: 1px solid var(--line); border-radius: var(--r-lg); padding: 10px;
    box-shadow: 0 18px 44px rgba(20, 22, 26, .16); max-height: 74vh; overflow-y: auto;
  }
  .nav-menu.on { display: flex; }

  .nav-link {
    justify-content: space-between; padding: 14px 16px; border-radius: 13px; font-size: 16px;
  }
  .nav-link .chev { opacity: .75; }
  /* На дотику підменю розкривається тапом, а не наведенням. */
  .nav-item:hover > .nav-link { background: transparent; color: var(--n-800); }
  .nav-item:hover > .nav-link .chev { transform: none; }
  .nav-item.open > .nav-link { background: var(--accent-200); color: var(--accent-900); }
  .nav-item.open > .nav-link .chev { transform: rotate(180deg); }
  .nav-link[aria-current]::before { display: none; }

  .nav-drop, .nav-drop-right {
    position: static; display: none; opacity: 1; visibility: visible;
    transform: none; min-width: 0; max-width: none; padding: 4px 0 8px;
  }
  .nav-item.open > .nav-drop { display: block; }
  .nav-item:hover > .nav-drop,
  .nav-item:hover > .nav-drop-right { opacity: 1; visibility: visible; transform: none; }
  .nav-drop > ul {
    border: 0; border-left: 2px solid var(--accent-300); border-radius: 0;
    box-shadow: none; margin-left: 18px; padding: 2px 0 2px 6px;
  }
  .nav-drop a { padding: 11px 12px; font-size: 15px; }
  .nav-drop-all {
    border: 0 !important; border-radius: 12px !important; margin: 0 0 4px 18px;
    padding: 11px 13px !important;
  }

  .nav-sep { display: none; }
  .nav-icon { height: auto; padding: 14px 16px; border-radius: 13px; color: var(--n-800); }
  .nav-icon-text { display: inline; font-size: 16px; }
  .nav-cta {
    display: flex; justify-content: center; height: 48px; margin-top: 8px; font-size: 16px;
  }
}

@media (max-width: 880px) {
  .hero-grid { grid-template-columns: 1fr; gap: 34px; }
  .hero-photo { max-width: 420px; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  /* Вужчі поля: на 375px кожні 8px — це ще пів слова в рядку. */
  .wrap { width: calc(100% - 32px); }
  .section { padding: 48px 0; }
  .section-head { margin-bottom: 30px; }
  .grid-2, .grid-3, .grid-4, .numbers { grid-template-columns: 1fr; }
  .grid { gap: 16px; }
  .card { padding: 20px; }
  .card-media { margin: -20px -20px 16px; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .stamp { width: 92px; height: 92px; left: -6px; }
  .hero-photo .frame { border-width: 7px; }

  .hero { padding: 34px 0 12px; }
  .hero h1 { font-size: clamp(32px, 9vw, 44px); }
  .hero-lead { font-size: 17px; margin-top: 18px; }
  .hero-actions { margin-top: 26px; gap: 10px; }
  .hero-actions .btn { flex: 1 1 auto; justify-content: center; }

  .page-head { padding: 18px 0 26px; }
  .page-head h1 { font-size: clamp(26px, 7.5vw, 34px); }
  .page-head .lead { font-size: 16.5px; margin-top: 12px; }

  .prose { font-size: 16.5px; line-height: 1.7; }
  .prose h2 { font-size: 23px; }
  .prose h3 { font-size: 19px; }
  .prose blockquote { padding: 14px 18px; }

  .marquee { --gap: 30px; padding: 12px 0; }
  .marquee span { font-size: 13px; }

  .layout { padding-bottom: 50px; }
  .timeline { padding-left: 28px; }
  .photos { grid-template-columns: repeat(2, 1fr); gap: 10px; }
}

/* ── зручні цілі для пальця ──────────────────────────────────────────────── */
/* Списки посилань — це навігація, а не текст у абзаці: на дотику вони
   мають бути завширшки з рядок і заввишки з палець, інакше промахуєшся. */
@media (max-width: 880px) {
  .footer ul { gap: 0; }
  .footer ul a,
  .aside-nav a,
  .nav-drop a {
    display: block; min-height: 46px; padding: 12px 12px;
    display: flex; align-items: center;
  }
  .footer ul a { padding-inline: 0; }

  /* Списки всередині карток (блоки «Розділи сайту», «Кожному — своє»). */
  .card ul { margin-top: 8px !important; }
  .card ul li a {
    display: flex; align-items: center; min-height: 44px;
    padding: 8px 0; font-size: 15.5px !important;
  }
  .card ul li + li { border-top: 1px solid var(--n-200); }

  /* Заголовок картки теж посилання — робимо його зручним для пальця. */
  .card h3 a { display: inline-flex; align-items: center; min-height: 40px; }

  .crumbs { gap: 6px 10px; padding-top: 20px; }
  .crumbs a { padding: 6px 0; }

  .footer-bottom { gap: 6px 14px; }
  .footer-bottom a { display: inline-flex; align-items: center; min-height: 40px; }

  .filters { gap: 8px; }
  .filters a { min-height: 42px; display: inline-flex; align-items: center; }

  .pager a, .pager span { min-width: 46px; height: 46px; }

  /* Крапки каруселі: сама крапка лишається дрібною, а натискається
     невидима область навколо неї. */
  .carousel-dots { gap: 0; }
  .carousel-dots button {
    width: 30px; height: 40px; background: none; position: relative;
  }
  .carousel-dots button::after {
    content: ''; position: absolute; left: 50%; top: 50%;
    width: 9px; height: 9px; margin: -4.5px 0 0 -4.5px;
    border-radius: 999px; background: var(--n-300); transition: width .18s, background .18s;
  }
  .carousel-dots button[aria-current="true"]::after {
    width: 22px; margin-left: -11px; background: var(--accent-600);
  }
  .carousel-nav button { width: 46px; height: 46px; }

  .files a { padding: 16px 18px; }
  .btn { padding: 14px 24px; }
  .btn-sm { padding: 11px 18px; }
}

@media (max-width: 620px) {
  /* Лайтбокс: стрілки під великим пальцем, а не в кутах екрана. */
  .lightbox { padding: 12px; }
  .lightbox img { max-height: 74vh; }
  .lightbox button { width: 52px; height: 52px; }
  .lightbox .prev { left: 12px; top: auto; bottom: 18px; transform: none; }
  .lightbox .next { right: 12px; top: auto; bottom: 18px; transform: none; }
  .lightbox .close { top: 12px; right: 12px; }
}

/* ── дотик ───────────────────────────────────────────────────────────────── */
/* На сенсорному екрані немає наведення: те, що з'являлось по :hover,
   мусить бути доступним одразу, інакше на телефоні воно недосяжне. */
@media (hover: none) {
  .card:hover { transform: none; }
  .photos a:hover img { transform: none; }
  a.card:active { transform: scale(.99); }
}

@media print {
  .nav, .footer, .backdrop, .aside, .marquee, .btn, .pager, .filters { display: none !important; }
  body { background: #fff; font-size: 12pt; }
  .prose { max-width: none; }
  a[href^="http"]::after { content: " (" attr(href) ")"; font-size: 9pt; color: #555; }
}
