:root {
  --green: #2c6e33;
  --green-dark: #1f5226;
  --green-light: #e6f0e4;
  --bg: #f4f6f2;
  --surface: #fff;
  --text: #1f2a22;
  --text-soft: #4a574d;
  --text-nav: #3d4a40;
  --muted: #5d6b60;
  --placeholder: #7a877d;
  --border: #e3e8e0;
  --border-soft: #edf0eb;
  --border-input: #d6ddd3;
  --chip: #eef5ec;
  --footer: #1f3323;
  --footer-text: #c9d6cb;
  --footer-muted: #9fb0a3;
  --footer-border: #34493a;
  --radius: 12px;
  --container: 1200px;
  --font-sans: 'Golos Text', system-ui, sans-serif;
  --font-serif: 'Source Serif 4', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  -webkit-font-smoothing: antialiased;
}

a { color: var(--green); text-decoration: none; }
a:hover { color: var(--green-dark); text-decoration: underline; }
a:focus-visible, button:focus-visible, input:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 2px;
  border-radius: 2px;
}

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

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

.serif { font-family: var(--font-serif); font-weight: 600; }

/* Header */
.site-header { background: var(--surface); border-bottom: 1px solid var(--border); }

.topbar { background: var(--green); color: var(--green-light); font-size: 13px; }
.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 24px;
  justify-content: space-between;
  padding-top: 8px;
  padding-bottom: 8px;
}
.topbar a { color: inherit; }
.topbar__links { display: flex; flex-wrap: wrap; gap: 20px; }

.brand {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 18px;
  padding-top: 20px;
  padding-bottom: 20px;
}
.brand__logo { width: 84px; height: 56px; flex: none; }
.brand__logo img { width: 100%; height: 100%; object-fit: contain; }
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 240px;
  color: inherit;
}
.brand__text:hover { text-decoration: none; }
.brand__name { font-size: 24px; line-height: 1.2; color: var(--green-dark); }
.brand__subtitle { font-size: 14px; color: var(--muted); }

.search {
  display: flex;
  align-items: center;
  min-width: 200px;
  border: 1px solid var(--border-input);
  border-radius: 8px;
  padding: 9px 14px;
}
.search input {
  flex: 1;
  min-width: 0;
  border: 0;
  padding: 0;
  font: inherit;
  font-size: 14px;
  color: var(--text);
  background: transparent;
}
.search input::placeholder { color: var(--placeholder); }
.search input:focus-visible { outline: none; }
.search:focus-within { border-color: var(--green); }

.main-nav ul {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 26px;
  margin: 0;
  padding: 0;
  list-style: none;
  font-size: 15px;
  font-weight: 500;
}
.main-nav a {
  display: block;
  padding: 12px 0 11px;
  color: var(--text-nav);
  border-bottom: 3px solid transparent;
}
.main-nav a:hover { color: var(--green-dark); text-decoration: none; border-bottom-color: var(--border); }
.main-nav a[aria-current="page"] { color: var(--green-dark); border-bottom-color: var(--green); }

/* Page shell */
.page {
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding-top: 40px;
  padding-bottom: 64px;
}

.meta { display: flex; flex-wrap: wrap; gap: 10px; font-size: 13px; color: var(--muted); }
.meta__tag { color: var(--green); font-weight: 600; }

.img-placeholder {
  width: 100%;
  height: 100%;
  background: repeating-linear-gradient(45deg, #eef2ec 0 10px, #e6ebe3 10px 20px);
}

/* Hero */
.hero {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 14px;
  overflow: hidden;
}
.hero__media { position: relative; min-height: 320px; }
.hero__media > * { position: absolute; inset: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; }
.hero__body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 16px;
  padding: 40px;
}
.hero__title { margin: 0; font-size: 34px; line-height: 1.2; text-wrap: pretty; }
.hero__title a { color: var(--text); }
.hero__summary { margin: 0; font-size: 16px; line-height: 1.6; color: var(--text-soft); text-wrap: pretty; }
.hero__more { font-size: 15px; font-weight: 600; }
@media (max-width: 520px) {
  .hero__media { min-height: 220px; }
  .hero__body { padding: 24px; }
  .hero__title { font-size: 26px; }
}

/* Home columns */
.home-columns {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
  gap: 48px;
  align-items: start;
}
.home-columns__main {
  grid-column: span 2;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
@media (max-width: 720px) {
  .home-columns__main { grid-column: auto; }
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid #dfe5dc;
}
.section-head h2 { margin: 0; font-size: 26px; }
.section-head a { font-size: 14px; font-weight: 500; }

/* News */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 240px), 1fr));
  gap: 28px 24px;
}
.news-card {
  display: flex;
  flex-direction: column;
  gap: 10px;
  color: inherit;
}
.news-card:hover { text-decoration: none; }
.news-card:hover .news-card__title { color: var(--green-dark); text-decoration: underline; }
.news-card__media { aspect-ratio: 3 / 2; border-radius: 10px; overflow: hidden; }
.news-card__media img { width: 100%; height: 100%; object-fit: cover; }
.news-card .meta { font-size: 12.5px; }
.news-card__title { margin: 0; font-size: 17px; font-weight: 600; line-height: 1.35; color: var(--text); text-wrap: pretty; }

/* Cards in a row share its height, so text cards line up with photo cards. */
.news-item { display: flex; min-width: 0; }
.news-item > .news-card { flex: 1; }

.news-card--text {
  padding: 20px 20px 22px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-top: 3px solid var(--green);
  border-radius: 10px;
}
.news-card--text .news-card__title { font-size: 20px; line-height: 1.3; }
.news-card--text:hover { border-color: #cfd8cb; border-top-color: var(--green-dark); }
.news-card__excerpt {
  margin: 0;
  font-size: 14.5px;
  line-height: 1.55;
  color: var(--text-soft);
  text-wrap: pretty;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.news-card__more { margin-top: auto; padding-top: 6px; font-size: 14px; font-weight: 600; color: var(--green); }

.empty { margin: 0; color: var(--muted); }

/* Sidebar */
.sidebar { display: flex; flex-direction: column; gap: 24px; min-width: 0; }
.side-card {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.side-card h3 { margin: 0; font-size: 20px; }
.side-card--accent { gap: 12px; background: var(--green); border-color: var(--green); color: #fff; }
.side-card--accent p { margin: 0; font-size: 15px; line-height: 1.5; color: var(--green-light); }

.notice-list { display: flex; flex-direction: column; gap: 14px; margin: 0; padding: 0; list-style: none; }
.notice-list li {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 1px solid var(--border-soft);
}
.notice-list time { font-size: 12.5px; color: var(--muted); }
.notice-list a { font-size: 15px; line-height: 1.4; font-weight: 500; color: var(--text); }
.notice-list a:hover { color: var(--green-dark); }

.button-light {
  align-self: flex-start;
  padding: 10px 16px;
  border-radius: 8px;
  background: #fff;
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 600;
}
.button-light:hover { color: var(--green-dark); background: var(--chip); text-decoration: none; }

.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0; padding: 0; list-style: none; }
.chip {
  display: inline-block;
  padding: 7px 12px;
  border-radius: 999px;
  background: var(--chip);
  color: var(--green-dark);
  font-size: 14px;
  font-weight: 500;
}
a.chip:hover { background: #e0eedc; text-decoration: none; }

/* Simple content pages (notices, until their own design exists) */
.article { max-width: 720px; display: flex; flex-direction: column; gap: 16px; font-size: 17px; line-height: 1.7; color: #2c3a30; }
.article .page-title { margin: 0; font-size: 42px; line-height: 1.15; color: var(--text); }
@media (max-width: 520px) {
  .article .page-title { font-size: 32px; }
}
/* Headings inside imported/editor text, below the page title. */
.article h1:not(.page-title) { margin: 12px 0 0; font-size: 26px; }
.article h2 { margin: 12px 0 0; font-size: 22px; }
.article h3 { margin: 8px 0 0; font-size: 19px; }
.article p { margin: 0; }
.article img { height: auto; margin: 0 auto; border-radius: 10px; }
.article table {
  max-width: 100%;
  display: block;
  overflow-x: auto;
  border-collapse: collapse;
  font-size: 15px;
  line-height: 1.45;
}
.article th, .article td { padding: 6px 10px; border: 1px solid var(--border); vertical-align: top; }
.article th { background: var(--chip); font-weight: 600; }
.article h1, .article h2, .article h3 { line-height: 1.25; }
.article iframe { max-width: 100%; }

/* News list (Новини page) and section subpage lists */
.news-list-section { max-width: 820px; display: flex; flex-direction: column; gap: 32px; }
.news-list-section .section-title { margin: 0 0 -16px; font-size: 24px; }
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
.news-list {
  margin: 0;
  padding: 0;
  list-style: none;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
}
.news-list li + li { border-top: 1px solid var(--border-soft); }
.news-row {
  display: flex;
  align-items: center;
  gap: 18px;
  min-height: 88px;
  padding: 14px 20px;
  color: var(--text);
}
.news-row:hover { text-decoration: none; background: #fafbf9; }
.news-row:hover .news-row__title { color: var(--green-dark); text-decoration: underline; }
.news-list li:first-child .news-row { border-radius: var(--radius) var(--radius) 0 0; }
.news-list li:last-child .news-row { border-radius: 0 0 var(--radius) var(--radius); }
.news-row__thumb {
  flex: none;
  width: 96px;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: 6px;
}
.news-row__text { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.news-row__date { font-size: 13px; color: var(--muted); }
.news-row__title { font-size: 16px; font-weight: 500; line-height: 1.4; text-wrap: pretty; overflow-wrap: anywhere; }
@media (max-width: 520px) {
  .news-row { gap: 14px; padding: 12px 14px; }
  .news-row__thumb { width: 72px; }
}

.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 8px 16px; font-size: 15px; }
.pagination__pages { display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; list-style: none; }
.pagination__page {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 38px;
  height: 38px;
  padding: 0 8px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--text);
  font-weight: 500;
}
a.pagination__page:hover { border-color: var(--green); color: var(--green-dark); text-decoration: none; }
.pagination__page[aria-current="page"] { background: var(--green); border-color: var(--green); color: #fff; }
.pagination__gap { display: inline-flex; align-items: center; padding: 0 4px; color: var(--muted); }
.pagination__step { font-weight: 600; }

/* Footer */
.site-footer { background: var(--footer); color: var(--footer-text); font-size: 14px; }
.site-footer a { color: inherit; }
.site-footer a:hover { color: #fff; }
.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 32px;
  padding-top: 48px;
  padding-bottom: 32px;
}
.site-footer__col { display: flex; flex-direction: column; gap: 8px; }
.site-footer__col ul { display: flex; flex-direction: column; gap: 8px; margin: 0; padding: 0; list-style: none; }
.site-footer__name { font-size: 18px; line-height: 1.3; color: #fff; }
.site-footer__heading { margin: 0; font-size: 14px; font-weight: 600; color: #fff; }
.site-footer__note {
  padding-top: 16px;
  padding-bottom: 28px;
  border-top: 1px solid var(--footer-border);
  font-size: 13px;
  color: var(--footer-muted);
}

/* Search page */
.search--large { max-width: 820px; padding: 6px 6px 6px 16px; gap: 8px; background: #fff; }
.search--large input { font-size: 16px; }
.search--large button {
  border: 0;
  border-radius: 6px;
  padding: 9px 18px;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #fff;
  background: var(--green);
  cursor: pointer;
}
.search--large button:hover { background: var(--green-dark); }
.search-summary { margin: 0; color: var(--muted); }
.search-excerpt { font-size: 14px; line-height: 1.5; color: var(--muted); overflow-wrap: anywhere; }
.search-excerpt mark { background: var(--chip); color: var(--text); font-weight: 500; padding: 0 1px; }

/* Text, news and notice pages: content with a right-hand column */
.page-layout--sidebar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  column-gap: 56px;
  align-items: start;
}
.page-layout__main { min-width: 0; }
.page-layout__aside { padding-top: 40px; padding-bottom: 64px; }
@media (max-width: 960px) {
  .page-layout--sidebar { grid-template-columns: minmax(0, 1fr); }
  .page-layout__aside { padding-top: 0; }
}

.side-card__title { margin: 0; font-size: 20px; }
.side-card__more { font-size: 14px; font-weight: 600; color: var(--green); }

.side-menu { gap: 10px; padding: 20px 12px; }
.side-menu__title { margin: 0; padding: 0 12px 6px; font-size: 20px; }
.side-menu__title a { color: var(--text); }
.side-menu__title a:hover { color: var(--green-dark); }
.side-menu__list { display: flex; flex-direction: column; gap: 2px; margin: 0; padding: 0; list-style: none; }
.side-menu__list .side-menu__list { margin: 2px 0 4px 12px; padding-left: 8px; border-left: 2px solid var(--border-soft); }
.side-menu__list a {
  display: block;
  padding: 7px 12px;
  border-radius: 8px;
  font-size: 15px;
  line-height: 1.4;
  color: var(--text);
}
.side-menu__list a:hover { text-decoration: none; background: var(--chip); color: var(--green-dark); }
.side-menu__list a.is-active { color: var(--green-dark); font-weight: 600; }
.side-menu__list a[aria-current="page"] { background: var(--chip); }
