/* =========================================================
   Кафедра кібербезпеки та захисту інформації · ОНМУ
   wwwroot/css/site.css
   Ідея дизайну: морська навігаційна карта + радар.
   ========================================================= */

:root {
  --deep: #0c2b40;        /* морська глибина: шапка, футер, текст */
  --deep-2: #123a54;
  --sea: #14647d;         /* бірюзово-синій: посилання, акценти */
  --sea-light: #7fb3c4;   /* лінії глибин на карті */
  --chart: #f1f5f4;       /* колір паперу навігаційної карти */
  --line: #d3dedd;
  --buoy: #ff5a1f;        /* міжнародний рятувальний помаранчевий — дуже дозовано */
  --white: #ffffff;
  --muted: #56707c;

  --radius: 14px;
  --container: 1200px;

  --font-head: "Geologica", "Segoe UI", system-ui, sans-serif;
  --font-body: "Onest", "Segoe UI", system-ui, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--deep);
  background: var(--white);
  font-variant-numeric: tabular-nums;
}
img { max-width: 100%; display: block; }
a { color: inherit; }

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

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

/* ---------- Верхня смужка ---------- */
.topbar {
  background: var(--deep);
  color: #a9c3cd;
  font-size: 14px;
}
.topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  min-height: 40px;
}
.topbar a { color: var(--white); text-decoration: none; }
.topbar a:hover { text-decoration: underline; }

/* ---------- Шапка ---------- */
.site-header { background: var(--white); position: relative; z-index: 101; }
.site-header .container {
  display: flex;
  align-items: center;
  gap: 24px;
  min-height: 92px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
  min-width: 0;
}
.brand__logo { width: 56px; height: 56px; flex-shrink: 0; }
.brand__text { display: flex; flex-direction: column; min-width: 0; }
.brand__name {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(16px, 2vw, 21px);
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.brand__uni { font-size: 14px; color: var(--muted); margin-top: 3px; }

.header-cta {
  margin-left: auto;
  flex-shrink: 0;
}

/* ---------- Кнопки ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 13px 24px;
  border-radius: 8px;
  border: 2px solid transparent;
  font: inherit;
  font-weight: 600;
  font-size: 16px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.btn--buoy { background: var(--buoy); color: var(--white); }
.btn--buoy:hover { background: #e84a12; }
.btn--line { border-color: currentColor; color: var(--white); }
.btn--line:hover { background: var(--white); color: var(--deep); border-color: var(--white); }
.btn--sea { border-color: var(--sea); color: var(--sea); }
.btn--sea:hover { background: var(--sea); color: var(--white); }

/* ---------- Навігація ---------- */
.nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--deep);
  border-bottom: 1px solid rgba(127,179,196,.2);
}
.nav__list {
  list-style: none;
  margin: 0 0 0 -16px;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
}
.nav__item { position: relative; }
.nav__link {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 18px 16px;
  border: 0;
  background: none;
  font: inherit;
  font-size: 15px;
  font-weight: 500;
  color: #d8e6ea;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
  position: relative;
  transition: color .2s;
}
/* підкреслення-«ватерлінія» для активного і наведеного пункту */
.nav__link::after {
  content: "";
  position: absolute;
  left: 16px; right: 16px; bottom: 0;
  height: 3px;
  background: var(--buoy);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s;
}
.nav__link:hover,
.nav__item:focus-within > .nav__link,
.nav__item.is-open > .nav__link,
.nav__link.is-active { color: var(--white); }
.nav__link:hover::after,
.nav__item.is-open > .nav__link::after,
.nav__link.is-active::after { transform: scaleX(1); }

.nav__chevron { width: 10px; height: 10px; transition: transform .2s; }
.nav__item:hover .nav__chevron,
.nav__item.is-open .nav__chevron { transform: rotate(180deg); }

.dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  min-width: 290px;
  margin: 0;
  padding: 10px 0;
  list-style: none;
  background: var(--white);
  border-radius: 0 0 var(--radius) var(--radius);
  box-shadow: 0 24px 48px -16px rgba(12, 43, 64, 0.35);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s, transform .18s, visibility .18s;
}
.nav__item--right .dropdown { left: auto; right: 0; }
.nav__item:hover > .dropdown,
.nav__item:focus-within > .dropdown,
.nav__item.is-open > .dropdown {
  opacity: 1;
  visibility: visible;
  transform: none;
}
.dropdown a {
  display: block;
  padding: 11px 22px;
  border-left: 3px solid transparent;
  font-size: 15px;
  text-decoration: none;
  color: var(--deep);
  transition: background-color .15s, border-color .15s;
}
.dropdown a:hover,
.dropdown a:focus-visible {
  background: var(--chart);
  border-left-color: var(--sea);
  color: var(--sea);
}

.burger {
  display: none;
  flex-shrink: 0;
  margin-left: auto;
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 8px;
  background: var(--deep);
  cursor: pointer;
}
.burger span,
.burger span::before,
.burger span::after {
  display: block;
  width: 20px;
  height: 2px;
  margin: 0 auto;
  background: var(--white);
  position: relative;
  transition: transform .2s, background-color .2s;
}
.burger span::before, .burger span::after { content: ""; position: absolute; left: 0; }
.burger span::before { top: -6px; }
.burger span::after { top: 6px; }
.burger[aria-expanded="true"] span { background: transparent; }
.burger[aria-expanded="true"] span::before { transform: translateY(6px) rotate(45deg); }
.burger[aria-expanded="true"] span::after { transform: translateY(-6px) rotate(-45deg); }

/* ---------- Головний банер з радаром ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  color: var(--white);
}
.hero .container {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  align-items: center;
  gap: 48px;
  padding-top: 88px;
  padding-bottom: 96px;
}
.hero__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(38px, 6vw, 72px);
  line-height: 1.02;
  letter-spacing: -0.03em;
}
.hero__text {
  max-width: 34em;
  margin: 24px 0 36px;
  font-size: 19px;
  color: #c4d8df;
}
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; }

.radar {
  position: relative;
  width: min(100%, 440px);
  aspect-ratio: 1;
  margin-left: auto;
  border-radius: 50%;
  background:
    radial-gradient(circle, transparent 0 24.5%, rgba(127,179,196,.35) 25% 25.3%, transparent 25.6% 49.5%,
      rgba(127,179,196,.35) 50% 50.3%, transparent 50.6% 74.5%, rgba(127,179,196,.35) 75% 75.3%, transparent 75.6%),
    rgba(20, 100, 125, .18);
  border: 2px solid rgba(127,179,196,.6);
}
/* перехрестя */
.radar::before,
.radar::after {
  content: "";
  position: absolute;
  background: rgba(127,179,196,.3);
}
.radar::before { left: 50%; top: 0; bottom: 0; width: 1px; }
.radar::after { top: 50%; left: 0; right: 0; height: 1px; }

.radar__sweep {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 290deg, rgba(127,179,196,0) 290deg, rgba(127,179,196,.55) 360deg);
  animation: sweep 6s linear infinite;
}
@keyframes sweep { to { transform: rotate(360deg); } }

.radar__blip {
  position: absolute;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  border-radius: 50%;
  background: var(--sea-light);
  box-shadow: 0 0 0 4px rgba(127,179,196,.25);
}
.radar__blip--threat {
  background: var(--buoy);
  box-shadow: 0 0 0 5px rgba(255,90,31,.3);
}
.radar__coords {
  position: absolute;
  left: 50%;
  bottom: -38px;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 14px;
  color: var(--sea-light);
}

/* ---------- Секції ---------- */
.section { padding: 88px 0; }
.section--chart { background: var(--chart); }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  margin-bottom: 40px;
}
.section-title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.section-link {
  font-weight: 600;
  color: var(--sea);
  text-decoration: none;
  border-bottom: 2px solid currentColor;
  padding-bottom: 2px;
}
.section-link:hover { color: var(--deep); }

/* ---------- Новини ---------- */
.news {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}
.news-card {
  display: flex;
  flex-direction: column;
  text-decoration: none;
}
.news-card__img {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  overflow: hidden;
  background: linear-gradient(160deg, var(--sea), var(--deep));
}
.news-card__img img { width: 100%; height: 100%; object-fit: cover; }
.news-card__date {
  margin-top: 18px;
  font-size: 14px;
  color: var(--muted);
}
.news-card__title {
  margin: 6px 0 0;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  transition: color .2s;
}
.news-card:hover .news-card__title { color: var(--sea); }

/* перша новина — велика, на всю ширину двох колонок */
.news-card--lead { grid-column: span 2; grid-row: span 2; }
.news-card--lead .news-card__img { aspect-ratio: 16 / 10; }
.news-card--lead .news-card__title { font-size: clamp(22px, 2.6vw, 30px); }

/* ---------- Освітні програми ---------- */
.programs {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 28px;
}
.program {
  position: relative;
  padding: 36px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.program__level {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--deep);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
}
.program__title {
  margin: 18px 0 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
}
.program p { margin: 0 0 22px; color: var(--muted); }

/* ---------- Події ---------- */
.events { list-style: none; margin: 0; padding: 0; }
.event {
  display: grid;
  grid-template-columns: 110px 1fr auto;
  align-items: center;
  gap: 28px;
  padding: 26px 0;
  border-top: 1px solid var(--line);
  text-decoration: none;
}
.events li:last-child .event { border-bottom: 1px solid var(--line); }
.event__date { font-family: var(--font-head); line-height: 1; }
.event__day { display: block; font-size: 40px; font-weight: 800; color: var(--sea); }
.event__month { display: block; margin-top: 6px; font-size: 14px; color: var(--muted); }
.event__title { margin: 0; font-size: 19px; font-weight: 600; }
.event__place { margin: 4px 0 0; font-size: 15px; color: var(--muted); }
.event__arrow {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 50%;
  border: 1px solid var(--line);
  color: var(--sea);
  transition: background-color .2s, color .2s, border-color .2s;
}
.event__arrow svg { width: 18px; height: 18px; }
.event:hover .event__arrow { background: var(--sea); border-color: var(--sea); color: var(--white); }
.event:hover .event__title { color: var(--sea); }

/* ---------- Внутрішні сторінки ---------- */
.page-head {
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  color: var(--white);
  padding: 44px 0 56px;
}
.breadcrumbs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 14px;
  color: var(--sea-light);
}
.breadcrumbs a { color: var(--white); text-decoration: none; }
.breadcrumbs a:hover { text-decoration: underline; }
.page-title {
  margin: 20px 0 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(34px, 5.5vw, 60px);
  line-height: 1.05;
  letter-spacing: -0.03em;
}
.page-lead { max-width: 40em; margin: 18px 0 0; font-size: 19px; color: #c4d8df; }

.page-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 64px;
  align-items: start;
  padding-top: 56px;
  padding-bottom: 88px;
}

.prose { max-width: 70ch; line-height: 1.75; }
.prose h2 {
  margin: 48px 0 14px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 26px;
  line-height: 1.2;
  letter-spacing: -0.01em;
}
.prose > h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 16px; }
.prose ul { margin: 0 0 16px; padding: 0; list-style: none; }
.prose li { position: relative; padding-left: 28px; margin-bottom: 10px; }
.prose li::before {
  content: "";
  position: absolute;
  left: 2px; top: .55em;
  width: 12px; height: 12px;
  border-radius: 50%;
  border: 3px solid var(--sea);
}
.prose__figure { margin: 0 0 40px; }
.prose__figure img {
  width: 100%;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  border-radius: var(--radius);
  background: linear-gradient(160deg, var(--sea), var(--deep));
}
.prose__figure figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }

.facts {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  margin: 24px 0 8px;
}
.fact {
  padding: 20px;
  background: var(--chart);
  border-radius: var(--radius);
}
.fact__title { margin: 0 0 6px; font-weight: 700; }
.fact p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.5; }

.sidebar { position: sticky; top: 80px; display: grid; gap: 20px; }
.side-card {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.side-card__title {
  margin: 0 0 14px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
}
.side-card p { margin: 0 0 12px; font-size: 15px; }
.side-card p:last-child { margin-bottom: 0; }
.side-card--deep { background: var(--deep); border-color: var(--deep); color: #c4d8df; }
.side-card--deep .side-card__title, .side-card--deep a { color: var(--white); }

.side-nav { list-style: none; margin: 0; padding: 0; }
.side-nav a {
  display: block;
  padding: 10px 14px;
  border-left: 3px solid transparent;
  text-decoration: none;
  font-weight: 500;
  transition: background-color .15s;
}
.side-nav a:hover { background: var(--chart); color: var(--sea); }
.side-nav a.is-current { border-left-color: var(--buoy); background: var(--chart); font-weight: 700; }

/* ---------- Футер ---------- */
.site-footer {
  background: var(--deep);
  color: #a9c3cd;
  padding: 72px 0 32px;
  font-size: 16px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 48px;
}
.footer-brand { display: flex; gap: 16px; align-items: flex-start; }
.footer-brand img { width: 52px; height: 52px; flex-shrink: 0; }
.footer-brand__name {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: var(--white);
}
.footer-brand__uni { margin: 6px 0 0; font-size: 15px; }
.footer-title {
  margin: 0 0 16px;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 16px;
  color: var(--white);
}
.footer-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-list a { color: #d8e6ea; text-decoration: none; }
.footer-list a:hover { color: var(--white); text-decoration: underline; }

.footer-bottom {
  margin-top: 56px;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.12);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  font-size: 14px;
}
.socials { display: flex; gap: 10px; }
.socials a {
  display: grid; place-items: center;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255,255,255,.2);
  color: var(--white);
  transition: background-color .2s, border-color .2s;
}
.socials a:hover { background: var(--sea); border-color: var(--sea); }
.socials svg { width: 19px; height: 19px; }

.to-top {
  position: fixed;
  right: 24px; bottom: 24px;
  z-index: 90;
  width: 52px; height: 52px;
  border: 0;
  border-radius: 50%;
  background: var(--buoy);
  color: var(--white);
  cursor: pointer;
  box-shadow: 0 12px 24px -8px rgba(255,90,31,.55);
  opacity: 0; visibility: hidden;
  transform: translateY(10px);
  transition: opacity .2s, transform .2s, visibility .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top svg { width: 22px; height: 22px; }

/* ---------- Адаптив ---------- */
@media (max-width: 1100px) {
  .nav__link { padding: 16px 11px; font-size: 14px; }
  .nav__link::after { left: 11px; right: 11px; }
  .nav__list { margin-left: -11px; }
}

@media (max-width: 960px) {
  .header-cta { display: none; }
  .burger { display: block; }
  .site-header .container { min-height: 78px; }

  .nav { display: none; position: static; }
  .nav.is-open { display: block; }
  .nav__list { flex-direction: column; flex-wrap: nowrap; margin: 0; padding: 8px 0 16px; }
  .nav__link { width: 100%; justify-content: space-between; padding: 14px 0; font-size: 16px; }
  .nav__link::after { display: none; }
  .dropdown {
    position: static;
    min-width: 0;
    padding: 0 0 8px;
    background: var(--deep-2);
    border-radius: 8px;
    box-shadow: none;
    display: none;
    opacity: 1; visibility: visible; transform: none;
  }
  .nav__item:hover > .dropdown,
  .nav__item:focus-within > .dropdown { display: none; }
  .nav__item.is-open > .dropdown { display: block; }
  .nav__item:hover .nav__chevron { transform: none; }
  .nav__item.is-open .nav__chevron { transform: rotate(180deg); }
  .dropdown a { color: #d8e6ea; }
  .dropdown a:hover, .dropdown a:focus-visible { background: transparent; color: var(--white); border-left-color: var(--buoy); }

  .hero .container { grid-template-columns: 1fr; padding-top: 56px; padding-bottom: 88px; }
  .radar { margin: 8px auto 0; width: min(80%, 340px); }

  .news { grid-template-columns: 1fr 1fr; }
  .news-card--lead { grid-row: auto; }
  .programs, .footer-grid, .page-layout { grid-template-columns: 1fr; }
  .page-layout { gap: 40px; }
  .sidebar { position: static; }
  .facts { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
  .topbar__uni { display: none; }
  .brand__uni { display: none; }
  .section { padding: 56px 0; }
  .section-head { flex-direction: column; align-items: flex-start; }
  .news { grid-template-columns: 1fr; }
  .news-card--lead { grid-column: auto; }
  .program { padding: 26px; }
  .event { grid-template-columns: 76px 1fr; gap: 18px; }
  .event__arrow { display: none; }
  .event__day { font-size: 32px; }
  .footer-bottom { flex-direction: column; align-items: flex-start; }
}

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

/* =========================================================
   Сторінка «Нормативні документи»
   ========================================================= */
.section--compact { padding: 56px 0 88px; }

.doc-grid {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 24px;
}
.doc-grid > li { display: flex; }

.doc-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 26px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--deep);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.doc-card:hover,
.doc-card:focus-visible {
  border-color: var(--sea);
  box-shadow: 0 18px 40px -20px rgba(12, 43, 64, .45);
  transform: translateY(-3px);
}

.doc-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
}
.doc-card__icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--chart);
  color: var(--sea);
  transition: background-color .2s, color .2s;
}
.doc-card__icon svg {
  width: 28px;
  height: 28px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.doc-card:hover .doc-card__icon { background: var(--deep); color: var(--white); }

.doc-card__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 28px;
  line-height: 1;
  color: var(--line);
  transition: color .2s;
}
.doc-card:hover .doc-card__num { color: var(--sea-light); }

.doc-card__title {
  flex: 1;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.3;
}

.doc-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 14px;
}
.doc-card__type {
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--chart);
  font-weight: 700;
  color: var(--muted);
}
.doc-card__open {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  color: var(--sea);
}
.doc-card__open svg {
  width: 16px;
  height: 16px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .2s;
}
.doc-card:hover .doc-card__open { color: var(--buoy); }
.doc-card:hover .doc-card__open svg { transform: translateX(4px); }

@media (max-width: 600px) {
  .doc-card { padding: 22px; }
  .doc-card__title { font-size: 18px; }
}

/* ---------- Сторінка окремого документа ---------- */
.page-title--doc { font-size: clamp(28px, 4vw, 44px); max-width: 22em; }

.doc-actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 28px; }
.btn__icon {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2.2;
  stroke-linecap: round; stroke-linejoin: round;
}

.doc-viewer {
  display: block;
  width: 100%;
  height: 80vh;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--chart);
}
.doc-viewer__hint { margin: 12px 0 0; font-size: 15px; color: var(--muted); }
.doc-viewer__hint a { color: var(--sea); }

.side-nav a { font-size: 15px; line-height: 1.4; }

@media (max-width: 600px) {
  .doc-viewer { height: 70vh; min-height: 420px; }
}

/* =========================================================
   Сторінка «Стейкхолдери»
   ========================================================= */
.sh-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}

.sh-card {
  position: relative;
  display: flex;
  flex-direction: column;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.sh-card:hover,
.sh-card:focus-within {
  border-color: var(--sea);
  box-shadow: 0 18px 40px -20px rgba(12, 43, 64, .45);
  transform: translateY(-3px);
}

.sh-card__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}
.sh-card__type {
  padding: 4px 12px;
  border-radius: 6px;
  background: var(--chart);
  font-size: 13px;
  font-weight: 600;
  color: var(--muted);
  text-align: right;
}

.sh-card__title {
  margin: 22px 0 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
  line-height: 1.25;
}
.sh-card__link { text-decoration: none; color: var(--deep); }
/* розтягуємо посилання на всю картку */
.sh-card__link::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
}
.sh-card__link:focus-visible { outline: none; }
.sh-card:has(.sh-card__link:focus-visible) { outline: 3px solid var(--buoy); outline-offset: 3px; }

.sh-card__text { flex: 1; margin: 0 0 22px; color: var(--muted); font-size: 16px; }

.sh-card__footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  font-size: 15px;
  font-weight: 600;
}
.sh-card__more, .sh-card__ext {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}
.sh-card__more { color: var(--sea); }
.sh-card__more svg, .sh-card__ext svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s;
}
.sh-card:hover .sh-card__more svg { transform: translateX(4px); }

/* кнопка на сайт — над розтягнутим посиланням */
.sh-card__ext {
  position: relative;
  z-index: 1;
  padding: 8px 14px;
  border-radius: 8px;
  border: 1.5px solid var(--line);
  color: var(--deep);
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.sh-card__ext:hover { background: var(--buoy); border-color: var(--buoy); color: var(--white); }

/* Логотип / монограма / іконка */
.sh-logo {
  position: relative;
  display: grid;
  place-items: center;
  width: auto;          /* ширина підлаштовується: квадратні лого — 72px, широкі — ширше */
  min-width: 72px;
  max-width: 180px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
}
.sh-logo img {
  display: block;
  height: 70px;   /* висота рамки мінус рамка */
  width: auto;
  max-width: 180px;
  object-fit: contain;
  padding: 10px;
}
.sh-logo--dark { background: var(--deep); border-color: var(--deep); }
.sh-logo__short {
  display: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
  color: var(--white);
}
.sh-logo--empty { background: var(--deep); border-color: var(--deep); }
.sh-logo--empty img { display: none; }
.sh-logo--empty .sh-logo__short { display: block; }

.sh-logo__icon {
  width: 34px; height: 34px;
  fill: none; stroke: var(--sea); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.sh-logo:has(.sh-logo__icon) { background: var(--chart); border-color: var(--chart); }

/* Шапка сторінки стейкхолдера */
.sh-hero {
  display: flex;
  align-items: center;
  gap: 24px;
  margin-top: 22px;
}
.sh-hero .page-title { margin-top: 6px; }
.sh-hero__type {
  font-size: 14px;
  font-weight: 600;
  color: var(--sea-light);
}
.sh-logo--lg { min-width: 104px; max-width: 260px; height: 104px; border-radius: 18px; }
.sh-logo--lg img { height: 102px; max-width: 260px; padding: 14px; }
.sh-logo--lg .sh-logo__short { font-size: 30px; }
.sh-logo--lg .sh-logo__icon { width: 48px; height: 48px; }
.page-head .sh-logo--empty { background: var(--buoy); border-color: var(--buoy); }

@media (max-width: 600px) {
  .sh-grid { grid-template-columns: 1fr; }
  .sh-card { padding: 22px; }
  .sh-card__footer { flex-wrap: wrap; }
  .sh-hero { flex-direction: column; align-items: flex-start; gap: 16px; }
  .sh-logo--lg { min-width: 80px; height: 80px; }
  .sh-logo--lg img { height: 78px; padding: 10px; }
}
.page-head .sh-logo--dark { border-color: rgba(255,255,255,.25); }

/* ---------- Сторінка партнера: зображення, факти, договір ---------- */
.sh-banner { margin: 0 0 40px; }
.sh-banner img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.page-head .sh-hero__type { display: inline-block; margin-top: 22px; }

.sh-facts { margin: 0; }
.sh-facts dt { font-size: 13px; color: var(--sea-light); }
.sh-facts dd { margin: 2px 0 14px; font-weight: 600; color: var(--white); line-height: 1.4; }
.sh-facts dd:last-child { margin-bottom: 0; }

.sh-contract {
  margin-top: 56px;
  padding-top: 40px;
  border-top: 1px solid var(--line);
  scroll-margin-top: 80px;
}
.sh-contract__head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}
.sh-contract__title {
  margin: 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 24px;
  line-height: 1.2;
}

/* =========================================================
   Сторінка «Erasmus+»
   ========================================================= */
.er-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 40px;
  margin-top: 36px;
}
.er-stat { display: flex; flex-direction: column; }
.er-stat__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 40px;
  line-height: 1;
  color: var(--white);
}
.er-stat__label { margin-top: 6px; font-size: 15px; color: var(--sea-light); }

.er-benefits {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.er-benefit {
  padding: 26px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
}
.er-benefit svg {
  width: 32px; height: 32px;
  fill: none; stroke: var(--sea); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.er-benefit h3 {
  margin: 16px 0 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 18px;
  line-height: 1.25;
}
.er-benefit p { margin: 0; font-size: 15px; color: var(--muted); }

.er-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
}
.er-card {
  display: flex;
  align-items: flex-start;
  gap: 22px;
  padding: 24px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow .2s, transform .2s, border-color .2s;
}
.er-card:hover {
  border-color: var(--sea);
  box-shadow: 0 18px 40px -20px rgba(12, 43, 64, .45);
  transform: translateY(-3px);
}

/* Невеликий логотип зліва */
.er-card__logo {
  position: relative;
  flex-shrink: 0;
  width: 96px;
  height: 96px;
  display: grid;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--white);
  overflow: hidden;
}
.er-card__logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 10px;
}
.er-card__short {
  display: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 20px;
  letter-spacing: -0.02em;
  color: var(--white);
}
.er-card__logo--empty { background: var(--deep); border-color: var(--deep); }
.er-card__logo--empty img { display: none; }
.er-card__logo--empty .er-card__short { display: block; }

.er-card__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-self: stretch;
}
.er-card__place {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--sea);
}
.er-card__place svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2;
}
.er-card__title {
  margin: 10px 0 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
}
.er-card__abbr { color: var(--muted); font-weight: 600; }
.er-card__text { flex: 1; margin: 0 0 20px; font-size: 15px; color: var(--muted); }
.er-card__link {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 9px 16px;
  border: 1.5px solid var(--line);
  border-radius: 8px;
  font-size: 15px;
  font-weight: 600;
  color: var(--deep);
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
.er-card__link:hover { background: var(--buoy); border-color: var(--buoy); color: var(--white); }
.er-card__link svg {
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
}

.er-cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 40px;
  border-radius: var(--radius);
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  color: #c4d8df;
}
.er-cta > div { max-width: 44em; }
.er-cta__title {
  margin: 0 0 10px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 28px;
  color: var(--white);
}
.er-cta p { margin: 0; }

@media (max-width: 960px) {
  .er-benefits { grid-template-columns: 1fr 1fr; }
  .er-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .er-benefits { grid-template-columns: 1fr; }
  .er-grid { grid-template-columns: 1fr; }
  .er-card { padding: 20px; gap: 16px; }
  .er-card__logo { width: 64px; height: 64px; border-radius: 12px; }
  .er-card__logo img { padding: 6px; }
  .er-card__short { font-size: 15px; }
  .er-cta { padding: 28px; }
  .er-stats { gap: 24px; }
  .er-stat__num { font-size: 32px; }
}

/* ---------- Порожній стан документа («Матеріали готуються») ---------- */
.doc-empty {
  padding: 56px 32px;
  text-align: center;
  background: var(--chart);
  border: 1px dashed var(--line);
  border-radius: var(--radius);
}
.doc-empty svg {
  width: 48px; height: 48px;
  fill: none; stroke: var(--sea); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.doc-empty h2 {
  margin: 16px 0 8px;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 22px;
}
.doc-empty p { margin: 0 auto; max-width: 32em; color: var(--muted); }

/* ---------- Відеоплеєр (Здобувачу → Розклад, Вибіркові предмети) ---------- */
.video-player {
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--deep);
  box-shadow: 0 18px 40px -24px rgba(12, 43, 64, .6);
}
.video-player video {
  display: block;
  width: 100%;
  max-height: 80vh;
  aspect-ratio: 16 / 9;
  background: #000;
}

/* ---------- Перегляд зображення (Абітурієнту → Карта університету) ---------- */
.image-viewer {
  display: block;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--chart);
  cursor: zoom-in;
}
.image-viewer img { width: 100%; height: auto; transition: transform .3s; }
.image-viewer:hover img { transform: scale(1.02); }

/* картки документів: довгі мітки не розширюють картку */
.doc-card { min-width: 0; }
.doc-card__footer { flex-wrap: wrap; gap: 8px; }

/* =========================================================
   Сторінка «Новини»
   ========================================================= */
.nl-thumb {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--deep);
}
/* зображення вписуються повністю: банери з текстом не обрізаються */
.nl-thumb img { width: 100%; height: 100%; object-fit: contain; transition: transform .4s; }

.nl-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  font-size: 14px;
  color: var(--muted);
}
.nl-tag {
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--chart);
  color: var(--sea);
  font-weight: 700;
  font-size: 13px;
}
.nl-meta--light { margin-top: 22px; color: var(--sea-light); }
.nl-meta--light .nl-tag { background: var(--buoy); color: var(--white); }

/* Головна новина */
.nl-lead {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 56px;
  text-decoration: none;
  color: var(--deep);
}
.nl-lead:hover .nl-thumb img { transform: scale(1.03); }
.nl-lead__body { display: flex; flex-direction: column; gap: 14px; }
.nl-lead__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(24px, 3vw, 34px);
  line-height: 1.2;
  letter-spacing: -0.01em;
  transition: color .2s;
}
.nl-lead:hover .nl-lead__title { color: var(--sea); }
.nl-lead__text { font-size: 17px; color: var(--muted); }
.nl-more {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--buoy);
}
.nl-more svg {
  width: 18px; height: 18px;
  fill: none; stroke: currentColor; stroke-width: 2;
  stroke-linecap: round; stroke-linejoin: round;
  transition: transform .2s;
}
.nl-lead:hover .nl-more svg { transform: translateX(4px); }

/* Сітка новин */
.nl-grid {
  list-style: none;
  margin: 0;
  padding: 40px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px 28px;
}
.nl-card { display: flex; flex-direction: column; gap: 16px; text-decoration: none; color: var(--deep); }
.nl-card:hover .nl-thumb img { transform: scale(1.03); }
.nl-card__body { display: flex; flex-direction: column; gap: 10px; }
.nl-card__title {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  line-height: 1.3;
  transition: color .2s;
}
.nl-card:hover .nl-card__title { color: var(--sea); }
.nl-card__text { font-size: 15px; color: var(--muted); }

/* Сторінка новини */
.nl-figure { margin: 0 0 36px; }
.nl-figure img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.nl-side { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.nl-side a {
  display: grid;
  grid-template-columns: 84px 1fr;
  gap: 14px;
  align-items: start;
  text-decoration: none;
  color: var(--deep);
}
.nl-side__thumb {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: 8px;
  background: var(--deep);
}
.nl-side__thumb img { width: 100%; height: 100%; object-fit: contain; }
.nl-side time { display: block; font-size: 13px; color: var(--muted); }
.nl-side__title { display: block; margin-top: 2px; font-size: 15px; font-weight: 600; line-height: 1.35; }
.nl-side a:hover .nl-side__title { color: var(--sea); }

@media (max-width: 960px) {
  .nl-lead { grid-template-columns: 1fr; gap: 20px; }
  .nl-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .nl-grid { grid-template-columns: 1fr; }
}

/* головна сторінка: банери новин теж вписуються без обрізання */
.news-card__img img { object-fit: contain; }

/* ---------- Нумерація сторінок (Новини) ---------- */
.nl-grid--first { padding-top: 0; border-top: 0; }
.pager {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 56px;
}
.pager__link {
  display: grid;
  place-items: center;
  min-width: 44px;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  font-weight: 600;
  color: var(--deep);
  text-decoration: none;
  transition: background-color .2s, border-color .2s, color .2s;
}
a.pager__link:hover { border-color: var(--sea); color: var(--sea); }
.pager__link.is-current { background: var(--deep); border-color: var(--deep); color: var(--white); }

/* =========================================================
   Фото новин: однакові картки 4:3 для будь-яких фото.
   Фото показується ЦІЛКОМ (нічого не обрізається), а порожні
   місця по боках заповнює розмита копія цього ж фото.
   ========================================================= */
.nl-thumb,
.news-card__img,
.news-card--lead .news-card__img {
  position: relative;
  aspect-ratio: 4 / 3;
  height: auto;
  overflow: hidden;
  background: var(--chart);
}
/* основне фото — цілком, по центру */
.nl-thumb img,
.news-card__img img {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}
/* розмита копія фото на фоні замість порожніх полів */
.nl-thumb .photo-bg,
.news-card__img .photo-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: blur(22px) saturate(1.1) brightness(.9);
  transform: scale(1.15);   /* прибирає світлі краї від розмиття */
}
/* при наведенні збільшується лише фото, фон лишається на місці */
.nl-lead:hover .nl-thumb .photo-bg,
.nl-card:hover .nl-thumb .photo-bg { transform: scale(1.15); }
.nl-grid { align-items: start; }
.nl-lead { align-items: center; }
.news { align-items: start; }

/* маленькі мініатюри «Інші новини» — заповнюють квадратик */
.nl-side__thumb { background: var(--chart); }
.nl-side__thumb img { object-fit: cover; }

/* ---------- Вертикальні фото новин: автоматично обрізаються до 4:3 ----------
   Клас is-portrait додає скрипт у _Layout.cshtml, якщо фото вище, ніж ширше.
   Горизонтальні фото не обрізаються (показуються цілком, як і раніше). */
.nl-thumb.is-portrait img,
.news-card__img.is-portrait img {
  object-fit: cover;
  object-position: center 30%;   /* лишаємо частину ближче до верху кадру, де зазвичай обличчя */
}
.nl-thumb.is-portrait .photo-bg,
.news-card__img.is-portrait .photo-bg { display: none; }

/* ---------- Сторінка новини: вертикальне фото теж обрізається до 4:3 ---------- */
.nl-figure.is-portrait {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.nl-figure.is-portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center 30%;   /* частина ближче до верху кадру, де зазвичай обличчя */
  border: 0;
  border-radius: 0;
}

/* =========================================================
   Галерея фото на сторінці новини
   Кожен слайд — такий самий, як картка (.nl-thumb): 4:3,
   горизонтальні фото цілком, вертикальні обрізаються.
   ========================================================= */
.gallery { margin: 0 0 36px; outline: none; }
.gallery:focus-visible .gallery__viewport { outline: 3px solid var(--buoy); outline-offset: 3px; }

.gallery__viewport {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.gallery__track {
  display: flex;
  transition: transform .45s ease;
}
.gallery__slide {
  flex: 0 0 100%;
  border-radius: 0;
}

.gallery__btn {
  position: absolute;
  top: 50%;
  z-index: 2;
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  margin-top: -24px;
  border: 0;
  border-radius: 50%;
  background: rgba(255, 255, 255, .9);
  color: var(--deep);
  cursor: pointer;
  box-shadow: 0 6px 18px -6px rgba(12, 43, 64, .5);
  transition: background-color .2s, color .2s, transform .2s;
}
.gallery__btn:hover { background: var(--buoy); color: var(--white); transform: scale(1.06); }
.gallery__btn--prev { left: 16px; }
.gallery__btn--next { right: 16px; }
.gallery__btn svg {
  width: 22px; height: 22px;
  fill: none; stroke: currentColor; stroke-width: 2.5;
  stroke-linecap: round; stroke-linejoin: round;
}

.gallery__counter {
  position: absolute;
  right: 16px;
  bottom: 16px;
  z-index: 2;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(12, 43, 64, .75);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
}

.gallery__dots {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 14px;
}
.gallery__dot {
  width: 10px;
  height: 10px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--line);
  cursor: pointer;
  transition: background-color .2s, transform .2s;
}
.gallery__dot.is-active { background: var(--buoy); transform: scale(1.3); }

@media (max-width: 600px) {
  .gallery__btn { width: 40px; height: 40px; margin-top: -20px; }
  .gallery__btn--prev { left: 10px; }
  .gallery__btn--next { right: 10px; }
}

/* ---------- Меню: 10 пунктів уміщаються в один рядок ---------- */
.nav__link { padding-left: 12px; padding-right: 12px; }
.nav__link::after { left: 12px; right: 12px; }
.nav__list { margin-left: -12px; }
@media (max-width: 1240px) and (min-width: 961px) {
  .nav__link { padding-left: 8px; padding-right: 8px; font-size: 14px; }
  .nav__link::after { left: 8px; right: 8px; }
  .nav__list { margin-left: -8px; }
}

/* довгі слова в назвах карток переносяться, а не вилазять за межі */
.doc-card__title { overflow-wrap: break-word; hyphens: auto; }
@media (max-width: 1100px) and (min-width: 961px) {
  .nav__link { padding-left: 6px; padding-right: 6px; font-size: 13px; gap: 4px; }
  .nav__link::after { left: 6px; right: 6px; }
  .nav__list { margin-left: -6px; }
}

/* =========================================================
   Наука → Науково-дослідна робота викладачів
   ========================================================= */
.rs-jump { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 26px; }
.rs-jump a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 16px 8px 8px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
  transition: background-color .2s, border-color .2s;
}
.rs-jump a:hover { background: rgba(255,255,255,.1); border-color: var(--white); }
.rs-jump__letter {
  display: grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  background: var(--buoy);
  font-family: var(--font-head);
  font-weight: 800;
}

.rs-intro { max-width: none; margin-bottom: 40px; }
.rs-lead {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(20px, 2.4vw, 24px);
  line-height: 1.45;
  color: var(--deep);
  padding-left: 20px;
  border-left: 4px solid var(--buoy);
}

.rs-direction {
  margin-bottom: 32px;
  padding: 32px;
  background: var(--chart);
  border-radius: var(--radius);
  scroll-margin-top: 90px;
}
.rs-direction__head {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-bottom: 22px;
}
.rs-direction__letter {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 16px;
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 30px;
}
.rs-direction__label {
  font-size: 13px;
  font-weight: 700;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--sea);
}
.rs-direction__title {
  margin: 6px 0 0;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(20px, 2.2vw, 24px);
  line-height: 1.3;
}
.rs-direction .prose { max-width: none; }
.rs-direction__result {
  margin: 8px 0 0;
  padding: 18px 20px;
  background: var(--white);
  border-left: 4px solid var(--sea);
  border-radius: 0 10px 10px 0;
  font-weight: 600;
  line-height: 1.6;
}

.rs-conclusion {
  margin: 40px 0 0;
  padding: 28px 32px;
  border-radius: var(--radius);
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 19px;
  line-height: 1.5;
}

.rs-side-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.rs-side-list a { color: #d8e6ea; text-decoration: none; line-height: 1.4; }
.rs-side-list a:hover { color: var(--white); text-decoration: underline; }
.rs-side-list strong { color: var(--buoy); }

@media (max-width: 600px) {
  .rs-direction { padding: 22px; }
  .rs-direction__head { gap: 14px; }
  .rs-direction__letter { width: 48px; height: 48px; font-size: 22px; border-radius: 12px; }
  .rs-conclusion { padding: 22px; font-size: 17px; }
}

/* =========================================================
   Наука → Лабораторія відеоспостереження
   ========================================================= */
/* підпис на слайді галереї */
.gallery__slide { margin: 0; }
.gallery__caption {
  position: absolute;
  left: 16px;
  bottom: 16px;
  z-index: 2;
  max-width: calc(100% - 120px);
  padding: 6px 12px;
  border-radius: 8px;
  background: rgba(12, 43, 64, .75);
  color: var(--white);
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
}

/* список обладнання з іконками */
.lab-kit { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 12px; }
.lab-kit li {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 14px;
  align-items: start;
  padding: 16px;
  background: var(--white);
  border-radius: 12px;
  line-height: 1.6;
}
.lab-kit svg {
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: 10px;
  background: var(--chart);
  fill: none; stroke: var(--sea); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

/* скриншот відеоаналітики */
.lab-shot { margin: 8px 0 24px; }
.lab-shot img {
  width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.lab-shot figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }

/* три моделі ШІ */
.lab-ai {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 20px;
}
.lab-ai__item { padding: 18px; background: var(--white); border-radius: 12px; }
.lab-ai__model {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--deep);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}
.lab-ai__item h3 { margin: 12px 0 6px; font-size: 17px; font-weight: 700; }
.lab-ai__item p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }

/* призначення: 2×2 */
.lab-purpose { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.lab-purpose > div {
  padding: 20px;
  background: var(--white);
  border-radius: 12px;
  border-top: 4px solid var(--buoy);
}
.lab-purpose h3 { margin: 0 0 8px; font-family: var(--font-head); font-size: 18px; font-weight: 700; }
.lab-purpose p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }

@media (max-width: 960px) {
  .lab-ai { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .lab-purpose { grid-template-columns: 1fr; }
  .gallery__caption { font-size: 13px; left: 10px; bottom: 10px; max-width: calc(100% - 90px); }
}

/* =========================================================
   Наука → Науковий гурток здобувачів
   ========================================================= */
.club-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.club-card { padding: 20px; background: var(--white); border-radius: 12px; }
.club-card svg {
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: 10px;
  background: var(--deep);
  fill: none; stroke: var(--white); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.club-card h3 { margin: 14px 0 6px; font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.3; }
.club-card p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }

.club-list { list-style: none; margin: 0 0 20px; padding: 0; display: grid; gap: 10px; }
.club-list li {
  position: relative;
  padding: 14px 16px 14px 46px;
  background: var(--white);
  border-radius: 10px;
  line-height: 1.55;
}
.club-list li::before {
  content: "";
  position: absolute;
  left: 16px; top: 18px;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: var(--buoy);
  box-shadow: inset 0 0 0 4px #ffd6c5;
}

.club-formats { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.club-formats__label { font-weight: 700; margin-right: 4px; }
.club-chip {
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--white);
  border: 1px solid var(--line);
  font-size: 14px;
  font-weight: 600;
  color: var(--sea);
}

.club-benefits {
  margin-bottom: 32px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  color: var(--white);
}
.club-benefits__title { margin: 0 0 20px; font-family: var(--font-head); font-size: 24px; font-weight: 700; }
.club-benefits__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.club-benefits__grid > div {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border-top: 3px solid var(--buoy);
}
.club-benefits__grid strong { font-size: 16px; line-height: 1.3; }
.club-benefits__grid span { font-size: 14px; color: #c4d8df; line-height: 1.45; }

.club-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 8px 0 18px; }
.club-step { padding: 20px; background: var(--white); border-radius: 12px; }
.club-step__num {
  display: grid; place-items: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  background: var(--buoy);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 800;
}
.club-step p { margin: 12px 0 0; font-size: 15px; line-height: 1.55; }

@media (max-width: 960px) {
  .club-steps { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .club-grid, .club-benefits__grid { grid-template-columns: 1fr; }
  .club-benefits { padding: 22px; }
}

/* =========================================================
   Наука → Науково-дослідна робота студентів
   ========================================================= */
.nrs-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-top: 32px;
}
.nrs-stat {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 18px 20px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border-top: 3px solid var(--buoy);
}
.nrs-stat__num { font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1; color: var(--white); }
.nrs-stat__label { font-size: 14px; line-height: 1.4; color: #c4d8df; }

/* нагороди */
.nrs-awards { display: grid; gap: 14px; }
.nrs-award { padding: 20px; background: var(--white); border-radius: 12px; }
.nrs-award h3 { margin: 0 0 14px; font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.35; }
.nrs-podium { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 10px; }
.nrs-podium li {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 6px 16px 6px 6px;
  border-radius: 999px;
  background: var(--chart);
  font-weight: 600;
}
.nrs-place {
  display: grid; place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 14px;
  color: var(--deep);
}
.nrs-place--1 { background: #f5c542; }
.nrs-place--2 { background: #d5dbe0; }
.nrs-place--3 { background: #e0a878; }
.nrs-note { margin: 16px 0 0; font-size: 15px; color: var(--muted); line-height: 1.6; }

/* конференції: розгортані блоки */
.nrs-conf { margin-bottom: 12px; background: var(--white); border-radius: 12px; overflow: hidden; }
.nrs-conf summary {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 16px;
  padding: 18px 20px;
  cursor: pointer;
  list-style: none;
}
.nrs-conf summary::-webkit-details-marker { display: none; }
.nrs-conf summary:hover .nrs-conf__name { color: var(--sea); }
.nrs-conf__date { grid-column: 1; font-size: 13px; font-weight: 700; color: var(--sea); }
.nrs-conf__name { grid-column: 1; font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.35; transition: color .2s; }
.nrs-conf__count {
  grid-column: 2; grid-row: 1 / span 2;
  align-self: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--deep);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
  white-space: nowrap;
}
.nrs-conf[open] .nrs-conf__count { background: var(--buoy); }
.nrs-theses { list-style: none; margin: 0; padding: 0 20px 18px; display: grid; gap: 10px; }
.nrs-theses li {
  padding: 12px 14px;
  border-left: 3px solid var(--sea);
  background: var(--chart);
  border-radius: 0 8px 8px 0;
  line-height: 1.5;
}
.nrs-theses span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }

/* публікації */
.nrs-pubs { display: grid; gap: 14px; }
.nrs-pub { padding: 20px; background: var(--white); border-radius: 12px; }
.nrs-pub__badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 6px;
  background: var(--deep);
  color: var(--white);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .03em;
}
.nrs-pub__badge--scopus { background: var(--buoy); }
.nrs-pub__title { margin: 12px 0 6px; font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.35; }
.nrs-pub__meta { margin: 0 0 12px; font-size: 14px; color: var(--muted); line-height: 1.5; }
.nrs-pub__link { font-weight: 700; color: var(--sea); text-decoration: none; }
.nrs-pub__link:hover { color: var(--buoy); }

/* змагання та сертифікати */
.nrs-extra { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.nrs-extra__item { padding: 20px; background: var(--white); border-radius: 12px; border-top: 4px solid var(--sea); }
.nrs-extra__item h3 { margin: 0 0 4px; font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.35; }
.nrs-extra__where { margin: 0 0 10px; font-size: 13px; color: var(--sea); font-weight: 600; }
.nrs-extra__item p:last-child { margin: 0; font-size: 15px; line-height: 1.55; }

.nrs-supervisors { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-weight: 600; }

@media (max-width: 960px) {
  .nrs-stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .nrs-extra { grid-template-columns: 1fr; }
  .nrs-stat__num { font-size: 32px; }
  .nrs-conf summary { grid-template-columns: 1fr; }
  .nrs-conf__count { grid-column: 1; grid-row: auto; justify-self: start; }
}

/* =========================================================
   Наука → Сервер кафедри
   ========================================================= */
.srv-intro {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 32px;
  align-items: start;
  margin-bottom: 40px;
}
.srv-photo { margin: 0; }
.srv-photo img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: zoom-in;
}
.srv-photo figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); }
.srv-intro .prose { max-width: none; }

.srv-head-icon {
  width: 30px; height: 30px;
  fill: none; stroke: var(--white); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}

.srv-specs { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.srv-spec { padding: 20px; background: var(--white); border-radius: 12px; }
.srv-spec__top { display: flex; gap: 14px; align-items: flex-start; margin-bottom: 12px; }
.srv-spec__top svg {
  flex-shrink: 0;
  width: 44px; height: 44px;
  padding: 10px;
  border-radius: 10px;
  background: var(--chart);
  fill: none; stroke: var(--sea); stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.srv-spec h3 { margin: 0 0 6px; font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.srv-spec__values { display: flex; flex-wrap: wrap; gap: 6px; }
.srv-spec__now {
  padding: 2px 10px;
  border-radius: 6px;
  background: var(--deep);
  color: var(--white);
  font-size: 13px;
  font-weight: 700;
}
.srv-spec__max {
  padding: 2px 10px;
  border-radius: 6px;
  border: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 600;
}
.srv-spec p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }

@media (max-width: 960px) {
  .srv-specs { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .srv-intro { grid-template-columns: 1fr; }
  .srv-photo { max-width: 320px; }
}
.srv-intro .rs-lead { font-size: 18px; }

/* Сервери кафедри: дві картки сховища */
.srv-pair { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.srv-card {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 22px;
  background: var(--white);
  border-radius: 12px;
  border-top: 4px solid var(--buoy);
}
.srv-card__label { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--sea); }
.srv-card__num { font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1.1; color: var(--deep); }
.srv-card p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.55; }
@media (max-width: 600px) { .srv-pair { grid-template-columns: 1fr; } }
.srv-photos { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 36px; }
.srv-photos__item { margin: 0; }
.srv-photos__item img {
  width: 100%;
  height: auto;
  border-radius: var(--radius);
  border: 1px solid var(--line);
  cursor: zoom-in;
  transition: transform .3s;
}
.srv-photos__item a:hover img { transform: scale(1.01); }
.srv-photos__item figcaption { margin-top: 8px; font-size: 14px; color: var(--muted); line-height: 1.45; }
@media (max-width: 600px) { .srv-photos { grid-template-columns: 1fr; } }

/* =========================================================
   Освіта: хаб, рівні, сторінка програми
   ========================================================= */
.edu-hub { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.edu-hub__card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 36px;
  border-radius: var(--radius);
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  color: #c4d8df;
  text-decoration: none;
  overflow: hidden;
  transition: transform .2s, box-shadow .2s;
}
.edu-hub__card:hover { transform: translateY(-4px); box-shadow: 0 24px 48px -24px rgba(12,43,64,.7); }
.edu-hub__icon {
  display: grid; place-items: center;
  width: 64px; height: 64px;
  margin-bottom: 8px;
  border-radius: 16px;
  background: var(--buoy);
}
.edu-hub__icon svg { width: 32px; height: 32px; fill: none; stroke: var(--white); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.edu-hub__label { font-size: 13px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--sea-light); }
.edu-hub__title { font-family: var(--font-head); font-weight: 800; font-size: clamp(26px, 3vw, 34px); line-height: 1.15; color: var(--white); }
.edu-hub__text { font-size: 16px; line-height: 1.6; }
.edu-hub__more { display: inline-flex; align-items: center; gap: 8px; margin-top: 12px; font-weight: 700; color: var(--white); }
.edu-hub__more svg, .edu-level__more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.edu-hub__card:hover .edu-hub__more svg, .edu-level:hover .edu-level__more svg { transform: translateX(4px); }

.edu-levels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.edu-level {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-top: 4px solid var(--sea);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--deep);
  transition: transform .2s, box-shadow .2s, border-color .2s;
}
.edu-level:hover { transform: translateY(-3px); border-top-color: var(--buoy); box-shadow: 0 18px 40px -20px rgba(12,43,64,.45); }
.edu-level__top { display: flex; justify-content: space-between; align-items: flex-start; }
.edu-level__icon { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 12px; background: var(--chart); }
.edu-level__icon svg { width: 28px; height: 28px; fill: none; stroke: var(--sea); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.edu-level__step { font-family: var(--font-head); font-weight: 800; font-size: 14px; color: var(--muted); }
.edu-level__title { margin-top: 8px; font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1.1; }
.edu-level__qual { font-size: 15px; color: var(--muted); line-height: 1.5; }
.edu-level__facts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: auto; padding-top: 10px; }
.edu-level__facts span { padding: 4px 10px; border-radius: 6px; background: var(--chart); font-size: 14px; }
.edu-level__more { display: inline-flex; align-items: center; gap: 6px; padding-top: 14px; border-top: 1px solid var(--line); font-weight: 700; color: var(--sea); }

.edu-badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.edu-badge { padding: 4px 12px; border-radius: 6px; background: var(--buoy); color: var(--white); font-size: 13px; font-weight: 700; }
.edu-badge--line { background: transparent; border: 1px solid rgba(255,255,255,.35); }
.edu-badge--draft { background: #f5c542; color: var(--deep); }
.edu-stat-text { font-size: 24px; line-height: 1.15; }

.edu-about { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 18px; }
.edu-about > div { padding: 20px; background: var(--white); border-radius: 12px; }
.edu-about h3 { margin: 0 0 8px; font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.edu-about p { margin: 0; font-size: 15px; color: var(--muted); line-height: 1.6; }

.edu-table-wrap { overflow-x: auto; padding: 0 20px 18px; }
.edu-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.edu-table th { text-align: left; padding: 8px 10px; font-size: 13px; color: var(--muted); border-bottom: 2px solid var(--line); white-space: nowrap; }
.edu-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.edu-table td:nth-child(3), .edu-table td:nth-child(4) { white-space: nowrap; text-align: center; }
.edu-table th:nth-child(3), .edu-table th:nth-child(4) { text-align: center; }
.edu-table__code { white-space: nowrap; font-weight: 700; color: var(--sea); }
.edu-table tr:last-child td { border-bottom: 0; }

.edu-positions { list-style: none; margin: 0 0 16px; padding: 0; display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.edu-positions li {
  position: relative;
  padding: 12px 14px 12px 38px;
  background: var(--white);
  border-radius: 10px;
  font-size: 15px;
  line-height: 1.45;
}
.edu-positions li::before {
  content: "";
  position: absolute;
  left: 14px; top: 17px;
  width: 12px; height: 12px;
  border-radius: 3px;
  background: var(--sea);
  transform: rotate(45deg);
}

.edu-docs {
  margin-top: 8px;
  padding: 32px;
  border-radius: var(--radius);
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  color: var(--white);
  scroll-margin-top: 90px;
}
.edu-docs__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.edu-doc {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255,255,255,.08);
  border-top: 3px solid var(--buoy);
}
.edu-doc__year { font-family: var(--font-head); font-weight: 800; font-size: 40px; line-height: 1; }
.edu-doc__body { display: flex; flex-direction: column; gap: 6px; }
.edu-doc__label { font-weight: 600; line-height: 1.4; }
.edu-doc__type { align-self: flex-start; padding: 2px 8px; border-radius: 6px; background: rgba(255,255,255,.15); font-size: 12px; font-weight: 700; }
.edu-doc__actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: auto; }
.edu-doc__actions .btn { padding: 10px 18px; font-size: 15px; }

@media (max-width: 960px) {
  .edu-levels { grid-template-columns: 1fr; }
  .edu-positions { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .edu-hub, .edu-about, .edu-docs__grid { grid-template-columns: 1fr; }
  .edu-hub__card { padding: 26px; }
  .edu-docs { padding: 22px; }
}

/* =========================================================
   Освіта → Освітні програми
   ========================================================= */
.op-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.op-card {
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 28px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--deep);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.op-card:hover { border-color: var(--sea); box-shadow: 0 18px 40px -20px rgba(12,43,64,.45); transform: translateY(-3px); }
.op-card__top { display: flex; justify-content: space-between; align-items: flex-start; }
.op-card__icon {
  display: grid; place-items: center;
  width: 60px; height: 60px;
  border-radius: 14px;
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
}
.op-card__icon svg { width: 30px; height: 30px; fill: none; stroke: var(--white); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.op-card__step { font-size: 13px; font-weight: 700; color: var(--muted); }
.op-card__level { font-family: var(--font-head); font-weight: 800; font-size: 28px; line-height: 1.1; margin-top: 6px; }
.op-card__type { color: var(--muted); font-size: 15px; line-height: 1.45; }
.op-card__facts { display: grid; gap: 6px; padding: 14px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); font-size: 15px; }
.op-card__facts strong { color: var(--sea); }
.op-card__more { display: inline-flex; align-items: center; gap: 8px; margin-top: auto; font-weight: 700; color: var(--buoy); }
.op-card__more svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.op-card:hover .op-card__more svg { transform: translateX(4px); }

.op-stat-text { font-size: 22px !important; line-height: 1.2 !important; }

.op-about { margin-bottom: 36px; scroll-margin-top: 90px; }
.op-two { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 24px 0 20px; }
.op-box { padding: 20px; background: var(--chart); border-radius: 12px; }
.op-box--accent { background: var(--white); border: 1px solid var(--line); border-top: 4px solid var(--buoy); }
.op-box h3 { margin: 0 0 8px; font-family: var(--font-head); font-size: 17px; font-weight: 700; }
.op-box p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }

.op-research-title { margin: 18px 0 10px; font-family: var(--font-head); font-size: 17px; font-weight: 700; line-height: 1.35; }
.op-research-list { margin: 0; padding-left: 22px; display: grid; gap: 6px; line-height: 1.55; }

.op-table-wrap { overflow-x: auto; padding: 0 20px 18px; }
.op-table { width: 100%; border-collapse: collapse; font-size: 15px; }
.op-table th {
  text-align: left;
  padding: 8px 10px;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--muted);
  border-bottom: 2px solid var(--line);
  white-space: nowrap;
}
.op-table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; line-height: 1.45; }
.op-table tr:hover td { background: var(--chart); }
.op-table__code { white-space: nowrap; font-weight: 700; color: var(--sea); }
.op-table__num { white-space: nowrap; text-align: center; }

.op-docs { margin-top: 12px; scroll-margin-top: 90px; }
.op-docs__title { font-size: clamp(24px, 3vw, 32px); margin-bottom: 20px; }
.op-docs__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-bottom: 16px; }
.op-doc { display: flex; flex-direction: column; gap: 10px; padding: 24px; background: var(--chart); border-radius: var(--radius); }
.op-doc--new { background: var(--deep) url("../images/contours.svg") center / cover no-repeat; color: var(--white); }
.op-doc h3 { margin: 0; font-family: var(--font-head); font-size: 18px; font-weight: 700; line-height: 1.3; }
.op-doc p { margin: 0; font-size: 15px; line-height: 1.5; opacity: .85; }
.op-doc__badge { align-self: flex-start; padding: 4px 12px; border-radius: 999px; background: var(--buoy); color: var(--white); font-size: 13px; font-weight: 700; }
.op-doc__badge--old { background: var(--deep); }
.op-doc__actions { margin-top: auto; padding-top: 6px; }
.op-preview { margin-top: 10px; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.op-preview summary { padding: 14px 18px; cursor: pointer; font-weight: 700; color: var(--sea); }
.op-preview summary:hover { color: var(--buoy); }
.op-preview .doc-viewer { border-radius: 0; border: 0; border-top: 1px solid var(--line); }

/* Комп'ютерна аудиторія */
.op-room-text { margin-top: 32px; }
.op-links { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 24px; }
.op-link {
  display: flex; flex-direction: column; gap: 4px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 12px;
  text-decoration: none;
  color: var(--deep);
  transition: border-color .2s;
}
.op-link:hover { border-color: var(--sea); }
.op-link__label { font-size: 13px; color: var(--muted); }
.op-link strong { font-family: var(--font-head); font-size: 17px; }

@media (max-width: 960px) {
  .op-grid { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .op-two, .op-docs__grid, .op-links { grid-template-columns: 1fr; }
}

/* Головна: три освітні програми (бакалавр, магістр, аспірант) */
.programs { grid-template-columns: repeat(3, 1fr); }
.program { display: flex; flex-direction: column; padding: 30px; }
.program p { flex: 1; }
.program .btn { align-self: flex-start; }
@media (max-width: 960px) { .programs { grid-template-columns: 1fr; } }
.program__level { align-self: flex-start; }

/* =========================================================
   Кафедра: склад, сторінка викладача, сертифікати, випускники
   ========================================================= */
.st-avatar {
  position: relative;
  display: grid;
  place-items: center;
  flex-shrink: 0;
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--chart);
}
.st-avatar img { width: 100%; height: 100%; object-fit: cover; object-position: center 20%; }
.st-avatar__initials {
  display: none;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 44px;
  color: var(--white);
}
.st-avatar--empty { background: var(--deep) url("../images/contours.svg") center / cover no-repeat; }
.st-avatar--empty img { display: none; }
.st-avatar--empty .st-avatar__initials { display: block; }

.st-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.st-grid > li { display: flex; }
.st-card {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 14px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--deep);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.st-card:hover { border-color: var(--sea); box-shadow: 0 18px 40px -20px rgba(12,43,64,.45); transform: translateY(-3px); }
.st-card__body { flex: 1; display: flex; flex-direction: column; gap: 6px; padding: 16px 6px 6px; }
.st-card__position { font-size: 13px; font-weight: 700; color: var(--sea); text-transform: uppercase; letter-spacing: .04em; }
.st-card__name { font-family: var(--font-head); font-weight: 700; font-size: 19px; line-height: 1.25; }
.st-card__degree { font-size: 14px; color: var(--muted); }
.st-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 10px; font-weight: 700; color: var(--buoy); }
.st-card__more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.st-card:hover .st-card__more svg { transform: translateX(4px); }

.st-hero { display: flex; align-items: center; gap: 28px; margin-top: 24px; }
.st-hero .st-avatar { width: 150px; border: 3px solid rgba(255,255,255,.2); }
.st-hero .page-title { margin-top: 6px; }
.st-hero .page-lead { margin-top: 8px; }
.st-contacts { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 16px; }
.st-contacts a {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 8px 14px;
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  color: var(--white);
  text-decoration: none;
  font-weight: 600;
  font-size: 15px;
}
.st-contacts a:hover { background: rgba(255,255,255,.1); }
.st-contacts svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

.st-block { margin-bottom: 16px; }
.st-section { margin-top: 36px; }
.st-section__title { margin: 0 0 16px; font-family: var(--font-head); font-size: 24px; font-weight: 700; }
.st-timeline { list-style: none; margin: 0; padding: 0 0 0 22px; border-left: 2px solid var(--line); display: grid; gap: 14px; }
.st-timeline li { position: relative; line-height: 1.55; }
.st-timeline li::before {
  content: "";
  position: absolute;
  left: -29px; top: .45em;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--white);
  border: 3px solid var(--buoy);
}
.st-cert-list { list-style: none; margin: 0 0 18px; padding: 0; display: grid; gap: 10px; }
.st-cert-list li { padding: 12px 14px; background: var(--chart); border-radius: 10px; line-height: 1.5; }
.st-cert-list strong { display: block; }
.st-cert-list span { font-size: 14px; color: var(--muted); }

.st-head { display: flex; flex-direction: column; gap: 8px; text-decoration: none; }
.st-head .st-avatar { width: 120px; margin: 4px 0 6px; }
.st-head strong { color: var(--white); font-size: 17px; line-height: 1.3; }
.st-head > span:last-child { font-size: 14px; }
.st-head .st-avatar { border: 2px solid rgba(255,255,255,.25); }

/* Сертифікати */
.cert-person { margin-bottom: 48px; scroll-margin-top: 90px; }
.cert-person__head {
  display: flex; align-items: center; gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
  text-decoration: none;
  color: var(--deep);
}
.cert-person__head .st-avatar { width: 72px; border-radius: 50%; }
.cert-person__head .st-avatar__initials { font-size: 22px; }
.cert-person__name { display: block; font-family: var(--font-head); font-size: 24px; font-weight: 700; }
.cert-person__head:hover .cert-person__name { color: var(--sea); }
.cert-person__pos { display: block; margin-top: 2px; font-size: 14px; color: var(--muted); }

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(420px, 1fr)); gap: 18px; }
.cert-card {
  display: grid;
  grid-template-columns: 130px 1fr;
  gap: 16px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: 12px;
}
.cert-card__photo { aspect-ratio: 3 / 4; border-radius: 8px; overflow: hidden; background: var(--chart); }
.cert-card__photo img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in; }
.cert-card__placeholder {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 100%;
  border: 2px dashed var(--line);
  border-radius: 8px;
  font-size: 12px; font-weight: 600; color: var(--muted); text-align: center;
}
.cert-card__placeholder svg { width: 34px; height: 34px; fill: none; stroke: var(--sea); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cert-card__body { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.cert-card__num {
  align-self: flex-start;
  display: grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--deep);
  color: var(--white);
  font-size: 13px; font-weight: 700;
}
.cert-card__title { margin: 0; font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.cert-card__org { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; }
.cert-card__meta { display: flex; flex-wrap: wrap; gap: 6px; }
.cert-card__meta span { padding: 2px 10px; border-radius: 999px; background: var(--chart); font-size: 13px; font-weight: 600; color: var(--sea); }
.cert-card__doc { margin: 0; font-size: 13px; font-weight: 600; color: var(--deep); }

/* Випускники */
.grad-box {
  display: flex; align-items: center; gap: 40px;
  padding: 48px;
  border-radius: var(--radius);
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  color: #c4d8df;
}
.grad-box__year { font-family: var(--font-head); font-weight: 800; font-size: clamp(64px, 10vw, 120px); line-height: 1; color: var(--buoy); }
.grad-box h2 { margin: 0 0 12px; font-family: var(--font-head); font-size: clamp(22px, 3vw, 30px); color: var(--white); }
.grad-box p { margin: 0 0 24px; max-width: 40em; line-height: 1.6; }

@media (max-width: 600px) {
  .st-hero { flex-direction: column; align-items: flex-start; }
  .st-hero .st-avatar { width: 110px; }
  .cert-grid { grid-template-columns: 1fr; }
  .cert-card { grid-template-columns: 90px 1fr; }
  .grad-box { flex-direction: column; align-items: flex-start; gap: 16px; padding: 28px; }
}

/* =========================================================
   Кафедра → Склад кафедри, сторінка викладача, Випускники
   ========================================================= */
.staff-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 24px; }
.staff-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--deep);
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.staff-card:hover { border-color: var(--sea); box-shadow: 0 18px 40px -20px rgba(12,43,64,.45); transform: translateY(-3px); }
.staff-card__photo {
  display: grid;
  place-items: center;
  aspect-ratio: 4 / 5;
  background: var(--deep) url("../images/contours.svg") center / cover no-repeat;
  overflow: hidden;
}
.staff-card__photo img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.staff-card:hover .staff-card__photo img { transform: scale(1.03); }
.staff-card__initials { font-family: var(--font-head); font-weight: 800; font-size: 56px; color: var(--white); letter-spacing: -0.02em; }
.staff-card__body { display: flex; flex-direction: column; gap: 6px; padding: 18px 20px 20px; flex: 1; }
.staff-card__position { font-size: 13px; font-weight: 700; color: var(--sea); text-transform: uppercase; letter-spacing: .04em; }
.staff-card__name { font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.25; }
.staff-card__meta { font-size: 14px; color: var(--muted); line-height: 1.45; }
.staff-card__more { display: inline-flex; align-items: center; gap: 6px; margin-top: auto; padding-top: 8px; font-weight: 700; font-size: 15px; color: var(--buoy); }
.staff-card__more svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; transition: transform .2s; }
.staff-card:hover .staff-card__more svg { transform: translateX(4px); }

.person-hero { display: flex; gap: 32px; align-items: center; margin-top: 24px; }
.person-hero__photo {
  flex-shrink: 0;
  display: grid;
  place-items: center;
  width: 180px;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  border-radius: var(--radius);
  border: 3px solid rgba(255,255,255,.2);
  background: var(--deep-2);
}
.person-hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.person-hero .page-title { margin-top: 6px; }
.person-facts { display: flex; flex-wrap: wrap; gap: 12px 32px; margin: 18px 0 0; }
.person-facts dt { font-size: 13px; color: var(--sea-light); }
.person-facts dd { margin: 2px 0 0; font-weight: 600; color: var(--white); }
.person-facts a { color: var(--white); }
.person-facts a:hover { color: var(--buoy); }

.person-interests { margin-bottom: 32px; }
.person-section { margin-bottom: 28px; padding-bottom: 24px; border-bottom: 1px solid var(--line); }
.person-section__title { margin: 0 0 12px; font-family: var(--font-head); font-weight: 700; font-size: 22px; }
.person-section p { margin: 0 0 10px; line-height: 1.7; }
.person-list { margin: 0; padding-left: 22px; display: grid; gap: 8px; line-height: 1.6; }
.person-list--numbered { padding: 0 20px 18px 42px; }
.person-section .person-list--numbered { padding: 0 0 0 22px; }
.person-section--list { margin-bottom: 12px; border: 1px solid var(--line); }
.person-list--numbered li { font-size: 15px; overflow-wrap: anywhere; }

.grad-soon {
  display: flex;
  align-items: center;
  gap: 40px;
  padding: 48px;
  border-radius: var(--radius);
  background: var(--chart);
}
.grad-soon__year {
  flex-shrink: 0;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(64px, 10vw, 120px);
  line-height: 1;
  color: var(--buoy);
}
.grad-soon h2 { margin: 0 0 12px; font-family: var(--font-head); font-size: clamp(22px, 3vw, 30px); font-weight: 700; line-height: 1.25; }
.grad-soon p { margin: 0 0 24px; color: var(--muted); font-size: 17px; line-height: 1.6; max-width: 40em; }

@media (max-width: 600px) {
  .person-hero { flex-direction: column; align-items: flex-start; gap: 20px; }
  .person-hero__photo { width: 140px; }
  .grad-soon { flex-direction: column; align-items: flex-start; padding: 28px; gap: 16px; }
}
.person-interests { font-family: var(--font-body); font-size: 18px; font-weight: 400; line-height: 1.6; }

/* =========================================================
   Кафедра → Сертифікати
   ========================================================= */
.cert-teacher { margin-bottom: 48px; scroll-margin-top: 90px; }
.cert-teacher__head {
  display: flex;
  align-items: center;
  gap: 18px;
  margin-bottom: 20px;
  padding-bottom: 16px;
  border-bottom: 2px solid var(--line);
}
.cert-teacher__avatar {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 64px; height: 64px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--deep);
  color: var(--white);
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 22px;
}
.cert-teacher__avatar img { width: 100%; height: 100%; object-fit: cover; }
.cert-teacher__position { font-size: 13px; font-weight: 700; color: var(--sea); text-transform: uppercase; letter-spacing: .04em; }
.cert-teacher__name { margin: 4px 0 0; font-family: var(--font-head); font-size: clamp(20px, 2.4vw, 26px); font-weight: 700; }
.cert-teacher__name a { color: var(--deep); text-decoration: none; }
.cert-teacher__name a:hover { color: var(--sea); }
.cert-teacher__count {
  margin-left: auto;
  padding: 6px 14px;
  border-radius: 999px;
  background: var(--buoy);
  color: var(--white);
  font-size: 14px;
  font-weight: 700;
  white-space: nowrap;
}

.cert-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 20px; }
.cert-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  transition: box-shadow .2s, border-color .2s;
}
.cert-card:hover { border-color: var(--sea); box-shadow: 0 14px 32px -18px rgba(12,43,64,.45); }
.cert-card__img {
  position: relative;
  display: block;
  aspect-ratio: 4 / 3;
  background: var(--chart);
  border-bottom: 1px solid var(--line);
  overflow: hidden;
  cursor: zoom-in;
}
.cert-card__img img { width: 100%; height: 100%; object-fit: contain; padding: 8px; }
.cert-card__placeholder {
  position: absolute;
  inset: 0;
  display: none;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: var(--muted);
  font-size: 14px;
  font-weight: 600;
}
.cert-card__placeholder svg { width: 40px; height: 40px; fill: none; stroke: var(--sea-light); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cert-card__img--empty { cursor: default; pointer-events: none; }
.cert-card__img--empty img { display: none; }
.cert-card__img--empty .cert-card__placeholder { display: flex; }

.cert-card__body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; flex: 1; }
.cert-card__period { font-size: 13px; font-weight: 700; color: var(--sea); }
.cert-card__title { margin: 0; font-family: var(--font-head); font-size: 16px; font-weight: 700; line-height: 1.35; }
.cert-card__issuer { margin: 0; font-size: 14px; color: var(--muted); line-height: 1.45; flex: 1; }
.cert-card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.cert-card__tag { padding: 3px 10px; border-radius: 6px; background: var(--chart); font-size: 12px; font-weight: 600; color: var(--muted); }
.cert-card__tag--accent { background: var(--deep); color: var(--white); }

@media (max-width: 600px) {
  .cert-teacher__head { flex-wrap: wrap; }
  .cert-teacher__count { margin-left: 0; }
}

/* Склад кафедри: картка з email і ORCID */
.staff-card { position: relative; }
.staff-card__link { color: var(--deep); text-decoration: none; }
.staff-card__link::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.staff-card:hover .staff-card__link { color: var(--sea); }
.staff-card:hover .staff-card__photo img { transform: scale(1.03); }
.staff-card__contacts {
  position: relative;
  z-index: 1;              /* над розтягнутим посиланням — клікаються окремо */
  display: grid;
  gap: 6px;
  margin-top: 6px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}
.staff-card__contact {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  font-size: 13px;
  color: var(--muted);
  text-decoration: none;
}
.staff-card__contact span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-card__contact:hover { color: var(--sea); }
.staff-card__contact svg {
  flex-shrink: 0;
  width: 16px; height: 16px;
  fill: none; stroke: currentColor; stroke-width: 1.8;
  stroke-linecap: round; stroke-linejoin: round;
}
.staff-card__orcid {
  flex-shrink: 0;
  display: grid; place-items: center;
  width: 16px; height: 16px;
  border-radius: 50%;
  background: #a6ce39;     /* фірмовий колір ORCID */
  color: var(--white);
  font-size: 8px;
  font-weight: 800;
}

/* =========================================================
   Склад кафедри: посилання лише на фото, під фото — інформація
   (перекриває попередні правила .staff-card)
   ========================================================= */
.staff-card { position: static; }
.staff-card:hover { transform: none; }
.staff-card__photo { position: relative; text-decoration: none; }
.staff-card__photo:focus-visible { outline: 3px solid var(--buoy); outline-offset: -3px; }
.staff-card__hover {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px;
  background: linear-gradient(to top, rgba(12,43,64,.9), rgba(12,43,64,0));
  color: var(--white);
  font-weight: 700;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .2s, transform .2s;
}
.staff-card__hover svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.staff-card__photo:hover .staff-card__hover,
.staff-card__photo:focus-visible .staff-card__hover { opacity: 1; transform: none; }
.staff-card__photo:hover img { transform: scale(1.03); }

.staff-card__name { margin: 0 0 12px; font-family: var(--font-head); font-weight: 700; font-size: 20px; line-height: 1.25; color: var(--deep); }
.staff-card__info { margin: 0; display: grid; gap: 8px; }
.staff-card__info dt { font-size: 12px; font-weight: 700; letter-spacing: .03em; text-transform: uppercase; color: var(--sea); }
.staff-card__info dd { margin: 1px 0 0; font-size: 14px; line-height: 1.4; color: var(--deep); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.staff-card__info dd a { color: var(--deep); text-decoration: underline; text-decoration-color: var(--line); text-underline-offset: 3px; }
.staff-card__info dd a:hover { color: var(--buoy); text-decoration-color: currentColor; }
.staff-card__orcid-link { display: inline-flex; align-items: center; gap: 6px; }

/* Сторінка викладача: назва організації в «Професійному досвіді» */
.person-org { margin: 18px 0 6px; font-family: var(--font-head); font-size: 16px; font-weight: 700; color: var(--sea); }
.person-section .person-org:first-of-type { margin-top: 0; }
.person-section p { margin: 0 0 6px; }

/* =========================================================
   Сертифікати: без порожніх полів, як у новинах
   — вертикальні сертифікати заповнюють рамку (видно верхню частину з назвою),
   — горизонтальні показуються цілком, а невеликі поля заповнює розмита копія.
   Клік відкриває сертифікат повністю в новій вкладці.
   ========================================================= */
.cert-card__img img { position: relative; padding: 0; }
.cert-card__img .photo-bg {
  position: absolute;
  inset: 0;
  object-fit: cover;
  filter: blur(18px) saturate(1.1) brightness(.95);
  transform: scale(1.15);
}
.cert-card__img.is-portrait img { object-fit: cover; object-position: center top; }
.cert-card__img.is-portrait .photo-bg,
.cert-card__img--empty .photo-bg { display: none; }
