/* =========================================================================
   Сайт за общински проекти с европейско финансиране (шаблон: _shared/templates/website)
   WCAG 2.1 AA · без външни заявки · светла и тъмна тема
   ========================================================================= */

@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/onest-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Onest"; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url("fonts/onest-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
/* Ubuntu — само за текста до емблемата на ЕС: Приложение IX към Регламент 2021/1060, т. 1.3
   допуска Arial, Auto, Calibri, Garamond, Trebuchet, Tahoma, Verdana или Ubuntu. */
@font-face { font-family: "Ubuntu"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ubuntu-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Ubuntu"; font-style: normal; font-weight: 400; font-display: swap;
  src: url("fonts/ubuntu-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --ink: #0e1a26;  --ink-2: #4a5866;  --line: #e1e6ec;
  --eu-text: #003399;
  --bg: #ffffff;   --soft: #f3f6f9;   --soft-2: #e8eef4;
  --brand: #0b3d91; --brand-2: #1a5bc4; --brand-soft: #e7eefb;
  --green: #0a7a43; --green-soft: #e3f4ea;
  --on-accent: #ffffff;
  --amber-bg: #fff4d1; --amber-ink: #5c4400;
  --c-A: #00843d; --c-B: #52b848; --c-C: #bed630; --c-D: #fff200; --c-E: #fdb913; --c-F: #f37021; --c-G: #e3262b;
  --r: 18px; --r-s: 12px;
  --shadow: 0 1px 2px rgba(14,26,38,.06), 0 8px 24px rgba(14,26,38,.07);
  --shadow-h: 0 2px 4px rgba(14,26,38,.06), 0 18px 40px rgba(14,26,38,.13);
  --maxw: 1180px; --gut: clamp(1rem, 4vw, 2.25rem);
  --font: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eef2f6; --ink-2: #a9b5c2; --line: #2b3440;
    --eu-text: #ffffff;
    --bg: #0f141a; --soft: #151c24; --soft-2: #1d2630;
    --brand: #8db4ff; --brand-2: #a9c6ff; --brand-soft: #16243b;
    --green: #4fd08b; --green-soft: #133024;
    --on-accent: #0f141a;
    --amber-bg: #3a2f0f; --amber-ink: #f5dd97;
    --shadow: 0 1px 2px rgba(0,0,0,.4), 0 8px 24px rgba(0,0,0,.35);
    --shadow-h: 0 2px 4px rgba(0,0,0,.4), 0 18px 40px rgba(0,0,0,.5);
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { transition: none !important; animation: none !important; } }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 1.0625rem/1.65 var(--font); -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brand-2); text-underline-offset: .2em; text-decoration-thickness: .07em; }
a:hover { color: var(--brand); }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 3px; border-radius: 6px; }
h1, h2, h3 { line-height: 1.12; letter-spacing: -.02em; margin: 0 0 .5em; text-wrap: balance; font-weight: 750; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.6rem); font-weight: 800; letter-spacing: -.03em; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.15rem; letter-spacing: -.01em; }
p { margin: 0 0 1rem; text-wrap: pretty; }
.wrap { max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gut); }
.narrow { max-width: 820px; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--brand); color: #fff; padding: .8rem 1.2rem; font-weight: 700; border-radius: 0 0 10px 0; }
.skip:focus { left: 0; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--brand-2); margin: 0 0 .7rem; }
.lead { font-size: clamp(1.08rem, 1.8vw, 1.25rem); color: var(--ink-2); max-width: 62ch; }
.fineprint { font-size: .85rem; color: var(--ink-2); max-width: 90ch; margin-top: 1.4rem; }
.tbd { color: var(--ink-2); font-style: italic; }
.note { background: var(--soft); border-left: 4px solid var(--brand-2); border-radius: var(--r-s); padding: 1rem 1.2rem; }

/* ---------- чернова / ЕС / заглавна част ---------- */
.draft { margin: 0; background: var(--amber-bg); color: var(--amber-ink); text-align: center; font-size: .86rem; font-weight: 600; padding: .5rem var(--gut); }
.eubar { background: var(--bg); border-bottom: 1px solid var(--line); }
.eubar__in { display: flex; align-items: center; gap: .9rem; padding-block: .55rem; }
/* Текстът до емблемата на ЕС — по Приложение IX: шрифт от списъка, без курсив и ефекти,
   цвят рефлексно синьо / бяло; на тъмен фон — бяла рамка 1/25 от височината (т. „цветен фон“). */
.eubar p, .foot__eu p { font-family: "Ubuntu", Arial, Verdana, Tahoma, sans-serif; color: var(--eu-text); }
.eubar p { margin: 0; font-size: .8rem; line-height: 1.3; }
.eubar strong { display: block; font-size: .95rem; font-weight: 400; }
.foot__eu strong { font-weight: 400; }
.eu-emblem { flex: none; display: block; }
@media (prefers-color-scheme: dark) { .eu-emblem { outline: 2px solid #fff; } }

.top { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 88%, transparent); backdrop-filter: saturate(170%) blur(12px); border-bottom: 1px solid var(--line); }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 1rem; min-height: 70px; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
/* Гербът е до 40 px висок: емблемата на ЕС в горната лента е 40 px и трябва да е поне толкова голяма (Единен наръчник, т. 2). */
.brand__logo { display: block; width: auto; height: 40px; flex: none; }
.brand__txt { display: flex; flex-direction: column; line-height: 1.15; }
.brand__txt b { font-size: 1.02rem; }
.brand__txt small { font-size: .78rem; color: var(--ink-2); }
.nav { display: flex; gap: .15rem; }
.nav a { padding: .55rem .85rem; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 550; font-size: .96rem; }
.nav a:hover { background: var(--soft-2); }
.nav a[aria-current="page"] { background: var(--brand-soft); color: var(--brand); }
.navbtn { display: none; align-items: center; gap: .45rem; font: 600 .95rem var(--font); color: var(--ink); background: var(--soft); border: 1px solid var(--line); border-radius: 10px; padding: .55rem .8rem; cursor: pointer; }
@media (max-width: 900px) {
  .navbtn { display: inline-flex; }
  .nav { display: none; position: absolute; inset: 100% 0 auto; flex-direction: column; background: var(--bg); border-bottom: 1px solid var(--line); padding: .5rem var(--gut) 1rem; box-shadow: var(--shadow); }
  .nav[data-open="true"] { display: flex; }
  .nav a { padding: .8rem .9rem; }
  .brand__txt small { display: none; }
}

/* ---------- бутони ---------- */
.btn { display: inline-flex; align-items: center; gap: .5rem; background: var(--brand); color: var(--on-accent); text-decoration: none; font-weight: 650; padding: .85rem 1.35rem; border-radius: 999px; border: 2px solid var(--brand); transition: transform .15s, background .15s; }
.btn:hover { color: var(--on-accent); background: var(--brand-2); border-color: var(--brand-2); transform: translateY(-1px); }
.btn--ghost { background: transparent; color: var(--brand); }
.btn--ghost:hover { background: var(--brand-soft); color: var(--brand); }
.btn--light { background: #fff; color: #0b3d91; border-color: #fff; }
.btn--light:hover { background: #eaf1ff; color: #0b3d91; border-color: #eaf1ff; }
.arr { width: 1.1em; height: 1.1em; flex: none; }

/* ---------- начало ---------- */
.hero { padding-block: clamp(2.5rem, 6vw, 5rem) clamp(2.5rem, 5vw, 4.5rem); background: radial-gradient(1200px 500px at 90% -10%, var(--brand-soft), transparent 60%), radial-gradient(800px 400px at -10% 110%, var(--green-soft), transparent 60%); }
.hero__in { display: grid; gap: clamp(2rem, 4vw, 3.5rem); grid-template-columns: 1fr; align-items: center; }
@media (min-width: 1000px) { .hero__in { grid-template-columns: 5fr 6fr; } }
.hero h1 .hl { color: var(--green); }
.hero__cta { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.8rem; }
.mosaic { display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(.5rem, 1.2vw, .9rem); }
.mosaic__tile { position: relative; display: block; border-radius: var(--r-s); overflow: hidden; aspect-ratio: 4 / 3.3; box-shadow: var(--shadow); }
.mosaic__tile img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.mosaic__tile:hover img { transform: scale(1.06); }
.mosaic__tile span { position: absolute; left: .5rem; bottom: .5rem; background: rgba(14,26,38,.72); color: #fff; font-size: .74rem; font-weight: 650; padding: .2rem .55rem; border-radius: 999px; backdrop-filter: blur(4px); }

.band { background: linear-gradient(135deg, #0b3d91, #0d4fb3 60%, #0a7a43 140%); color: #fff; padding-block: clamp(2.5rem, 5vw, 3.75rem); }
.band .stats { --tile: rgba(255,255,255,.08); --tile-line: rgba(255,255,255,.14); }
.band .stat dt, .band .stat__note { color: #d6e2f7; }
.band .stat dd { color: #fff; }
.band .fineprint { color: #c6d5ef; }

/* ---------- статистики ---------- */
.stats { display: grid; gap: clamp(.6rem, 2vw, 1rem); grid-template-columns: repeat(auto-fit, minmax(min(100%, 150px), 1fr)); margin: 0; }
.stat { display: flex; flex-direction: column-reverse; justify-content: flex-end; min-width: 0; container-type: inline-size; background: var(--tile, var(--bg)); border: 1px solid var(--tile-line, var(--line)); border-radius: var(--r); padding: 1.2rem 1.25rem; }
.stat dt { font-size: .92rem; color: var(--ink-2); line-height: 1.35; }
/* Размерът на числото следва ширината на плочката (cqi), не на екрана — така и шестцифрените
   стойности остават в рамката при всяка ширина. Първият ред е резерва за стари браузъри. */
.stat dd { margin: 0 0 .25rem; font-size: clamp(1.4rem, 3vw, 2.2rem); font-size: clamp(1.35rem, 21cqi, 2.5rem); font-weight: 800; letter-spacing: -.02em; line-height: 1.05; font-variant-numeric: tabular-nums; white-space: nowrap; }
.stat dd .u { font-size: .48em; font-weight: 700; letter-spacing: 0; }
.stat__note { order: -1; margin: .35rem 0 0; font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-2); }

/* ---------- секции ---------- */
.sec { padding-block: clamp(3rem, 7vw, 5.5rem); }
.sec--tight { padding-block: clamp(1.5rem, 3vw, 2.5rem); }
.sec--alt { background: var(--soft); }
.sec__head { margin-bottom: clamp(1.5rem, 3vw, 2.5rem); }
.sec__head--row { display: flex; align-items: end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.sec__head--row h2 { margin: 0; }
.more { display: inline-flex; align-items: center; gap: .4rem; font-weight: 650; text-decoration: none; }
.phead { padding-block: clamp(2rem, 5vw, 3.5rem) clamp(1rem, 3vw, 2rem); }
.placehead { font-size: 1.5rem; }

.crumbs ol { list-style: none; display: flex; flex-wrap: wrap; gap: .3rem; padding: 0; margin: 0 0 1.4rem; font-size: .88rem; color: var(--ink-2); }
.crumbs li + li::before { content: "/"; margin-right: .3rem; opacity: .6; }
.crumbs a { color: var(--ink-2); }

/* ---------- мерки ---------- */
.mgrid { list-style: none; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.mgrid li { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 1.3rem; }
.mgrid h3 { font-size: 1.02rem; margin: .9rem 0 .25rem; }
.mgrid p { margin: 0; font-size: .9rem; color: var(--ink-2); }
.ico { width: 26px; height: 26px; color: var(--brand-2); }
.mgrid .ico, .measures .ico { box-sizing: content-box; padding: 10px; background: var(--brand-soft); border-radius: 12px; }
.measures { list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.measures--grid { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.measures li { display: flex; align-items: center; gap: .9rem; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r-s); padding: .75rem 1rem; font-weight: 550; }

/* ---------- карти на училищата ---------- */
.cards { display: grid; gap: clamp(1rem, 2vw, 1.5rem); grid-template-columns: repeat(auto-fill, minmax(min(100%, 320px), 1fr)); }
.scard { background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.scard:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); }
.scard__link { display: flex; flex-direction: column; height: 100%; color: inherit; text-decoration: none; }
.scard__media { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: var(--soft-2); }
.scard__media img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s ease; }
.scard:hover .scard__media img { transform: scale(1.05); }
.scard__place { position: absolute; top: .8rem; left: .8rem; background: rgba(255,255,255,.93); color: #0e1a26; font-size: .8rem; font-weight: 700; padding: .3rem .7rem; border-radius: 999px; }
.scard__body { display: flex; flex-direction: column; gap: .2rem; padding: 1.1rem 1.25rem 1.25rem; flex: 1; }
.scard__title { margin: 0; font-size: 1.15rem; }
.scard__meta { margin: 0; color: var(--ink-2); font-size: .9rem; }
.scard__foot { margin-top: auto; padding-top: .9rem; display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.scard__save { font-weight: 700; color: var(--green); font-size: .95rem; }

/* ---------- енергиен клас ---------- */
.cls { display: inline-grid; place-items: center; min-width: 1.9rem; height: 1.9rem; padding: 0 .4rem; border-radius: 8px; font-weight: 800; color: #fff; font-size: .95rem; }
.cls--A { background: var(--c-A); } .cls--B { background: var(--c-B); color: #10270a; } .cls--C { background: var(--c-C); color: #1c2a00; }
.cls--D { background: var(--c-D); color: #3a3500; } .cls--E { background: var(--c-E); color: #3a2600; }
.cls--F { background: var(--c-F); color: #2a1400; } .cls--G { background: var(--c-G); }
.shift { display: inline-flex; align-items: center; gap: .35rem; color: var(--ink-2); }

.energy { display: grid; gap: clamp(2rem, 4vw, 3.5rem); align-items: center; }
@media (min-width: 900px) { .energy { grid-template-columns: 1.1fr 1fr; } }
.energy .stats { margin-top: 1.5rem; }
.escale { margin: 0; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 1.4rem; box-shadow: var(--shadow); }
.escale__row { display: flex; align-items: center; gap: .7rem; min-height: 2.6rem; }
.escale__row + .escale__row { margin-top: .35rem; }
.escale__bar { position: relative; width: var(--w); height: 2.3rem; display: flex; align-items: center; padding-left: .9rem; font-weight: 800; color: #fff; clip-path: polygon(0 0, calc(100% - 14px) 0, 100% 50%, calc(100% - 14px) 100%, 0 100%); border-radius: 6px 0 0 6px; opacity: .38; }
.escale__bar.cls--B, .escale__bar.cls--C, .escale__bar.cls--D, .escale__bar.cls--E, .escale__bar.cls--F { color: #221a00; }
.escale__row.is-marked .escale__bar { opacity: 1; }
.escale__mark { display: inline-flex; align-items: baseline; gap: .35rem; font-size: .82rem; font-weight: 650; padding: .3rem .65rem; border-radius: 999px; white-space: nowrap; }
.escale__mark b { font-size: .98rem; }
.escale__mark--now { background: var(--soft-2); color: var(--ink); }
.escale__mark--after { background: var(--green); color: var(--on-accent); }
.escale figcaption { margin-top: 1rem; font-size: .82rem; color: var(--ink-2); }

/* ---------- дейности и етапи на изпълнение ---------- */
.split { display: grid; gap: clamp(1.5rem, 4vw, 4rem); align-items: start; }
@media (min-width: 960px) { .split { grid-template-columns: minmax(0, 1fr) minmax(0, 1.7fr); } .split__head { position: sticky; top: 96px; } }
.split__head p:not(.eyebrow) { color: var(--ink-2); }
.aprog { display: flex; gap: 6px; }
.aprog__seg { flex: 1; display: grid; place-items: center; height: 36px; border-radius: 9px; background: var(--bg); border: 1px solid var(--line); color: var(--ink-2); font-weight: 800; font-size: .92rem; }
.aprog__seg svg { width: 18px; height: 18px; }
.aprog__seg--done { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.aprog__seg--next { border: 2px solid var(--brand-2); color: var(--brand-2); }
.aprog__seg--now { background: var(--brand-soft); border: 2px solid var(--brand-2); color: var(--brand-2); }
.aprog__now { color: var(--brand-2) !important; }
.aprog__txt { margin: .6rem 0 1.75rem; font-size: .93rem; color: var(--ink-2); }
.aprog__txt strong { color: var(--ink); }
.actlist { list-style: none; padding: 0; margin: 0; }
.act { position: relative; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 1rem; padding-bottom: 1.5rem; }
.act:last-child { padding-bottom: 0; }
.act:not(:last-child)::before { content: ""; position: absolute; left: 20.5px; top: 46px; bottom: 2px; width: 3px; border-radius: 3px; background: var(--line); }
.act--done:not(:last-child)::before { background: var(--green); }
.act__num { position: relative; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; background: var(--bg); border: 3px solid var(--line); color: var(--ink-2); font-weight: 800; }
.act__num svg { width: 20px; height: 20px; }
.act--done .act__num { background: var(--green); border-color: var(--green); color: var(--on-accent); }
.act--next .act__num { border-color: var(--brand-2); color: var(--brand-2); }
.act--now .act__num { background: var(--brand-soft); border-color: var(--brand-2); color: var(--brand-2); box-shadow: 0 0 0 5px var(--brand-soft); }
.act__meta { display: flex; flex-wrap: wrap; gap: .2rem .8rem; margin: .45rem 0 .2rem; font-size: .76rem; font-weight: 700; letter-spacing: .07em; text-transform: uppercase; color: var(--ink-2); }
.act--done .act__status { color: var(--green); }
.act--next .act__status, .act--now .act__status { color: var(--brand-2); }
.act__title { font-size: 1.06rem; margin: 0 0 .25rem; }
.act__text { margin: 0; font-size: .93rem; color: var(--ink-2); }

/* ---------- карта ---------- */
.mapsec { display: grid; gap: 2rem; align-items: center; }
@media (min-width: 900px) { .mapsec { grid-template-columns: 1fr 1.5fr; } .mapsec--school { grid-template-columns: 1fr 1.3fr; } }
.mmap { width: 100%; height: auto; display: block; }
.mmap__land { fill: var(--brand-soft); stroke: var(--brand-2); stroke-width: 2.5; stroke-linejoin: round; }
.pin { cursor: pointer; }
.pin__halo { fill: var(--brand-2); opacity: .14; transition: opacity .2s, r .2s; }
.pin__dot { fill: var(--brand); stroke: var(--bg); stroke-width: 5; }
.mmap__north { font: 600 22px var(--font); fill: var(--ink-2); letter-spacing: .04em; }
.pin__label { font: 700 30px var(--font); fill: var(--ink); paint-order: stroke; stroke: var(--bg); stroke-width: 7px; stroke-linejoin: round; }
.pin:hover .pin__halo, .pin:focus-visible .pin__halo { opacity: .32; }
.mmap--compact .pin:not(.is-hot) { opacity: .35; }
.mmap--compact .pin.is-hot .pin__dot { fill: var(--green); }
.pin:focus-visible { outline: none; }
.pin:focus-visible .pin__dot { stroke: var(--brand-2); stroke-width: 6; }
.placelist { list-style: none; padding: 0; margin: 1.5rem 0 0; display: grid; gap: .9rem; }
.placelist li { display: flex; flex-direction: column; gap: .15rem; padding-bottom: .9rem; border-bottom: 1px solid var(--line); }
.placelist b { font-size: .8rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-2); }
.placelist a { font-weight: 600; }

/* ---------- проекти ---------- */
.pcards { display: grid; gap: 1.25rem; grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.pcard { display: flex; flex-direction: column; background: var(--bg); border: 1px solid var(--line); border-radius: var(--r); padding: 1.6rem; text-decoration: none; color: var(--ink); box-shadow: var(--shadow); transition: transform .2s, box-shadow .2s; }
.pcard:hover { transform: translateY(-3px); box-shadow: var(--shadow-h); color: var(--ink); }
.pcard h2, .pcard h3 { font-size: 1.35rem; }
.pcard ul { margin: 0 0 1rem; padding-left: 1.1rem; color: var(--ink-2); }
.pcard__kpi { font-weight: 650; color: var(--green); }
.pcard__foot small { font-size: .7em; font-weight: 600; color: var(--ink-2); }
.pcard__foot { margin: auto 0 0; padding-top: 1rem; border-top: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; font-weight: 750; font-size: 1.15rem; color: var(--brand); }

.cta { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; background: linear-gradient(135deg, #0b3d91, #10306b); color: #fff; border-radius: calc(var(--r) + 6px); padding: clamp(1.75rem, 4vw, 3rem); }
.cta h2 { color: #fff; } .cta .eyebrow { color: #a9c6ff; } .cta p { color: #dbe6fb; max-width: 60ch; margin-bottom: 0; }

/* ---------- страница на училище ---------- */
.shero { margin: 0; }
.shero img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; border-radius: calc(var(--r) + 4px); box-shadow: var(--shadow); }
.shero figcaption { font-size: .85rem; color: var(--ink-2); margin-top: .6rem; }
.facts { display: grid; gap: 1px; grid-template-columns: 1fr; background: var(--line); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; margin: 0; }
.facts > div { background: var(--bg); padding: 1.1rem 1.25rem; }
@media (min-width: 560px) { .facts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 900px) { .facts { grid-template-columns: repeat(3, 1fr); } }
.facts dt { font-size: .85rem; color: var(--ink-2); }
.facts dd { margin: .15rem 0 0; font-size: 1.15rem; font-weight: 700; }
.facts sup, .ftable sup { color: var(--ink-2); }
.pager { display: grid; gap: 1rem; grid-template-columns: 1fr 1fr; padding-block: 2rem 1rem; }
.pager a { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-s); padding: 1rem 1.2rem; text-decoration: none; font-weight: 650; color: var(--ink); }
.pager a:hover { border-color: var(--brand-2); }
.pager small { color: var(--ink-2); font-weight: 500; font-size: .8rem; }
.pager__next { text-align: right; }

/* ---------- галерия на училище ---------- */
.gal__note { color: var(--ink-2); margin: 0; }
.gal { list-style: none; padding: 0; margin: 0; display: grid; gap: clamp(1rem, 2.4vw, 1.5rem) clamp(.75rem, 2vw, 1.25rem); grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 760px) { .gal { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.gal__a { display: block; color: var(--ink-2); text-decoration: none; border-radius: var(--r-s); }
.gal__a picture { display: block; border-radius: var(--r-s); overflow: hidden; box-shadow: var(--shadow); background: var(--soft-2); }
.gal__a img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; transition: transform .35s ease; }
.gal__a:hover img { transform: scale(1.04); }
.gal__cap { display: block; margin-top: .55rem; font-size: .9rem; line-height: 1.4; }
.gal__a:hover .gal__cap { color: var(--ink); }
/* Преглед на цял екран — винаги тъмен, независимо от темата */
.lb { position: fixed; inset: 0; width: 100%; height: 100%; max-width: none; max-height: none; margin: 0; border: 0;
  padding: 4.25rem clamp(.75rem, 7vw, 6rem); background: rgba(8, 12, 16, .96); color: #fff; overscroll-behavior: contain; }
.lb[open] { display: grid; place-items: center; }
.lb::backdrop { background: transparent; }
html:has(.lb[open]) { overflow: hidden; }
.lb__fig { margin: 0; display: flex; flex-direction: column; align-items: center; gap: .8rem; max-width: 100%; }
.lb__img { width: auto; height: auto; max-width: 100%; max-height: calc(100vh - 11rem); max-height: calc(100dvh - 11rem); border-radius: 8px; }
.lb__cap { display: flex; justify-content: space-between; gap: 1.5rem; width: 100%; font-size: .98rem; line-height: 1.4; color: #eef2f6; }
.lb__n { color: #a9b5c2; font-variant-numeric: tabular-nums; white-space: nowrap; }
.lb__btn { position: absolute; display: grid; place-items: center; width: 48px; height: 48px; padding: 0; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .28); background: rgba(255, 255, 255, .1); color: #fff; cursor: pointer; }
.lb__btn:hover { background: rgba(255, 255, 255, .22); }
.lb__btn:focus-visible { outline: 3px solid #a9c6ff; outline-offset: 3px; border-radius: 50%; }
.lb__close { top: .9rem; right: .9rem; }
.lb__prev, .lb__next { top: 50%; margin-top: -24px; }
.lb__prev { left: clamp(.5rem, 2vw, 1.5rem); }
.lb__next { right: clamp(.5rem, 2vw, 1.5rem); }
@media (max-width: 700px) {
  .lb { padding-inline: .5rem; }
  .lb__prev, .lb__next { top: auto; bottom: .9rem; margin-top: 0; }
  .lb__prev { left: calc(50% - 60px); } .lb__next { right: calc(50% - 60px); }
}

/* ---------- таблици, списъци ---------- */
.ftable { margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.ftable > div { display: grid; grid-template-columns: minmax(160px, 30%) 1fr; border-bottom: 1px solid var(--line); }
.ftable > div:last-child { border-bottom: 0; }
.ftable dt { background: var(--soft); padding: .9rem 1.1rem; font-weight: 650; font-size: .92rem; }
.ftable dd { margin: 0; padding: .9rem 1.1rem; }
.ftable dd small { display: block; margin-top: .2rem; color: var(--ink-2); font-size: .86rem; }
@media (max-width: 620px) { .ftable > div { grid-template-columns: 1fr; } .ftable dt { padding-bottom: .4rem; } .ftable dd { padding-top: .4rem; } }
.olist { counter-reset: o; list-style: none; padding: 0; margin: 0; display: grid; gap: .8rem; }
.olist li { counter-increment: o; display: grid; grid-template-columns: 2.2rem 1fr; gap: .8rem; align-items: start; }
.olist li::before { content: counter(o); display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--brand); color: var(--on-accent); font-weight: 750; font-size: .9rem; }
.docs { list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.docs a { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: var(--r-s); padding: .9rem 1.1rem; text-decoration: none; color: var(--ink); }
.prose h2 { font-size: 1.3rem; margin-top: 2rem; }
.video { width: 100%; aspect-ratio: 16 / 9; border: 0; border-radius: var(--r); margin-top: 1.5rem; }

/* ---------- подвал ---------- */
.foot { background: var(--soft); border-top: 1px solid var(--line); padding-block: 2.75rem 2rem; margin-top: 2rem; font-size: .92rem; }
.foot__eu { display: flex; align-items: center; gap: 1rem; }
.foot__eu p { margin: 0; line-height: 1.4; }
.foot__disc { margin: 1.2rem 0 2rem; color: var(--ink-2); font-size: .85rem; max-width: 95ch; }
.foot__grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); border-top: 1px solid var(--line); padding-top: 2rem; }
.foot h2 { font-size: .8rem; text-transform: uppercase; letter-spacing: .09em; color: var(--ink-2); margin-bottom: .7rem; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: .35rem; }
.foot a { color: var(--ink); }
.foot__upd { margin-top: 1rem; color: var(--ink-2); font-size: .85rem; }

@media print {
  .top, .eubar, .draft, .navbtn, .pager, .mosaic, .skip, .lb { display: none !important; }
  .band, .cta { background: none !important; color: #000 !important; }
  .band *, .cta * { color: #000 !important; }
  .sec { padding-block: 1rem; }
  .scard, .pcard, .escale { box-shadow: none; break-inside: avoid; }
}
