/* =========================================================
   Gerovės centras - prototipas
   WCAG 2.1 AA: kontrastas ≥ 4.5:1, matomas fokusas, 200% teksto mastelis
   ========================================================= */
:root {
  --purple: #3c246b;
  --purple-700: #2c1a52;
  --purple-500: #5b3a9e;
  --lilac: #f3effa;
  --lilac-200: #e4dcf3;
  --text: #1f1d24;
  --muted: #55505f;
  --line: #ddd8e6;
  --bg: #ffffff;
  --bg-soft: #f6f5f8;
  --focus: #ffbf47;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(44, 26, 82, .06), 0 8px 24px rgba(44, 26, 82, .08);
  --container: 1240px;
  --fs: 1.0625rem;
}
html { font-size: 100%; scroll-behavior: smooth; }
html.fs-1 { font-size: 112.5%; }
html.fs-2 { font-size: 125%; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0; background: var(--bg); color: var(--text);
  font: 400 var(--fs)/1.6 "Source Sans 3", "Source Sans Pro", system-ui, sans-serif;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--purple); text-underline-offset: .18em; }
a:hover { color: var(--purple-500); }
h1, h2, h3, h4 { line-height: 1.2; color: var(--purple); margin: 0 0 .6em; }
h1 { font-size: clamp(1.9rem, 3vw, 2.5rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.2vw, 1.9rem); font-weight: 700; }
h3 { font-size: 1.2rem; font-weight: 600; }
.container { max-width: var(--container); margin: 0 auto; padding: 0 24px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; box-shadow: 0 0 0 6px var(--purple-700); border-radius: 4px; }

.skip-link {
  position: absolute; left: 16px; top: -100px; z-index: 1000;
  background: var(--focus); color: #000; padding: 12px 18px; font-weight: 700; border-radius: 0 0 8px 8px;
}
.skip-link:focus { top: 0; }

/* ---------- Viršutinė juosta ---------- */
.topbar { background: var(--purple); color: #fff; font-size: .9rem; }
.topbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 48px; flex-wrap: wrap; }
.topbar a, .topbar button { color: #fff; }
.topbar__tools, .topbar__links { display: flex; align-items: center; gap: 6px; list-style: none; margin: 0; padding: 0; flex-wrap: wrap; }
.topbar__links { margin-left: -10px; }
.topbar__links a {
  white-space: nowrap; display: inline-flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 8px; text-decoration: none;
}
.topbar__links a:hover { background: rgba(255,255,255,.12); color: #fff; }
.topbar__links svg, .topbar__links img { width: 22px; height: 22px; object-fit: contain; flex: none; }
.tool-btn {
  background: transparent; border: 1px solid rgba(255,255,255,.35); border-radius: 8px;
  min-width: 36px; height: 34px; padding: 0 10px; font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px;
}
.tool-btn:hover, .tool-btn[aria-pressed="true"] { background: #fff; color: var(--purple) !important; }
.tool-btn svg { width: 18px; height: 18px; }
.tool-sep { width: 1px; height: 22px; background: rgba(255,255,255,.3); margin: 0 6px; }
.hotline { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; text-decoration: none; padding: 6px 12px; background: rgba(255,255,255,.12); border-radius: 999px; }

/* ---------- Antraštė ---------- */
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: relative; z-index: 50; }
.site-header .container { display: flex; align-items: center; gap: 32px; min-height: 104px; }
.brand { display: flex; align-items: center; gap: 14px; text-decoration: none; color: var(--text); margin-right: auto; }
.brand img { width: 88px; height: 88px; object-fit: contain; }
.brand__name { display: flex; flex-direction: column; line-height: 1.2; }
.brand__name small { color: var(--muted); font-size: .85rem; }
.brand__name strong { color: var(--purple); font-size: 1.15rem; max-width: 280px; }
.brand__badge { height: 34px !important; width: auto !important; margin-left: 6px; }

.main-nav ul { display: flex; gap: 4px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  white-space: nowrap; position: relative; display: block; padding: 12px 14px; font-weight: 600; text-decoration: none; color: var(--text); border-radius: 8px;
}
.main-nav a::after {
  content: ""; position: absolute; left: 14px; right: 14px; bottom: 6px; height: 3px; border-radius: 3px;
  background: var(--purple); transform: scaleX(0); transform-origin: left; transition: transform .2s ease;
}
.main-nav a:hover { color: var(--purple); }
.main-nav a:hover::after, .main-nav a[aria-current="page"]::after { transform: scaleX(1); }
.main-nav a[aria-current="page"] { color: var(--purple); }
.ext { display: inline-block; font-size: .68rem; font-weight: 700; letter-spacing: .04em; line-height: 1; color: #fff; background: #b3261e; border-radius: 4px; padding: 3px 5px; margin-left: 6px; vertical-align: 2px; text-decoration: none; }
a:hover .ext { background: #8c1d17; }
html.contrast .ext { background: #ff0; color: #000; }
.header-search { border: 1px solid var(--line); background: #fff; color: var(--purple); width: 44px; height: 44px; border-radius: 10px; cursor: pointer; display: grid; place-items: center; }
.header-search svg { width: 20px; height: 20px; }
.menu-toggle { display: none; }

/* paieška */
.search-panel { background: #fff; border-bottom: 1px solid var(--line); padding: 18px 0 22px; }
.search-form { position: relative; display: flex; align-items: center; max-width: 680px; margin: 0 auto; background: var(--bg-soft); border: 2px solid var(--line); border-radius: 999px; padding: 5px 5px 5px 50px; transition: border-color .15s, box-shadow .15s; }
.search-form > svg { position: absolute; left: 18px; width: 20px; height: 20px; color: var(--purple); pointer-events: none; }
.search-form:focus-within { border-color: var(--purple); background: #fff; box-shadow: 0 0 0 4px rgba(91,58,158,.18); }
.search-form input { flex: 1; min-width: 0; font: inherit; font-size: 1.05rem; border: 0; background: transparent; padding: 10px 8px; color: var(--text); }
.search-form input:focus { outline: none; box-shadow: none; }
.search-form input::placeholder { color: #6b6575; }
.search-form__btn { border: 0; background: var(--purple); color: #fff; font: inherit; font-weight: 600; padding: 10px 22px; border-radius: 999px; cursor: pointer; }
.search-form__btn:hover { background: var(--purple-700); }
.header-search[aria-expanded="true"] { background: var(--purple); color: #fff; border-color: var(--purple); }

/* ---------- Padalinių juosta ---------- */
.units { background: var(--lilac); border-bottom: 1px solid var(--lilac-200); position: relative; z-index: 40; }
.units__list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; list-style: none; margin: 0; padding: 16px 0; }
.unit-btn {
  width: 100%; display: flex; align-items: center; gap: 14px; text-align: left;
  background: #fff; border: 2px solid transparent; border-radius: var(--radius); padding: 14px 18px;
  font: inherit; color: var(--text); cursor: pointer; text-decoration: none; box-shadow: var(--shadow);
  transition: border-color .15s, transform .15s;
}
.unit-btn:hover { border-color: var(--purple-500); transform: translateY(-1px); color: var(--text); }
.unit-btn[aria-expanded="true"] { border-color: var(--purple); background: var(--purple); color: #fff; }
.unit-btn__icon { width: 52px; height: 52px; border-radius: 50%; background: var(--lilac); display: grid; place-items: center; flex: none; }
.unit-btn__icon img { width: 34px; height: 34px; object-fit: contain; }
.unit-btn[aria-expanded="true"] .unit-btn__icon { background: #fff; }
.unit-btn__text { display: flex; flex-direction: column; line-height: 1.25; }
.unit-btn__text small { font-size: .8rem; text-transform: uppercase; letter-spacing: .06em; opacity: .75; }
.unit-btn__text strong { font-size: 1.08rem; }
.unit-btn__chev { margin-left: auto; width: 28px; height: 28px; flex: none; transition: transform .2s; }
.unit-btn[aria-expanded="true"] .unit-btn__chev { transform: rotate(180deg); }

.mega {
  position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 4px solid var(--purple);
  box-shadow: 0 24px 48px rgba(44,26,82,.18); padding: 28px 0 32px;
}
.mega[hidden] { display: none; }
.mega__head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.mega__head h2 { margin: 0; font-size: 1.4rem; }
.mega__close { background: none; border: 1px solid var(--line); border-radius: 8px; padding: 6px 12px; font: inherit; cursor: pointer; color: var(--purple); }
.mega__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 16px; }
.mega__grid--wide { grid-template-columns: 1fr 1fr 2fr; }
.mega-card { border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; background: var(--bg-soft); }
.mega-card h3 { font-size: 1.05rem; margin-bottom: 10px; }
.mega-card h3 a { text-decoration: none; }
.mega-card ul { list-style: none; margin: 0; padding: 0; columns: 1; }
.mega-card--cols ul { columns: 2; column-gap: 24px; }
.mega-card li { break-inside: avoid; }
.mega-card li a { display: flex; gap: 8px; padding: 6px 0; text-decoration: none; color: var(--text); line-height: 1.35; }
.mega-card li a::before { content: "›"; color: var(--purple-500); font-weight: 700; }
.mega-card li a:hover { color: var(--purple); text-decoration: underline; }
.mega-card .sub { padding-left: 18px; columns: 1 !important; }
.mega-card .group-label { display: block; font-weight: 600; color: var(--muted); padding: 8px 0 2px; font-size: .9rem; }
.mega-link { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px; border-radius: var(--radius); background: var(--bg-soft); border: 1px solid var(--line); font-weight: 600; font-size: 1.1rem; text-decoration: none; }
.mega-link:hover { background: var(--lilac); }
.mega-note { color: var(--muted); font-size: .95rem; margin: 0; }

/* ---------- Puslapio turinys ---------- */
main { display: block; }
.section { padding: 48px 0; }
.section-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 24px; }
.section-head h2 { margin: 0; position: relative; padding-bottom: 10px; }
.section-head h2::after { content: ""; position: absolute; left: 0; bottom: 0; width: 56px; height: 4px; border-radius: 4px; background: var(--purple); }

.banners { display: grid; grid-template-columns: repeat(6, 1fr); gap: 20px; padding-top: 32px; }
.banner { grid-column: span 2; border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; background: var(--lilac); }
.banner--wide { grid-column: span 3; }
/* baneriai rodomi pilni - jokio kirpimo, nes juose yra tekstas */
.banner { align-self: start; }
.banner img { width: 100%; height: auto; }
.banner:hover { transform: translateY(-3px); box-shadow: 0 16px 36px rgba(44,26,82,.18); }
.banner--logo { display: grid; place-items: center; background: #4a90d9; }
.banner--logo img { width: 30%; height: auto; aspect-ratio: auto; }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.news-card { position: relative; display: flex; flex-direction: column; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; transition: box-shadow .2s, transform .2s; }
.news-card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }
.news-card__img { aspect-ratio: 16 / 10; overflow: hidden; background: var(--lilac); }
.news-card__img img { width: 100%; height: 100%; object-fit: contain; }
.news-card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.news-card h3 { font-size: 1.2rem; margin: 0; }
.news-card h3 a { color: var(--text); text-decoration: none; }
.news-card h3 a::after { content: ""; position: absolute; inset: 0; }
.news-card h3 a:hover { color: var(--purple); text-decoration: underline; }
.meta { display: flex; gap: 10px; align-items: center; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.tag { background: var(--lilac); color: var(--purple); font-weight: 700; font-size: .75rem; letter-spacing: .06em; text-transform: uppercase; padding: 3px 10px; border-radius: 999px; }

.btn { display: inline-flex; align-items: center; gap: 8px; background: var(--purple); color: #fff; padding: 12px 22px; border-radius: 10px; font-weight: 600; text-decoration: none; border: 0; font: inherit; cursor: pointer; }
.btn:hover { background: var(--purple-700); color: #fff; }
.btn--ghost { background: transparent; color: var(--purple); border: 2px solid var(--purple); }
.btn--ghost:hover { background: var(--purple); color: #fff; }

/* Vidiniai puslapiai */
.breadcrumbs { padding: 20px 0 0; font-size: .92rem; color: var(--muted); }
.breadcrumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: 6px; margin: 0; padding: 0; }
.breadcrumbs li + li::before { content: "/"; margin-right: 6px; color: #9a94a6; }
.page-head { padding: 16px 0 24px; border-bottom: 1px solid var(--line); margin-bottom: 32px; }
.page-head h1 { margin: 0; }
.page-layout { display: grid; grid-template-columns: 280px 1fr; gap: 48px; padding-bottom: 64px; }
.side-nav { position: sticky; top: 16px; align-self: start; background: var(--bg-soft); border-radius: var(--radius); padding: 18px; }
.side-nav h2 { font-size: 1rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 10px; }
.side-nav ul { list-style: none; margin: 0; padding: 0; }
.side-nav a { display: block; padding: 8px 12px; border-radius: 8px; text-decoration: none; color: var(--text); line-height: 1.35; }
.side-nav a:hover { background: var(--lilac); color: var(--purple); }
.side-nav a[aria-current="page"] { background: var(--purple); color: #fff; font-weight: 600; }

.prose { max-width: 75ch; }
.prose h2 { font-size: 1.4rem; margin-top: 1.6em; }
.prose p, .prose ul { margin: 0 0 1em; }
.prose dl { display: grid; grid-template-columns: max-content 1fr; gap: 6px 20px; margin: 0 0 1.5em; }
.prose dt { font-weight: 700; }
.prose dd { margin: 0; }
.prose figure { margin: 0 0 1.5em; }
.lead-person { display: flex; gap: 16px; align-items: center; background: var(--lilac); border-radius: var(--radius); padding: 20px; margin-bottom: 24px; }
.lead-person p { margin: 0; }
.lead-person strong { font-size: 1.3rem; color: var(--purple); display: block; }

.docs { list-style: none; margin: 0 0 1.5em; padding: 0; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.docs li + li { border-top: 1px solid var(--line); }
.docs a { display: flex; align-items: center; gap: 14px; padding: 14px 18px; text-decoration: none; color: var(--text); }
.docs a:hover { background: var(--bg-soft); color: var(--purple); }
.docs .file-ico { width: 40px; height: 48px; flex: none; border-radius: 6px; background: #b3261e; color: #fff; display: grid; place-items: center; font-size: .7rem; font-weight: 700; }
.docs .file-info { color: var(--muted); font-size: .88rem; margin-left: auto; white-space: nowrap; }

.page-tools { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); padding-top: 16px; margin-top: 32px; color: var(--muted); font-size: .92rem; }

.article-hero { border-radius: var(--radius); overflow: hidden; margin-bottom: 28px; }

/* ---------- Poraštė ---------- */
.site-footer { background: var(--bg-soft); border-top: 1px solid var(--line); margin-top: 32px; }
.footer-grid { display: grid; grid-template-columns: 1.1fr 1fr 1fr 1.1fr; gap: 28px; padding: 48px 0; align-items: start; }
.footer-col h2 { font-size: .95rem; text-transform: uppercase; letter-spacing: .05em; margin: 0 0 14px; }
.footer-col h2 ~ h2 { margin-top: 28px; }
.footer-col > ul:not(.footer-units) { list-style: none; margin: 0; padding: 0; }
.footer-col ul { list-style: none; margin: 0; padding: 0; }
.footer-col li a { display: block; padding: 5px 0; color: var(--text); text-decoration: none; font-size: .95rem; line-height: 1.35; }
.footer-col li a:hover { color: var(--purple); text-decoration: underline; }
.footer-box { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 6px 18px; }
.footer-box li + li { border-top: 1px solid var(--line); }
.footer-box li a { padding: 10px 0; }
.footer-info { display: grid; grid-template-columns: 1.1fr 1fr 1fr; gap: 20px; padding: 0 0 40px; }
.info-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 24px 26px; display: flex; flex-direction: column; gap: 12px; font-size: .97rem; }
.info-card h2 { font-size: 1.15rem; margin: 0; }
.info-card p { margin: 0; }
.info-card__org { font-weight: 600; line-height: 1.35; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.info-card__note { color: var(--muted); line-height: 1.4; }
.info-card__small { color: var(--muted); font-size: .88rem; margin-top: auto !important; }
.info-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.info-list li { display: flex; gap: 12px; align-items: flex-start; line-height: 1.4; }
.info-list svg { width: 20px; height: 20px; flex: none; color: var(--purple); margin-top: 1px; }
.info-list small { display: block; color: var(--muted); font-size: .85rem; margin-top: 2px; }
.hours { width: 100%; border-collapse: collapse; }
.hours th, .hours td { padding: 9px 0; border-bottom: 1px solid var(--line); text-align: left; font-weight: 400; }
.hours td { text-align: right; font-weight: 600; white-space: nowrap; font-variant-numeric: tabular-nums; padding-left: 12px; }
.hours tr:last-child th, .hours tr:last-child td { border-bottom: 0; color: var(--muted); }
.info-card--accent { background: var(--purple); border-color: var(--purple); color: #fff; }
.info-card--accent h2 { color: #fff; }
.info-card--accent .info-card__small { color: #e4dcf3; }
.big-phone { display: flex; align-items: center; justify-content: center; gap: 10px; background: #fff; color: var(--purple) !important; text-decoration: none; font-size: 1.45rem; font-weight: 700; border-radius: 12px; padding: 14px 18px; margin-top: 4px; font-variant-numeric: tabular-nums; }
.big-phone svg { width: 24px; height: 24px; }
.big-phone:hover { background: var(--lilac); }
html.contrast .info-card { background: #000 !important; color: #fff !important; border-color: #fff !important; }
html.contrast .big-phone { background: #000 !important; color: #ff0 !important; border: 2px solid #ff0; }
.footer-units { display: grid; gap: 8px; }
.footer-units .unit-btn, .footer-col .footer-units a.unit-btn { display: flex; width: 100%; gap: 10px; padding: 7px 10px; box-shadow: none; border: 1px solid var(--line); color: var(--text); text-decoration: none; border-radius: 10px; }
.footer-units .unit-btn[aria-expanded="true"] { color: #fff; }
.footer-units .unit-btn__icon { width: 30px; height: 30px; }
.footer-units .unit-btn__icon img { width: 20px; height: 20px; }
.footer-units .unit-btn__text strong { font-size: .88rem; font-weight: 600; line-height: 1.25; }
.footer-units .unit-btn__chev { width: 18px; height: 18px; }
.footer-grid { position: relative; }
.fmega { left: 0; right: 0; top: 0; border-radius: var(--radius); border-top-width: 4px; padding: 24px 28px 28px; z-index: 5; max-height: none; }
.fu-sub .fu-label { display: block; font-weight: 600; color: var(--muted); font-size: .9rem; padding: 8px 0 2px; }
.footer-bottom { background: var(--purple); color: #fff; font-size: .9rem; }
.footer-bottom .container { display: flex; justify-content: space-between; gap: 16px; padding-top: 14px; padding-bottom: 14px; flex-wrap: wrap; }
.footer-bottom a { color: #fff; }

/* ---------- Didelis kontrastas ---------- */
html.contrast body, html.contrast .site-header, html.contrast .units, html.contrast .mega, html.contrast .news-card,
html.contrast .site-footer, html.contrast .footer-box, html.contrast .mega-card, html.contrast .side-nav, html.contrast .unit-btn, html.contrast .lead-person,
html.contrast .search-panel, html.contrast .docs a:hover, html.contrast .mega-link { background: #000 !important; color: #fff !important; border-color: #fff !important; box-shadow: none !important; }
html.contrast a, html.contrast h1, html.contrast h2, html.contrast h3, html.contrast .meta, html.contrast .brand__name strong,
html.contrast .brand__name small, html.contrast .docs a, html.contrast .footer-col li a, html.contrast .mega-card li a, html.contrast .main-nav a, html.contrast .side-nav a { color: #ff0 !important; }
html.contrast .topbar, html.contrast .footer-bottom { background: #000; border-bottom: 2px solid #fff; }
html.contrast .tag { background: #ff0; color: #000; }
html.contrast .btn { background: #ff0; color: #000; }
html.contrast img { filter: grayscale(1) contrast(1.2); }

/* ---------- Mobilus ---------- */
@media (max-width: 1080px) {
  .topbar__links span { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .main-nav { display: none; }
  .menu-toggle { display: inline-flex; align-items: center; gap: 8px; background: var(--purple); color: #fff; border: 0; border-radius: 10px; padding: 10px 14px; font: inherit; font-weight: 600; cursor: pointer; }
  .main-nav.is-open { display: block; position: absolute; left: 0; right: 0; top: 100%; background: #fff; border-top: 1px solid var(--line); box-shadow: var(--shadow); padding: 8px 16px 16px; }
  .main-nav.is-open ul { flex-direction: column; }
  .units__list { grid-template-columns: 1fr; gap: 10px; }
  .mega { position: static; box-shadow: none; border-top: 0; padding: 0 0 20px; background: transparent; }
  .mega__grid--wide { grid-template-columns: 1fr; }
  .fmega { position: static; padding: 10px 0 4px; border: 0; }
  .fmega .mega__head { display: none; }
  .mega-card--cols ul { columns: 1; }
  .banners { grid-template-columns: 1fr 1fr; }
  .banner, .banner--wide { grid-column: span 1; }
  .news-grid { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-info { grid-template-columns: 1fr 1fr; }
  .info-card--accent { grid-column: 1 / -1; }
  .page-layout { grid-template-columns: 1fr; gap: 24px; }
  .side-nav { position: static; order: 2; }
}
@media (max-width: 640px) {
  .container { padding: 0 16px; }
  .site-header .container { min-height: 84px; gap: 12px; }
  .brand img { width: 64px; height: 64px; }
  .brand__name strong { font-size: 1rem; }
  .brand__badge, .brand__name small { display: none; }
  .banners, .news-grid, .footer-grid, .footer-info { grid-template-columns: 1fr; }
  .search-form__btn { padding: 10px 14px; }
  .hotline span { display: none; }
  .prose dl { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  .topbar .container { flex-wrap: nowrap; gap: 4px; min-height: 52px; }
  .topbar__links a { padding: 8px 6px; }
  .topbar__tools { gap: 4px; flex-wrap: nowrap; }
  .tool-btn { min-width: 32px; padding: 0 6px; }
  #contrastBtn span { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .mega__head { display: none; }
  .mega { padding: 10px 0 4px; }
  .mega .container { padding: 0; }
}

/* ---------- Lipni antraštė ---------- */
.sticky-head { position: sticky; top: 0; z-index: 60; background: #fff; transition: box-shadow .2s; }
.sticky-head.is-compact { box-shadow: 0 6px 20px rgba(44,26,82,.14); }
.site-header .container, .brand img, .units__list, .unit-btn, .unit-btn__icon { transition: min-height .2s, width .2s, height .2s, padding .2s; }
.is-compact .site-header .container { min-height: 64px; }
.is-compact .brand img { width: 52px; height: 52px; }

.is-compact .brand__name small, 
.is-compact .brand__name strong { font-size: 1rem; }
.is-compact .units__list { padding: 8px 0; gap: 10px; }
.is-compact .unit-btn { padding: 6px 12px; box-shadow: none; border-color: var(--lilac-200); }
.is-compact .unit-btn__icon { width: 32px; height: 32px; }
.is-compact .unit-btn__icon img { width: 22px; height: 22px; }
.is-compact .unit-btn__text small { display: none; }
.is-compact .unit-btn__text strong { font-size: .98rem; }
.is-compact .unit-btn__chev { width: 22px; height: 22px; }
.mega { max-height: calc(100vh - 180px); overflow-y: auto; }
html.contrast .sticky-head { background: #000; }

@media (max-width: 1080px) {
  .sticky-head { max-height: 100vh; overflow-y: auto; }
  .is-compact .units__list { grid-template-columns: repeat(3, 1fr); gap: 6px; }
  .is-compact .units__list > li { min-width: 0; }
  .is-compact .unit-btn { padding: 6px 8px; gap: 6px; justify-content: center; }
  .is-compact .unit-btn__icon { display: none; }
  .is-compact .unit-btn__text .long { display: none; }
  .is-compact .unit-btn__text strong { font-size: .95rem; text-transform: capitalize; }
  .is-compact .unit-btn__chev { width: 18px; height: 18px; margin-left: 0; }
  .is-compact .units__list > li > .mega { grid-column: 1 / -1; }
  .mega { max-height: none; overflow: visible; }
}
@media (max-width: 1080px) {
  /* atidarytas padalinys kompaktiniame režime rodomas per visą plotį po kortelėmis */
  .is-compact .units__list { position: relative; }
}
@media (max-width: 640px) {
  .is-compact .site-header .container { min-height: 58px; }
  .is-compact .brand img { width: 38px; height: 38px; }
  .is-compact .brand__name strong { font-size: .9rem; }
  .is-compact .menu-toggle { padding: 8px 10px; }
  .is-compact .header-search { width: 38px; height: 38px; }
}
.footer-col .fmega a.mega-link { display: flex; padding: 16px 18px; font-size: 1rem; }
.footer-col .fmega .mega-card li a { display: flex; padding: 6px 0; }
.footer-badge { display: inline-block; margin-top: 28px; border-radius: 999px; }
.footer-badge img { width: 180px; height: auto; }

/* Kompaktiškesnis padalinių skydelis */
.mega { padding: 20px 0 24px; }
.mega__head { margin-bottom: 14px; }
.mega__head h2 { font-size: 1.15rem; }
.mega__close { font-size: .9rem; padding: 4px 10px; }
.mega__grid { gap: 12px; }
.mega__grid--wide { grid-template-columns: minmax(220px, 1fr) 3fr; align-items: start; }
.mega-stack { display: grid; gap: 12px; }
.mega-card { padding: 14px 16px; }
.mega-card h3 { font-size: .95rem; margin-bottom: 8px; }
.mega-card--plain h3 { margin: 0; color: var(--text); font-weight: 600; }
.mega-card--cols ul { columns: 3; column-gap: 20px; }
.mega-card li a { font-size: .9rem; padding: 4px 0; }
.mega-card .group-label { font-size: .82rem; padding: 6px 0 0; }
.mega-link { padding: 14px 16px; font-size: .95rem; }
.fmega { padding: 18px 22px 20px; }
@media (max-width: 1080px) {
  .mega__grid--wide { grid-template-columns: 1fr; }
  .mega-card--cols ul { columns: 1; }
}

/* Kompaktiškesnė antraštė ir padalinių juosta */
.site-header .container { min-height: 84px; gap: 24px; }
.brand { flex: none; gap: 16px; }
.brand img { width: 68px; height: 68px; }
.brand__badge { width: auto !important; height: 30px !important; flex: none; }
.main-nav ul { gap: 0; }
.main-nav a { font-size: .95rem; padding: 10px 12px; }
.main-nav a::after { left: 12px; right: 12px; bottom: 4px; height: 2px; }
.header-search { width: 40px; height: 40px; }
.units__list { padding: 12px 0; gap: 12px; }
.unit-btn { padding: 8px 14px; gap: 12px; border-width: 1px; box-shadow: 0 1px 2px rgba(44,26,82,.06); }
.unit-btn__icon { width: 38px; height: 38px; }
.unit-btn__icon img { width: 24px; height: 24px; }
.unit-btn__text strong { font-size: .95rem; font-weight: 600; }
.unit-btn__chev { width: 20px; height: 20px; }
.is-compact .site-header .container { min-height: 60px; }
.is-compact .brand img { width: 44px; height: 44px; }
.is-compact .units__list { padding: 6px 0; }
@media (max-width: 640px) { .brand img { width: 56px; height: 56px; } }
.topbar { font-size: .85rem; }
.topbar .container { min-height: 42px; }
.topbar__links a { padding: 6px 8px; gap: 6px; }
.tool-btn { height: 30px; min-width: 32px; padding: 0 8px; }
@media (max-width: 1280px) and (min-width: 1081px) {
  #contrastBtn span { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .topbar .container { flex-wrap: nowrap; }
}

/* ---------- Paieškos langas ---------- */
.search-overlay { position: fixed; inset: 0; z-index: 200; background: rgba(28, 16, 52, .55); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); display: flex; justify-content: center; align-items: flex-start; padding: 12vh 16px 16px; opacity: 0; transition: opacity .2s ease; }
.search-overlay.is-open { opacity: 1; }
.search-overlay[hidden] { display: none; }
.search-dialog { width: 100%; max-width: 720px; background: #fff; border-radius: 20px; padding: 26px 28px 20px; box-shadow: 0 30px 80px rgba(20, 10, 40, .35); transform: translateY(-16px) scale(.98); transition: transform .22s ease; }
.search-overlay.is-open .search-dialog { transform: none; }
.search-dialog__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.search-dialog__head h2 { margin: 0; font-size: 1.2rem; }
.search-close { width: 38px; height: 38px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--purple); font-size: 1rem; cursor: pointer; }
.search-close:hover { background: var(--lilac); }
.search-dialog .search-form { max-width: none; margin: 0; padding: 6px 6px 6px 54px; border-radius: 14px; background: #fff; border: 2px solid var(--purple); }
.search-dialog .search-form > svg { left: 20px; width: 22px; height: 22px; }
.search-dialog .search-form:focus-within { box-shadow: 0 0 0 4px rgba(91, 58, 158, .2); }
.search-dialog .search-form input { font-size: 1.15rem; padding: 12px 8px; }
.search-dialog .search-form__btn { border-radius: 10px; padding: 12px 24px; }
.search-hint { margin: 12px 2px 0; color: var(--muted); font-size: .85rem; }
.search-hint kbd { font: inherit; font-weight: 600; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; padding: 1px 6px; background: var(--bg-soft); }
html.contrast .search-dialog { background: #000; color: #fff; border: 2px solid #fff; }
html.contrast .search-dialog .search-form { background: #000; border-color: #ff0; }
html.contrast .search-dialog .search-form input { color: #fff; }
@media (max-width: 640px) {
  .search-overlay { padding-top: 16px; }
  .search-dialog { padding: 18px 16px 14px; border-radius: 16px; }
  .search-dialog .search-form { padding-left: 46px; }
  .search-dialog .search-form > svg { left: 16px; }
  .search-dialog .search-form__btn { padding: 10px 14px; }
}
.tool-btn { font-weight: 400; }
.topbar .ext { font-weight: 600; }
.news-card__img { aspect-ratio: 1 / 1; display: grid; place-items: center; }
.news-card__img img { width: 100%; height: 100%; object-fit: contain; }

/* Logotipai */
.brand { gap: 18px; }
.brand img:first-child { width: 84px; height: 84px; }
.brand__badge { display: block !important; height: 40px !important; width: auto !important; }
.site-header .container { min-height: 100px; }
.is-compact .site-header .container { min-height: 64px; }
.is-compact .brand img:first-child { width: 52px; height: 52px; }
.is-compact .brand__badge { height: 28px !important; }
@media (max-width: 1280px) and (min-width: 1081px) {
  .site-header .container { gap: 12px; }
  .main-nav a { padding: 10px 8px; font-size: .9rem; }
  .main-nav a::after { left: 8px; right: 8px; }
}
@media (max-width: 640px) {
  .brand { gap: 10px; }
  .brand img:first-child { width: 60px; height: 60px; }
  .brand__badge { height: 28px !important; }
  .is-compact .brand img:first-child { width: 42px; height: 42px; }
  .is-compact .brand__badge { height: 22px !important; }
}
/* Ne kvadratinės nuotraukos: tuščią vietą užpildo sulieta ta pati nuotrauka */
.news-card__img { position: relative; overflow: hidden; background: #2c1a52; }
.news-card__img::before { content: ""; position: absolute; inset: -20px; background: var(--img) center / cover no-repeat; filter: blur(18px) brightness(.85); transform: scale(1.1); }
.news-card__img img { position: relative; z-index: 1; }
.brand__badge { height: 58px !important; }
.is-compact .brand__badge { height: 36px !important; }
@media (max-width: 1280px) and (min-width: 1081px) { .brand__badge { height: 48px !important; } }
@media (max-width: 640px) {
  .brand__badge { height: 40px !important; }
  .is-compact .brand__badge { height: 30px !important; }
}
@media (max-width: 1200px) and (min-width: 1081px) {
  .brand { gap: 12px; }
  .brand img:first-child { width: 70px; height: 70px; }
  .brand__badge { height: 40px !important; }
  .main-nav a { padding: 10px 6px; font-size: .86rem; }
  .main-nav a::after { left: 6px; right: 6px; }
}
/* Susitraukusi antraštė: didesni logotipai */
.is-compact .site-header .container { min-height: 76px; }
.is-compact .brand img:first-child { width: 66px; height: 66px; }
.is-compact .brand__badge { height: 48px !important; }
@media (max-width: 1200px) and (min-width: 1081px) {
  .is-compact .brand img:first-child { width: 60px; height: 60px; }
  .is-compact .brand__badge { height: 40px !important; }
}
@media (max-width: 640px) {
  .is-compact .site-header .container { min-height: 62px; }
  .is-compact .brand img:first-child { width: 50px; height: 50px; }
  .is-compact .brand__badge { height: 34px !important; }
}

/* Telefone: paslinkus padalinių juosta paslepiama (padaliniai - „Meniu“ skydelyje) */
@media (max-width: 1080px) {
  .is-compact .units { display: none; }
}
.fb-veiklos h2 { margin-top: 28px; }
/* Telefone „Veiklos sritys“ - poraštės gale */
@media (max-width: 1080px) {
  .site-footer > .container { display: flex; flex-direction: column; }
  .footer-grid, .footer-col--first { display: contents; }
  .footer-grid > .footer-col:not(.footer-col--first), .fb-struktura { margin-bottom: 28px; }
  .footer-info { order: 5; }
  .fb-veiklos { order: 10; padding-bottom: 32px; }
  .fb-veiklos h2 { margin-top: 0; }
}

/* ---------- Mobilus meniu (išslystantis skydelis) ---------- */
.drawer { position: fixed; inset: 0; z-index: 210; background: rgba(28, 16, 52, .5); backdrop-filter: blur(3px); -webkit-backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s ease; }
.drawer[hidden] { display: none; }
.drawer.is-open { opacity: 1; }
.drawer__panel { position: absolute; top: 0; right: 0; bottom: 0; width: min(420px, 92vw); background: #fff; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(20, 10, 40, .25); transform: translateX(100%); transition: transform .28s cubic-bezier(.2, .8, .2, 1); }
.drawer.is-open .drawer__panel { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 14px 20px; border-bottom: 1px solid var(--line); background: var(--purple); color: #fff; }
.drawer__title { font-weight: 700; font-size: 1.1rem; }
.drawer__close { width: 40px; height: 40px; border-radius: 50%; border: 1px solid rgba(255,255,255,.4); background: transparent; color: #fff; font-size: 1rem; cursor: pointer; }
.drawer__body { overflow-y: auto; padding: 8px 16px 28px; flex: 1; }
.drawer-nav { list-style: none; margin: 0; padding: 0; }
.drawer-nav li + li { border-top: 1px solid var(--line); }
.drawer-nav a { display: flex; align-items: center; gap: 6px; padding: 15px 4px; color: var(--text); text-decoration: none; font-weight: 600; font-size: 1.05rem; }
.drawer-nav a[aria-current="page"] { color: var(--purple); box-shadow: inset 4px 0 0 var(--purple); padding-left: 14px; }
.drawer-nav a::after { display: none; }
.drawer__h { font-size: .8rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 22px 4px 10px; }
.drawer-units { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.drawer-units .unit-btn { box-shadow: none; border: 1px solid var(--line); padding: 10px 12px; }
.drawer-units .unit-btn__icon { width: 36px; height: 36px; }
.drawer-units .unit-btn__icon img { width: 22px; height: 22px; }
.drawer-units .unit-btn__text strong { font-size: .98rem; }
.drawer-units .unit-btn[aria-expanded="true"] { border-radius: 12px 12px 0 0; }
.dr-panel { border: 1px solid var(--line); border-top: 0; border-radius: 0 0 12px 12px; padding: 12px; background: var(--bg-soft); }
.dr-panel .mega__grid, .dr-panel .mega__grid--wide { grid-template-columns: 1fr; gap: 8px; }
.dr-panel .mega-card { padding: 10px 12px; background: #fff; }
.dr-panel .mega-card--cols ul { columns: 1; }
.dr-panel .mega-link { padding: 12px 14px; background: #fff; }
.drawer-links { list-style: none; margin: 24px 0 0; padding: 16px 0 0; border-top: 1px solid var(--line); display: grid; gap: 2px; }
.drawer-links a { display: flex; align-items: center; gap: 10px; padding: 10px 4px; color: var(--text); text-decoration: none; }
.drawer-links img { width: 26px; height: 26px; object-fit: contain; background: var(--purple); border-radius: 6px; padding: 3px; }
.drawer-links span:not(.ext):not([aria-hidden]):not(.sr-only) { position: static !important; width: auto !important; height: auto !important; clip: auto !important; overflow: visible !important; }
.main-nav.is-open { display: none !important; }
html.contrast .drawer__panel { background: #000; }
html.contrast .drawer-nav a, html.contrast .drawer-links a { color: #ff0; }
/* Planšetė: „Veiklos sritys“ prieš kontaktų korteles; telefone - pačiame gale */
@media (max-width: 1080px) and (min-width: 641px) {
  .fb-veiklos { order: 4; padding-bottom: 28px; }
  .footer-info { order: 5; }
}
/* Telefone ir planšetėje: „Veiklos sritys“ prieš kontaktų korteles */
@media (max-width: 1080px) {
  .fb-veiklos { order: 4; padding-bottom: 28px; }
  .footer-info { order: 5; }
}
