/* ==========================================================================
   ПТГ Бургас — основен стил
   Подредба: променливи · основа · достъпност · подредба · части · адаптивност
   ========================================================================== */

/* --------------------------------------------------- 1. Променливи */
:root {
  /* Цветове — тъмносиньото на гимназията */
  --navy-900: #102B4E;
  --navy-800: #173B66;
  --navy-700: #224F80;
  --navy-600: #2A5796;
  --blue-600: #1557A6;
  --blue-700: #104783;
  --blue-50:  #EDF3FE;

  --ink:      #0F1B2D;
  --body:     #35465D;
  --muted:    #5B6B85;
  --faint:    #60718C;   /* 4.96:1 на бяло — минава WCAG AA за дребен текст */

  --line:       #E4E6EA;
  --line-soft:  #EFF0F2;
  --line-strong:#CDD2D9;
  --bg:         #F7F7F7;
  --surface:    #FFFFFF;

  --amber:      #F4B832;
  --amber-soft: #FDF1D3;
  --amber-text: #8A5A00;   /* 5.3:1 на #F7F7F7 */

  --amber-bg: #FFF4E2;
  --amber-fg: #7A4700;

  --ok-bg:    #E8F6EC;
  --ok-fg:    #17603A;
  --err-bg:   #FDECEC;
  --err-fg:   #9B1C1C;

  /* Шрифтове */
  --font-head: Arial, "Segoe UI", system-ui, sans-serif;
  --font-body: Arial, "Segoe UI", system-ui, sans-serif;

  /* Размери */
  --sidebar-w: 320px;
  --shell-max: 1500px;
  --radius:    18px;
  --radius-sm: 10px;
  --gap:       24px;

  --shadow-sm: 0 2px 8px rgba(17, 24, 39, .04);
  --shadow-md: 0 18px 36px -20px rgba(16, 43, 78, .28);
  --shadow-lg: 0 20px 44px rgba(10, 31, 61, .16);

  --ease: cubic-bezier(.2, .7, .3, 1);

  /* Височина на лентата с логото на тесен екран. */
  --header-h: 66px;
}

/* --------------------------------------------------- 2. Основа */
*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: hidden; overflow-x: clip; }

body {
  margin: 0;
  overflow-x: clip;
  background: var(--bg);
  color: var(--body);
  font: 400 16px/1.65 var(--font-body);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  /* Една форма на кирилицата навсякъде: без този ред Manrope рисува заглавията
     с българските форми (д, т, к…), а Inter — основния текст със стандартните. */
  font-feature-settings: "locl" 0;
}

h1, h2, h3, h4, h5, h6 {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-head);
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.015em;
}

p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }

a { color: var(--blue-600); text-decoration: none; }
a:hover { color: var(--blue-700); text-decoration: underline; }

img { max-width: 100%; height: auto; }

ul, ol { margin: 0; padding: 0; list-style: none; }

button { font: inherit; color: inherit; }

mark { background: #FFF1B8; color: var(--ink); padding: 0 .15em; border-radius: 2px; }

/* Иконите наследяват цвета на текста. */
.i {
  width: 1em; height: 1em;
  flex: none;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

/* --------------------------------------------------- 3. Достъпност */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px; left: 12px;
  z-index: 200;
  padding: 12px 20px;
  background: var(--surface);
  color: var(--navy-900);
  font-family: var(--font-head);
  
  border-radius: var(--radius-sm);
  box-shadow: var(--shadow-lg);
  transition: top .18s var(--ease);
}
.skip-link:focus { top: 12px; text-decoration: none; }

:focus-visible {
  outline: 3px solid #2E7BFF;
  outline-offset: 2px;
  border-radius: 4px;
}
/* Върху тъмен фон фокусът е светъл, за да личи. */
.sidebar :focus-visible,
.footer :focus-visible { outline-color: #FFCF58; }

.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Връзка насред текст трябва да личи и без цвят (WCAG 1.4.1). */
.prose a, .form__note a, .alert a, .error-page__text a { text-decoration: underline; text-underline-offset: 2px; }

/* --------------------------------------------------- 4. Подредба */
.shell {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 28px var(--gap) 100px;
  display: flex;
  flex-wrap: wrap;
  gap: 55px;
  align-items: flex-start;
}

.main {
flex: 999 1 620px;
  min-width: 0;
  max-width: 100%;
  display: flex;
  flex-direction: column;
  gap: 28px;
}
/* Разделите на началната страница дишат повече от вътрешните страници. */
.main > .section { margin-top: 48px; }
.main:focus { outline: none; }

.body--bare { display: grid; place-items: center; min-height: 100vh; padding: 24px; }
.bare { width: 100%; max-width: 620px; }

/* --------------------------------------------------- 5. Горна лента */
.utility { background: #FFFFFF; color: var(--navy-900); font-size: 13px; }

.utility__inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 0 var(--gap);
  min-height: 48px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 22px;
}

.utility__group { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; }

.utility__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 0;
  color: var(--navy-900);
  font-weight: 600;
  transition: color .15s var(--ease);
}
.utility__link:hover { color: var(--blue-600); text-decoration: none; }
.utility__link .i { width: 14px; height: 14px; }
.utility__link--strong { color: var(--navy-900); font-weight: 600; }

/* --------------------------------------------------- 6. Страничен панел */
.sidebar {
  flex: 1 1 300px;
  max-width: var(--sidebar-w);
  min-width: 0;
  background: linear-gradient(180deg, #07315E 0%, #082A50 100%);
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 18px;
  overflow: hidden;
  color: #DCE6F5;
}

.sidebar__brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 28px 20px 24px;
  background: transparent;
}

.brand { display: flex; align-items: center; gap: 13px; flex: 1; min-width: 0; }
.brand:hover { text-decoration: none; }

.brand__mark {
  width: 54px; height: 54px;
  flex: none;
  display: grid;
  place-items: center;
  background: transparent;
  border: 2px solid rgba(255,255,255,.8);
  border-radius: 13px;
  color: #FFFFFF;
  font-family: var(--font-head);
  
  font-size: 18px;
  letter-spacing: -.03em;
}
/* Логото на училището (П, Т и Г), рисувано с текущия цвят. */
.brand__mark svg { display: block; width: 30px; height: auto; fill: currentColor; }

.brand__text { min-width: 0; }
.brand__name { display: block; color: #FFFFFF; font-family: var(--font-head); font-size: 14px; line-height: 1.2; }
.brand__city { display: block; color: #D5E3F5; font-size: 12px; }

.sidebar__toggle {
  display: none;
  width: 46px; height: 46px;
  flex: none;
  align-items: center;
  justify-content: center;
  background: var(--blue-600);
  border: 0;
  border-radius: var(--radius-sm);
  color: #FFFFFF;
  cursor: pointer;
  transition: background .15s var(--ease);
}
.sidebar__toggle:hover { background: var(--blue-700); }
.sidebar__toggle .i { width: 21px; height: 21px; stroke-width: 2.2; }

/* --- търсачка --- */
.search {     padding: 16px 14px;
    position: relative;
    border-top: 1px dashed #405f8b;
    border-bottom: 1px dashed #405f8b; }

.search__field {
  display: flex;
  align-items: center;
  gap: 9px;
  height: 44px;
  padding: 0 6px 0 12px;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  transition: box-shadow .15s var(--ease);
}
.search__field:focus-within { box-shadow: 0 0 0 3px rgba(46, 123, 255, .4); }

.search__icon { width: 17px; height: 17px; color: #D5E3F5; }

.search__field input {
  flex: 1;
  min-width: 0;
  background: none;
  border: 0;
  outline: none;
  color: #FFFFFF;
  font: inherit;
  font-size: 14.5px;
}
.search__field input::-webkit-search-cancel-button { cursor: pointer; }
.search__field input::placeholder { color: #D5E3F5; opacity: 1; }

.search__go {
  width: 34px; height: 34px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--blue-600);
  border: 0;
  border-radius: 50%;
  color: #FFFFFF;
  cursor: pointer;
  transition: background .15s var(--ease);
}
.search__go:hover { background: var(--blue-700); }
.search__go .i { width: 16px; height: 16px; }

/* --- падащи предложения --- */
.suggest {
  position: absolute;
  left: 14px; right: 14px;
  top: calc(100% - 2px);
  z-index: 30;
  background: #FFFFFF;
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  max-height: 60vh;
  overflow-y: auto;
}
.suggest[hidden] { display: none; }

.suggest__group { padding: 9px 14px 5px; font-size: 10.5px;  letter-spacing: .1em; text-transform: uppercase; color: var(--faint); }
.suggest__group + .suggest__item { border-top: 0; }

.suggest__item {
  display: block;
  padding: 10px 14px;
  color: var(--body);
  font-size: 14px;
  line-height: 1.4;
  border-top: 1px solid var(--line-soft);
}
.suggest__item:first-of-type { border-top: 0; }
.suggest__item:hover,
.suggest__item.is-active {
  background: var(--blue-50);
  color: var(--ink);
  text-decoration: none;
}
.suggest__item strong { color: var(--ink); font-weight: 600; }
.suggest__date { display: block; font-size: 12px; color: var(--muted); margin-top: 2px; }

.suggest__all {
  display: block;
  padding: 11px 14px;
  background: var(--bg);
  border-top: 1px solid var(--line);
  font-size: 13px;
  font-weight: 600;
  text-align: center;
}

/* --- навигация --- */
.nav { padding: 14px 10px 10px; }



.nav__link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  width: 100%;
  min-height: 46px;
  padding: 11px 14px;
  margin-top: 2px;
  background: none;
  border: 0;
  border-radius: 10px;
  color: #F1F6FD;
  font-family: var(--font-head);
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1.35;
  text-align: left;
  cursor: pointer;
  transition: background .15s var(--ease), color .15s var(--ease), padding-left .15s var(--ease);
}
.nav__link:hover { background: rgba(255,255,255,.12); color: #FFFFFF; text-decoration: none; padding-left: 16px; }
.nav__link.is-active { background: linear-gradient(100deg, #FFD05B 0%, #F4B832 100%); color: #102B4E;  box-shadow: 0 5px 14px rgba(4,20,40,.18); }
.nav__link.is-active:hover { background: linear-gradient(100deg, #FFD05B 0%, #F4B832 100%); padding-left: 14px; }

.nav__link--group.is-open { background: rgba(255,255,255,.12); color: #FFFFFF; }
.nav__link.is-active .nav__chevron { color: #102B4E; }
.nav__chevron { width: 15px; height: 15px; stroke-width: 2.4; color: #8FA8CC; transition: transform .2s var(--ease); }
.nav__link--group.is-open .nav__chevron { transform: rotate(90deg); }

.nav__sub {
  margin: 2px 0 6px 24px;
  padding-left: 12px;
  border-left: 2px solid #E6B73E;
}
.nav__sub[hidden] { display: none; }

.nav__sublink {
  display: block;
  padding: 8px 12px;
  border-radius: 7px;
  color: #D5E3F5;
  font-size: 13px;
  line-height: 1.4;
  transition: background .15s var(--ease), color .15s var(--ease), padding-left .15s var(--ease);
}
.nav__sublink:hover { background: rgba(255,255,255,.12); color: #FFFFFF; text-decoration: none; padding-left: 16px; }
.nav__sublink.is-active { background: #F4B832; color: #102B4E; font-weight: 600; }

/* --- контакти в панела --- */
.sidebar__contacts {
  margin: 4px 10px 14px;
  padding: 18px;
  background: rgba(255,255,255,.08);
  border: 1px solid rgba(255,255,255,.2);
  border-radius: 11px;
  font-size: 13px;
  line-height: 1.65;
  color: #B9CBE5;
}
.sidebar__contacts-title { color: #FFFFFF; font-size: 13px; margin-bottom: 9px; }
.sidebar__label { display: block; color: #D5E3F5; font-size: 12px; }
.sidebar__director { margin: 12px 0 0; padding-top: 12px; border-top: 1px solid #1E3F6B; }
.sidebar__director strong { color: #FFFFFF; }
.sidebar__phones { margin: 8px 0 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.sidebar__phones a { color: #FFD05B; }
.sidebar__email { display: none; }

/* Връзките от горната лента — показват се само в менюто на тесен екран. */
.sidebar__quick { display: none; }

.sidebar__toggle-close { display: none; }
.sidebar__toggle[aria-expanded="true"] .sidebar__toggle-open { display: none; }
.sidebar__toggle[aria-expanded="true"] .sidebar__toggle-close { display: block; }


/* --------------------------------------------------- 7. Трохи */
.crumbs { font-size: 13px; }
.crumbs__list { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.crumbs__item { display: flex; align-items: center; gap: 6px; color: var(--muted); }
.crumbs__item + .crumbs__item::before { content: "/"; color: var(--faint); }
.crumbs__item [aria-current] { color: var(--ink); font-weight: 600; }

/* --------------------------------------------------- 8. Hero
   Без рамка: текстът и снимката стоят направо върху фона на страницата. */
.hero {
  position: relative;
  isolation: isolate;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(36px, 4.5vw, 72px);
  padding: clamp(16px, 2.4vw, 36px) 0 clamp(20px, 2.6vw, 40px);
}

.hero__copy { min-width: 0; }

.hero__title {
  margin: 0;
  color: var(--navy-900);
  font-size: clamp(32px, 3vw, 52px);
  line-height: 1;
  font-weight: 500;
}
.hero__city { display: block; color: var(--blue-600); }

.hero__title, .section__title, .page-title, .article__title {
  font-family: "Roboto Condensed", var(--font-head);
  
  letter-spacing: 0;
}

.hero__lead {
  max-width: 52ch;
  margin: 22px 0 0;
  color: var(--body);
  font-size: 16.5px;
  line-height: 1.65;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 32px 0 0; }

/* Програми и признания — кръгли значки с логото (във футъра). */
.hero__programs {
  display: flex;
  flex-wrap: wrap;
  gap: 14px 24px;
  margin: 40px 0 0;
}
.hero__program { display: flex; align-items: center; gap: 12px; min-width: 0; }
.hero__program-logo {
  width: 60px; height: 60px;
  flex: none;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: var(--shadow-sm);
}
.hero__program-logo img { width: 30px; height: 30px; object-fit: contain; }
.hero__program-text { min-width: 0; line-height: 1.35; }
.hero__program-text strong, .hero__program-text span { white-space: nowrap; }
.hero__program-text strong { display: block; color: var(--line-soft); font-family: var(--font-head); font-size: 13px;  }
.hero__program-text span { display: block;  font-size: 12.5px; }

/* Снимката стъпва върху жълта плоскост, изместена надолу и надясно,
   а в горния ляв ъгъл има точков растер. Нищо друго не я разсейва. */
.hero__media { position: relative; min-width: 0; margin: 0 18px 18px 0; }
.hero__media::before {
  content: "";
  position: absolute;
  inset: 18px -18px -18px 18px;
  z-index: -1;
  background: linear-gradient(140deg, #FFD466 0%, var(--amber) 100%);
  border-radius: 30px;
}
.hero__dots {
  position: absolute;
  left: -26px; top: -26px;
  z-index: -1;
  width: 150px; height: 150px;
  background-image: radial-gradient(rgba(16, 43, 78, .34) 1.6px, transparent 1.8px);
  background-size: 15px 15px;
  -webkit-mask-image: linear-gradient(135deg, #000 25%, transparent 80%);
          mask-image: linear-gradient(135deg, #000 25%, transparent 80%);
  pointer-events: none;
}

/* --------------------------------------------------- 9. Бутони */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;
    min-width: 150px;
    min-height: 42px;
    padding: 0 24px;
    border: 1px solid transparent;
    border-radius: 8px;
    font-family: var(--font-head);
    font-size: 14.5px;
    cursor: pointer;
    transition: background .16s var(--ease), border-color .16s var(--ease), box-shadow .16s var(--ease), color .16s var(--ease);
}
.btn:hover { text-decoration: none; }
.btn__arrow { width: 17px; height: 17px; stroke-width: 2.2; transition: transform .16s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--primary { background: #072f59; color: #FFFFFF;  }
.btn--primary:hover { background: var(--blue-700); color: #FFFFFF; }

.btn--quiet {  border-color: var(--line-strong); color: var(--navy-900); }
.btn--quiet:hover { border-color: var(--navy-700); color: var(--navy-900); background: #FFFFFF;}

.btn--ghost { border: 1px solid #3c6794; color: #072f59; font-weight: 600; }
.btn--ghost:hover {  border-color: #072f59; color: #072f59; }

.btn--outline { background: var(--surface); border-color: var(--line-strong); color: var(--navy-800); font-weight: 600; }
.btn--outline:hover { background: var(--blue-50); border-color: var(--blue-600); color: var(--navy-800); }

/* --------------------------------------------------- 10. Слайдшоу */
.slider { position: relative; }

.slider__track {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #E6E9EE;
  border-radius: 26px;
  box-shadow: 0 30px 60px -32px rgba(16, 43, 78, .5);
}
/* Тъмен преход отдолу, за да личат точките и бутоните върху всяка снимка. */
.slider__track::after {
  content: "";
  position: absolute; left: 0; right: 0; bottom: 0;
  height: 34%;
  background: linear-gradient(180deg, transparent, rgba(6, 20, 42, .55));
  pointer-events: none;
}

.slider__slide { position: absolute; inset: 0; opacity: 0; transition: opacity .7s var(--ease); }
.slider__track { touch-action: pan-y; }
.slider__slide.is-current { opacity: 1; }
.slider__slide img,
.slider__slide picture { width: 100%; height: 100%; object-fit: cover; display: block; }

.slider__caption {
  position: absolute; left: 20px; right: 20px; bottom: 70px;
  z-index: 2;
  margin: 0;
  color: #FFFFFF;
  font-size: 14px;
  font-weight: 500;
  text-shadow: 0 1px 8px rgba(0, 0, 0, .45);
}

.slider__controls {
  position: absolute;
  left: 18px; right: 18px; bottom: 18px;
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.slider__dots {
  display: flex;
  align-items: center;
  gap: 0;
  min-width: 0;
  max-width: 100%;
  overflow-x: auto;
  scrollbar-width: none;
  padding: 3px 2px;
  background: rgba(8, 24, 46, .42);
  -webkit-backdrop-filter: blur(8px);
          backdrop-filter: blur(8px);
  border-radius: 999px;
}

/* Всяка точка е бутон 24×24px (WCAG 2.5.8), а видимата част е малкото хапче вътре. */
.slider__dot {
  position: relative;
  width: 24px; height: 24px;
  flex: none;
  display: grid;
  place-items: center;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 99px;
  cursor: pointer;
}
.slider__dot::after {
  content: "";
  width: 7px; height: 7px;
  background: rgba(255, 255, 255, .55);
  border-radius: 99px;
  transition: width .25s var(--ease), background .25s var(--ease);
}
.slider__dot:hover::after { background: rgba(255, 255, 255, .9); }
.slider__dot.is-current::after { width: 18px; background: #FFFFFF; }
.slider__dot:focus-visible { outline: 2px solid #FFFFFF; outline-offset: -2px; }

.slider__buttons { display: flex; gap: 6px; flex: none; }

.slider__btn {
  width: 40px; height: 40px;
  display: grid;
  place-items: center;
  background: rgba(255, 255, 255, .94);
  border: 0;
  border-radius: 50%;
  color: var(--navy-900);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .15);
  transition: background .15s var(--ease), transform .15s var(--ease);
}
.slider__btn:hover { background: #FFFFFF; transform: translateY(-1px); }
.slider__btn .i { width: 17px; height: 17px; stroke-width: 2.3; }
.slider :focus-visible { outline-color: #FFFFFF; }

/* --------------------------------------------------- 12. Раздели */
.section__head { margin-bottom: 30px; }
.section__head--row { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 24px; }

.section__kicker {
  margin: 0 0 6px;
  color: var(--amber-text);
  font-family: var(--font-head);
  font-size: 12px;

  letter-spacing: .12em;
  text-transform: uppercase;
}
.section__title { font-size: clamp(24px, 2.4vw, 30px);  letter-spacing: -.03em; color: var(--navy-900);     font-weight: 400;}
.section__title--sm { font-size: 19px; margin-bottom: 12px; }
.section__lead { margin: 6px 0 0; font-size: 15px; color: var(--muted); }

.link-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--navy-900);
  font-family: var(--font-head);
  
  font-size: 14px;
  transition: border-color .16s var(--ease), color .16s var(--ease);
}
.link-more:hover { border-color: var(--blue-600); color: var(--blue-600); text-decoration: none; }
.link-more .i { width: 16px; height: 16px; stroke-width: 2.2; transition: transform .16s var(--ease); }
.link-more:hover .i { transform: translateX(3px); }

/* --------------------------------------------------- 12а. Актуално на началната страница
   Минимална подредба без кутии и линии: водеща новина (снимка, дата, заглавие),
   до нея четири реда, отдолу още четири малки. Разделя ги само празното място. */
.story { position: relative; min-width: 0; }
.story__media { display: block; overflow: hidden; background: #E6E9EE; }
.story__img, .story__media picture, .story__media .ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.story__media img { transition: transform .5s var(--ease); }
.story:hover .story__media img { transform: scale(1.04); }
.story__body { min-width: 0; }

.story__date {
  display: flex;
  align-items: center;
  gap: 7px;
  margin: 0;
  color: var(--faint);
  font-size: 13px;
  font-weight: 500;
}
.story__date .i { width: 14px; height: 14px; }

.story__title { color: var(--ink); line-height: 1.3; transition: color .16s var(--ease); }
.story__title a { color: inherit; }
.story__title a:hover { text-decoration: none; }
/* Цялата карта е една връзка — без повтарящи се връзки за екранен четец. */
.story__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.story__title a:focus-visible { outline: none; }
.story__title a:focus-visible::after { outline: 3px solid #2E7BFF; outline-offset: 3px; border-radius: inherit; }
.story:hover .story__title { color: var(--blue-600); }

.news-top {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 56px;
  align-items: start;
}
.news-top--solo { grid-template-columns: minmax(0, 520px); }

.story--lead { display: flex; flex-direction: column; }
.story--lead .story__media { aspect-ratio: 16 / 10; border-radius: 18px; }
.story--lead .story__body { display: flex; flex-direction: column; gap: 10px; padding: 20px 2px 0; }
.story--lead .story__title {
  font-size: clamp(16px, 1.5vw, 18px);
  letter-spacing: -.02em;
  line-height: 1.27;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.news-list { display: flex; flex-direction: column; gap: 30px; min-width: 0; }
.news-list > li { display: flex; min-width: 0; }

.story--row {
  flex: 1;
  display: grid;
  grid-template-columns: 108px minmax(0, 1fr);
  gap: 20px;
  align-items: center;
}
.story--row .story__media { aspect-ratio: 4 / 3; border-radius: 12px; }
.story--row .story__body { display: flex; flex-direction: column;  }
.story--row .story__title {
  font-size: 15px;
  line-height: 1.38;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}

/* Четирите новини отдолу — само снимка, дата и заглавие. Една тънка линия ги дели от горните. */
.news-grid.news-grid--home {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 36px;
  margin-top: 52px;
  padding-top: 52px;
  border-top: 1px solid var(--line);
}
.news-grid.news-grid--home .post-card { background: none; border: 0; border-radius: 0; overflow: visible; }
.news-grid.news-grid--home .post-card:hover { transform: none; box-shadow: none; }
.news-grid.news-grid--home .post-card__media { border-radius: 14px; }
.news-grid.news-grid--home .post-card__body { padding: 16px 2px 0; gap: 6px; }
.news-grid.news-grid--home .post-card__date .i { display: none; }
.news-grid.news-grid--home .post-card__title { font-size: 15px; line-height: 1.38; }
.news-grid.news-grid--home .post-card__title a:focus-visible::after { border-radius: 14px; }
.news-grid.news-grid--home .post-card__text,
.news-grid.news-grid--home .post-card__more { display: none; }

/* --------------------------------------------------- 12б. На фокус — девет връзки, три по три, без кутии */
.focus {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: 40px;
  border-bottom: 1px solid var(--line);
}
.focus > li { min-width: 0; }

.focus__item {
  display: flex;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 20px 2px;
  border-top: 1px solid var(--line);
  color: var(--body);
}
.focus__item:hover { text-decoration: none; }

.focus__icon {
  width: 44px; height: 44px;
  flex: none;
  display: grid;
  place-items: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 50%;
  color: var(--navy-700);
  transition: background .16s var(--ease), color .16s var(--ease), border-color .16s var(--ease);
}
.focus__icon .i { width: 19px; height: 19px; stroke-width: 1.9; }
.focus__item:hover .focus__icon { background: var(--navy-900); border-color: var(--navy-900); color: #FFFFFF; }

.focus__body { flex: 1; min-width: 0; }
.focus__title { display: block; color: var(--ink); font-family: var(--font-head);  font-size: 14px; line-height: 1.3; transition: color .16s var(--ease); }
.focus__text  { display: block; margin-top: 3px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.focus__item:hover .focus__title { color: var(--blue-600); }

.focus__arrow { width: 18px; height: 18px; flex: none; color: var(--faint); stroke-width: 2; transition: transform .18s var(--ease), color .18s var(--ease); }
.focus__item:hover .focus__arrow { color: var(--blue-600); transform: translate(2px, -2px); }

/* --------------------------------------------------- 12г. Страница „Актуално“ — карти */
.page-head--news { margin-bottom: 4px; }

.news-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px 24px;
}
.news-grid__item { display: flex; min-width: 0; }
.news-grid__item--featured { grid-column: 1 / -1; }

/* Първа страница: решетка от 6 колони — 2 водещи карти по 3 колони,
   а обикновените по 2 колони, т.е. по 3 на ред. */
.news-grid--first { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.news-grid--first .news-grid__item { grid-column: span 2; }
.news-grid--first .news-grid__item--featured { grid-column: span 3; }

.post-card {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  overflow: hidden;
  transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
}
.post-card:hover { transform: translateY(-4px); border-color: var(--line-strong); box-shadow: 0 24px 40px -24px rgba(16, 43, 78, .35); }

.post-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: #E6E9EE; }
.post-card__img, .post-card__media picture, .post-card__media .ph { display: block; width: 100%; height: 100%; object-fit: cover; }
.post-card__media img { transition: transform .5s var(--ease); }
.post-card:hover .post-card__media img { transform: scale(1.05); }

.post-card__body { flex: 1; display: flex; flex-direction: column; gap: 10px; padding: 20px 22px 22px; }

.post-card__date { display: flex; align-items: center; gap: 7px; margin: 0; color: var(--faint); font-size: 13px; font-weight: 500; }
.post-card__date .i { width: 14px; height: 14px; }

.post-card__title {
  color: var(--ink);
  font-size: 16px;
  line-height: 1.32;
  letter-spacing: -.01em;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}
.post-card__title a { color: inherit; }
.post-card__title a:hover { text-decoration: none; }
.post-card__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.post-card__title a:focus-visible { outline: none; }
.post-card__title a:focus-visible::after { outline: 3px solid #2E7BFF; outline-offset: 2px; border-radius: 20px; }
.post-card:hover .post-card__title { color: var(--blue-600); }

.post-card__text {
  margin: 0;
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
}

.post-card__more {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 6px;
  color: var(--blue-600);
  font-family: var(--font-head);
  
  font-size: 14px;
}
.post-card__more .i { width: 15px; height: 15px; stroke-width: 2.3; transition: transform .18s var(--ease); }
.post-card:hover .post-card__more .i { transform: translateX(4px); }

/* Двете водещи карти на първа страница: вертикални, с по-голяма снимка и заглавие. */
.post-card--featured .post-card__media { aspect-ratio: 16 / 9; }
.post-card--featured .post-card__body { gap: 12px; padding: 26px 30px 28px; }
.post-card--featured .post-card__date {
  align-self: flex-start;
  padding: 5px 11px;
  background: var(--amber-soft);
  border-radius: 999px;
  color: var(--amber-text);
  
  font-size: 12.5px;
}
.post-card--featured .post-card__title { font-size: clamp(18px, 1.5vw, 20px); letter-spacing: -.02em; line-height: 1.28; -webkit-line-clamp: 3; }
.post-card--featured .post-card__text { font-size: 15px; -webkit-line-clamp: 3; }
.post-card--featured .post-card__more { margin-top: 8px; }

/* Запълващо поле за липсваща снимка */
.ph {
  display: grid;
  place-items: center;
  width: 100%; height: 100%;
  min-height: 120px;
  background: #E8EEF8;
  color: var(--faint);
}
.ph svg { width: 26px; height: 26px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }

.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  align-self: flex-start;
  margin: 0;
  padding: 4px 9px;
  background: var(--amber-bg);
  color: var(--amber-fg);
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
}
.chip .i { width: 12px; height: 12px; stroke-width: 2.2; }
.chip--lg { font-size: 13px; padding: 6px 12px; margin-top: 12px; }

.empty { padding: 28px; background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); text-align: center; }

/* --------------------------------------------------- 13. Текстови страници */
.prose-wrap, .page-head, .section, .contact-grid, .results, .grid-photos, .pager, .sitemap {
  background: none;
}

.prose-wrap { min-width: 0; background: var(--surface); border: 1px solid var(--line); border-radius: 20px; padding: clamp(24px, 4vw, 44px) clamp(20px, 4vw, 48px); }

.page-head { margin-bottom: 18px; }
.page-title { font-size: clamp(24px, 3vw, 32px);  }
.page-sub { margin: 8px 0 0; color: var(--muted); font-size: 15px; }

/* Съдържание от редактора — стилът му трябва да издържа всичко, което редакторът произвежда. */
.prose { font-size: 16px; line-height: 1.75; color: var(--body); overflow-wrap: anywhere; min-width: 0; }
/* Съдържанието е копирано от Word през годините — нищо не бива да излиза от рамката. */
.prose * { max-width: 100%; }
.prose pre { white-space: pre-wrap; font: inherit; margin: 0 0 1.1em; }
.prose span[style*="letter-spacing"] { letter-spacing: normal !important; }
.prose p:empty { display: none; }
/* Дългият ред изморява окото. Текстът се ограничава, а таблиците и
   снимките остават на пълна ширина. */

.prose > h2, .prose > h3, .prose > h4 { max-width: 34em; }
.prose > *:first-child { margin-top: 0; }
.prose h2 { font-size: 22px; margin: 1.7em 0 .6em; }
.prose h3 { font-size: 18.5px; margin: 1.5em 0 .5em; }
.prose h4 { font-size: 16.5px; margin: 1.3em 0 .4em; }
.prose p { margin: 0 0 1.1em; }
.prose ul, .prose ol { margin: 0 0 1.2em; padding-left: 1.5em; }
.prose ul { list-style: disc; }
.prose ol { list-style: decimal; }
.prose li { margin-bottom: .45em; }
.prose a { text-decoration: underline; text-underline-offset: 2px; }
.prose img { height: auto; border-radius: var(--radius-sm); margin: .5em 0; }
.prose strong { color: var(--ink); }
.prose hr { border: 0; border-top: 1px solid var(--line); margin: 2em 0; }

.prose blockquote {
  margin: 1.4em 0;
  padding: 14px 20px;
  background: var(--bg);
  border-left: 4px solid var(--blue-600);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  color: var(--ink);
}

/* Таблиците от редактора се превъртат встрани на тесен екран, вместо да чупят подредбата. */
.prose table {
  width: 100%;
  margin: 1.4em 0;
  border-collapse: collapse;
  font-size: 14.5px;
}
.prose table th, .prose table td { padding: 10px 13px; border: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose table th { background: var(--bg); color: var(--ink); font-family: var(--font-head);  }
.prose table caption { caption-side: top; padding-bottom: 8px; color: var(--muted); font-size: 13px; text-align: left; }
.prose table tr:nth-child(even) td { background: #FAFCFE; }

.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1.4em 0; }
.table-scroll table { margin: 0; min-width: 520px; }
.prose table { overflow-wrap: normal; word-break: normal; }
.prose iframe { max-width: 100%; border: 0; border-radius: var(--radius-sm); }

/* Подсигуровка: ако някъде е останало подравняване от атрибут, се неутрализира. */
.prose [align="justify"], .prose [style*="justify"] { text-align: left !important; }

/* Връзки към документи — разпознават се по разширението. */
.prose a[href$=".pdf"], .prose a[href$=".doc"], .prose a[href$=".docx"],
.prose a[href$=".xls"], .prose a[href$=".xlsx"], .prose a[href$=".ppt"], .prose a[href$=".pptx"] {
  display: inline-flex;
  align-items: flex-start;   /* иконата остава при ПЪРВИЯ ред, не по средата */
  gap: 8px;
}
.prose a[href$=".pdf"]::before, .prose a[href$=".doc"]::before, .prose a[href$=".docx"]::before,
.prose a[href$=".xls"]::before, .prose a[href$=".xlsx"]::before, .prose a[href$=".ppt"]::before, .prose a[href$=".pptx"]::before {
  content: "";
  width: 15px; height: 15px;
  flex: none;
  margin-top: .32em;          /* сяда на базовата линия на първия ред */
  background: currentColor;
  -webkit-mask: var(--doc-icon) center / contain no-repeat;
          mask: var(--doc-icon) center / contain no-repeat;
  --doc-icon: 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='M14 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V8z'/%3E%3Cpath d='M14 2v6h6'/%3E%3C/svg%3E");
}

.callout { padding: 16px 20px; border-radius: var(--radius-sm); margin: 1.4em 0; }
.callout--todo { background: #FFF8E6; border: 1px solid #F0DCA8; color: #6B4E00; }
.callout p:last-child { margin-bottom: 0; }

.prose dl { margin: 1.2em 0; }
.prose dt { font-family: var(--font-head);  color: var(--ink); margin-top: 1em; }
.prose dd { margin: .2em 0 0; }

/* --------------------------------------------------- 14. Новина */
.article { width: 100%;  display: flex; flex-direction: column; gap: 28px; }

.article__head { display: flex; flex-direction: column; gap: 14px; padding-top: 4px; }
.article__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 10px; margin: 0; }
.article__date, .article__count {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  line-height: 1.2;
}
.article__date  { background: var(--amber-soft); color: var(--amber-text); }
.article__count { background: var(--surface); border: 1px solid var(--line); color: var(--muted); }
.article__date .i, .article__count .i { width: 14px; height: 14px; }
.article__title {
  color: var(--navy-900);
  font-size: clamp(26px, 2.6vw, 36px);
  
  line-height: 1.2;
  letter-spacing: -.025em;
  overflow-wrap: break-word;
}

/* --- текст и галерия една до друга --- */
.article__layout { display: grid; grid-template-columns: minmax(0, 1fr); gap: 24px; align-items: start; }
.article__layout--media { grid-template-columns: minmax(0, 1fr) minmax(280px, 380px); }

.article__body {
  min-width: 0;
  padding: clamp(24px, 3.5vw, 40px) clamp(20px, 3.5vw, 44px);
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
  font-size: 16.5px;
}
.article__body.prose > * { max-width: none; }

/* --- галерия: снимка + мрежа с миниатюри, залепена при превъртане --- */
.pgallery {
  position: sticky;
  top: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 20px;
}

.pgallery__stage {
  position: relative;
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: #E6E9EE;
  border-radius: 14px;
}
.pgallery__main { position: absolute; inset: 0; display: block; cursor: zoom-in; }
.pgallery__main picture, .pgallery__img, .pgallery__main .ph { display: block; width: 100%; height: 100%; }
.pgallery__img { object-fit: cover; transition: opacity .25s var(--ease), transform .4s var(--ease); }
.pgallery__main:hover .pgallery__img { transform: scale(1.03); }
.pgallery__img.is-loading { opacity: .35; }

.pgallery__nav {
  position: absolute;
  top: 50%;
  z-index: 2;
  width: 36px; height: 36px;
  display: grid;
  place-items: center;
  margin-top: -18px;
  background: rgba(255, 255, 255, .94);
  border: 0;
  border-radius: 50%;
  color: var(--navy-900);
  cursor: pointer;
  box-shadow: 0 4px 12px rgba(0, 0, 0, .22);
  opacity: 0;
  transition: opacity .18s var(--ease), background .15s var(--ease);
}
.pgallery__stage:hover .pgallery__nav, .pgallery__nav:focus-visible { opacity: 1; }
.pgallery__nav:hover { background: #FFFFFF; }
.pgallery__nav .i { width: 17px; height: 17px; stroke-width: 2.4; }
.pgallery__nav--prev { left: 10px; }
.pgallery__nav--next { right: 10px; }
@media (hover: none) { .pgallery__nav { opacity: 1; } }

.pgallery__counter, .pgallery__zoom {
  position: absolute;
  z-index: 2;
  margin: 0;
  background: rgba(8, 24, 46, .6);
  -webkit-backdrop-filter: blur(6px);
          backdrop-filter: blur(6px);
  color: #FFFFFF;
  pointer-events: none;
}
.pgallery__counter { left: 10px; bottom: 10px; padding: 4px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; font-variant-numeric: tabular-nums; }
.pgallery__zoom { right: 10px; bottom: 10px; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 50%; }
.pgallery__zoom .i { width: 14px; height: 14px; }
.pgallery .pgallery__stage :focus-visible { outline-color: #FFFFFF; outline-offset: -4px; }

.pgallery__thumbs { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.pgallery__thumbs > li[hidden] { display: none; }
.pgallery__thumb {
  position: relative;
  display: block;
  aspect-ratio: 1;
  overflow: hidden;
  background: #E6E9EE;
  border-radius: 9px;
}
.pgallery__thumb::after {
  content: "";
  position: absolute; inset: 0;
  border: 2.5px solid transparent;
  border-radius: inherit;
  transition: border-color .18s var(--ease), background .18s var(--ease);
}
.pgallery__thumb:hover::after { background: rgba(255, 255, 255, .18); }
.pgallery__thumb.is-current::after { border-color: var(--blue-600); }
.pgallery__thumb img, .pgallery__thumb picture { display: block; width: 100%; height: 100%; object-fit: cover; }
.pgallery__more {
  position: absolute; inset: 0;
  z-index: 1;
  display: grid;
  place-items: center;
  background: rgba(10, 31, 61, .66);
  color: #FFFFFF;
  font-family: var(--font-head);
  font-size: 16px;
  
}

/* --- предишна / следваща --- */
.post-nav { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.post-nav__link {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 18px;
  transition: border-color .16s var(--ease), box-shadow .16s var(--ease);
}
.post-nav__link:hover { border-color: var(--line-strong); box-shadow: var(--shadow-md); text-decoration: none; }
.post-nav__link--next { grid-column: 2; align-items: flex-end; text-align: right; }
.post-nav__label { display: inline-flex; align-items: center; gap: 7px; color: var(--blue-600); font-family: var(--font-head); font-size: 13px;  }
.post-nav__label .i { width: 15px; height: 15px; stroke-width: 2.3; transition: transform .16s var(--ease); }
.post-nav__link--prev:hover .i { transform: translateX(-3px); }
.post-nav__link--next:hover .i { transform: translateX(3px); }
.post-nav__title { color: var(--ink); font-family: var(--font-head);  font-size: 15px; line-height: 1.4; }

.section--more { margin-top: 28px; }

/* --------------------------------------------------- 15. Галерия */
.grid-photos { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.photo { display: block; aspect-ratio: 4 / 3; border-radius: var(--radius-sm); overflow: hidden; background: #E8EEF8; box-shadow: var(--shadow-sm); }
.photo img, .photo picture { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s var(--ease); }
.photo:hover img { transform: scale(1.06); }

/* светлинна кутия */
.lightbox { position: fixed; inset: 0; z-index: 300; display: grid; place-items: center; background: rgba(6,20,42,.92); padding: 24px; }
.lightbox[hidden] { display: none; }
.lightbox__img { max-width: min(92vw, 1400px); max-height: 82vh; object-fit: contain; border-radius: 6px; }
.lightbox__caption { margin: 14px 0 0; color: #D6E3F5; font-size: 14px; text-align: center; max-width: 70ch; }
.lightbox__close, .lightbox__nav {
  position: absolute;
  width: 48px; height: 48px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 50%;
  color: #FFFFFF;
  cursor: pointer;
  transition: background .15s var(--ease);
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.26); }
.lightbox__close { top: 20px; right: 20px; }
.lightbox__nav--prev { left: 20px; top: 50%; transform: translateY(-50%); }
.lightbox__nav--next { right: 20px; top: 50%; transform: translateY(-50%); }
.lightbox .i { width: 22px; height: 22px; }

/* --------------------------------------------------- 16. Форми */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.35fr); gap: 24px; align-items: stretch; }
.contact-info, .contact-form { display: flex; flex-direction: column; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 30px; }
.contact-info .section__title, .contact-form .section__title { margin-bottom: 18px; }

/* Данни за връзка: икона, етикет и стойност на всеки ред, с тънък разделител. */
.cinfo { margin: 0; display: flex; flex-direction: column; flex: 1; }
.cinfo__row { display: flex; align-items: flex-start; gap: 14px; padding: 14px 0; border-top: 1px solid var(--line); }
.cinfo__row:first-child { border-top: 0; padding-top: 2px; }
.cinfo__icon { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: var(--blue-50); color: var(--blue-600); }
.cinfo__icon .i { width: 20px; height: 20px; }
.cinfo__body { min-width: 0; }
.cinfo__label { margin: 0; font-family: var(--font-head); font-size: 12.5px; letter-spacing: .02em; color: var(--muted); }
.cinfo__value { margin: 2px 0 0; color: var(--ink); line-height: 1.5; overflow-wrap: anywhere; }
.cinfo__value > a { font-weight: 600; }
.cinfo__link { display: flex; width: fit-content; align-items: center; gap: 4px; margin-top: 6px; font-size: 13px; font-weight: 600; }
.cinfo__link .i { width: 14px; height: 14px; stroke-width: 2.2; }

.deflist { margin: 0 0 20px; }
.deflist dt { font-family: var(--font-head);  font-size: 13px; color: var(--muted); margin-top: 14px; }
.deflist dt:first-child { margin-top: 0; }
.deflist dd { margin: 3px 0 0; color: var(--ink); }

.map { position: relative; height: 340px; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); background: #E8EEF8; }
/* Лентата със заглавие на Google My Maps (~46px) се избутва над видимата част. */
.map iframe { display: block; width: 100%; height: calc(100% + 46px);  border: 0; }

.form { margin: 0; }
.field { margin-bottom: 16px; }
.field label { display: block; margin-bottom: 6px; font-family: var(--font-head); font-weight: 600; font-size: 14px; color: var(--ink); }
.req { color: #B42318; }

.field input, .field textarea, .field select {
  width: 100%;
  min-height: 48px;
  padding: 11px 14px;
  background: var(--surface);
  border: 1.5px solid #CBD6E6;
  border-radius: var(--radius-sm);
  color: var(--ink);
  font: inherit;
  font-size: 15px;
  transition: border-color .15s var(--ease), box-shadow .15s var(--ease);
}
.field textarea { min-height: 150px; resize: vertical; line-height: 1.6; }
.field input:focus, .field textarea:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(27,95,217,.16); outline: none; }
.field [aria-invalid="true"] { border-color: #D92D20; }
.field__error { margin: 6px 0 0; color: var(--err-fg); font-size: 13px; font-weight: 500; }

.form__note { font-size: 13px; color: var(--muted); }
.form__actions { margin: 20px 0 0; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 16px; }
.contact-form .form { display: flex; flex-direction: column; flex: 1; }
.contact-form .field:has(textarea) { flex: 1; display: flex; flex-direction: column; }
.contact-form .field textarea { flex: 1; }
.form__foot { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-top: 4px; }
.form__foot .form__note { margin: 0; max-width: 46ch; line-height: 1.5; }
.form__foot .btn { flex: none; }

.alert { display: flex; gap: 12px; padding: 16px 20px; border-radius: var(--radius-sm); margin-bottom: 20px; }
.alert .i { width: 20px; height: 20px; flex: none; margin-top: 2px; }
.alert p { margin: 0 0 .4em; }
.alert p:last-child { margin-bottom: 0; }
.alert ul { margin: .4em 0 0; padding-left: 1.2em; list-style: disc; }
.alert--ok    { background: var(--ok-bg);  color: var(--ok-fg);  border: 1px solid #B7E0C4; }
.alert--error { background: var(--err-bg); color: var(--err-fg); border: 1px solid #F4C7C7; }
.alert--info  { background: var(--blue-50); color: var(--navy-800); border: 1px solid #C9DCFA; }

/* --------------------------------------------------- 17. Търсене */
.search--page { padding: 0; margin-bottom: 22px;    border-top: none;    border-bottom: none; }
.search__field--lg { height: 56px; padding: 0 8px 0 16px; background: var(--surface); border: 1.5px solid #CBD6E6; gap: 12px; }
.search__field--lg input { font-size: 16px; color: var(--ink); }
.search__field--lg input::placeholder { color: var(--muted); }
.search__field--lg .search__icon { flex: none; color: var(--muted); }
.search__field--lg .btn { min-height: 42px; padding: 0 20px; font-size: 14.5px; border-radius: 30px;}

.results-count { color: var(--muted); font-size: 14.5px; margin-bottom: 16px; }
.results { display: flex; flex-direction: column; gap: 12px; }
.result { padding: 18px 22px; background: var(--surface); border: 1px solid var(--line); border-radius: 12px; transition: border-color .16s var(--ease), box-shadow .16s var(--ease); }
.result:hover { border-color: #BFD2EE; box-shadow: var(--shadow-sm); }
.result__kind { margin: 0 0 6px; font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--faint); }
.result__title { font-size: 17px; margin-bottom: 6px; }
.result__snippet { margin: 0; font-size: 14.5px; color: var(--muted); line-height: 1.6; }

/* --------------------------------------------------- 18. Странициране */
.pager { margin-top: 8px; }
.pager__list { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px; }

.pager__link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-width: 44px;
  min-height: 44px;
  padding: 0 13px;
  justify-content: center;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  color: var(--body);
  font-size: 14.5px;
  transition: background .15s var(--ease), border-color .15s var(--ease), color .15s var(--ease);
}
.pager__link:hover { background: var(--blue-50); border-color: var(--blue-600); color: var(--navy-800); text-decoration: none; }
.pager__link.is-current { background: var(--blue-600); border-color: var(--blue-600); color: #FFFFFF; }
.pager__link .i { width: 16px; height: 16px; }
.pager__gap { display: inline-block; min-width: 24px; text-align: center; color: var(--faint); }

/* --------------------------------------------------- 19. Карта на сайта */
.sitemap { columns: 2; column-gap: 32px; }
.sitemap > li { break-inside: avoid; margin-bottom: 14px; }
.sitemap > li > a, .sitemap > li > span { font-family: var(--font-head);  color: var(--ink); }
.sitemap ul { margin: 6px 0 0 14px; }
.sitemap ul li { margin-bottom: 4px; font-size: 14.5px; }
.sitemap--flat { columns: 2; }
.sitemap--flat li { margin-bottom: 7px; font-weight: 400; }
.sitemap--flat a { font-family: var(--font-body); font-weight: 400; color: var(--blue-600); }

/* --------------------------------------------------- 20. Подвал */
.footer { background: var(--navy-900); color: #B9CBE5; font-size: 14px; line-height: 1.75; margin-top: 0; }

.footer__inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 42px var(--gap) 38px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 28px;
}

.footer__title { color: #FFFFFF; font-size: 15px; margin-bottom: 10px; }
.footer__title--sm { margin-top: 20px; font-size: 14px; }
.footer__label { color: #8FA8CC; font-size: 12.5px; }
.footer__links li { margin-bottom: 4px; }
.footer a { color: #B9CBE5; }
.footer a:hover { color: #FFFFFF; }
.footer__links a, .footer p a { color: #7FB0FF; }

.footer__bar { border-top: 1px solid #1E3F6B; }
.footer__bar-inner {
  max-width: var(--shell-max);
  margin: 0 auto;
  padding: 16px var(--gap);
  display: flex;
  flex-wrap: wrap;
  gap: 8px 20px;
  justify-content: space-between;
  font-size: 13px;
  color: #8FA8CC;
}
.footer__bar p { margin: 0; }
.footer__legal { display: flex; flex-wrap: wrap; gap: 8px 18px; }
.footer__legal a { color: #8FA8CC; }

/* --------------------------------------------------- 21. Към началото */
.to-top {
  position: fixed;
  right: 20px; bottom: 20px;
  z-index: 40;
  width: 48px; height: 48px;
  display: grid;
  place-items: center;
  background: var(--navy-900);
  border: 0;
  border-radius: 50%;
  color: #FFFFFF;
  cursor: pointer;
  box-shadow: var(--shadow-lg);
  opacity: 0;
  transform: translateY(10px);
  transition: opacity .2s var(--ease), transform .2s var(--ease), background .15s var(--ease);
}
.to-top[hidden] { display: none; }
.to-top.is-visible { opacity: 1; transform: translateY(0); }
.to-top:hover { background: var(--blue-600); }
.to-top svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }

/* --------------------------------------------------- 22. Грешки */
.error-page { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 46px 38px; text-align: center; }
.error-page__code { margin: 0; font-family: var(--font-head);  font-size: 60px; color: var(--muted); line-height: 1; }
.error-page__title { margin: 8px 0 0; font-size: 26px; }
.error-page__text { margin: 12px 0 0; color: var(--muted); }
.error-page__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 11px; margin: 26px 0 0; }

/* --------------------------------------------------- 23. Адаптивност */
@media (max-width: 1280px) {
  /* Три колони остават и на по-тесен екран — пести се място от описанието и стрелката. */
  .focus { column-gap: 24px; }
  .focus__item { gap: 14px; padding: 16px 2px; }
  .focus__text, .focus__arrow { display: none; }
  .news-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .news-grid--first .news-grid__item,
  .news-grid--first .news-grid__item--featured { grid-column: auto; }
  .news-top { gap: 40px; }
  .news-grid.news-grid--home { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; }
  .news-grid.news-grid--home .post-card__title { font-size: 15px; }
}

@media (max-width: 1180px) {
  .hero { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .slider__track { aspect-ratio: 16 / 9; }
  .hero__lead { max-width: 60ch; }
  /* Една колона: водещата новина ляга настрани, за да не стане снимката ѝ огромна. */
  .news-top { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .story--lead { display: grid; grid-template-columns: minmax(0, 42%) minmax(0, 1fr); gap: 32px; align-items: center; }
  .story--lead .story__body { padding: 0; }
  .news-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 30px 36px; }
  .footer__inner { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Новина: галерията отива над текста и спира да е залепена. */
  .article__layout--media { grid-template-columns: minmax(0, 1fr); }
  .article__layout--media .pgallery { order: -1; position: static; max-width: 640px; }
  .pgallery__thumbs { grid-template-columns: repeat(6, minmax(0, 1fr)); }
}

@media (max-width: 920px) {
  :root { --gap: 16px; }

  /* Горната лента се скрива — връзките ѝ са в менюто. */
  .utility { display: none; }

  .shell { flex-direction: column; align-items: stretch; gap: 22px; padding-top: 0; }

  /* Панелът става светла лента от край до край, залепена горе.
     Тъмният фон остава само за отвореното меню. */
  .sidebar {
    flex: none;
    max-width: none;
    width: auto;
    margin: 0 calc(-1 * var(--gap));
    position: sticky;
    top: 0;
    z-index: 50;
    overflow: visible;
    background: var(--surface);
    border: 0;
    border-bottom: 1px solid var(--line);
    border-radius: 0;
    color: var(--body);
    transition: box-shadow .2s var(--ease), border-color .2s var(--ease);
  }
  .sidebar.is-stuck { border-bottom-color: transparent; box-shadow: 0 10px 26px -16px rgba(16, 43, 78, .4); }
  .sidebar.is-open { border-bottom-color: transparent; box-shadow: none; }

  .sidebar__brand { min-height: var(--header-h); padding: 10px 14px 10px 16px; }
  .sidebar__brand :focus-visible { outline-color: #2E7BFF; }
  .brand { gap: 12px; }
  .brand__mark { width: 44px; height: 44px; background: var(--navy-900); border-color: var(--navy-900); border-radius: 12px; }
  .brand__mark svg { width: 25px; }
  .brand__name { color: var(--navy-900);  font-size: 13px; }
  .brand__city { color: var(--muted); }

  .sidebar__toggle { display: flex; width: 44px; height: 44px; background: var(--blue-50); border-radius: 12px; color: var(--navy-900); }
  .sidebar__toggle:hover { background: #DFE9FB; }
  .sidebar__toggle[aria-expanded="true"] { background: var(--navy-900); color: #FFFFFF; }

  /* Менюто се плъзга под лентата и покрива целия екран. */
  .sidebar__body {
    position: absolute;
    left: 0; right: 0; top: 100%;
    height: calc(100vh - var(--header-h));
    height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    padding-bottom: 28px;
    background: linear-gradient(180deg, #07315E 0%, #082A50 100%);
    color: #DCE6F5;
    visibility: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity .22s var(--ease), transform .22s var(--ease), visibility 0s linear .22s;
  }
  .sidebar.is-open .sidebar__body { visibility: visible; opacity: 1; transform: none; transition-delay: 0s; }
  /* Само на html: ако и body стане контейнер за превъртане, лентата спира да е залепена. */
  html.nav-open { overflow: hidden; }


  .search__field { height: 48px; }
  .suggest { left: 16px; right: 16px; }
  .nav { padding: 12px 12px 6px; }
  .nav__link { min-height: 48px; font-size: 14px; }
  .nav__sublink { padding: 10px 12px; font-size: 14.5px; }

  .sidebar__quick { display: block; margin: 8px 12px 14px; }
  .sidebar__quick a {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    padding: 8px 10px;
    background: rgba(255, 255, 255, .08);
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 12px;
    color: #FFFFFF;
    font-family: var(--font-head);
    font-size: 13px;
    font-weight: 600;
    line-height: 1.25;
  }
  .sidebar__quick a:hover { background: rgba(255, 255, 255, .16); text-decoration: none; }
  .sidebar__quick .i { width: 16px; height: 16px; }
  .sidebar__contacts { margin: 0 12px; }
  .sidebar__email { display: inline; }

  .main { gap: 24px; }
  .main > .section { margin-top: 28px; }
  .hero { padding-top: 8px; }
  .post-card--featured { grid-template-columns: minmax(0, 1fr); }
  .article { gap: 22px; }
  .post-card--featured .post-card__media { aspect-ratio: 16 / 9; min-height: 0; height: auto; }
  .post-card--featured .post-card__body { padding: 24px 24px 26px; }
  .prose-wrap { padding: 24px 20px 28px; }
  .contact-grid { grid-template-columns: 1fr; }
  .contact-info, .contact-form { padding: 20px; }
  .map { height: 280px; }
  .news-grid.news-grid--home { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}

@media (max-width: 760px) {
  .news-grid.news-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 680px) {
  .form__row { grid-template-columns: minmax(0, 1fr); }
  .form__foot { flex-direction: column; align-items: stretch; }
  .form__foot .btn { width: 100%; }
  body { font-size: 14px; }

  .shell { padding: 0 16px 40px; gap: 18px; }
  .main { gap: 22px; }
  .main > .section { margin-top: 24px; }

  .hero { gap: 30px; padding: 14px 0 6px; }
  .hero__title { font-size: clamp(27px, 8.4vw, 36px); }
  .hero__programs { flex-direction: column; gap: 14px; margin-top: 28px; }
  .hero__program-text strong, .hero__program-text span { white-space: normal; }
  .hero__lead { font-size: 14px; margin-top: 16px; }
  .hero__actions { margin-top: 24px; gap: 10px; flex-wrap: nowrap;     flex-direction: column;}
  .hero__actions .btn { flex: 1 1 0; min-width: 0; padding: 0 14px; }
  .hero__media { margin: 0 10px 10px 0; }
  .hero__media::before { inset: 10px -10px -10px 10px; border-radius: 22px; }
  .hero__dots { left: -10px; top: -12px; width: 90px; height: 90px; background-size: 13px 13px; }

  .slider__track { aspect-ratio: 4 / 3; border-radius: 20px; }
  .slider__controls { left: 12px; right: 12px; bottom: 12px; }
  .slider__btn { width: 36px; height: 36px; }
  /* На телефон снимките се сменят с плъзгане и с точките, затова стрелките се скриват,
     за да има място за точки с пълен размер 24×24px. Бутонът за пауза остава. */
  .slider__btn[data-slider-prev], .slider__btn[data-slider-next] { display: none; }
  .slider__btn[data-slider-toggle] { display: grid; }
  .slider__dots { padding: 2px 4px; }
  .slider__dot.is-current::after { width: 14px; }

  .section__head { margin-bottom: 18px; }
  .section__head--row { flex-wrap: nowrap; align-items: center; }
  .section__head--row .link-more { flex: none; }
  .link-more { padding: 8px 14px; font-size: 13px; }

  /* На фокус: една колона, с описанието и стрелката. */
  .focus { grid-template-columns: minmax(0, 1fr); }
  .focus__item { padding: 14px 2px; }
  .focus__text { display: block; font-size: 13px; }
  .focus__arrow { display: block; }
  .focus__title { font-size: 15px; }

  .news-top { gap: 30px; }
  .story--lead { display: flex; }
  .story--lead .story__media { border-radius: 16px; }
  .story--lead .story__body { gap: 8px; }

  .news-list { display: flex; gap: 22px; }
  .story--row { grid-template-columns: 96px minmax(0, 1fr); gap: 16px; }
  .story--row .story__media { border-radius: 10px; }
  .story--row .story__title { font-size: 15px; -webkit-line-clamp: 3; }

  .news-grid { grid-template-columns: minmax(0, 1fr); gap: 18px; }
  .post-card__body { padding: 18px 18px 20px; }
  .news-grid.news-grid--home { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 28px 16px; margin-top: 32px; padding-top: 32px; }
  .news-grid.news-grid--home .post-card__media { border-radius: 12px; }
  .news-grid.news-grid--home .post-card__body { padding: 12px 2px 0; gap: 4px; }
  .news-grid.news-grid--home .post-card__date { font-size: 12px; }
  .news-grid.news-grid--home .post-card__title { font-size: 14px; -webkit-line-clamp: 4; }

  .footer__inner { grid-template-columns: 1fr; gap: 22px; }
  .sitemap, .sitemap--flat { columns: 1; }
  .post-nav { grid-template-columns: minmax(0, 1fr); }
  .post-nav__link--next { grid-column: auto; align-items: flex-start; text-align: left; }
  .pgallery { padding: 8px; border-radius: 16px; }
  .pgallery__thumbs { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
  .pgallery__thumb { border-radius: 7px; }
  .article__body { font-size: 16px; border-radius: 16px; }
  .grid-photos { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Иконката и полето остават на един ред в рамката, а бутонът е отдолу на цяла ширина. */
  .search__field--lg { flex-wrap: wrap; height: auto; padding: 0; gap: 10px; background: none; border: 0; border-radius: 0; }
  .search__field--lg:focus-within { box-shadow: none; }
  .search__field--lg .search__icon { position: absolute; left: 15px; top: 17px; pointer-events: none; }
  .search__field--lg input { flex: 1 1 100%; height: 50px; padding: 0 16px 0 44px; background: var(--surface); border: 1.5px solid #CBD6E6; border-radius: 999px; }
  .search__field--lg input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(46, 123, 255, .25); }
  .search__field--lg .btn { flex: 1 1 100%; min-height: 48px; border-radius: 999px; }
  .to-top { right: 14px; bottom: 14px; width: 44px; height: 44px; }
}

@media (max-width: 380px) {
  .brand__name { font-size: 13px; }
  .error-page { padding: 32px 20px; }
}
/* --------------------------------------------------- 24. Предпочитания */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .post-card:hover { transform: none; }
  .story:hover .story__media img, .post-card:hover .post-card__media img { transform: none; }
}

@media (prefers-contrast: more) {
  :root { --muted: #3C4A61; --faint: #4A5B74; --line: #AFBDD0; }
  .post-card, .hero__program-logo, .result { border-width: 2px; }
}

/* --------------------------------------------------- 25. Печат */
@media print {
  .utility, .sidebar, .footer, .to-top, .pager, .post-nav, .crumbs, .slider__controls { display: none !important; }
  body { background: #FFFFFF; color: #000000; font-size: 11pt; }
  .shell { display: block; padding: 0; max-width: none; }
  .prose-wrap { border: 0; padding: 0; }
  .prose a::after { content: " (" attr(href) ")"; font-size: 9pt; color: #444; }
  .hero__dots, .hero__media::before, .slider__controls { display: none; }
  .hero__title, .hero__lead { color: #000000; }
}
