/* ==========================================================================
   ПИГ „Св. Климент Охридски“ – София
   Основна таблица със стилове
   ========================================================================== */

:root {
  /* ---------- тъмносиня гама ---------- */
  --navy-900: #04121f;   /* най-тъмно: топбар, футър */
  --navy-800: #0f3255;   /* плътни панели, бутони */
  --navy-700: #17496f;   /* hover на бутони */
  --navy-600: #2b74ad;   /* фокус */
  --gold-600: #c9a558;
  --gold-500: #d9b76d;
  --gold-300: #f0ddb0;
  --cream-50: #06182a;   /* фон на страницата */
  --cream-100: #081f34;  /* редуващи се секции */
  --cream-200: #10314c;  /* рамки на миниатюри */
  --ink-900: #e9f1fa;    /* основен текст */
  --ink-700: #c2d4e6;
  --ink-500: #9bb2c9;
  --ink-400: #8499b0;
  --line: #17364f;
  --white: #0c2740;      /* повърхност на картите */
  --link: #9ec8ec;

  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, "Times New Roman", serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .3), 0 2px 8px rgba(0, 0, 0, .18);
  --shadow-md: 0 4px 12px rgba(0, 0, 0, .3), 0 14px 34px rgba(0, 0, 0, .3);
  --shadow-lg: 0 18px 48px rgba(0, 0, 0, .55);

  --wrap: 1180px;
  --radius: 4px;
  --radius-lg: 8px;

  --ease: cubic-bezier(.22, .61, .36, 1);
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream-50);
  color: var(--ink-900);
  font-family: var(--sans);
  font-size: 16.5px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

body.nav-open { overflow: hidden; }

img { max-width: 100%; display: block; }
a { color: var(--link); text-decoration: none; }
a:hover { color: var(--gold-600); }
button { font: inherit; cursor: pointer; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; line-height: 1.18; margin: 0 0 .6em; letter-spacing: -.01em; }
h1 { font-size: clamp(2.1rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.65rem, 2.7vw, 2.35rem); }
h3 { font-size: 1.28rem; }
p { margin: 0 0 1.05em; }
ul, ol { margin: 0 0 1.05em; padding-left: 1.25em; }
li { margin-bottom: .35em; }
:focus-visible { outline: 2px solid var(--gold-500); outline-offset: 3px; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--navy-900);
  color: rgba(255, 255, 255, .72);
  font-size: 13px;
  letter-spacing: .01em;
}
.topbar .wrap {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px; min-height: 40px;
}
.topbar-info { display: flex; align-items: center; gap: 22px; flex-wrap: wrap; }
.topbar-info span { display: inline-flex; align-items: center; gap: 7px; }
.topbar-info svg { opacity: .55; flex: none; }
.topbar-links { display: flex; align-items: center; gap: 18px; }
.topbar-links a { color: rgba(255, 255, 255, .72); }
.topbar-links a:hover { color: var(--gold-300); }
.topbar-links .cta-mini {
  background: var(--gold-500); color: var(--navy-900);
  padding: 4px 13px; border-radius: 100px; font-size: 12px; font-weight: 600;
  letter-spacing: .01em; transition: background .18s var(--ease);
}
.topbar-links .cta-mini:hover { background: var(--gold-300); color: var(--navy-900); }
.topbar-links .staff-link {
  color: var(--gold-300);
  border: 1px solid rgba(227, 203, 146, .32);
  padding: 3px 11px; border-radius: 100px; font-size: 12px;
  transition: background .18s var(--ease);
}
.topbar-links .staff-link:hover { background: rgba(227, 203, 146, .12); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 90;
  background: rgba(6, 24, 42, .94);
  backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid var(--line);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .05) inset;
}
.site-header .wrap {
  display: flex; align-items: center; gap: 28px;
  min-height: 84px; padding-top: 10px; padding-bottom: 10px;
}
.brand { display: flex; align-items: center; gap: 14px; flex: none; }
.brand:hover { color: inherit; }
.crest { width: 58px; height: 58px; flex: none; border-radius: 50%; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name {
  font-family: var(--serif); font-size: 1.06rem; font-weight: 600;
  color: var(--ink-900); letter-spacing: -.005em;
}
.brand-sub {
  font-size: 11.5px; text-transform: uppercase; letter-spacing: .16em;
  color: var(--ink-400); margin-top: 4px;
}

.main-nav { margin-left: auto; }
.main-nav ul { display: flex; align-items: center; gap: 2px; list-style: none; margin: 0; padding: 0; }
.main-nav a {
  display: block; padding: 9px 10px; border-radius: var(--radius);
  font-size: 14.2px; font-weight: 500; color: var(--ink-700);
  transition: color .16s var(--ease), background .16s var(--ease);
  white-space: nowrap;
}
.main-nav a:hover { color: var(--ink-900); background: var(--cream-100); }
.main-nav a.active { color: var(--ink-900); font-weight: 600; box-shadow: inset 0 -2px 0 var(--gold-500); }

/* dropdown */
.main-nav .has-sub { position: relative; }
.main-nav .submenu {
  position: absolute; top: calc(100% + 10px); left: 0; min-width: 236px;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  box-shadow: var(--shadow-md); padding: 8px; display: flex; flex-direction: column; gap: 2px;
  opacity: 0; visibility: hidden; transform: translateY(-6px);
  transition: opacity .16s var(--ease), transform .16s var(--ease), visibility .16s;
}
.main-nav .has-sub:hover .submenu,
.main-nav .has-sub:focus-within .submenu { opacity: 1; visibility: visible; transform: none; }
.main-nav .submenu a { padding: 9px 12px; font-size: 14px; border-radius: var(--radius); }
.main-nav .submenu a.active { box-shadow: none; background: var(--cream-100); }

.header-cta {
  display: inline-flex; align-items: center; gap: 8px; flex: none;
  background: var(--gold-500); color: var(--navy-900); font-size: 13.6px; font-weight: 600;
  padding: 11px 16px; border-radius: 100px;
  transition: background .18s var(--ease), transform .18s var(--ease);
}
.header-cta:hover { background: var(--gold-300); color: var(--navy-900); transform: translateY(-1px); }

.nav-toggle {
  display: none; margin-left: auto; background: none; border: 1px solid var(--line);
  border-radius: var(--radius); width: 44px; height: 42px; padding: 0;
  align-items: center; justify-content: center; color: var(--ink-900);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  padding: 13px 24px; border-radius: 100px; border: 1px solid transparent;
  font-size: 15px; font-weight: 500; line-height: 1.2;
  transition: all .18s var(--ease); text-align: center;
}
.btn-primary {
  background: linear-gradient(180deg, #25699f 0%, #17517f 100%);
  color: #fff; border-color: rgba(255, 255, 255, .16);
  box-shadow: 0 1px 0 rgba(255, 255, 255, .12) inset, 0 6px 18px rgba(0, 0, 0, .28);
}
.btn-primary:hover {
  background: linear-gradient(180deg, #2c7cb8 0%, #1b5c8f 100%);
  color: #fff; transform: translateY(-1px); box-shadow: 0 10px 26px rgba(0, 0, 0, .38);
}
.btn-ghost { border-color: rgba(233, 241, 250, .3); color: var(--ink-900); background: transparent; }
.btn-ghost:hover { background: rgba(233, 241, 250, .1); border-color: rgba(233, 241, 250, .5); color: #fff; }
.btn-gold { background: var(--gold-500); color: var(--navy-900); }
.btn-gold:hover { background: var(--gold-300); color: var(--navy-900); }
.btn-sm { padding: 9px 16px; font-size: 13.5px; }

.link-arrow {
  display: inline-flex; align-items: center; gap: 7px;
  font-size: 14.5px; font-weight: 600; color: var(--link);
}
.link-arrow svg { transition: transform .2s var(--ease); }
.link-arrow:hover svg { transform: translateX(4px); }

/* ---------- Section helpers ---------- */
.section { padding: 76px 0; }
.section--tight { padding: 54px 0; }
.section--cream { background: var(--cream-100); }
.section--white { background: var(--white); }
.section--navy { background: var(--navy-800); color: rgba(255, 255, 255, .82); }
.section--navy h2, .section--navy h3 { color: #fff; }

.section-head { max-width: 720px; margin-bottom: 42px; }
.section-head--center { margin-left: auto; margin-right: auto; text-align: center; }
.kicker {
  display: inline-flex; align-items: center; gap: 9px;
  font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .17em;
  color: var(--gold-600); margin-bottom: 14px;
}
.kicker::before {
  content: ""; width: 26px; height: 1px; background: var(--gold-500); display: block;
}
.section--navy .kicker { color: var(--gold-300); }
.section--navy .kicker::before { background: var(--gold-300); }
.section-head p { color: var(--ink-500); font-size: 1.06rem; margin-bottom: 0; }
.section--navy .section-head p { color: rgba(255, 255, 255, .66); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  background:
    radial-gradient(1100px 560px at 88% -10%, rgba(217, 183, 109, .16), transparent 62%),
    radial-gradient(900px 420px at 4% 110%, rgba(43, 116, 173, .2), transparent 65%),
    linear-gradient(180deg, #0a2137 0%, var(--cream-50) 100%);
  border-bottom: 1px solid var(--line);
}
.hero::after {
  content: ""; position: absolute; inset: auto 0 0 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--gold-300), transparent);
  opacity: .8;
}
.hero .wrap {
  display: grid; grid-template-columns: 1.08fr .92fr; gap: 62px; align-items: center;
  padding-top: 66px; padding-bottom: 66px;
}
.hero-kicker {
  display: inline-flex; align-items: flex-start; gap: 10px;
  background: rgba(217, 183, 109, .12); border: 1px solid rgba(217, 183, 109, .32);
  color: var(--gold-300); font-size: 12.5px; font-weight: 600;
  letter-spacing: .04em; padding: 7px 15px; border-radius: 100px; margin-bottom: 22px;
  line-height: 1.45;
}
.hero-kicker .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500); flex: none; margin-top: 6px; }
.hero h1 { color: var(--ink-900); margin-bottom: .38em; max-width: 13ch; }
.hero h1 em {
  font-style: italic; color: var(--gold-600);
  font-family: var(--serif);
}
.hero-lead { font-size: 1.12rem; color: var(--ink-700); max-width: 52ch; margin-bottom: 30px; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 34px; }
.hero-motto {
  font-family: var(--serif); font-style: italic; font-size: 1.02rem;
  color: var(--ink-400); border-left: 2px solid var(--gold-300); padding-left: 14px;
}

.hero-figure { position: relative; }
.hero-frame {
  position: relative; border-radius: 260px 260px var(--radius-lg) var(--radius-lg);
  overflow: hidden; aspect-ratio: 4 / 4.4; box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255, 255, 255, .1);
}
.hero-frame img { width: 100%; height: 100%; object-fit: cover; }
.hero-badge {
  position: absolute; left: -26px; bottom: 34px;
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 16px 20px; box-shadow: var(--shadow-md);
  display: flex; align-items: center; gap: 14px; max-width: 260px;
}
.hero-badge .num {
  font-family: var(--serif); font-size: 1.9rem; line-height: 1; color: var(--ink-900);
}
.hero-badge .lbl { font-size: 12.5px; color: var(--ink-500); line-height: 1.35; }

/* ---------- Stats ---------- */
.stats {
  display: grid; grid-template-columns: repeat(4, 1fr);
  background: var(--white); border: 1px solid var(--line);
  border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow-sm);
}
.stat { padding: 26px 24px; text-align: center; border-right: 1px solid var(--line); }
.stat:last-child { border-right: 0; }
.stat .value {
  font-family: var(--serif); font-size: 2.1rem; line-height: 1;
  color: var(--ink-900); display: block; margin-bottom: 6px;
}
.stat .label { font-size: 12.5px; text-transform: uppercase; letter-spacing: .12em; color: var(--ink-400); }

/* ---------- Cards / grid ---------- */
.grid { display: grid; gap: 26px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---------- News ---------- */
.news-card {
  display: flex; flex-direction: column; background: var(--white);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  overflow: hidden; transition: transform .22s var(--ease), box-shadow .22s var(--ease), border-color .22s var(--ease);
  height: 100%;
}
.news-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); border-color: var(--cream-200); }
.news-thumb { aspect-ratio: 16 / 9; overflow: hidden; background: var(--cream-200); }
.news-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.news-card:hover .news-thumb img { transform: scale(1.04); }
/* text-only news card */
.news-stamp {
  display: flex; align-items: baseline; gap: 9px; padding: 22px 24px 0;
  border-top: 3px solid var(--gold-500);
}
.news-stamp .dd { font-family: var(--serif); font-size: 2.35rem; line-height: 1; color: var(--ink-900); }
.news-stamp .mm { font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--ink-400); }
.news-card--text { background: var(--white); }
.news-card--text .news-body { padding-top: 16px; }

.news-body { padding: 24px 24px 22px; display: flex; flex-direction: column; flex: 1; }
.news-meta { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.tag {
  font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase;
  color: #a9cbea; background: rgba(120, 178, 230, .14);
  border: 1px solid rgba(120, 178, 230, .22);
  padding: 4px 9px; border-radius: 3px;
}
.tag--gold { color: var(--gold-300); background: rgba(217, 183, 109, .14); border-color: rgba(217, 183, 109, .3); }
.news-date { font-size: 12.5px; color: var(--ink-400); }
.news-card h3 { font-size: 1.16rem; margin-bottom: .5em; color: var(--ink-900); }
.news-card h3 a { color: inherit; }
.news-card p { font-size: 14.5px; color: var(--ink-500); margin-bottom: 18px; }
.news-body .link-arrow { margin-top: auto; font-size: 13.5px; }

.news-card--feature { grid-column: span 2; }
.news-card--feature .news-thumb { aspect-ratio: 16 / 7.4; }
.news-card--feature h3 { font-size: 1.6rem; }
.news-card--feature p { font-size: 15.5px; }

/* ---------- News list (page) ---------- */
.news-list { display: flex; flex-direction: column; gap: 0; border-top: 1px solid var(--line); }
.news-row {
  display: grid; grid-template-columns: 118px 1fr auto; gap: 30px;
  padding: 26px 0; border-bottom: 1px solid var(--line); align-items: start;
}
.news-row:hover { background: rgba(255, 255, 255, .035); }
.news-row .d { font-family: var(--serif); color: var(--ink-900); font-size: 1.05rem; line-height: 1.3; }
.news-row .d small { display: block; font-family: var(--sans); font-size: 12px; color: var(--ink-400); letter-spacing: .06em; text-transform: uppercase; margin-top: 4px; }
.news-row h3 { font-size: 1.2rem; margin-bottom: .35em; }
.news-row h3 a { color: var(--ink-900); }
.news-row p { font-size: 14.5px; color: var(--ink-500); margin: 0; max-width: 70ch; }

/* ---------- Article ---------- */
.article-head { max-width: 760px; }
.article-head h1 { color: var(--ink-900); }
.article-meta { display: flex; align-items: center; gap: 14px; margin-bottom: 26px; font-size: 13.5px; color: var(--ink-400); }
.article-cover { border-radius: var(--radius-lg); overflow: hidden; margin: 0 0 40px; border: 1px solid var(--line); }
.article-cover img { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; }
.prose { max-width: 70ch; font-size: 1.04rem; color: var(--ink-700); }
.prose p { margin-bottom: 1.15em; }
.prose h3 { color: var(--ink-900); margin-top: 1.6em; }
.prose ul li { margin-bottom: .5em; }
.prose blockquote {
  margin: 1.6em 0; padding: 4px 0 4px 22px; border-left: 3px solid var(--gold-400, var(--gold-300));
  font-family: var(--serif); font-size: 1.12rem; font-style: italic; color: var(--ink-700);
}
.prose a { text-decoration: underline; text-underline-offset: 2px; }

/* ---------- Breadcrumbs ---------- */
.crumbs { font-size: 13px; color: var(--ink-400); padding: 18px 0 0; }
.crumbs a { color: var(--ink-400); }
.crumbs a:hover { color: var(--link); }
.crumbs span { margin: 0 7px; opacity: .5; }

.page-head {
  padding: 34px 0 46px;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--cream-100), var(--cream-50));
}
.page-head h1 { color: var(--ink-900); margin-bottom: .3em; }
.page-head p { color: var(--ink-500); font-size: 1.08rem; max-width: 62ch; margin: 0; }

/* ---------- About / values ---------- */
.about-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 60px; align-items: start; }
.about-lead {
  font-family: var(--serif); font-size: 1.32rem; line-height: 1.55;
  color: var(--ink-900); margin-bottom: 22px;
}
.value-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 26px 24px; position: relative; overflow: hidden;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.value-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.value-card .idx {
  font-family: var(--serif); font-size: 12px; letter-spacing: .18em;
  color: var(--gold-600); display: block; margin-bottom: 12px;
}
.value-card h3 { font-size: 1.1rem; margin-bottom: .45em; color: var(--ink-900); }
.value-card p { font-size: 14.3px; color: var(--ink-500); margin: 0; }

.director-card {
  background: var(--navy-800); color: rgba(255, 255, 255, .78);
  border-radius: var(--radius-lg); padding: 34px; position: relative; overflow: hidden;
}
.director-card::before {
  content: "„"; position: absolute; top: -26px; right: 12px;
  font-family: var(--serif); font-size: 12rem; line-height: 1; color: rgba(227, 203, 146, .12);
}
.director-card .who { display: flex; align-items: center; gap: 16px; margin-bottom: 20px; }
.director-card .who h3 { color: #fff; margin: 0 0 2px; font-size: 1.1rem; }
.director-card .who span { font-size: 12.5px; color: var(--gold-300); letter-spacing: .04em; }
.director-card p { font-size: 14.6px; line-height: 1.7; position: relative; }
.director-card .sign {
  font-family: var(--serif); font-style: italic; color: var(--gold-300);
  font-size: 1.05rem; margin-top: 18px;
}

/* ---------- Avatars ---------- */
.avatar {
  width: 56px; height: 56px; border-radius: 50%; flex: none;
  display: grid; place-items: center; overflow: hidden;
  background: linear-gradient(140deg, #16405f, #0d2a44);
  color: var(--gold-300); font-family: var(--serif); font-size: 1.12rem; font-weight: 600;
  border: 1px solid rgba(255, 255, 255, .12);
}
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar--sm { width: 42px; height: 42px; font-size: .95rem; }
.avatar--lg { width: 76px; height: 76px; font-size: 1.5rem; }

/* ---------- Teachers ---------- */
.teacher-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px; display: flex; gap: 18px; align-items: flex-start;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
}
.teacher-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.teacher-card h3 { font-size: 1.06rem; margin: 0 0 3px; color: var(--ink-900); }
.teacher-card .subject { font-size: 13px; color: var(--gold-600); font-weight: 600; margin-bottom: 8px; }
.teacher-card .bio { font-size: 13.8px; color: var(--ink-500); margin: 0; }
.teacher-card .role {
  display: inline-block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-400); margin-bottom: 5px;
}

/* ---------- Classes ---------- */
.class-card {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white);
  padding: 26px; display: flex; flex-direction: column; gap: 10px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.class-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); }
.class-card .top { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; }
.class-card .cname { font-family: var(--serif); font-size: 1.7rem; color: var(--ink-900); line-height: 1; }
.class-card .count { font-size: 12.5px; color: var(--ink-400); }
.class-card .profile { font-size: 13px; font-weight: 600; color: var(--gold-600); }
.class-card p { font-size: 13.8px; color: var(--ink-500); margin: 0; }
.class-card .meta {
  margin-top: auto; padding-top: 12px; border-top: 1px dashed var(--line);
  display: flex; justify-content: space-between; font-size: 12.5px; color: var(--ink-400);
}

/* ---------- Facts card ---------- */
.facts {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--white);
  padding: 22px 24px; margin-top: 22px;
}
.facts h3 { font-size: 1rem; margin: 0 0 14px; color: var(--ink-900); }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: 10px 16px; font-size: 13.6px; }
.facts dt { color: var(--ink-400); }
.facts dd { margin: 0; color: var(--ink-900); font-weight: 500; text-align: right; }

/* ---------- Bells strip ---------- */
.bells-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 10px; }
.bell-cell {
  border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--cream-50);
  padding: 16px 10px; text-align: center; display: flex; flex-direction: column; gap: 3px;
  transition: border-color .18s var(--ease), transform .18s var(--ease);
}
.bell-cell:hover { border-color: var(--gold-300); transform: translateY(-2px); }
.bell-cell .bn {
  font-size: 10.5px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--gold-600); font-weight: 600; margin-bottom: 3px;
}
.bell-cell .bt { font-family: var(--serif); font-size: 1.02rem; color: var(--ink-900); font-variant-numeric: tabular-nums; }
.bell-cell .bd { color: var(--ink-400); font-size: 11px; line-height: .8; }

/* ---------- Bells ---------- */
.bells {
  border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden;
  background: var(--white);
}
.bells table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.bells th, .bells td { padding: 11px 18px; text-align: left; border-bottom: 1px solid var(--line); }
.bells th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .12em;
  color: var(--ink-400); background: var(--cream-100); font-weight: 600;
}
.bells tr:last-child td { border-bottom: 0; }
.bells td:nth-child(2), .bells td:nth-child(3) { font-variant-numeric: tabular-nums; color: var(--ink-700); }

/* ---------- Gallery ---------- */
.gallery-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.gallery-item {
  position: relative; overflow: hidden; border-radius: var(--radius-lg);
  aspect-ratio: 4 / 3; background: var(--cream-200); border: 1px solid var(--line);
  cursor: zoom-in; padding: 0; display: block; width: 100%;
}
.gallery-item img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s var(--ease); }
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute; inset: auto 0 0 0; padding: 30px 16px 13px;
  background: linear-gradient(transparent, rgba(7, 28, 51, .82));
  color: #fff; font-size: 13px; text-align: left; line-height: 1.4;
}
.gallery-grid .gallery-item { aspect-ratio: 4 / 3; }

.lightbox {
  position: fixed; inset: 0; z-index: 200; background: rgba(2, 10, 20, .96);
  display: none; place-items: center; padding: 40px;
}
.lightbox.open { display: grid; }
.lightbox img { max-width: 92vw; max-height: 82vh; border-radius: var(--radius); box-shadow: var(--shadow-lg); }
.lightbox .cap { color: rgba(255, 255, 255, .8); font-size: 14px; margin-top: 14px; text-align: center; }
.lightbox .close {
  position: absolute; top: 22px; right: 26px; background: none; border: 0;
  color: #fff; font-size: 32px; line-height: 1; opacity: .7;
}
.lightbox .close:hover { opacity: 1; }
.lightbox .nav-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .2);
  color: #fff; width: 46px; height: 46px; border-radius: 50%; font-size: 20px;
}
.lightbox .nav-btn:hover { background: rgba(255, 255, 255, .2); }
.lightbox .prev { left: 22px; }
.lightbox .next { right: 22px; }

/* ---------- Documents ---------- */
.doc-list { border-top: 1px solid var(--line); }
.doc-row {
  display: grid; grid-template-columns: 44px 1fr auto; gap: 18px; align-items: center;
  padding: 18px 0; border-bottom: 1px solid var(--line);
}
.doc-row:hover { background: rgba(255, 255, 255, .035); }
.doc-icon {
  width: 40px; height: 46px; border: 1px solid var(--line); border-radius: 3px;
  display: grid; place-items: center; font-size: 10px; font-weight: 700;
  letter-spacing: .04em; color: var(--gold-300); background: var(--white);
}
.doc-row h3 { font-size: 1rem; margin: 0 0 3px; font-family: var(--sans); font-weight: 600; color: var(--ink-900); }
.doc-row .dmeta { font-size: 12.5px; color: var(--ink-400); display: flex; gap: 10px; flex-wrap: wrap; }
.doc-row .dmeta .cat { color: var(--gold-600); font-weight: 600; }
.doc-row .dl {
  font-size: 13px; font-weight: 600; color: var(--link);
  border: 1px solid var(--line); border-radius: 100px; padding: 8px 15px; white-space: nowrap;
}
.doc-row .dl:hover { border-color: var(--gold-500); background: var(--gold-500); color: var(--navy-900); }
.doc-row .dl[aria-disabled="true"] { color: var(--ink-400); border-style: dashed; pointer-events: none; }

/* ---------- Contacts ---------- */
.contact-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 46px; align-items: start; }
.contact-item { display: flex; gap: 16px; padding: 18px 0; border-bottom: 1px solid var(--line); }
.contact-item:first-child { padding-top: 0; }
.contact-item .ic {
  width: 40px; height: 40px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: rgba(120, 178, 230, .14); color: var(--gold-300);
}
.contact-item h4 {
  font-family: var(--sans); font-size: 11.5px; text-transform: uppercase; letter-spacing: .13em;
  color: var(--ink-400); margin: 0 0 4px; font-weight: 600;
}
.contact-item .v { font-size: 1.02rem; color: var(--ink-900); font-weight: 500; }
.contact-item .n { font-size: 12.5px; color: var(--ink-400); margin-top: 3px; }
.map-frame {
  border-radius: var(--radius-lg); overflow: hidden; border: 1px solid var(--line);
  box-shadow: var(--shadow-sm); background: var(--cream-200);
}
.map-frame iframe { width: 100%; height: 380px; border: 0; display: block; }

/* ---------- Steps (admission) ---------- */
.steps { counter-reset: step; display: grid; gap: 0; }
.step {
  display: grid; grid-template-columns: 60px 1fr; gap: 22px;
  padding: 24px 0; border-bottom: 1px solid var(--line);
}
.step:last-child { border-bottom: 0; }
.step .no {
  counter-increment: step; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; border: 1px solid var(--gold-300);
  color: var(--gold-600); font-family: var(--serif); font-size: 1.1rem;
}
.step .no::before { content: counter(step, decimal-leading-zero); }
.step h3 { font-size: 1.1rem; margin: 4px 0 6px; color: var(--ink-900); }
.step p { font-size: 14.6px; color: var(--ink-500); margin: 0; }

.dates-list { list-style: none; padding: 0; margin: 0; }
.dates-list li {
  display: grid; grid-template-columns: 108px 1fr; gap: 16px;
  padding: 13px 0; border-bottom: 1px dashed var(--line); font-size: 14.5px;
}
.dates-list li:last-child { border-bottom: 0; }
.dates-list .dt { font-family: var(--serif); color: var(--ink-900); }

/* ---------- FAQ ---------- */
.faq { border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); padding: 4px 0; }
.faq summary {
  cursor: pointer; list-style: none; padding: 18px 40px 18px 0; position: relative;
  font-family: var(--serif); font-size: 1.08rem; color: var(--ink-900);
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  font-size: 22px; color: var(--gold-600); font-family: var(--sans); font-weight: 300;
}
.faq details[open] summary::after { content: "–"; }
.faq .a { padding: 0 0 20px; color: var(--ink-500); font-size: 14.8px; max-width: 72ch; }

/* ---------- CTA band ---------- */
.cta-band {
  background: linear-gradient(135deg, #123a61 0%, #0c2942 100%);
  border: 1px solid rgba(217, 183, 109, .22);
  color: #fff; border-radius: var(--radius-lg);
  padding: 44px 48px; display: flex; align-items: center; justify-content: space-between;
  gap: 32px; flex-wrap: wrap; position: relative; overflow: hidden;
}
.cta-band::after {
  content: ""; position: absolute; right: -60px; top: -60px; width: 240px; height: 240px;
  border-radius: 50%; border: 1px solid rgba(227, 203, 146, .22);
}
.cta-band h2 { color: #fff; margin: 0 0 6px; font-size: 1.75rem; }
.cta-band p { margin: 0; color: rgba(255, 255, 255, .66); font-size: 15px; }

/* ---------- Footer ---------- */
.site-footer { background: var(--navy-900); color: rgba(255, 255, 255, .62); padding: 58px 0 0; font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr 1.1fr; gap: 42px; padding-bottom: 44px; }
.site-footer h4 {
  color: #fff; font-family: var(--sans); font-size: 11.5px; text-transform: uppercase;
  letter-spacing: .15em; margin: 0 0 16px; font-weight: 600;
}
.site-footer a { color: rgba(255, 255, 255, .62); }
.site-footer a:hover { color: var(--gold-300); }
.footer-brand { display: flex; gap: 14px; margin-bottom: 16px; }
.footer-brand .crest { width: 48px; height: 48px; }
.footer-brand .name { font-family: var(--serif); color: #fff; font-size: 1.05rem; line-height: 1.3; }
.footer-brand .sub { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; color: rgba(255, 255, 255, .4); margin-top: 5px; }
.footer-list { list-style: none; padding: 0; margin: 0; }
.footer-list li { margin-bottom: 9px; }
.footer-bottom {
  border-top: 1px solid rgba(255, 255, 255, .1); padding: 18px 0;
  display: flex; justify-content: space-between; gap: 18px; flex-wrap: wrap;
  font-size: 12.5px; color: rgba(255, 255, 255, .4);
}
.footer-social { display: flex; gap: 10px; }
.footer-social a {
  width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid rgba(255, 255, 255, .16);
}
.footer-social a:hover { border-color: var(--gold-300); background: rgba(227, 203, 146, .1); }

/* ---------- Reveal animation ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .6s var(--ease), transform .6s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  * { animation-duration: .001ms !important; }
}

/* ---------- Mobile nav drawer ---------- */
.mobile-nav {
  position: fixed; inset: 0; z-index: 120; display: none;
  background: var(--cream-50);
  padding: 20px 22px 40px; overflow-y: auto;
}
.mobile-nav.open { display: block; }
.mobile-nav .m-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.mobile-nav ul { list-style: none; margin: 0; padding: 0; }
.mobile-nav li { border-bottom: 1px solid var(--line); }
.mobile-nav a { display: block; padding: 15px 4px; font-size: 1.05rem; color: var(--ink-900); font-weight: 500; }
.mobile-nav .brand { display: flex; padding: 0; gap: 12px; }
.mobile-nav .brand .brand-name { font-size: .95rem; }
.mobile-nav .close-btn {
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  width: 40px; height: 40px; font-size: 20px; color: var(--ink-900); line-height: 1;
}

/* ---------- Empty state ---------- */
.empty {
  border: 1px dashed var(--line); border-radius: var(--radius-lg);
  padding: 40px; text-align: center; color: var(--ink-400); font-size: 14.5px;
  background: var(--cream-50);
}

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .header-cta { display: none; }
}

@media (max-width: 1080px) {
  .main-nav a { padding: 9px 8px; font-size: 13.4px; }
  .hero .wrap { gap: 40px; }
}

@media (max-width: 900px) {
  .topbar-info { gap: 14px; font-size: 12px; }
  .topbar-info .hide-sm { display: none; }
  .main-nav { display: none; }
  .nav-toggle { display: inline-flex; }
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; padding-bottom: 46px; gap: 34px; }
  .hero h1 { max-width: none; }
  .hero-frame { aspect-ratio: 16 / 11; border-radius: var(--radius-lg); }
  .hero-badge { left: auto; right: 12px; bottom: -18px; padding: 12px 16px; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .stat:nth-child(2) { border-right: 0; }
  .stat:nth-child(1), .stat:nth-child(2) { border-bottom: 1px solid var(--line); }
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .about-grid { grid-template-columns: 1fr; gap: 34px; }
  .contact-grid { grid-template-columns: 1fr; gap: 32px; }
  .bells-strip { grid-template-columns: repeat(4, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .gallery-grid { grid-template-columns: repeat(2, 1fr); }
  .news-card--feature { grid-column: span 2; }
  .section { padding: 56px 0; }
  .cta-band { padding: 32px; }
  .news-row { grid-template-columns: 1fr; gap: 10px; }
  .news-row .d { display: flex; gap: 8px; align-items: baseline; }
  .news-row .d small { margin: 0; }
}

@media (max-width: 620px) {
  body { font-size: 16px; }
  .wrap { padding: 0 18px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .news-card--feature { grid-column: span 1; }
  .gallery-grid { grid-template-columns: 1fr; }
  .gallery-grid .gallery-item { aspect-ratio: 4 / 3; }
  .stats { grid-template-columns: 1fr 1fr; }
  .bells-strip { grid-template-columns: repeat(2, 1fr); }
  .stat { padding: 18px 12px; }
  .stat .value { font-size: 1.7rem; }
  .brand-name { font-size: .95rem; }
  .brand-sub { font-size: 10px; letter-spacing: .1em; }
  .crest { width: 44px; height: 44px; }
  .topbar-links { display: none; }
  .doc-row { grid-template-columns: 40px 1fr; }
  .doc-row .dl { grid-column: 2; justify-self: start; margin-top: 4px; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-motto { font-size: .95rem; }
  .section { padding: 44px 0; }
  .page-head { padding: 22px 0 32px; }
  .cta-band { padding: 26px; }
  .lightbox { padding: 16px; }
  .lightbox .nav-btn { width: 38px; height: 38px; }
  .lightbox .prev { left: 8px; }
  .lightbox .next { right: 8px; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .site-header, .site-footer, .cta-band, .hero-figure, .nav-toggle { display: none !important; }
  body { background: #fff; color: #111; }
  .section { padding: 18px 0; }
  .page-head, .hero { background: none; }
  .value-card, .teacher-card, .class-card, .facts, .bells, .news-card, .apply-card, .job-card {
    background: #fff !important; border-color: #ccc !important; color: #111 !important;
  }
  .section--navy, .director-card { background: #fff !important; color: #111 !important; }
  .section--navy h2, .section--navy h3, .director-card h3, .page-head h1 { color: #111 !important; }
}

/* ==========================================================================
   Кариери
   ========================================================================== */
.jobs { display: grid; gap: 16px; }
.job-card {
  display: flex; gap: 26px; align-items: flex-start; justify-content: space-between;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 26px 28px;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), border-color .2s var(--ease);
}
.job-card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--cream-200); }
.job-body { min-width: 0; }
.job-top { display: flex; align-items: center; gap: 14px; margin-bottom: 11px; flex-wrap: wrap; }
.job-deadline { font-size: 12.5px; color: var(--ink-400); }
.job-card h3 { font-size: 1.3rem; margin: 0 0 9px; color: var(--ink-900); }
.job-meta { display: flex; gap: 18px; flex-wrap: wrap; font-size: 13px; color: var(--ink-400); margin-bottom: 12px; }
.job-meta span { position: relative; }
.job-meta span + span::before { content: "·"; position: absolute; left: -11px; opacity: .55; }
.job-summary { font-size: 14.6px; color: var(--ink-500); margin: 0 0 12px; max-width: 74ch; }
.job-more summary {
  cursor: pointer; font-size: 13.5px; font-weight: 600; color: var(--link);
  list-style: none; display: inline-flex; align-items: center; gap: 7px;
}
.job-more summary::-webkit-details-marker { display: none; }
.job-more summary::after { content: "＋"; font-weight: 400; color: var(--gold-600); }
.job-more[open] summary::after { content: "–"; }
.job-more[open] summary { margin-bottom: 14px; }
.job-req-title { font-size: .95rem; margin: 18px 0 8px; color: var(--ink-900); font-family: var(--serif); }
.job-req { margin: 0; padding-left: 20px; font-size: 14.4px; color: var(--ink-500); }
.job-side { flex: none; }

.apply-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 52px; align-items: start; }
.apply-list { list-style: none; padding: 0; margin: 22px 0 0; }
.apply-list li { position: relative; padding-left: 20px; font-size: 14.2px; color: var(--ink-500); margin-bottom: 10px; }
.apply-list li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 6px; height: 6px; border-radius: 50%; background: var(--gold-500);
}
.apply-card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 28px; box-shadow: var(--shadow-sm);
}

/* Събеседване в Discord */
.discord-note {
  display: flex; gap: 13px; align-items: flex-start;
  margin-top: 24px; padding: 16px 18px; max-width: 44ch;
  background: rgba(88, 101, 242, .16);
  border: 1px solid rgba(88, 101, 242, .42);
  border-left: 3px solid #5865f2;
  border-radius: 8px;
}
.discord-note .dn-ic {
  flex: none; width: 34px; height: 34px; border-radius: 8px;
  display: grid; place-items: center;
  background: #5865f2; color: #fff;
}
.discord-note .dn-body { min-width: 0; }
.discord-note b {
  display: block; font-family: var(--sans); font-size: 12px; font-weight: 700;
  letter-spacing: .09em; text-transform: uppercase; color: #a5aeff; margin-bottom: 5px;
}
.discord-note p { margin: 0; font-size: 13.6px; line-height: 1.6; color: var(--ink-500); }
.discord-note .btn { margin-top: 11px; }
.fld-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fld { margin-bottom: 14px; display: flex; flex-direction: column; }
.fld label {
  font-size: 11.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase;
  color: var(--ink-500); margin-bottom: 6px;
}
.fld input, .fld select {
  width: 100%; border: 1px solid var(--line); border-radius: 6px; background: var(--white);
  padding: 11px 12px; font: inherit; font-size: 14.6px; color: var(--ink-900);
  transition: border-color .15s, box-shadow .15s;
}
.fld input:focus, .fld select:focus {
  outline: none; border-color: var(--navy-600); box-shadow: 0 0 0 3px rgba(43, 116, 173, .32);
}
.fld input.invalid { border-color: #d9614d; background: rgba(217, 97, 77, .12); }
.fld .hint { font-size: 11.5px; color: var(--ink-400); margin-top: 5px; line-height: 1.4; }
.err { display: none; font-size: 12.2px; color: #ff9d8c; margin-top: 5px; line-height: 1.45; }
.err.show { display: block; }
.consent {
  display: flex; gap: 10px; align-items: flex-start; font-size: 13.2px; color: var(--ink-500);
  line-height: 1.5; cursor: pointer; margin: 6px 0 4px;
}
.consent input { margin-top: 3px; width: 16px; height: 16px; flex: none; accent-color: var(--gold-500); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form-status { display: none; margin-top: 14px; font-size: 13.2px; border-radius: 6px; padding: 11px 13px; line-height: 1.55; }
.form-status.err { display: block; background: rgba(217, 83, 79, .13); border: 1px solid rgba(217, 83, 79, .42); color: #ffb0a3; }
.form-note { font-size: 11.8px; color: var(--ink-400); margin: 14px 0 0; line-height: 1.55; }
.apply-success { text-align: center; padding: 22px 6px; }
.apply-success .tick {
  width: 52px; height: 52px; border-radius: 50%; background: rgba(72, 190, 120, .16);
  color: #7fe0a6; display: grid; place-items: center; font-size: 24px; margin: 0 auto 16px;
}
.apply-success h3 { margin: 0 0 8px; color: var(--ink-900); }
.apply-success p { font-size: 14.4px; color: var(--ink-500); margin: 0 0 18px; }

@media (max-width: 900px) {
  .job-card { flex-direction: column; gap: 16px; padding: 22px; }
  .job-side { width: 100%; }
  .job-side .btn { width: 100%; }
  .apply-grid { grid-template-columns: 1fr; gap: 30px; }
}
@media (max-width: 620px) {
  .fld-row { grid-template-columns: 1fr; gap: 0; }
  .apply-card { padding: 20px; }
}

/* ==========================================================================
   Партньорства
   ========================================================================== */
.partners-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }

.partner-card {
  display: flex; gap: 16px; align-items: center;
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: 20px; color: inherit; height: 100%;
  transition: transform .2s var(--ease), border-color .2s var(--ease), box-shadow .2s var(--ease);
}
.partner-card:hover {
  color: inherit; transform: translateY(-2px);
  border-color: rgba(217, 183, 109, .45); box-shadow: var(--shadow-md);
}
.partner-card--plain { cursor: default; }
.partner-card--plain:hover { transform: none; border-color: var(--line); box-shadow: none; }

.partner-logo {
  width: 76px; height: 76px; flex: none; border-radius: 12px;
  display: grid; place-items: center; overflow: hidden; padding: 9px;
  background: rgba(255, 255, 255, .05); border: 1px solid rgba(255, 255, 255, .09);
}
.partner-logo img { width: 100%; height: 100%; object-fit: contain; }
.partner-mono {
  font-family: var(--serif); font-size: 1.24rem; color: var(--gold-300);
  letter-spacing: .04em; line-height: 1;
}

.partner-body { min-width: 0; }
.partner-name {
  display: block; font-family: var(--serif); font-size: 1.04rem; line-height: 1.3;
  color: var(--ink-900); margin-bottom: 5px;
}
.partner-desc { display: block; font-size: 13.3px; line-height: 1.5; color: var(--ink-500); }
.partner-go {
  display: inline-flex; align-items: center; gap: 6px; margin-top: 10px;
  font-size: 12.2px; font-weight: 600; letter-spacing: .02em; color: var(--gold-300);
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.partner-go svg { flex: none; transition: transform .2s var(--ease); }
.partner-card:hover .partner-go svg { transform: translate(2px, -2px); }

.partners-note {
  margin: 26px 0 0; font-size: 14px; color: var(--ink-500);
  padding-top: 20px; border-top: 1px dashed var(--line);
}
.partners-note a { color: var(--gold-300); text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 1000px) {
  .partners-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 700px) {
  .partners-grid { grid-template-columns: 1fr; gap: 14px; }
  .partner-card { padding: 16px; gap: 14px; }
  .partner-logo { width: 64px; height: 64px; border-radius: 10px; }
}
