/* ДСУ – РЦСОО „Марија Кири – Склодовска“ – Скопје
   Бојата и типографијата ги следат знакот и банерите на училиштето. */

:root {
  --navy: #001937;
  --navy-2: #0c2a52;
  --navy-3: #1d3b68;
  --crimson: #9b0b22;
  --crimson-dark: #7a0819;
  --paper: #ffffff;
  --mist: #eef2f7;
  --ink: #1a2233;
  --muted: #566175;
  --line: #d6dde7;
  --focus: var(--navy);

  --font-display: "Oswald", "Arial Narrow", "Roboto Condensed", sans-serif;
  --font-text: "Onest", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --slant: 120px;
  --header-h: 76px;
}

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

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 16px); }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

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

a { color: var(--crimson); text-underline-offset: 0.18em; text-decoration-thickness: 1px; }
a:hover { color: var(--crimson-dark); text-decoration-thickness: 2px; }

:focus-visible { outline: 3px solid var(--focus); outline-offset: 3px; border-radius: 2px; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  color: var(--navy);
  line-height: 1.12;
  letter-spacing: 0.005em;
  margin: 0 0 0.5em;
}
h2 { font-size: clamp(1.9rem, 1.3rem + 2vw, 2.75rem); }
h3 { font-size: 1.375rem; font-weight: 500; }
p { margin: 0 0 1em; }

.container { width: 100%; max-width: calc(var(--container) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.prose { max-width: 68ch; }
.lead { font-size: 1.1875rem; color: var(--muted); max-width: 60ch; }
.muted { color: var(--muted); }
.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: 12px; top: -100px; z-index: 100;
  background: var(--paper); color: var(--navy); padding: 10px 16px; font-weight: 600;
}
.skip-link:focus { top: 12px; }

/* Копчиња ---------------------------------------------------------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px; border: 2px solid transparent; border-radius: 2px;
  font: 600 1rem/1.2 var(--font-text); text-decoration: none; cursor: pointer;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}
.btn--primary { background: var(--crimson); color: #fff; }
.btn--primary:hover { background: var(--crimson-dark); color: #fff; }
.btn--light { border-color: rgba(255, 255, 255, 0.55); color: #fff; }
.btn--light:hover { border-color: #fff; background: rgba(255, 255, 255, 0.08); color: #fff; }
.btn--outline { border-color: var(--navy); color: var(--navy); }
.btn--outline:hover { background: var(--navy); color: #fff; }

/* Заглавие и навигација ------------------------------------------- */

.site-header {
  --focus: #fff;
  position: sticky; top: 0; z-index: 50;
  background: var(--navy); color: #fff;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.site-header__inner { display: flex; align-items: center; justify-content: space-between; gap: 24px; min-height: var(--header-h); }

.brand { display: flex; align-items: center; gap: 14px; color: #fff; text-decoration: none; min-width: 0; }
.brand:hover { color: #fff; }
.brand__seal { flex: none; width: 54px; height: 54px; border-radius: 50%; background: #fff; padding: 2px; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; min-width: 0; }
.brand__short { font-size: 0.8125rem; font-weight: 500; color: rgba(255, 255, 255, 0.72); letter-spacing: 0.02em; }
.brand__name { font-family: var(--font-display); font-weight: 500; font-size: 1.3rem; letter-spacing: 0.01em; white-space: nowrap; }

.nav-toggle {
  display: none; align-items: center; gap: 10px;
  background: none; border: 1px solid rgba(255, 255, 255, 0.4); border-radius: 2px;
  color: #fff; font: 500 0.9375rem var(--font-text); padding: 9px 14px; cursor: pointer;
}
.nav-toggle__bars, .nav-toggle__bars::before, .nav-toggle__bars::after {
  display: block; width: 18px; height: 2px; background: currentColor; position: relative; transition: transform 0.2s;
}
.nav-toggle__bars::before, .nav-toggle__bars::after { content: ""; position: absolute; left: 0; }
.nav-toggle__bars::before { top: -6px; }
.nav-toggle__bars::after { top: 6px; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars { background: transparent; }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::before { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle__bars::after { transform: translateY(-6px) rotate(-45deg); }

.nav__list { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.nav__item { position: relative; }
.nav__link {
  position: relative; display: flex; align-items: center; gap: 6px;
  padding: 10px 13px; background: none; border: 0; cursor: pointer;
  color: rgba(255, 255, 255, 0.86); font: 500 0.9375rem/1.2 var(--font-text); text-decoration: none; white-space: nowrap;
}
.nav__link:hover { color: #fff; text-decoration: none; }
.nav__link::after {
  content: ""; position: absolute; left: 13px; right: 13px; bottom: 2px; height: 3px;
  background: var(--crimson); transform: scaleX(0); transition: transform 0.2s;
}
.nav__link:hover::after { transform: scaleX(1); background: rgba(255, 255, 255, 0.35); }
.nav__link[aria-current="page"], .nav__link.is-current { color: #fff; }
.nav__link[aria-current="page"]::after, .nav__link.is-current::after { transform: scaleX(1); background: var(--crimson); }
.nav__chevron { width: 10px; height: 10px; transition: transform 0.2s; }
.nav__link[aria-expanded="true"] .nav__chevron { transform: rotate(180deg); }

.subnav {
  --focus: var(--navy);
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 280px;
  list-style: none; margin: 0; padding: 8px 0;
  background: var(--paper); border-top: 3px solid var(--crimson);
  box-shadow: 0 18px 40px rgba(0, 25, 55, 0.22);
  opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity 0.15s, transform 0.15s, visibility 0.15s;
}
.nav__item--has-sub.is-open .subnav { opacity: 1; visibility: visible; transform: none; }
.subnav a { display: block; padding: 10px 20px; color: var(--ink); text-decoration: none; font-size: 0.9375rem; }
.subnav a:hover { background: var(--mist); color: var(--navy); }
.subnav a[aria-current="page"] { color: var(--crimson); font-weight: 600; }

@media (hover: hover) and (min-width: 1041px) {
  .nav__item--has-sub:hover .subnav { opacity: 1; visibility: visible; transform: none; }
}

@media (max-width: 1040px) {
  .nav-toggle { display: inline-flex; }
  .nav {
    display: none; position: absolute; top: 100%; left: 0; right: 0;
    background: var(--navy); border-top: 1px solid rgba(255, 255, 255, 0.1);
    max-height: calc(100vh - var(--header-h)); overflow-y: auto;
    padding: 8px var(--gutter) 24px;
  }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; align-items: stretch; gap: 0; }
  .nav__item { border-bottom: 1px solid rgba(255, 255, 255, 0.08); }
  .nav__link { width: 100%; padding: 14px 4px; font-size: 1.0625rem; justify-content: space-between; }
  .nav__link::after { left: 0; right: auto; width: 3px; top: 12px; bottom: 12px; height: auto; transform: scaleY(0); }
  .nav__link[aria-current="page"]::after, .nav__link.is-current::after { transform: scaleY(1); }
  .nav__link[aria-current="page"], .nav__link.is-current { padding-left: 14px; }
  .subnav {
    position: static; display: none; min-width: 0; padding: 0 0 10px 14px;
    background: none; border: 0; box-shadow: none; opacity: 1; visibility: visible; transform: none;
  }
  .nav__item--has-sub.is-open .subnav { display: block; }
  .subnav a { color: rgba(255, 255, 255, 0.82); padding: 9px 4px; }
  .subnav a:hover { background: none; color: #fff; }
  .subnav a[aria-current="page"] { color: #fff; }
  .subnav { --focus: #fff; }
}

@media (max-width: 480px) {
  :root { --header-h: 68px; }
  .brand__seal { width: 46px; height: 46px; }
  .brand__name { font-size: 1.1rem; }
  .brand__short { font-size: 0.75rem; }
  .nav-toggle__label { display: none; }
}

/* Косите ленти (мотив од банерите на училиштето) ------------------ */

.bands { position: absolute; inset: 0; pointer-events: none; }
.band {
  position: absolute; top: 0; bottom: 0;
  width: calc(var(--slant) + var(--w, 40px));
  clip-path: polygon(var(--slant) 0, 100% 0, calc(100% - var(--slant)) 100%, 0 100%);
}

/* Херој на почетната ---------------------------------------------- */

.hero { --focus: #fff; position: relative; overflow: hidden; background: var(--navy); color: #fff; isolation: isolate; }
.hero__inner { position: relative; z-index: 2; display: flex; align-items: center; min-height: min(80vh, 700px); }
.hero__text { width: 54%; padding-block: clamp(56px, 9vw, 120px); padding-right: 40px; }

.hero__title { margin: 0 0 28px; color: #fff; font-weight: 600; }
.hero__kicker {
  display: block; max-width: 34ch; margin-bottom: 20px;
  font-family: var(--font-text); font-weight: 500; font-size: clamp(1rem, 0.9rem + 0.4vw, 1.1875rem);
  line-height: 1.45; letter-spacing: 0; color: rgba(255, 255, 255, 0.8);
}
.hero__name { display: block; font-size: clamp(3rem, 1.1rem + 5.2vw, 5.75rem); line-height: 0.98; letter-spacing: 0.002em; }
.hero__name span { display: block; }
.hero__lead { max-width: 44ch; font-size: 1.1875rem; color: rgba(255, 255, 255, 0.86); margin-bottom: 32px; }
.hero__lead strong { color: #fff; font-weight: 600; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 12px; }

.hero__media { position: absolute; top: 0; bottom: 0; left: 50%; right: 0; z-index: 1; }
.hero__photo {
  position: absolute; inset: 0 0 0 calc(var(--slant) * 0.55 + 70px); margin: 0;
  clip-path: polygon(var(--slant) 0, 100% 0, 100% 100%, 0 100%);
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 30% center; }
.hero__photo::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(90deg, rgba(0, 25, 55, 0.35), rgba(0, 25, 55, 0) 40%);
}
.hero .band--a { left: 0; --w: 46px; background: var(--crimson); }
.hero .band--b { left: 58px; --w: 18px; background: var(--crimson); opacity: 0.55; }
.hero .band--c { left: calc(var(--slant) * -0.9); --w: 150px; background: var(--navy-2); }

@media (prefers-reduced-motion: no-preference) {
  .hero .band, .hero__photo { animation: band-in 0.9s cubic-bezier(0.2, 0.7, 0.2, 1) both; }
  .hero .band--c { animation-delay: 0s; }
  .hero .band--a { animation-delay: 0.08s; }
  .hero .band--b { animation-delay: 0.16s; }
  .hero__photo { animation-name: photo-in; animation-delay: 0.1s; animation-duration: 1.1s; }
  .hero__text > * { animation: text-in 0.7s ease-out both; }
  .hero__text > :nth-child(2) { animation-delay: 0.15s; }
  .hero__text > :nth-child(3) { animation-delay: 0.25s; }
}
@keyframes band-in { from { transform: translateY(100%); } to { transform: none; } }
@keyframes photo-in { from { opacity: 0; transform: translateX(40px); } to { opacity: 1; transform: none; } }
@keyframes text-in { from { opacity: 0; transform: translateY(12px); } to { opacity: 1; transform: none; } }

@media (max-width: 880px) {
  :root { --slant: 70px; }
  .hero__inner { min-height: 0; }
  .hero__text { width: 100%; padding-right: 0; padding-bottom: 40px; }
  .hero__media { position: relative; left: auto; height: clamp(240px, 58vw, 380px); }
  .hero__photo { left: calc(var(--slant) * 0.55 + 40px); }
  .hero .band--a { --w: 28px; }
  .hero .band--b { left: 36px; --w: 12px; }
}

/* Заглавие на внатрешните страници -------------------------------- */

.page-hero { --focus: #fff; position: relative; overflow: hidden; background: var(--navy); color: #fff; }
.page-hero__inner { position: relative; z-index: 1; padding-block: clamp(40px, 6vw, 72px) clamp(44px, 6vw, 80px); }
.page-hero h1 { color: #fff; font-size: clamp(2.25rem, 1.5rem + 3vw, 3.75rem); margin: 0; max-width: 20ch; }
.page-hero__lead { margin: 16px 0 0; max-width: 58ch; color: rgba(255, 255, 255, 0.8); font-size: 1.125rem; }
.page-hero .bands { left: auto; width: min(42%, 520px); right: 0; }
.page-hero .band--a { right: 150px; --w: 44px; background: var(--crimson); }
.page-hero .band--b { right: 110px; --w: 16px; background: var(--crimson); opacity: 0.55; }
.page-hero .band--c { right: -60px; --w: 150px; background: var(--navy-2); }

.crumbs { margin-bottom: 18px; font-size: 0.875rem; color: rgba(255, 255, 255, 0.68); }
.crumbs ol { display: flex; flex-wrap: wrap; gap: 6px; list-style: none; margin: 0; padding: 0; }
.crumbs li + li::before { content: "/"; margin-right: 6px; color: rgba(255, 255, 255, 0.4); }
.crumbs a { color: rgba(255, 255, 255, 0.85); text-decoration: none; }
.crumbs a:hover { color: #fff; text-decoration: underline; }

@media (max-width: 720px) {
  .page-hero .bands { opacity: 0.35; width: 60%; }
}

/* Секции --------------------------------------------------------- */

.section { padding-block: clamp(56px, 8vw, 104px); }
.section--mist { background: var(--mist); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--follow { padding-top: 0; }
.section-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 40px; margin-bottom: clamp(28px, 4vw, 48px); }
.section-head h2 { margin-bottom: 0.25em; }
.section-head .lead { margin: 0; }
.section-head__text { max-width: 62ch; }

.text-link { font-weight: 600; }
.section-head .text-link, .doc__action { white-space: nowrap; }

/* За училиштето (почетна) ---------------------------------------- */

.about { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 6vw, 88px); align-items: center; }
.about__seal { width: min(100%, 360px); justify-self: center; }
.about__text p { max-width: 62ch; }
.about__text .text-link { display: inline-block; margin-top: 8px; }

@media (max-width: 800px) {
  .about { grid-template-columns: 1fr; }
  .about__seal { width: 220px; justify-self: start; }
}

/* Хронологија ---------------------------------------------------- */

.timeline { list-style: none; margin: clamp(48px, 7vw, 80px) 0 0; padding: 0; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); border-top: 2px solid var(--navy); }
.timeline li { position: relative; padding: 26px 20px 0 0; }
.timeline li::before { content: ""; position: absolute; top: -8px; left: 0; width: 14px; height: 14px; background: var(--crimson); transform: rotate(45deg); }
.timeline__year { display: block; font-family: var(--font-display); font-weight: 600; font-size: 1.875rem; line-height: 1; color: var(--navy); margin-bottom: 10px; }
.timeline__text { margin: 0; font-size: 0.9375rem; line-height: 1.5; color: var(--muted); }

@media (max-width: 960px) {
  .timeline { grid-template-columns: 1fr; border-top: 0; border-left: 2px solid var(--navy); margin-left: 7px; }
  .timeline li { padding: 0 0 28px 28px; }
  .timeline li::before { top: 6px; left: -8px; }
}

.timeline--page { margin-top: 0; }

/* Струки и профили ----------------------------------------------- */

.sectors { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 3vw, 40px); }
.sector { border-top: 4px solid var(--navy); padding-top: 22px; }
.sector h3 { margin-bottom: 4px; }
.sector__meta { margin: 0 0 18px; font-size: 0.9375rem; color: var(--muted); }
.ticks { list-style: none; margin: 0; padding: 0; }
.ticks li { position: relative; padding: 10px 0 10px 22px; border-bottom: 1px solid var(--line); line-height: 1.45; }
.ticks li:last-child { border-bottom: 0; }
.ticks li::before { content: ""; position: absolute; left: 2px; top: 1.05em; width: 7px; height: 7px; background: var(--crimson); }

.adult { margin-top: clamp(32px, 4vw, 48px); display: grid; grid-template-columns: minmax(0, 4fr) minmax(0, 8fr); gap: 16px 40px; padding: clamp(24px, 3vw, 36px); background: var(--paper); border-left: 4px solid var(--crimson); }
.adult h3 { margin: 0; }
.adult .ticks { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 24px; }
.adult .ticks li { border-bottom: 0; }
.adult .ticks small { display: block; margin-top: 2px; font-size: 0.8125rem; color: var(--muted); }
.profiles-more { margin: 28px 0 0; }

@media (max-width: 900px) {
  .sectors { grid-template-columns: 1fr; }
  .adult { grid-template-columns: 1fr; }
  .adult .ticks { grid-template-columns: 1fr; }
}

/* Документи ------------------------------------------------------ */

.doclist { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--line); }
.doc { display: grid; grid-template-columns: 30px minmax(0, 1fr) auto; gap: 6px 20px; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); }
.doc__icon { width: 28px; height: 36px; }
.doc__title { margin: 0; font-weight: 500; line-height: 1.45; color: var(--ink); }
.doc__meta { display: block; margin-top: 2px; font-size: 0.875rem; color: var(--muted); }
.doc__action { font-weight: 600; white-space: nowrap; }
.doc__action--pending { color: var(--muted); font-weight: 500; font-size: 0.9375rem; }
.doc.is-missing .doc__icon { opacity: 0.45; }

@media (max-width: 600px) {
  .doc { grid-template-columns: 26px minmax(0, 1fr); }
  .doc__action { grid-column: 2; justify-self: start; }
}

.docs-layout { display: grid; grid-template-columns: minmax(0, 3fr) minmax(0, 9fr); gap: clamp(32px, 5vw, 72px); align-items: start; }
.docs-nav { position: sticky; top: calc(var(--header-h) + 24px); }
.docs-nav h2 { font-size: 1.125rem; font-family: var(--font-text); font-weight: 600; margin-bottom: 12px; }
.docs-nav ul { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--line); }
.docs-nav a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; color: var(--ink); text-decoration: none; line-height: 1.35; }
.docs-nav a:hover { border-left-color: var(--crimson); color: var(--crimson); }
.docs-group + .docs-group { margin-top: clamp(48px, 6vw, 72px); }
.docs-group h2 { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.125rem); }
.docs-group__note { color: var(--muted); margin-bottom: 20px; }

.linkgroups { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.linkgroup { padding: 24px; background: var(--mist); }
.linkgroup h3 { font-size: 1.25rem; margin-bottom: 4px; }
.linkgroup .muted { margin-bottom: 12px; font-size: 0.9375rem; }
.linkgroup ul { list-style: none; margin: 0; padding: 0; }
.linkgroup li { padding: 6px 0; }
.linkgroup h4 { font-family: var(--font-text); font-size: 0.9375rem; font-weight: 600; color: var(--ink); margin: 14px 0 2px; }

@media (max-width: 900px) {
  .docs-layout { grid-template-columns: 1fr; }
  .docs-nav { position: static; }
  .linkgroups { grid-template-columns: 1fr; }
}

/* Фотографии ----------------------------------------------------- */

.mosaic { display: grid; grid-template-columns: 2fr 1fr 1fr; grid-template-rows: repeat(2, minmax(0, 1fr)); gap: 10px; aspect-ratio: 2.3 / 1; }
.mosaic a { display: block; overflow: hidden; background: var(--mist); }
.mosaic a:first-child { grid-row: span 2; }
.mosaic img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.mosaic a:hover img { transform: scale(1.03); }

@media (max-width: 720px) {
  .mosaic { grid-template-columns: 1fr 1fr; grid-template-rows: none; aspect-ratio: auto; }
  .mosaic a { aspect-ratio: 4 / 3; }
  .mosaic a:first-child { grid-column: span 2; grid-row: auto; }
}

.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.gallery a { display: block; position: relative; overflow: hidden; aspect-ratio: 4 / 3; background: var(--mist); }
.gallery img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.gallery a:hover img { transform: scale(1.03); }
.gallery figcaption { margin-top: 8px; font-size: 0.875rem; color: var(--muted); line-height: 1.4; }
.gallery figure { margin: 0; }

.lightbox {
  --focus: #fff;
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(0, 12, 28, 0.94); color: #fff;
}
.lightbox::backdrop { background: rgba(0, 12, 28, 0.6); }
.lightbox__stage { position: absolute; inset: 64px 72px 72px; display: flex; align-items: center; justify-content: center; margin: 0; }
.lightbox__stage img { max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; }
.lightbox__caption { position: absolute; left: 0; right: 0; bottom: 22px; text-align: center; font-size: 0.9375rem; color: rgba(255, 255, 255, 0.85); padding-inline: 16px; }
.lightbox__btn {
  position: absolute; display: grid; place-items: center; width: 48px; height: 48px;
  background: rgba(255, 255, 255, 0.08); border: 1px solid rgba(255, 255, 255, 0.3); border-radius: 2px; color: #fff; cursor: pointer;
}
.lightbox__btn:hover { background: var(--crimson); border-color: var(--crimson); }
.lightbox__btn svg { width: 20px; height: 20px; }
.lightbox__close { top: 12px; right: 12px; }
.lightbox__prev { left: 12px; top: 50%; transform: translateY(-50%); }
.lightbox__next { right: 12px; top: 50%; transform: translateY(-50%); }
@media (max-width: 600px) {
  .lightbox__stage { inset: 64px 8px 80px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: 14px; transform: none; }
  .lightbox__caption { bottom: 70px; }
}

/* Содржински страници -------------------------------------------- */

.split { display: grid; grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: clamp(28px, 5vw, 72px); align-items: start; }
.split--reverse { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); }
.split--reverse .split__media { order: -1; }
.split + .split { margin-top: clamp(48px, 7vw, 88px); }
.split__media { margin: 0; }
.split__media img { width: 100%; }
.split__media--seal img { max-width: 340px; margin-inline: auto; }
.split__media figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--muted); }
.split p { max-width: 64ch; }

@media (max-width: 820px) {
  .split, .split--reverse { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .split__media--seal img { max-width: 220px; margin-inline: 0; }
}

.callout { margin: 24px 0; padding: 20px 24px; background: var(--mist); border-left: 4px solid var(--crimson); }
.callout p { margin: 0; }
.callout__title { font-weight: 600; color: var(--navy); margin-bottom: 6px !important; }

.flyer { margin: clamp(40px, 6vw, 64px) 0 0; max-width: 960px; }
.flyer a { display: block; border: 1px solid var(--line); }
.flyer figcaption { margin-top: 10px; font-size: 0.875rem; color: var(--muted); }

.statement { font-size: clamp(1.125rem, 1rem + 0.5vw, 1.3125rem); line-height: 1.6; color: var(--ink); }
.statement-block h2 { margin-bottom: 0.6em; }

/* Табели --------------------------------------------------------- */

.table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.data-table { width: 100%; border-collapse: collapse; font-size: 0.975rem; }
.data-table th, .data-table td { text-align: left; vertical-align: top; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.data-table thead th { font-size: 0.875rem; font-weight: 600; color: var(--muted); border-bottom: 2px solid var(--navy); padding-top: 0; }
.data-table tbody th[scope="row"] { width: 34%; font-weight: 600; color: var(--navy); }
.data-table ul { list-style: none; margin: 0; padding: 0; }
.data-table li + li { margin-top: 4px; }
.data-table .num { width: 3.5rem; color: var(--muted); font-variant-numeric: tabular-nums; }
.data-table .code { width: 13rem; white-space: nowrap; color: var(--muted); font-size: 0.9rem; font-variant-numeric: tabular-nums; letter-spacing: 0.02em; }
.data-table .group th {
  padding-top: 28px; padding-bottom: 10px; border-bottom: 2px solid var(--line);
  font-family: var(--font-display); font-weight: 500; font-size: 1.1875rem; color: var(--navy);
}
.data-table .group:first-child th { padding-top: 12px; }
.data-table .group__count { font-family: var(--font-text); font-size: 0.875rem; color: var(--muted); font-weight: 400; margin-left: 8px; }

@media (max-width: 640px) {
  .data-table--kv tbody tr { display: block; padding: 14px 0; border-bottom: 1px solid var(--line); }
  .data-table--kv tbody th[scope="row"], .data-table--kv tbody td { display: block; width: auto; padding: 0; border: 0; }
  .data-table--kv tbody th[scope="row"] { margin-bottom: 4px; }
  .data-table .code { width: auto; white-space: normal; }
}

/* Организациска шема --------------------------------------------- */

.orgchart { --c: var(--navy); margin: 0 0 clamp(48px, 7vw, 80px); }
.orgchart ul { list-style: none; margin: 0; padding: 0; }
.org-top { display: flex; justify-content: center; }
.org-director {
  position: relative; padding: 16px 40px; background: var(--navy); color: #fff;
  font-family: var(--font-display); font-weight: 600; font-size: 1.5rem; letter-spacing: 0.02em;
}
.org-director::after { content: ""; position: absolute; left: 50%; top: 100%; width: 2px; height: 28px; background: var(--c); }
.org-services { position: relative; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; margin-top: 56px !important; }
.org-services::before { content: ""; position: absolute; top: -28px; left: calc((100% - 48px) / 6); right: calc((100% - 48px) / 6); height: 2px; background: var(--c); }
.org-service { position: relative; }
.org-service::before { content: ""; position: absolute; left: 50%; top: -28px; width: 2px; height: 28px; background: var(--c); }
.org-service__name { padding: 16px 18px; background: var(--paper); border: 2px solid var(--navy); font-weight: 600; color: var(--navy); text-align: center; line-height: 1.35; }
.org-units { margin-top: 18px !important; display: grid; gap: 10px; }
.org-units li { position: relative; padding: 12px 16px; background: var(--mist); border-left: 4px solid var(--crimson); line-height: 1.4; font-size: 0.9375rem; }
.org-units a { color: var(--ink); text-decoration: none; }
.org-units a:hover { color: var(--crimson); text-decoration: underline; }
.org-units small { display: block; color: var(--muted); font-size: 0.8125rem; margin-top: 2px; }

@media (max-width: 820px) {
  .org-top { justify-content: flex-start; }
  .org-director::after { left: 24px; }
  .org-services { grid-template-columns: 1fr; margin-top: 28px !important; margin-left: 24px !important; padding-left: 24px !important; border-left: 2px solid var(--c); gap: 28px; }
  .org-services::before { display: none; }
  .org-service::before { left: -24px; top: 26px; width: 24px; height: 2px; }
}

/* Контакт -------------------------------------------------------- */

.contact { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: clamp(32px, 5vw, 72px); align-items: stretch; }
.contact dl { margin: 0 0 28px; display: grid; gap: 18px; }
.contact dt { font-size: 0.875rem; color: var(--muted); margin-bottom: 2px; }
.contact dd { margin: 0; font-weight: 500; }
.contact dd a { color: var(--ink); }
.contact dd a:hover { color: var(--crimson); }
.socials { display: flex; flex-wrap: wrap; gap: 10px; }
.social { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--line); background: var(--paper); color: var(--navy); text-decoration: none; font-weight: 500; }
.social:hover { border-color: var(--navy); color: var(--navy); }
.social svg { width: 20px; height: 20px; }
.map { display: flex; flex-direction: column; gap: 10px; }
.map iframe { flex: 1; width: 100%; min-height: 360px; border: 0; background: var(--line); }
.map a { align-self: flex-start; font-weight: 600; }

@media (max-width: 860px) { .contact { grid-template-columns: 1fr; } }

/* Подножје ------------------------------------------------------- */

.site-footer { --focus: #fff; background: var(--navy); color: rgba(255, 255, 255, 0.78); font-size: 0.9375rem; }
.site-footer a { color: rgba(255, 255, 255, 0.86); text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer__grid { display: grid; grid-template-columns: minmax(0, 4fr) repeat(3, minmax(0, 2fr)); gap: 40px; padding-block: 64px 48px; }
.footer__brand { display: flex; gap: 16px; align-items: flex-start; }
.footer__brand img { flex: none; width: 64px; height: 64px; border-radius: 50%; background: #fff; padding: 2px; }
.footer__brand p { margin: 0; line-height: 1.5; }
.footer__name { font-family: var(--font-display); font-size: 1.25rem; font-weight: 500; color: #fff; margin-bottom: 6px !important; }
.footer__title { font-family: var(--font-text); font-size: 0.9375rem; font-weight: 600; color: #fff; margin: 0 0 14px; }
.footer__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 24px; padding-block: 22px; border-top: 1px solid rgba(255, 255, 255, 0.12); font-size: 0.875rem; color: rgba(255, 255, 255, 0.6); }

@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: span 2; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } .footer__brand { grid-column: auto; } }

.to-top {
  position: fixed; right: 16px; bottom: 16px; z-index: 40; width: 44px; height: 44px;
  display: grid; place-items: center; background: var(--crimson); color: #fff; border-radius: 2px;
  opacity: 0; visibility: hidden; transition: opacity 0.2s, visibility 0.2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; }
.to-top:hover { background: var(--crimson-dark); color: #fff; }
.to-top svg { width: 18px; height: 18px; }

/* 404 ------------------------------------------------------------ */

.notfound { padding-block: clamp(64px, 10vw, 140px); }
.notfound__code { font-family: var(--font-display); font-size: clamp(5rem, 3rem + 10vw, 10rem); line-height: 1; color: var(--crimson); margin: 0 0 12px; }

/* Големи екрани (27" монитори и пошироки) -------------------------
   Пошироки содржини и малку поголем текст. Фотографиите на училиштето
   се 800 px, па фотографијата во херојот не се развлекува преку цел екран. */

@media (min-width: 1680px) {
  :root { --container: 1320px; }
  html { font-size: 106.25%; }
  .hero__media { left: max(50%, calc(100% - 1150px)); }
  .page-hero .bands { right: max(0px, calc((100% - var(--container)) / 2 - 160px)); }
}

@media (min-width: 2200px) {
  :root { --container: 1440px; --slant: 140px; }
  html { font-size: 112.5%; }
  .hero__inner { min-height: min(78vh, 780px); }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

@media print {
  .site-header, .site-footer, .to-top, .page-hero .bands, .map, .nav { display: none !important; }
  .page-hero { background: none; color: #000; }
  .page-hero h1 { color: #000; }
}
