/* BUDU TAM - спільна дизайн-система (ТЗ №9, погоджено 09.11.2026).
   Етап 3: підключено лише до головної (site.html), після її вбудованих
   стилів. Інші сторінки поки зі своїми стилями - переводяться окремо.
   Шрифти: Unbounded Bold (логотип і заголовки) + Inter (увесь інтерфейс),
   власні файли (OFL), бюджет головної ~46 КБ. */

/* ── шрифти ── */
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/static/fonts/inter-ua-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Inter'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url(/static/fonts/inter-ua-latin.woff2) format('woff2');
  unicode-range: U+0020-007E, U+00A0, U+00A9, U+00AB, U+00B0, U+00B7, U+00BB, U+2013-2014,
                 U+2019, U+201C-201E, U+2026, U+20AC, U+20B4, U+2212; }
@font-face { font-family: 'Unbounded Head'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/unbounded-700-cyrillic.woff2) format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
/* латиниця Unbounded - лише для латинських літер (англійська версія), а не
   для пробілів і цифр: інакше файл вантажився б на кожній українській сторінці */
@font-face { font-family: 'Unbounded Head'; font-style: normal; font-weight: 700; font-display: swap;
  src: url(/static/fonts/unbounded-700-latin.woff2) format('woff2');
  unicode-range: U+0041-005A, U+0061-007A; }

/* ── токени ── */
:root {
  --font-display: 'Unbounded Head', Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-ui: Inter, -apple-system, "Segoe UI", Roboto, sans-serif;
  --bg: #FFFFFF; --ink: #171717; --muted: #666666;
  --line: #E5E5E5;          /* звичайні роздільники 1 px */
  --line-strong: #262626;   /* структурні межі 1 px - вибірково */
  --red: #E02323;           /* основний UI; #C4212A - лише обкладинки добірок */
  --active-w: 2px;          /* активні вкладки й вибрані елементи - червоний 2 px */
  --radius-card: 4px; --radius-ctl: 4px; --ctl-h: 44px;
  --h-section: 28px;
  --gap-banner: 48px; --gap-section: 60px; --gap-head: 24px;
}
@media (max-width: 767px) {
  :root { --h-section: 22px; --gap-banner: 32px; --gap-section: 32px; --gap-head: 16px; }
}

/* ── логотип і заголовки секцій ── */
.hero h1 .brand-name { font-family: var(--font-display); font-weight: 700; letter-spacing: -.01em; }
.grid-head h2, .popular-title, .find-sub, .digest h2 {
  font-family: var(--font-display); font-weight: 700; font-size: var(--h-section);
  line-height: 1.2; letter-spacing: -.01em; }
.grid-head, .popular-title { border-top: 1px solid var(--line-strong); padding-top: 16px; }
.find-sub { margin-bottom: var(--gap-head); }
@media (max-width: 767px) { .grid-head { flex-wrap: wrap; row-gap: 4px; } }

/* ── картки подій ── */
.card { border-radius: var(--radius-card); border-color: var(--line); transition: border-color .15s; }
.card:hover { transform: none; box-shadow: none; border-color: var(--line-strong); }
.card .badge { display: none; }            /* категорія - текстовим маркером над назвою */
.card .body { padding: 12px 14px 14px; display: flex; flex-direction: column; gap: 8px; }
.card .cat-mark { margin: 0; font: 600 11px/1.2 var(--font-ui); letter-spacing: .08em;
                  text-transform: uppercase; color: var(--red); }
.card h3 { margin: 0; font-size: 17px; line-height: 1.3; font-weight: 600; overflow-wrap: anywhere;
           display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.meta { gap: 4px; }
.meta .when { display: block; }
.meta .when svg { display: inline-block; vertical-align: -2px; margin: 0 6px 0 0; }
.meta .mdate { color: var(--red); font-weight: 600; }
.meta .when .mrest { display: inline; }
.popular-item a, .city-photo { border-radius: var(--radius-card); }
@media (max-width: 767px) { .card h3 { font-size: 15px; -webkit-line-clamp: 4; } }

/* ── вкладки, фільтри, категорії: одна висота, лінія, активний стан ── */
.periods .period b, .period-link b { font-weight: 500; }
.period.on { border-bottom: var(--active-w) solid var(--red) !important; }
.period.on b { font-weight: 600; }
.cat-badge .lbl { font-weight: 500; }
.filters-toggle { height: var(--ctl-h); border-radius: var(--radius-ctl); border: 1px solid var(--line); font-weight: 500; }
.filters-toggle[aria-expanded="true"] { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); }
.filters { border-radius: var(--radius-ctl); border-color: var(--line); }
.filters input, .filters select { height: var(--ctl-h); border-radius: var(--radius-ctl); border-color: var(--line); font-weight: 500; }
.sort-btn { height: var(--ctl-h); border-radius: var(--radius-ctl); border-color: var(--line); font-weight: 500; }
.sort-btn.on { border-color: var(--red); box-shadow: inset 0 0 0 1px var(--red); font-weight: 600; }
