/* Портал Мелітопольської міської ради — базові стилі.
   Палітра й шрифт e-Ukraine — зі старого mlt.gov.ua (web.archive.org, 31.08.2026). */

@font-face { font-family: "e-Ukraine"; font-weight: 300; font-display: swap; src: url("../fonts/e-Ukraine-Light.woff2") format("woff2"); }
@font-face { font-family: "e-Ukraine"; font-weight: 400; font-display: swap; src: url("../fonts/e-Ukraine-Regular.woff2") format("woff2"); }
@font-face { font-family: "e-Ukraine"; font-weight: 500; font-display: swap; src: url("../fonts/e-Ukraine-Medium.woff2") format("woff2"); }
@font-face { font-family: "e-Ukraine"; font-weight: 700; font-display: swap; src: url("../fonts/e-Ukraine-Bold.woff2") format("woff2"); }

:root {
    --blue: #1c7cc9;
    --blue-600: #1869b0;
    --blue-700: #11528d;
    --blue-800: #0c3d6b;
    --blue-50: #eaf4fc;
    --yellow: #ffd500;
    --ink: #16202e;
    --muted: #5b6b7f;
    --line: #e3e8f0;
    --bg: #f5f7fa;
    --card: #ffffff;
    --radius: 12px;
    --radius-sm: 8px;
    --shadow: 0 1px 2px rgb(16 40 80 / .06), 0 8px 24px -12px rgb(16 40 80 / .18);
    --shadow-lg: 0 24px 48px -16px rgb(16 40 80 / .28);
    --container: 1240px;
    --font: "e-Ukraine", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.6; color: var(--ink); background: var(--bg); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
a:focus-visible, button:focus-visible, summary:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; border-radius: 4px; }
h1, h2, h3, h4 { margin: 0; line-height: 1.3; font-weight: 700; }
p { margin: 0; }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer; padding: 0; }
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 20px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 1em; height: 1em; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.skip-link { position: absolute; left: 12px; top: -48px; z-index: 100; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: var(--radius-sm); font-weight: 500; }
.skip-link:focus { top: 12px; }

/* ── Top utility bar ─────────────────────────────────────────── */
.topbar { background: var(--blue-800); color: #d6e6f5; font-size: 12.5px; }
.topbar .container { display: flex; align-items: center; gap: 22px; min-height: 38px; }
.topbar a, .topbar button { display: inline-flex; align-items: center; gap: 7px; opacity: .92; transition: opacity .15s; }
.topbar a:hover, .topbar button:hover { opacity: 1; color: #fff; }
.topbar .icon { font-size: 15px; }
.topbar__trident { width: 11px; height: 18px; }
.topbar__spacer { flex: 1; }
.search { position: relative; display: flex; align-items: center; }
.search input { width: 210px; height: 28px; border-radius: 999px; border: 1px solid rgb(255 255 255 / .22); background: rgb(255 255 255 / .1); color: #fff; padding: 0 12px 0 32px; font: inherit; transition: width .2s, background .2s; }
.search input::placeholder { color: #bcd3e8; }
.search input:focus { outline: none; width: 260px; background: rgb(255 255 255 / .18); border-color: var(--yellow); }
.search .icon { position: absolute; left: 11px; pointer-events: none; }

/* ── Header ──────────────────────────────────────────────────── */
.masthead { position: relative; color: #fff; background: var(--blue) var(--header-bg) center / cover no-repeat; }
.masthead::before { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, rgb(12 61 107 / .1), rgb(12 61 107 / .35)); }
.masthead__inner { position: relative; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 26px 20px 22px; text-align: center; }
.masthead__logo { height: 64px; width: auto; }
.masthead__title { font-size: 19px; letter-spacing: .14em; text-transform: uppercase; }
.masthead__subtitle { font-size: 11px; font-weight: 400; letter-spacing: .32em; text-transform: uppercase; opacity: .85; display: block; }
.masthead__text { display: grid; gap: 10px; }
.masthead--compact .masthead__inner { flex-direction: row; justify-content: flex-start; gap: 16px; padding-top: 12px; padding-bottom: 12px; text-align: left; }
.masthead--compact .masthead__logo { height: 42px; }
.masthead--compact .masthead__text { gap: 4px; }
.masthead--compact .masthead__title { font-size: 15px; margin: 0; }
.masthead--compact .masthead__subtitle { font-size: 9.5px; letter-spacing: .26em; }

/* ── Main navigation + mega menu ─────────────────────────────── */
.nav { position: sticky; top: 0; z-index: 50; background: var(--blue-600); color: #fff; box-shadow: 0 1px 0 rgb(255 255 255 / .12) inset, 0 6px 20px -12px rgb(0 0 0 / .45); }
.nav__bar { display: flex; align-items: center; min-height: 54px; gap: 8px; }
.nav__brand { display: none; align-items: center; gap: 10px; font-weight: 700; font-size: 13px; letter-spacing: .06em; text-transform: uppercase; }
.nav__brand img { height: 30px; width: auto; }
.nav__list { display: flex; align-items: stretch; list-style: none; margin: 0; padding: 0; flex: 1; }
.nav__item { position: static; }
.nav__link { display: flex; align-items: center; gap: 6px; height: 54px; padding: 0 12px; font-size: 12.5px; font-weight: 500; letter-spacing: .05em; text-transform: uppercase; white-space: nowrap; border-bottom: 3px solid transparent; transition: background .15s, border-color .15s; }
.nav__link .icon { font-size: 13px; transition: transform .2s; }
.nav__item:hover > .nav__link, .nav__item.is-open > .nav__link { background: rgb(255 255 255 / .1); border-bottom-color: var(--yellow); }
.nav__item.is-open > .nav__link .icon { transform: rotate(180deg); }
.nav__meta { display: flex; align-items: center; gap: 14px; font-size: 12.5px; white-space: nowrap; }
.nav__social { display: inline-flex; gap: 2px; }
.nav__social a { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; transition: background .15s; }
.nav__social a:hover { background: rgb(255 255 255 / .14); }
.nav__social .icon { font-size: 16px; }
.nav__toggle { display: none; width: 40px; height: 40px; place-items: center; border-radius: var(--radius-sm); margin-left: auto; }
.nav__toggle .icon { font-size: 22px; }

.mega { position: absolute; left: 0; right: 0; top: 100%; background: var(--card); color: var(--ink); box-shadow: var(--shadow-lg); border-top: 3px solid var(--yellow); opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .18s, transform .18s, visibility 0s .18s; max-height: calc(100vh - 150px); overflow-y: auto; }
.nav__item:hover > .mega, .nav__item.is-open > .mega { opacity: 1; visibility: visible; transform: none; transition-delay: .08s, .08s, 0s; }
.mega__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 26px 32px; padding: 28px 20px 32px; }
.mega__group-title { display: block; font-size: 13.5px; font-weight: 700; color: var(--blue-700); margin-bottom: 8px; }
a.mega__group-title:hover { color: var(--blue); text-decoration: underline; }
.mega__links { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.mega__links a { display: block; font-size: 13px; color: var(--muted); line-height: 1.45; padding-left: 12px; position: relative; }
.mega__links a::before { content: ""; position: absolute; left: 0; top: .6em; width: 4px; height: 4px; border-radius: 50%; background: #b7c4d4; }
.mega__links a:hover { color: var(--blue); }
.ext { font-size: 10px; margin-left: 3px; vertical-align: 1px; opacity: .6; }

/* ── Sections ────────────────────────────────────────────────── */
main { display: block; }
.section { padding: 36px 0; }
.section-title { display: flex; align-items: center; gap: 12px; font-size: 15px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 22px; }
.section-title::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: var(--yellow); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); }

/* Portals strip */
.portals { background: var(--card); border-bottom: 1px solid var(--line); }
.portals__track { display: grid; grid-template-columns: repeat(auto-fit, minmax(104px, 1fr)); gap: 4px; padding: 18px 20px; }
.portal { scroll-snap-align: start; display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 10px 12px; border-radius: var(--radius); text-align: center; font-size: 12.5px; line-height: 1.35; color: var(--ink); transition: background .15s, transform .15s; }
.portal:hover { background: var(--blue-50); transform: translateY(-2px); }
.portal__icon { width: 52px; height: 52px; display: grid; place-items: center; border-radius: 14px; background: var(--blue-50); }
.portal__icon img { width: 30px; height: 30px; object-fit: contain; }

/* Featured slider */
.slider { position: relative; }
.slider__viewport { overflow: hidden; border-radius: var(--radius); box-shadow: var(--shadow); background: var(--card); }
.slider__track { display: flex; transition: transform .5s cubic-bezier(.4, 0, .2, 1); }
.slide { flex: 0 0 100%; display: grid; grid-template-columns: 1.35fr 1fr; min-height: 380px; }
.slide__media { position: relative; background: var(--blue-800); overflow: hidden; }
.slide__body { display: flex; flex-direction: column; gap: 14px; padding: 36px 36px 30px; }
.slide__title { font-size: 22px; line-height: 1.35; }
.slide__title a:hover { color: var(--blue); }
.slide__intro { color: var(--muted); font-size: 14px; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.slide__body .btn { margin-top: auto; align-self: flex-start; }
.meta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px; color: var(--muted); font-size: 12px; }
.meta span { display: inline-flex; align-items: center; gap: 5px; }
.slider__controls { display: flex; align-items: center; justify-content: center; gap: 14px; margin-top: 18px; }
.slider__dots { display: flex; gap: 8px; }
.slider__dot { width: 8px; height: 8px; border-radius: 999px; background: #c5d2e0; transition: width .25s, background .25s; }
.slider__dot[aria-current="true"] { width: 26px; background: var(--blue); }
.round-btn { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); color: var(--ink); transition: border-color .15s, color .15s, background .15s; }
.round-btn:hover { border-color: var(--blue); color: var(--blue); }
.round-btn .icon { font-size: 18px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 22px; border-radius: var(--radius-sm); font-size: 13px; font-weight: 500; transition: background .15s, color .15s, border-color .15s; }
.btn .icon { font-size: 16px; }
.btn--primary { background: var(--blue); color: #fff; }
.btn--primary:hover { background: var(--blue-700); }
.btn--outline { border: 1.5px solid var(--ink); color: var(--ink); border-radius: 999px; }
.btn--outline:hover { background: var(--ink); color: #fff; }

/* Cover: whole picture (posters carry text) on a blurred fill of itself */
.slide__media, .news-item__media, .tile__media, .popular__media, .mini__media { position: relative; }
.fit { position: absolute; inset: 0; overflow: hidden; background: var(--blue-800); }
.fit::before { content: ""; position: absolute; inset: -24px; background: var(--img) center / cover no-repeat; filter: blur(18px) brightness(.85) saturate(1.1); }
.fit > img { position: relative; width: 100%; height: 100%; object-fit: contain; }
.mini__media .fit > img { object-fit: cover; }  /* у мініатюрі 76px поля лише заважають */
html.a11y .fit::before { filter: blur(18px) grayscale(1); }

/* Placeholder when a news item has no picture */
.ph { width: 100%; height: 100%; min-height: 100%; display: grid; place-items: center; background: linear-gradient(135deg, var(--blue) 0%, var(--blue-800) 100%); }
.ph .ph__logo { width: 46%; max-width: 150px; height: auto; object-fit: contain; opacity: .95; transform: none; }

/* News + sidebar */
.layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 40px; align-items: start; }
.layout--wide { grid-template-columns: minmax(0, 1fr); }
.layout--wide .news-list { grid-template-columns: repeat(auto-fill, minmax(min(520px, 100%), 1fr)); }
.news-list { display: grid; gap: 18px; }
.news-item { display: grid; grid-template-columns: 260px minmax(0, 1fr); overflow: hidden; transition: box-shadow .2s, border-color .2s; }
.news-item:hover { box-shadow: var(--shadow); border-color: #d3dde9; }
.news-item__media { min-height: 150px; overflow: hidden; background: var(--blue-800); }  /* на всю висоту картки */
.news-item__media img { transition: transform .4s; }
.news-item:hover .news-item__media img { transform: scale(1.04); }
.news-item__body { display: flex; flex-direction: column; gap: 8px; padding: 18px 22px; }
.news-item__title { font-size: 16.5px; line-height: 1.4; }
.news-item__title a:hover { color: var(--blue); }
.news-item__intro { color: var(--muted); font-size: 13.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; font-size: 12.5px; font-weight: 700; color: var(--blue-700); }
.more .icon { transition: transform .15s; }
.more:hover .icon { transform: translateX(3px); }
.news-all { display: flex; justify-content: center; margin-top: 26px; }

.sidebar { display: grid; gap: 22px; position: sticky; top: 76px; }
.mayor { overflow: hidden; text-align: center; }
.mayor__photo { background: linear-gradient(180deg, var(--blue-50), #fff); padding-top: 18px; }
.mayor__photo img { width: 78%; margin: 0 auto; }
.mayor__body { padding: 16px 20px 20px; border-top: 1px solid var(--line); display: grid; gap: 4px; }
.mayor__name { font-size: 16px; }
.mayor__position { font-size: 12.5px; color: var(--muted); }
.mayor__body .more { justify-content: center; margin-top: 8px; }
.promo { position: relative; overflow: hidden; border-radius: var(--radius); min-height: 190px; display: flex; flex-direction: column; justify-content: flex-end; gap: 12px; padding: 20px; color: #fff; background: var(--blue-800); }
.promo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.promo::before { content: ""; position: absolute; inset: 0; z-index: 1; background: linear-gradient(180deg, rgb(12 61 107 / .25), rgb(12 61 107 / .9)); }
.promo > :not(img) { position: relative; z-index: 2; }
.promo__title { font-size: 15px; line-height: 1.4; }
.promo .btn { background: var(--yellow); color: var(--ink); height: 38px; align-self: flex-start; }
.promo .btn:hover { background: #fff; }

/* Partners */
.partners { background: var(--card); border-top: 1px solid var(--line); }
.partners__row { display: flex; align-items: center; gap: 14px; }
.partners__track { flex: 1; display: grid; grid-auto-flow: column; grid-auto-columns: calc((100% - 3 * 16px) / 4); gap: 16px; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; padding: 4px; }
.partners__track::-webkit-scrollbar { display: none; }
.partner { scroll-snap-align: start; display: grid; place-items: center; height: 96px; padding: 8px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: #fff; transition: border-color .15s, box-shadow .15s; }
.partner:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.partner img { max-height: 78px; width: auto; object-fit: contain; }

/* ── Inner pages ─────────────────────────────────────────────── */
.page-head { padding: 26px 0 8px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; font-size: 12.5px; color: var(--muted); margin-bottom: 14px; }
.crumbs a:hover { color: var(--blue); }
.crumbs .icon { font-size: 13px; opacity: .6; }
.page-head__title { font-size: 28px; margin-bottom: 18px; }
.page-head__hint { margin-top: 12px; font-size: 13px; color: var(--muted); }
.page-head__hint a { color: var(--blue); text-decoration: underline; }
.page-search { position: relative; display: flex; gap: 10px; max-width: 640px; }
.page-search .icon { position: absolute; left: 14px; top: 13px; color: var(--muted); font-size: 16px; }
.page-search input { flex: 1; height: 42px; padding: 0 14px 0 40px; border: 1px solid var(--line); border-radius: var(--radius-sm); background: var(--card); font: inherit; color: var(--ink); }
.page-search input:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px rgb(28 124 201 / .15); }

.archive { display: grid; gap: 10px; margin-top: 18px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); font-size: 13px; font-weight: 500; transition: border-color .15s, color .15s, background .15s; }
.chip span { font-size: 11px; font-weight: 400; color: var(--muted); }
a.chip:hover { border-color: var(--blue); color: var(--blue); }
.chip.is-active { background: var(--blue); border-color: var(--blue); color: #fff; }
.chip.is-active span { color: rgb(255 255 255 / .8); }
.chips--sub .chip { height: 30px; font-size: 12.5px; }
@media (max-width: 640px) { .chips { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; } .chip { flex: none; } }

.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 20px; }
.tile { overflow: hidden; display: flex; flex-direction: column; transition: box-shadow .2s, transform .2s; }
.tile:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.tile__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--blue-800); }
.tile__body { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px 20px; }
.tile__title { font-size: 15.5px; line-height: 1.4; }
.tile__title a::after { content: ""; position: absolute; inset: 0; }
.tile { position: relative; }
.tile__title a:hover { color: var(--blue); }
.tile__intro { color: var(--muted); font-size: 13px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

.pager { display: flex; justify-content: center; flex-wrap: wrap; gap: 6px; margin-top: 34px; }
.pager__btn { display: grid; place-items: center; min-width: 40px; height: 40px; padding: 0 10px; border-radius: var(--radius-sm); border: 1px solid var(--line); background: var(--card); font-size: 13.5px; font-weight: 500; }
a.pager__btn:hover { border-color: var(--blue); color: var(--blue); }
.pager__btn.is-current { background: var(--blue); border-color: var(--blue); color: #fff; }
.pager__gap { display: grid; place-items: center; width: 24px; color: var(--muted); }

.empty { padding: 32px; text-align: center; color: var(--muted); }
.empty--big { padding: 56px 24px; display: grid; gap: 12px; justify-items: center; }
.empty--big h1 { color: var(--ink); font-size: 24px; }
.empty__code { font-size: 64px; font-weight: 700; line-height: 1; color: var(--blue); }
.empty__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 10px; }

.article { padding: 32px 40px 28px; }
.article__head { display: grid; gap: 14px; margin-bottom: 24px; }
.article__title { font-size: 28px; line-height: 1.3; }
.article__lead { font-size: 16px; color: var(--muted); line-height: 1.6; }
.article__cover { margin: 0 0 26px; border-radius: var(--radius-sm); overflow: hidden; background: var(--bg); }
.article__cover img { width: 100%; max-height: 560px; object-fit: contain; }
.article__foot { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin-top: 30px; padding-top: 20px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted); }
.article__foot .round-btn .icon { font-size: 16px; }

.article-col { display: grid; gap: 18px; min-width: 0; }
.siblings { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.sibling { display: grid; gap: 6px; padding: 16px 20px; transition: border-color .15s, box-shadow .15s; }
.sibling:hover { border-color: var(--blue); box-shadow: var(--shadow); }
.sibling--next { text-align: right; }
.sibling__dir { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--blue-700); text-transform: uppercase; letter-spacing: .06em; }
.sibling--next .sibling__dir { justify-content: flex-end; }
.sibling__title { font-weight: 500; font-size: 14px; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.sibling__date { font-size: 12px; color: var(--muted); }
@media (max-width: 640px) { .siblings { grid-template-columns: 1fr; } .sibling--next { text-align: left; } .sibling--next .sibling__dir { justify-content: flex-start; } }

.prose { font-size: 15.5px; line-height: 1.75; overflow-wrap: anywhere; }
.prose > * + * { margin-top: 1em; }
.prose h2, .prose h3, .prose h4 { margin-top: 1.6em; }
.prose h2 { font-size: 21px; } .prose h3 { font-size: 18px; } .prose h4 { font-size: 16px; }
.prose a { color: var(--blue); text-decoration: underline; text-underline-offset: 2px; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li + li { margin-top: .35em; }
.prose img { height: auto; border-radius: var(--radius-sm); margin: 1.2em auto; }
.prose blockquote { margin: 1.2em 0; padding: 4px 0 4px 18px; border-left: 3px solid var(--yellow); color: var(--muted); }
.prose table { width: 100%; border-collapse: collapse; font-size: 14px; display: block; overflow-x: auto; overflow-wrap: normal; }
.prose th, .prose td { border: 1px solid var(--line); padding: 8px 10px; text-align: left; vertical-align: top; }
.prose table.docs { display: table; }
.prose .docs th[scope="row"] { width: 34%; font-weight: 500; color: var(--muted); }
.docs__nowrap { white-space: nowrap; }
.docs-wrap { overflow-x: auto; }
@media (max-width: 640px) { .docs__type { display: none; } }
.prose iframe { width: 100%; aspect-ratio: 16 / 9; height: auto; border: 0; border-radius: var(--radius-sm); }

.mini-list { list-style: none; margin: 0; padding: 6px; }
.mini { display: grid; grid-template-columns: 76px 1fr; gap: 12px; align-items: center; padding: 10px; border-radius: var(--radius-sm); transition: background .15s; }
.mini:hover { background: var(--blue-50); }
.mini__media { aspect-ratio: 4 / 3; border-radius: 6px; overflow: hidden; background: var(--blue-800); }
.mini__body { display: grid; gap: 3px; }
.mini__date { font-size: 11.5px; color: var(--muted); }
.mini__title { font-size: 13px; font-weight: 500; line-height: 1.4; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* News list — wide cards like the old site + «Популярні» */
.news-list--wide { gap: 22px; }
.news-list--wide .news-item { grid-template-columns: 340px minmax(0, 1fr); }
.news-list--wide .news-item__media { min-height: 210px; }
.news-list--wide .news-item__body { padding: 20px 24px; gap: 10px; }
.news-list--wide .news-item__title { font-size: 19px; }
.news-list--wide .news-item__intro { font-size: 14px; -webkit-line-clamp: 4; }
.popular { display: grid; gap: 22px; }
.popular__item { display: grid; gap: 10px; padding-bottom: 22px; border-bottom: 1px solid var(--line); }
.popular__item:last-child { border-bottom: 0; padding-bottom: 0; }
.popular__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; border-radius: var(--radius-sm); background: var(--blue-800); }
.popular__media img { transition: transform .4s; }
.popular__item:hover .popular__media img { transform: scale(1.04); }
.popular__title { font-size: 15px; line-height: 1.4; }
.popular__title a:hover { color: var(--blue); }
.popular__intro { font-size: 13px; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }

/* Section pages */
.layout--single { grid-template-columns: minmax(0, 880px); justify-content: center; }
.article__note { display: flex; gap: 10px; margin-top: 18px; padding: 12px 16px; border-radius: var(--radius-sm); background: var(--blue-50); color: var(--muted); font-size: 13.5px; }
.article__note .icon { flex: none; margin-top: 3px; color: var(--blue); font-size: 16px; }
.article__note a { color: var(--blue); text-decoration: underline; }
.article__foot > span { display: inline-flex; align-items: center; gap: 6px; }
.subpages--after { margin-top: 30px; padding-top: 24px; border-top: 1px solid var(--line); }
.subpages__title { font-size: 17px; margin-bottom: 14px; }
.subpages__list { display: grid; gap: 12px; }
.subpages__list .news-item { grid-template-columns: 220px minmax(0, 1fr); }
.subpages__list .news-item__title { font-size: 15.5px; }
.subpage { display: flex; align-items: center; gap: 14px; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .15s, background .15s; }
.subpage:hover { border-color: var(--blue); background: var(--blue-50); }
.subpage__body { flex: 1; display: grid; gap: 2px; }
.subpage__title { font-weight: 500; font-size: 14.5px; line-height: 1.4; }
.subpage__date { font-size: 12px; color: var(--muted); }
.subpage .icon { color: var(--muted); font-size: 16px; }
.section-nav { list-style: none; margin: 0; padding: 6px; }
.section-nav a { display: block; padding: 9px 12px; border-radius: 6px; font-size: 13.5px; line-height: 1.4; border-left: 3px solid transparent; }
.section-nav a:hover { background: var(--blue-50); color: var(--blue); }
.section-nav a[aria-current="page"] { background: var(--blue-50); color: var(--blue-700); font-weight: 700; border-left-color: var(--blue); }

/* Gallery + lightbox */
.prose .gallery { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 8px; margin: 1.4em 0; }
.prose .gallery__item { display: block; aspect-ratio: 4 / 3; overflow: hidden; border-radius: var(--radius-sm); background: var(--bg); text-decoration: none; }
.prose .gallery__item img { width: 100%; height: 100%; object-fit: cover; margin: 0; border-radius: 0; transition: transform .3s; }
.prose .gallery__item:hover img { transform: scale(1.05); }
.prose img, [data-zoom] { cursor: zoom-in; }

/* File list (RichText «Файли» block) */
.prose .file-list { list-style: none; padding: 0; margin: 1.4em 0; border: 1px solid var(--line); border-radius: var(--radius-sm); }
.prose .file-list li { display: flex; align-items: baseline; gap: 10px; margin: 0; padding: 10px 14px; }
.prose .file-list li + li { border-top: 1px solid var(--line); }
.prose .file-list li::before { content: ""; flex: none; width: 14px; height: 16px; align-self: center; background: var(--blue); mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z'/%3E%3Cpath d='M14 2v4a2 2 0 0 0 2 2h4'/%3E%3C/svg%3E") center / contain no-repeat; }
.prose .file-list a { flex: 1; min-width: 0; }
.prose .file-list__meta { flex: none; color: var(--muted); font-size: 13px; white-space: nowrap; }
.lightbox { width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0; background: rgb(8 18 32 / .94); }
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: transparent; }
.lightbox img { max-width: calc(100vw - 140px); max-height: calc(100vh - 60px); object-fit: contain; border-radius: 4px; }
.lightbox .round-btn { position: fixed; background: rgb(255 255 255 / .12); border-color: transparent; color: #fff; width: 46px; height: 46px; }
.lightbox .round-btn:hover { background: rgb(255 255 255 / .24); color: #fff; }
.lightbox__close { top: 18px; right: 18px; }
.lightbox__nav--prev { left: 18px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 18px; top: 50%; transform: translateY(-50%); }
@media (max-width: 640px) {
    .lightbox img { max-width: 100vw; max-height: calc(100vh - 140px); }
    .lightbox__nav--prev, .lightbox__nav--next { top: auto; bottom: 18px; transform: none; }
}

/* ── Footer ──────────────────────────────────────────────────── */
.sitemap { background: var(--blue); color: #fff; }
.sitemap summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; min-height: 64px; font-weight: 700; font-size: 14px; letter-spacing: .1em; text-transform: uppercase; }
.sitemap summary::-webkit-details-marker { display: none; }
.sitemap summary .icon { transition: transform .2s; }
.sitemap[open] summary .icon { transform: rotate(180deg); }
.sitemap__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 24px 32px; padding: 6px 0 36px; }
.sitemap__grid h3 { font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--yellow); margin-bottom: 10px; }
.sitemap__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 5px; }
.sitemap__grid a { font-size: 13px; opacity: .88; }
.sitemap__grid a:hover { opacity: 1; text-decoration: underline; }

.footer { background: var(--card); padding: 40px 0 26px; font-size: 13px; }
.footer__cols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; padding-bottom: 30px; border-bottom: 1px solid var(--line); }
.footer h4 { font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; margin-bottom: 14px; }
.footer h4::after { content: ""; display: block; width: 26px; height: 2px; margin-top: 10px; background: var(--blue); }
.footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer li { display: flex; gap: 8px; align-items: flex-start; }
.footer li .icon { margin-top: 3px; color: var(--blue); font-size: 15px; }
.footer a:hover { color: var(--blue); }
.footer__bottom { display: grid; grid-template-columns: 1.2fr 1fr; gap: 30px; padding-top: 24px; color: var(--muted); font-size: 12.5px; }
.footer__stores { display: flex; gap: 10px; margin-top: 12px; }
.footer__stores img { height: 38px; width: auto; }
.footer__bottom a { color: var(--blue); }
.footer__copy { margin-top: 20px; font-size: 12px; color: var(--muted); }

.to-top { position: fixed; right: 20px; bottom: 20px; z-index: 40; width: 44px; height: 44px; border-radius: 50%; background: var(--blue); color: #fff; display: grid; place-items: center; box-shadow: var(--shadow); opacity: 0; visibility: hidden; transform: translateY(10px); transition: all .2s; }
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top .icon { font-size: 20px; }

/* ── Accessibility mode («Людям із порушенням зору») ─────────── */
html.a11y body { font-size: 18px; }
html.a11y { --ink: #000; --muted: #1a1a1a; --line: #000; --bg: #fff; --blue: #00338d; --blue-600: #00266b; --blue-700: #00338d; --blue-800: #001a4d; }
html.a11y img:not(.keep-color) { filter: grayscale(1) contrast(1.1); }
html.a11y a { text-decoration: underline; }
html.a11y .card, html.a11y .partner { border-width: 2px; }
html.a11y .slide__intro, html.a11y .news-item__intro { -webkit-line-clamp: unset; }
html.a11y *, html.a11y *::before, html.a11y *::after { transition: none !important; animation: none !important; }

/* ── Responsive ──────────────────────────────────────────────── */
@media (max-width: 1100px) {
    .nav__link { padding: 0 10px; font-size: 11.5px; }
}
@media (max-width: 991px) {
    .nav__bar { min-height: 56px; }
    .nav__brand { display: flex; }
    .masthead { display: none; }  /* на мобільному бренд (і h1 головної) — у панелі меню */
    .nav__brand { min-width: 0; font-size: 12px; line-height: 1.3; }
    .nav__brand-title { margin: 0; font: inherit; }
    .nav__toggle { display: grid; }
    .nav__meta { display: none; }
    .nav__list { display: none; position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; background: var(--blue-700); max-height: calc(100vh - 56px); overflow-y: auto; box-shadow: var(--shadow-lg); }
    .nav.is-open .nav__list { display: flex; }
    .nav__link { height: 52px; padding: 0 20px; justify-content: space-between; border-bottom: 1px solid rgb(255 255 255 / .1); font-size: 13px; width: 100%; }
    .nav__item:hover > .nav__link { background: none; border-bottom-color: rgb(255 255 255 / .1); }
    .nav__item.is-open > .nav__link { background: rgb(255 255 255 / .08); }
    .mega { position: static; display: none; opacity: 1; visibility: visible; transform: none; box-shadow: none; border-top: 0; max-height: none; }
    .nav__item:hover > .mega { display: none; }
    .nav__item.is-open > .mega { display: block; }
    .mega__grid { grid-template-columns: 1fr; gap: 18px; padding: 18px 20px 22px; }
    .layout { grid-template-columns: 1fr; }
    .sidebar { position: static; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
    .slide { grid-template-columns: 1fr; min-height: 0; }
    .slide__media { aspect-ratio: 16 / 9; }
    .partners__track { grid-auto-columns: calc((100% - 2 * 16px) / 3); }
    .footer__cols, .footer__bottom { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
    body { font-size: 14px; }
    .container { padding: 0 16px; }
    .topbar__label { display: none; }
    .search { margin-left: auto; }
    .search input, .search input:focus { width: 150px; }
    .masthead__logo { height: 48px; }
    .masthead__title { font-size: 14px; letter-spacing: .08em; }
    .masthead__subtitle { font-size: 9.5px; letter-spacing: .2em; }
    .section { padding: 26px 0; }
    .slide__body { padding: 22px 20px; }
    .slide__title { font-size: 18px; }
    .news-item, .subpages__list .news-item, .news-list--wide .news-item { grid-template-columns: 1fr; }
    .news-item__media { aspect-ratio: 16 / 10; min-height: 0; }
    .partners__track { grid-auto-columns: calc((100% - 16px) / 2); }
    .partners__row .round-btn { display: none; }
    .portals__track { grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 112px; overflow-x: auto; scroll-snap-type: x mandatory; padding: 14px 16px; }
    .footer__cols, .footer__bottom { grid-template-columns: 1fr; }
    .page-head__title { font-size: 22px; }
    .article { padding: 22px 18px; }
    .article__title { font-size: 21px; }
    .page-search .btn { padding: 0 16px; }
}
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { transition: none !important; scroll-behavior: auto !important; }
}
.round-btn.is-done { border-color: #1f9d55; color: #1f9d55; }
.article__foot .more { margin-top: 0; }
