/* ============================================================
   SECTIONS — Homepage blocks — ArtCol Theme
   ============================================================ */

/* ---- Hero (split layout: text left / photo right) ---- */
.hero {
  background: var(--color-white);
  position: relative;
  height: 100svh;
  box-sizing: border-box;
  display: flex;
  align-items: stretch;
  padding: calc((var(--header-height) + var(--header-gap)) / 2) 0 var(--space-4);
  overflow: hidden;
}

/* Shield watermark from logo (two left blocks) */
.hero::before {
  content: '';
  position: absolute;
  left: -2%;
  top: 50%;
  transform: translateY(-50%);
  width: 22%;
  height: 85%;
  background-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 48 99'><rect x='1.93' y='1.59' width='44.05' height='43.84' fill='%23161616'/><path d='M1.93,50.73h44.05v46.42h0C21.67,97.15,1.93,77.41,1.93,53.1v-2.37h0Z' fill='%23161616'/><polygon points='30.82 64.93 37.45 65.16 34.33 71.01 37.45 76.86 30.83 77.08 27.32 82.7 23.8 77.08 17.18 76.85 20.29 71 17.17 65.15 23.8 64.92 27.31 59.3 30.82 64.93' fill='white'/><path d='M33.34,21.63c-.1,1.41-.42,2.76-.91,4.02-2.05,5.35-7.25,9.15-13.33,9.15-.6,0-1.19-.04-1.77-.11-1.38-.17-2.71-.54-3.93-1.08l-1.19,3.3c1.24.52,2.55.91,3.91,1.14.97.16,1.97.25,2.99.25,7.96,0,14.71-5.23,16.98-12.45.41-1.29.66-2.64.77-4.03l-3.5-.19Z' fill='white'/></svg>");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.05;
  pointer-events: none;
  z-index: 0;
}

.hero > .container {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: stretch;
}

.hero__text-col {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.hero__inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: clamp(2rem, 6vw, 5rem);
  align-items: stretch;
  width: 100%;
}

/* Left col */
.hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-pink);
  margin-bottom: var(--space-3);
}
.hero__label::before,
.nmk-hero__label::before,
.pub-hero__label::before,
.admin-hero__label::before {
  content: '';
  display: inline-block;
  width: 0.85em;
  height: 1em;
  background-image: var(--star-deco);
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  vertical-align: middle;
}

.hero__title {
  font-size: var(--text-hero);
  color: var(--color-black);
  margin-bottom: var(--space-4);
  line-height: 1.05;
}
.hero__title em {
  font-style: normal;
  color: var(--color-pink);
}

.hero__text {
  font-size: var(--text-lg);
  color: var(--color-gray-600);
  line-height: var(--lh-relaxed);
  max-width: 52ch;
  margin-bottom: var(--space-5);
}

.hero__actions {
  display: flex;
  gap: var(--space-4);
  flex-wrap: wrap;
}

/* Right col */
.hero__image-col {
  position: relative;
  display: flex;
  flex-direction: column;
}

/* Pink circle behind photo */
.hero__image-col::after {
  content: '';
  position: absolute;
  right: 6%;
  bottom: 10%;
  width: 89%;
  aspect-ratio: 1 / 1;
  background: var(--color-pink);
  border-radius: 50%;
  z-index: 0;
}

.hero__photo-frame {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  overflow: hidden;
  flex: 1;
  min-height: 0;
  max-height: calc(100svh - var(--header-height) - var(--space-12));
  background: transparent;
  border: none;
}

.hero__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  margin-top: 60px;

}
.hero__photo--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-400);
}


/* ---- Планшет + мобільний (≤1024px) ---- */
@media (max-width: 1024px) {
  .hero {
    height: 100svh !important;
    max-height: 100svh;
    padding: 0 !important;
    align-items: stretch;
    overflow: hidden;
  }
  .hero::before { display: none; }

  .hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
      linear-gradient(to bottom, rgba(255,255,255,0.2) 0%, rgba(255,255,255,1) 60%),
      var(--hero-bg, none);
    background-size: 100% 100%, auto 80%;
    background-position: 0 0, calc(100% + 100px) 50px;
    background-repeat: no-repeat;
    opacity: .9;
    z-index: 0;
    pointer-events: none;
  }

  .hero > .container {
    position: relative;
    z-index: 1;
    display: flex;
    align-items: flex-end;
    padding-top: var(--header-height);
    padding-bottom: var(--space-8);
    box-sizing: border-box;
  }
  .hero__inner {
    grid-template-columns: 1fr;
    width: 100%;
  }
  .hero__image-col { display: none; }
}

/* ---- Мобільний (≤600px) ---- */
@media (max-width: 600px) {
  .hero::after {
    background-size: 100% 100%, auto 65%;
    background-position: 0 0, calc(100% + 40px) 60px;
  }
  .hero__title { font-size: clamp(1.9rem, 7vw, 2.4rem); }
  .hero__text { font-size: var(--text-sm); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(8px); }
}

/* ---- Stats block (flat, white bg) ---- */
.stats {
  background-color: var(--color-white);
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
}

.stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
}

.stats__item { text-align: center; }

.stats__divider {
  width: 1px;
  background-color: var(--color-gray-200);
}

.stats__value {
  font-family: var(--font-display);
  font-size: var(--text-hero);
  font-weight: var(--fw-extrabold);
  color: var(--color-pink);
  line-height: 1;
  margin-bottom: var(--space-2);
}

.stats__label {
  font-size: var(--text-sm);
  color: var(--color-gray-600);
}

/* ---- News section ---- */
/* ---- News filter tabs ---- */
.news-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-8);
}

.news-filter__btn {
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gray-600);
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: color var(--duration-fast), border-color var(--duration-fast), background var(--duration-fast);
  white-space: nowrap;
}
.news-filter__btn:hover {
  border-color: var(--color-pink);
  color: var(--color-pink);
}
.news-filter__btn.is-active {
  background: var(--color-pink);
  border-color: var(--color-pink);
  color: var(--color-white);
}

/* ---- Side cards ---- */
.news__side {
  display: flex;
  flex-direction: column;
  gap: var(--grid-gap);
  align-self: start;
}

.news__side-card {
  display: flex;
  flex-direction: row;
  overflow: hidden;
  border-radius: var(--radius-lg);
  height: 120px;
}

.news__side-image {
  width: 120px;
  flex-shrink: 0;
  aspect-ratio: 1;
}

.news__side-body {
  padding: var(--space-4);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.news__side-title {
  font-size: var(--text-base);
  margin-top: var(--space-1);
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* ---- Empty state ---- */
.news-empty {
  text-align: center;
  color: var(--color-gray-400);
  padding: var(--space-12) 0;
  font-size: var(--text-sm);
}

/* ---- Skeleton ---- */
@keyframes skeleton-pulse {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.4; }
}

.skeleton-box,
.skeleton-line {
  background: var(--color-gray-100);
  border-radius: var(--radius-md);
  animation: skeleton-pulse 1.4s ease-in-out infinite;
  display: block;
}

.news__side-card--skeleton {
  pointer-events: none;
}

.news__featured--loading .card__body {
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---- News card accent (homepage only) ---- */
.news-section .card {
  border-top-left-radius: clamp(16px, 3vw, 24px);
}

/* Featured card: wide strip, full card height */
.news__featured > .card {
  position: relative;
  overflow: hidden;
  border-bottom-left-radius: clamp(16px, 3vw, 24px);
}

.news__featured > .card::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: clamp(28px, 4vw, 44px);
  background: var(--color-pink);
  z-index: 1;
}

.news__featured > .card .card__body {
  position: relative;
  padding-left: calc(var(--space-6) + clamp(28px, 4vw, 44px));
}

/* ---- News featured/grid ---- */
.news__featured {
  display: grid;
  grid-template-columns: 1.5fr 1fr;
  gap: var(--grid-gap);
  margin-bottom: var(--grid-gap);
}

.news__featured .card:first-child .card__image {
  aspect-ratio: 16/9;
}

.news__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--grid-gap);
}

.news__footer {
  display: flex;
  justify-content: center;
  margin-top: var(--space-10);
}

/* ---- Departments section ---- */
.departments__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}
@media (max-width: 900px) {
  .departments__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .departments__grid { grid-template-columns: 1fr; }
}


.coll-card {
  display: flex;
  flex-direction: column;
  border-radius: 4px 4px 4px 60px;
  overflow: hidden;
  background: #fff;
}

/* Top block — білий фон, нота + назва в один рядок */
.coll-card__top {
  padding: var(--space-5) var(--space-6);
  display: flex;
  flex-direction: row;
  align-items: flex-start;
  gap: var(--space-3);
  background: #fff;
}

/* Decorative music note */
.coll-card__deco {
  font-size: 1.4rem;
  line-height: 1.6;
  color: var(--color-pink);
  flex-shrink: 0;
}

/* Title — текст з рожевим підсвіченням як маркер */
.coll-card__title {
  margin: 0;
  font-size: var(--text-xl);
  font-weight: var(--fw-bold);
  line-height: 1.6;
  text-align: right;
  flex: 1;
}

.coll-card__title a {
  color: #fff;
  text-decoration: none;
  background: var(--color-pink);
  padding: 1px 6px;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* Photo — нижня частина */
.coll-card__photo {
  display: block;
  aspect-ratio: 4/3;
  overflow: hidden;
  flex-shrink: 0;
}

.coll-card__photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  transition: transform .6s var(--ease-out);
}

.coll-card:hover .coll-card__photo img {
  transform: scale(1.05);
}


/* ---- Partners ---- */
.partners {
  border-top: 1px solid var(--color-gray-200);
  border-bottom: 1px solid var(--color-gray-200);
  padding-top: var(--space-12);
  padding-bottom: var(--space-12);
}

.partners__logos {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
}

.partners__logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 120px;
  height: 120px;
  opacity: 0.55;
  transition: opacity var(--duration-fast);
  cursor: default;
}
.partners__logo:hover { opacity: 1; }

.partners__logo a {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  cursor: pointer;
}

.partners__logo-img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  filter: grayscale(1);
  transition: filter var(--duration-fast), opacity var(--duration-fast);
}
.partners__logo:hover .partners__logo-img {
  filter: grayscale(0);
}

/* ================================================================
   VSTUPNYK CTA
   ================================================================ */
.vstupnyk-cta {
  position: relative;
  overflow: hidden;
  padding: var(--space-16) 0;
  background: linear-gradient(120deg, var(--color-pink) 0%, #1a0d4f 60%, #0d0826 100%);
}

/* decorative blurred circles */
.vstupnyk-cta::before,
.vstupnyk-cta::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}
.vstupnyk-cta::before {
  width: 480px;
  height: 480px;
  top: -160px;
  left: -120px;
  background: radial-gradient(circle, rgba(255,44,161,.35) 0%, transparent 70%);
}
.vstupnyk-cta::after {
  width: 360px;
  height: 360px;
  bottom: -120px;
  right: 5%;
  background: radial-gradient(circle, rgba(80,30,180,.45) 0%, transparent 70%);
}

.vstupnyk-cta__inner {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-10);
}

.vstupnyk-cta__text {
  flex: 1;
  min-width: 0;
}

.vstupnyk-cta__label {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--color-pink-light);
  margin-bottom: var(--space-4);
}

.vstupnyk-cta__title {
  font-size: clamp(1.75rem, 3.5vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.vstupnyk-cta__subtitle {
  font-size: var(--text-base);
  color: rgba(255,255,255,.72);
  max-width: 520px;
  line-height: 1.6;
}

.vstupnyk-cta__action {
  flex-shrink: 0;
}

.btn--vstupnyk {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-4) var(--space-8);
  background: var(--color-white);
  color: var(--color-black);
  font-size: var(--text-base);
  font-weight: 700;
  border-radius: var(--radius-full);
  text-decoration: none;
  transition: background var(--duration-fast), color var(--duration-fast), transform var(--duration-fast);
  white-space: nowrap;
}
.btn--vstupnyk svg {
  transition: transform var(--duration-fast);
}
.btn--vstupnyk:hover {
  background: var(--color-pink);
  color: var(--color-white);
  transform: translateY(-2px);
}
.btn--vstupnyk:hover svg {
  transform: translateX(3px);
}

@media (max-width: 768px) {
  .vstupnyk-cta__inner {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-8);
  }
  .vstupnyk-cta__title {
    font-size: clamp(1.5rem, 6vw, 2rem);
  }
}

/* ================================================================
   DEPARTMENT — intro split: фото ліворуч + текст праворуч
   ================================================================ */

/* ================================================================
   DEPT EDITORIAL
   Ліво: керівник (вертикальна картка, фото в нейтральному колі)
   Право: нахилене фото + картка тексту з великою першою літерою
   ================================================================ */

.dept-editorial {
  background: var(--color-white);
  position: relative;
}

/* Grid: ліво — керівник (~280px), право — фото+текст */
.dept-editorial__inner {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}
.dept-editorial__inner--single {
  grid-template-columns: 1fr;
  max-width: 680px;
}

/* ---- ЛІВО: Картка керівника ---- */
.dept-editorial__director {
  position: sticky;
  top: calc(var(--header-height) + var(--space-8));
}

.dept-editorial__head {
  display: block;
  text-align: center;
  text-decoration: none;
  padding: var(--space-10) var(--space-6);
  background: var(--color-white);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  transition: border-color var(--duration-normal) var(--ease-out);
}
.dept-editorial__head:hover {
  border-color: var(--color-pink);
}

/* Фото в колі */
.dept-editorial__head-photo {
  width: 164px;
  height: 164px;
  border-radius: 50%;
  overflow: hidden;
  margin: 0 auto var(--space-6);
  outline: 3px solid var(--color-gray-200);
  outline-offset: 3px;
  transition: outline-color var(--duration-normal) var(--ease-out);
}
.dept-editorial__head:hover .dept-editorial__head-photo {
  outline-color: var(--color-pink);
}
.dept-editorial__head-photo img {
  width: 100%; height: 100%;
  object-fit: cover; object-position: top center;
}

.dept-editorial__head-label {
  display: block;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: var(--ls-widest);
  text-transform: uppercase;
  color: var(--color-gray-400);
  margin-bottom: var(--space-3);
}
.dept-editorial__head-name {
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--color-black);
  line-height: 1.25;
  margin-bottom: var(--space-2);
}
.dept-editorial__head-position {
  font-size: var(--text-sm);
  color: var(--color-gray-500);
  line-height: var(--lh-snug);
}

/* ---- ПРАВО: фото + картка тексту ---- */
.dept-editorial__main {
  position: relative;
  padding-top: var(--space-4);
  padding-right: var(--space-8);
}

/* Фото (flat — без нахилу і тіней) */
.dept-editorial__figure {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin: 0;
  border: 1px solid var(--color-gray-200);
}
.dept-editorial__img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform var(--duration-slow) var(--ease-out);
}
.dept-editorial__figure:hover .dept-editorial__img {
  transform: scale(1.02);
}

/* Текстова картка (flat — без overlap і rotation) */
.dept-editorial__lead {
  position: relative;
  z-index: 1;
  margin-top: var(--space-5);
  background: var(--color-white);
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  padding: var(--space-8) var(--space-8);
}


.dept-editorial__lead p {
  margin: 0;
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--color-gray-600);
}

.dept-editorial__lead p::first-letter {
  float: left;
  font-family: var(--font-heading);
  font-size: 4.2rem;
  font-weight: var(--fw-bold);
  line-height: 0.78;
  color: var(--color-pink);
  padding-right: var(--space-3);
  padding-top: 4px;
}

/* Body section */
.dept-body { border-top: 1px solid var(--color-gray-100); }

/* H2 underline reveal via JS class */
.wysiwyg-content h2::before {
  width: 0;
  transition: width 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.15s;
}
.wysiwyg-content h2.is-visible::before { width: 52px; }

/* Responsive */
@media (max-width: 900px) {
  .dept-editorial__inner {
    grid-template-columns: 1fr;
    gap: var(--space-8);
  }
  .dept-editorial__director { position: static; }
  .dept-editorial__lead {
    margin-top: var(--space-4);
    padding: var(--space-6);
  }
}

/* ---- Editorial wysiwyg typography ---- */
.wysiwyg-content {
  font-size: var(--text-base);
  line-height: var(--lh-relaxed);
  color: var(--color-gray-600);
}

.wysiwyg-content p { margin-bottom: var(--space-5); }

/* Headings with pink underline accent */
.wysiwyg-content h2 {
  font-family: var(--font-heading);
  font-size: var(--text-2xl);
  color: var(--color-black);
  margin-top: var(--space-12);
  margin-bottom: var(--space-5);
  padding-bottom: var(--space-4);
  position: relative;
}
.wysiwyg-content h2::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 1px;
  background: var(--color-gray-200);
}
.wysiwyg-content h2::before {
  content: '';
  position: absolute;
  bottom: -1px;
  left: 0;
  width: 52px;
  height: 3px;
  background: var(--color-pink);
  border-radius: var(--radius-full);
  z-index: 1;
}

.wysiwyg-content h3 {
  font-family: var(--font-heading);
  font-size: var(--text-xl);
  color: var(--color-black);
  margin-top: var(--space-8);
  margin-bottom: var(--space-3);
}

.wysiwyg-content h4 {
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--color-black);
  margin-top: var(--space-6);
  margin-bottom: var(--space-2);
}

/* Custom bullet list */
.wysiwyg-content ul {
  padding-left: 0;
  margin-bottom: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
}
.wysiwyg-content ul li {
  padding-left: var(--space-6);
  position: relative;
  color: var(--color-gray-600);
  line-height: var(--lh-relaxed);
  list-style: none;
}
.wysiwyg-content ul li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.58em;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-pink);
  opacity: .65;
}

/* Numbered list with pink circles */
.wysiwyg-content ol {
  padding-left: 0;
  margin-bottom: var(--space-6);
  counter-reset: wysiwyg-ol;
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
}
.wysiwyg-content ol li {
  counter-increment: wysiwyg-ol;
  padding-left: calc(var(--space-6) + var(--space-3));
  position: relative;
  color: var(--color-gray-600);
  line-height: var(--lh-relaxed);
  list-style: none;
}
.wysiwyg-content ol li::before {
  content: counter(wysiwyg-ol);
  position: absolute;
  left: 0;
  top: 0.1em;
  width: 24px;
  height: 24px;
  background: var(--color-pink);
  color: var(--color-white);
  border-radius: 50%;
  font-family: var(--font-display);
  font-size: 11px;
  font-weight: var(--fw-bold);
  text-align: center;
  line-height: 24px;
}

.wysiwyg-content a {
  color: var(--color-pink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-color: rgba(255,44,161,.35);
  transition: text-decoration-color var(--duration-fast);
}
.wysiwyg-content a:hover { text-decoration-color: var(--color-pink); }

.wysiwyg-content strong { font-weight: var(--fw-bold); color: var(--color-black); }
.wysiwyg-content em { font-style: italic; }

/* Table */
.wysiwyg-content table {
  width: 100%;
  border-collapse: collapse;
  margin-bottom: var(--space-8);
  font-size: var(--text-sm);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.wysiwyg-content thead th {
  background: var(--color-gray-100);
  color: var(--color-black);
  padding: var(--space-3) var(--space-4);
  text-align: left;
  font-family: var(--font-display);
  font-size: var(--text-xs);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  border-bottom: 2px solid var(--color-pink);
}
.wysiwyg-content td {
  padding: var(--space-3) var(--space-4);
  border-bottom: 1px solid var(--color-gray-200);
  color: var(--color-gray-600);
  vertical-align: top;
  border-right: none;
  border-left: none;
  border-top: none;
}
.wysiwyg-content tr:last-child td { border-bottom: none; }
.wysiwyg-content tr:nth-child(even) td { background: rgba(0,0,0,.018); }
.wysiwyg-content tbody tr:hover td { background: rgba(255,44,161,.03); }

/* Blockquote — magazine pull-quote */
.wysiwyg-content blockquote {
  position: relative;
  margin: var(--space-10) 0;
  padding: var(--space-6) var(--space-8) var(--space-6) var(--space-10);
  background: var(--color-gray-100);
  border-radius: var(--radius-xl);
  border-left: 4px solid var(--color-pink);
  overflow: hidden;
}
.wysiwyg-content blockquote::before {
  content: '\201C';
  position: absolute;
  top: -1rem;
  left: var(--space-5);
  font-family: var(--font-heading);
  font-size: 5rem;
  line-height: 1;
  color: var(--color-pink);
  opacity: .2;
  pointer-events: none;
}
.wysiwyg-content blockquote p {
  font-size: var(--text-lg);
  font-style: italic;
  color: var(--color-black);
  line-height: var(--lh-relaxed);
  margin-bottom: 0;
}

/* Images */
.wysiwyg-content img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  display: block;
  margin: var(--space-6) 0;
}

/* HR divider with star */
.wysiwyg-content hr {
  border: none;
  height: 1px;
  background: var(--color-gray-200);
  margin: var(--space-10) 0;
  position: relative;
}
.wysiwyg-content hr::after {
  content: '❧';
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  background: #FAFAF8;
  padding: 0 var(--space-4);
  color: var(--color-pink);
  font-size: var(--text-sm);
}

@media (max-width: 480px) {
  .wysiwyg-content blockquote { padding: var(--space-5) var(--space-5) var(--space-5) var(--space-8); }
}

/* ---- Department page hero ---- */
.dept-hero {
  background-color: var(--color-black);
  color: var(--color-white);
  position: relative;
  overflow: hidden;
  min-height: clamp(320px, 50vh, 560px);
  display: flex;
  align-items: flex-end;
}

/* Без фото — просто темний фон з акцентом */
.dept-hero__bg-accent {
  position: absolute;
  top: -200px;
  right: -200px;
  width: 600px;
  height: 600px;
  background: radial-gradient(circle, rgba(255,44,161,.2) 0%, transparent 70%);
  pointer-events: none;
}

/* З фото — повноцінний банер */
.dept-hero--has-image {
  min-height: clamp(400px, 60vh, 640px);
}

.dept-hero__image {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.dept-hero__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.dept-hero__image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to top,
    rgba(22,22,22,.92) 0%,
    rgba(22,22,22,.55) 50%,
    rgba(22,22,22,.25) 100%
  );
}

/* Контент поверх усього */
.dept-hero__content {
  position: relative;
  z-index: 1;
  padding-top: calc(var(--header-height) + var(--space-16));
  padding-bottom: var(--space-12);
  width: 100%;
}

.dept-hero__title {
  font-size: var(--text-4xl);
  color: var(--color-white);
  margin-bottom: var(--space-4);
}

.dept-hero__description {
  font-size: var(--text-lg);
  color: rgba(255,255,255,.75);
  max-width: 65ch;
  line-height: var(--lh-relaxed);
}

/* Breadcrumb всередині dept-hero — на білому тлі не видно */
.dept-hero__content .breadcrumb {
  color: rgba(255,255,255,.5);
  margin-bottom: var(--space-6);
}
.dept-hero__content .breadcrumb a {
  color: rgba(255,255,255,.5);
}
.dept-hero__content .breadcrumb a:hover {
  color: var(--color-pink-light);
}
.dept-hero__content .breadcrumb__item--current {
  color: rgba(255,255,255,.85);
}

/* ---- Persons grid (горизонтальні картки) ---- */
/* Горизонтальні картки (старий fallback) */
.persons-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: var(--space-3);
}

/* Вертикальні картки: викладачі + керівництво — рівно 4 в ряд */
.persons-grid--vert,
.persons-grid--heads {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
}

@media (max-width: 1024px) {
  .persons-grid--vert,
  .persons-grid--heads {
    grid-template-columns: repeat(3, 1fr);
  }
}

@media (max-width: 680px) {
  .persons-grid--vert,
  .persons-grid--heads {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-4);
  }
}

@media (max-width: 400px) {
  .persons-grid--vert,
  .persons-grid--heads {
    grid-template-columns: 1fr;
  }
}

/* ---- Single teacher / graduate ---- */
.teacher-single__layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: var(--space-10);
  align-items: start;
  margin-bottom: var(--space-10);
}

.teacher-single__photo {
  position: sticky;
  top: calc(var(--header-height) + var(--space-6));
}

.teacher-single__img {
  width: 100%;
  aspect-ratio: 1;
  object-fit: cover;
  object-position: top center;
  border-radius: var(--radius-xl);
}

.teacher-single__dept {
  display: inline-block;
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-pink);
  margin-bottom: var(--space-3);
}

.teacher-single__name {
  font-size: var(--text-3xl);
  margin-bottom: var(--space-2);
}

.teacher-single__position {
  font-size: var(--text-lg);
  color: var(--color-gray-600);
  margin-bottom: var(--space-5);
}

.teacher-single__meta {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
  padding: var(--space-4);
  background: var(--color-gray-100);
  border-radius: var(--radius-lg);
}

.teacher-single__meta-row {
  display: grid;
  grid-template-columns: 120px 1fr;
  gap: var(--space-3);
  font-size: var(--text-sm);
}

.teacher-single__meta-row dt {
  color: var(--color-gray-400);
  font-weight: 500;
}

.teacher-single__meta-row dd {
  color: var(--color-black);
  font-weight: 500;
}

.teacher-single__bio {
  font-size: var(--text-base);
  color: var(--color-gray-600);
  line-height: var(--lh-relaxed);
}

.teacher-single__content {
  max-width: 720px;
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-gray-200);
}

/* ---- Dept filter ---- */
.dept-filter {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-2);
}

.dept-filter__btn {
  display: inline-flex;
  align-items: center;
  padding: var(--space-2) var(--space-4);
  font-size: var(--text-xs);
  font-weight: 600;
  letter-spacing: var(--ls-wide);
  text-transform: uppercase;
  color: var(--color-gray-600);
  border: 1px solid var(--color-gray-200);
  border-radius: var(--radius-full);
  background: var(--color-white);
  transition:
    border-color     var(--duration-fast) var(--ease-out),
    color            var(--duration-fast) var(--ease-out),
    background-color var(--duration-fast) var(--ease-out);
}

.dept-filter__btn:hover,
.dept-filter__btn.is-active {
  border-color: var(--color-pink);
  color: var(--color-pink);
  background: rgba(255,44,161,.06);
}

/* ---- Responsive ---- */
@media (max-width: 768px) {
  .teacher-single__layout {
    grid-template-columns: 1fr;
  }

  .teacher-single__photo {
    position: static;
    max-width: 180px;
  }

  .teacher-single__img {
    border-radius: var(--radius-lg);
  }

  .teacher-single__meta-row {
    grid-template-columns: 100px 1fr;
  }
}

/* ---- Responsive ---- */
@media (max-width: 1024px) {
  .stats__grid {
    grid-template-columns: repeat(2, 1fr);
    gap: var(--space-8) var(--space-4);
  }
  .stats__divider { display: none; }

  .news__featured { grid-template-columns: 1fr; }
  .news__grid { grid-template-columns: repeat(2, 1fr); }

  .collective-card {
    flex: 0 0 calc(50% - var(--grid-gap));
  }
}

@media (max-width: 640px) {
  .hero__title { font-size: clamp(2rem, 10vw, 3rem); }
  .hero__text { font-size: var(--text-base); }
  .hero__actions { flex-direction: column; }

  .stats__grid { grid-template-columns: repeat(2, 1fr); }

  .news__grid { grid-template-columns: 1fr; }

  .collective-card {
    flex: 0 0 85%;
  }

  /* Head cards — shorter photo on small screens */
  .person-card--head .person-card__photo {
    height: 160px;
  }

  /* Graduate card — smaller gap */
  .graduate-card {
    gap: var(--space-4);
    padding: var(--space-4) var(--space-5);
  }

  /* Wysiwyg mobile */
  .wysiwyg-content > p:first-of-type { font-size: var(--text-lg); }
  .wysiwyg-content h2 { margin-top: var(--space-8); }
}

/* ================================================================
   НМК — Навчально-методичний кабінет
   ================================================================ */

/* ---- Hero ---- */
.nmk-hero {
  padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-12);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
}
.nmk-hero__inner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-8);
  flex-wrap: wrap;
}
.nmk-hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-pink);
  margin-bottom: var(--space-3);
}
.nmk-hero__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-4xl));
  color: var(--color-black);
  line-height: 1.1;
  max-width: 640px;
}
.nmk-hero__desc {
  margin-top: var(--space-4);
  font-size: var(--text-lg);
  color: var(--color-gray-600);
  max-width: 560px;
  line-height: var(--lh-relaxed);
}
.nmk-hero__stat-row {
  display: flex;
  gap: var(--space-8);
  flex-shrink: 0;
}
.nmk-stat {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}
.nmk-stat__num {
  font-family: var(--font-display);
  font-size: var(--text-3xl);
  font-weight: var(--fw-extrabold, 800);
  color: var(--color-pink);
  line-height: 1;
}
.nmk-stat__lbl {
  font-size: var(--text-xs);
  color: var(--color-gray-400);
  text-transform: uppercase;
  letter-spacing: var(--ls-wider);
  margin-top: var(--space-1);
}

/* ---- Команда ---- */
.nmk-team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
  gap: var(--space-5);
}

.nmk-member {
  display: flex;
  align-items: flex-start;
  gap: var(--space-5);
  padding: var(--space-6);
  background: var(--color-white);
  border-radius: var(--radius-xl);
  border: 1px solid var(--color-gray-100);
  box-shadow: 0 2px 12px rgba(0,0,0,.05);
  transition: box-shadow var(--duration-fast) var(--ease-out), transform var(--duration-fast) var(--ease-out);
}
.nmk-member:hover {
  box-shadow: 0 8px 32px rgba(0,0,0,.08);
  transform: translateY(-2px);
}

.nmk-member__photo {
  width: 80px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  border: 2px solid var(--color-white);
  box-shadow: 0 0 0 2px var(--color-gray-200);
}
.nmk-member__photo img,
.nmk-member__photo .img-placeholder {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  border-radius: 50%;
}

.nmk-member__info { flex: 1; min-width: 0; }

.nmk-member__position {
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-pink);
  margin-bottom: var(--space-1);
}
.nmk-member__name {
  font-family: var(--font-heading);
  font-size: var(--text-base);
  font-weight: var(--fw-bold);
  color: var(--color-black);
  line-height: 1.3;
  margin-bottom: var(--space-2);
}
.nmk-member__resp {
  font-size: var(--text-xs);
  color: var(--color-gray-500);
  line-height: var(--lh-relaxed);
  margin-bottom: var(--space-3);
}
.nmk-member__contacts {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}
.nmk-member__contact {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  color: var(--color-gray-500);
  text-decoration: none;
  transition: color var(--duration-fast);
}
.nmk-member__contact:hover { color: var(--color-pink); }

/* ---- Tabs ---- */
.nmk-tabs__nav {
  display: flex;
  gap: 0;
  border-bottom: 2px solid var(--color-gray-200);
  margin-bottom: var(--space-8);
  overflow-x: auto;
  scrollbar-width: none;
}
.nmk-tabs__nav::-webkit-scrollbar { display: none; }

.nmk-tab-btn {
  padding: var(--space-4) var(--space-6);
  font-family: var(--font-display);
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-gray-500);
  background: none;
  border: none;
  border-bottom: 2px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  white-space: nowrap;
  transition: color var(--duration-fast), border-color var(--duration-fast);
}
.nmk-tab-btn:hover { color: var(--color-black); }
.nmk-tab-btn.is-active {
  color: var(--color-pink);
  border-bottom-color: var(--color-pink);
}

.nmk-tab-panel { display: none; }
.nmk-tab-panel.is-active { display: block; }

/* ---- Document list ---- */
.nmk-doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  border-radius: var(--radius-lg);
  border: 1px solid var(--color-gray-200);
  overflow: hidden;
  background: var(--color-white);
}

.nmk-doc {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-gray-100);
  transition: background var(--duration-fast);
}
.nmk-doc:last-child { border-bottom: none; }
.nmk-doc:hover { background: #FAFAF8; }

/* File type badge */
.nmk-doc__type {
  flex-shrink: 0;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .03em;
}
.nmk-doc__type--pdf { background: #FEE2E2; color: #DC2626; }
.nmk-doc__type--doc { background: #DBEAFE; color: #2563EB; }
.nmk-doc__type--xls { background: #DCFCE7; color: #16A34A; }

.nmk-doc__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.nmk-doc__title {
  font-size: var(--text-sm);
  font-weight: 600;
  color: var(--color-black);
  line-height: var(--lh-snug);
}
.nmk-doc__note {
  font-size: var(--text-xs);
  color: var(--color-gray-400);
}

/* Status badge */
.nmk-badge {
  flex-shrink: 0;
  font-size: 11px;
  font-weight: 600;
  padding: 3px 10px;
  border-radius: var(--radius-full);
  white-space: nowrap;
}
.nmk-badge--new      { background: #F5F3FF; color: #7C3AED; }
.nmk-badge--updated  { background: #EFF6FF; color: #2563EB; }
.nmk-badge--current  { background: #F0FDF4; color: #16A34A; }
.nmk-badge--archived { background: var(--color-gray-100); color: var(--color-gray-400); }

/* Download button */
.nmk-doc__dl {
  flex-shrink: 0;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-400);
  background: transparent;
  border: 1px solid transparent;
  transition: color var(--duration-fast), background var(--duration-fast), border-color var(--duration-fast);
}
.nmk-doc__dl:hover {
  color: var(--color-pink);
  background: rgba(255,44,161,.06);
  border-color: rgba(255,44,161,.2);
}

/* ---- Документація підрозділу ---- */
.nmk-dept-docs__group {
  margin-bottom: var(--space-8);
}
.nmk-dept-docs__group:last-child { margin-bottom: 0; }

.nmk-dept-docs__group-title {
  font-family: var(--font-heading);
  font-size: var(--text-lg);
  font-weight: var(--fw-bold);
  color: var(--color-black);
  margin-bottom: var(--space-4);
  padding-left: var(--space-4);
  border-left: 3px solid var(--color-pink);
}

/* ---- Help ---- */
.nmk-doc-list--help .nmk-doc__title { font-weight: 500; }

/* Empty state */
.nmk-empty {
  padding: var(--space-10) 0;
  text-align: center;
  color: var(--color-gray-400);
  font-size: var(--text-sm);
}

/* ---- Responsive ---- */
@media (max-width: 640px) {
  .nmk-hero__inner { flex-direction: column; align-items: flex-start; }
  .nmk-hero__stat-row { align-self: stretch; justify-content: space-around; }
  .nmk-team__grid { grid-template-columns: 1fr; }
  .nmk-badge { display: none; }
  .nmk-doc { gap: var(--space-3); padding: var(--space-3) var(--space-4); }
}

/* ================================================================
   Публічна інформація
   ================================================================ */

/* ---- Page hero ---- */
.pub-hero {
  padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-12);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
}

.pub-hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-pink);
  margin-bottom: var(--space-3);
}

.pub-hero__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-black);
  margin-bottom: 0;
}

.pub-hero__desc {
  margin-top: var(--space-4);
  max-width: 60ch;
  color: var(--color-gray-600);
  font-size: var(--text-lg);
}

/* ---- Layout ---- */
.pub-info__layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: start;
}

/* ---- Sidebar nav ---- */
.pub-info__sidebar {
  position: sticky;
  top: calc(var(--header-height) + var(--space-8));
}

.pub-nav {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.pub-nav__btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  border-radius: var(--radius-lg);
  padding: var(--space-3) var(--space-4);
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-gray-600);
  cursor: pointer;
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
  line-height: 1.4;
}

.pub-nav__btn:hover {
  background: var(--color-gray-100, #f0f0f0);
  color: var(--color-black);
}

.pub-nav__btn.is-active {
  background: var(--color-pink-50, #fff0f7);
  color: var(--color-pink);
  font-weight: 600;
}

.pub-nav__count {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  color: inherit;
  opacity: .6;
  background: rgba(0,0,0,.06);
  border-radius: 999px;
  padding: 1px 7px;
}

.pub-nav__btn.is-active .pub-nav__count {
  background: rgba(255,44,161,.12);
  opacity: 1;
}

/* ---- Content panels ---- */
.pub-panel {
  display: none;
}

.pub-panel.is-active {
  display: block;
}

.pub-panel__title {
  font-size: var(--text-2xl);
  font-weight: var(--fw-bold);
  color: var(--color-black);
  margin-bottom: var(--space-6);
  padding-bottom: var(--space-4);
  border-bottom: 2px solid var(--color-gray-100, #ebebeb);
}

/* ---- Doc list ---- */
.pub-doc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---- Doc item ---- */
.pub-doc {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  border-bottom: 1px solid var(--color-gray-100, #ebebeb);
  transition: background var(--duration-fast) var(--ease-out);
}

.pub-doc:first-child {
  border-top: 1px solid var(--color-gray-100, #ebebeb);
}

.pub-doc:hover {
  background: var(--color-gray-50, #f8f8f8);
}

/* File-type badge */
.pub-doc__type {
  flex-shrink: 0;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 7px;
  border-radius: var(--radius-sm);
  line-height: 1;
}

.pub-doc__type--pdf  { background: #fde8e8; color: #c0392b; }
.pub-doc__type--doc  { background: #e8f0fe; color: #1a56db; }
.pub-doc__type--xls  { background: #e6f4ea; color: #1e7e34; }

/* Body */
.pub-doc__body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
}

.pub-doc__title {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--color-black);
  line-height: 1.4;
}

.pub-doc__note {
  font-size: var(--text-xs);
  color: var(--color-gray-400);
}

/* Status badge */
.pub-badge {
  flex-shrink: 0;
  font-size: var(--text-xs);
  font-weight: 600;
  padding: 3px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

.pub-badge--new      { background: #f3e8ff; color: #7c3aed; }
.pub-badge--updated  { background: #dbeafe; color: #1d4ed8; }
.pub-badge--current  { background: #dcfce7; color: #15803d; }
.pub-badge--archived { background: var(--color-gray-100, #f0f0f0); color: var(--color-gray-400); }

/* Download button */
.pub-doc__dl {
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: var(--radius-lg);
  color: var(--color-gray-400);
  transition: background var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out);
}

.pub-doc__dl:hover {
  background: var(--color-pink);
  color: var(--color-white);
}

/* Empty state */
.pub-empty {
  padding: var(--space-10) 0;
  color: var(--color-gray-400);
  font-size: var(--text-sm);
}

/* ---- Sub-tabs (вкладки всередині панелі, напр. Атестація) ---- */
.pub-subtabs__nav {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-bottom: var(--space-6);
}

.pub-subtab-btn {
  padding: var(--space-2) var(--space-5);
  border-radius: 999px;
  border: 1.5px solid var(--color-gray-200);
  background: transparent;
  color: var(--color-gray-500);
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: border-color var(--duration-fast) var(--ease-out),
              color var(--duration-fast) var(--ease-out),
              background var(--duration-fast) var(--ease-out);
}

.pub-subtab-btn:hover {
  border-color: var(--color-pink);
  color: var(--color-pink);
}

.pub-subtab-btn.is-active {
  background: var(--color-pink);
  border-color: var(--color-pink);
  color: #fff;
}

.pub-subpanel {
  display: none;
}

.pub-subpanel.is-active {
  display: block;
}

/* ---- Responsive ---- */
@media (max-width: 900px) {
  .pub-info__layout {
    grid-template-columns: 220px 1fr;
    gap: var(--space-8);
  }
}

@media (max-width: 640px) {
  .pub-info__layout {
    grid-template-columns: 1fr;
  }

  .pub-info__sidebar {
    position: static;
  }

  .pub-nav {
    flex-direction: row;
    flex-wrap: wrap;
    gap: var(--space-2);
  }

  .pub-nav__btn {
    padding: var(--space-2) var(--space-3);
    font-size: var(--text-xs);
  }

  .pub-badge { display: none; }

  .pub-doc {
    gap: var(--space-3);
    padding: var(--space-3) var(--space-4);
  }
}

/* ================================================================
   Адміністрація
   ================================================================ */

/* ---- Hero ---- */
.admin-hero {
  padding: calc(var(--header-height) + var(--space-12)) 0 var(--space-12);
  background: var(--color-white);
  border-bottom: 1px solid var(--color-gray-200);
}

.admin-hero__label {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: 700;
  letter-spacing: var(--ls-wider);
  text-transform: uppercase;
  color: var(--color-pink);
  margin-bottom: var(--space-3);
}

.admin-hero__title {
  font-size: clamp(var(--text-3xl), 5vw, var(--text-5xl));
  font-weight: var(--fw-bold);
  line-height: var(--lh-tight);
  color: var(--color-black);
}

/* ---- Groups ---- */
.admin-group--spaced {
  margin-top: var(--space-10);
  padding-top: var(--space-8);
  border-top: 1px solid var(--color-gray-100);
}

/* ---- Director — широка горизонтальна картка ---- */
.admin-group--director {
  display: block;
}

.admin-card--director {
  display: grid;
  grid-template-columns: 280px 1fr;
  border-radius: 4px 4px 4px 60px;
  overflow: hidden;
  background: var(--color-black);
}

.admin-card--director .admin-card__photo-wrap {
  width: 100%;
  aspect-ratio: 3/4;
  overflow: hidden;
  flex-shrink: 0;
}

.admin-card--director .admin-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
  filter: grayscale(20%);
}

.admin-card--director .admin-card__photo--placeholder {
  width: 100%;
  height: 100%;
  background: var(--color-gray-800, #222);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-500);
}

.admin-card--director .admin-card__info {
  padding: var(--space-10) var(--space-10);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: var(--space-3);
}

.admin-card--director .admin-card__info::before {
  content: '';
  display: block;
  width: 32px;
  height: 3px;
  background: var(--color-pink);
  margin-bottom: var(--space-2);
}

.admin-card--director .admin-card__name {
  font-size: clamp(var(--text-xl), 2.5vw, var(--text-3xl));
  font-weight: var(--fw-bold);
  color: #fff;
  line-height: var(--lh-tight);
}

.admin-card--director .admin-card__position {
  font-size: var(--text-sm);
  color: var(--color-pink);
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
}

/* ---- Member cards — компактний список ---- */
.admin-group--grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
}

.admin-card--member {
  display: flex;
  flex-direction: row;
  align-items: center;
  gap: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--color-white);
}

.admin-card--member .admin-card__photo-wrap {
  width: 72px;
  height: 72px;
  flex-shrink: 0;
  border-radius: 50%;
  overflow: hidden;
  background: var(--color-gray-100);
}

.admin-card--member .admin-card__photo {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  display: block;
}

.admin-card--member .admin-card__photo--placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--color-gray-300);
}

.admin-card--member .admin-card__info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.admin-card--member .admin-card__name {
  font-size: var(--text-sm);
  font-weight: var(--fw-bold);
  color: var(--color-black);
  line-height: var(--lh-tight);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.admin-card--member .admin-card__position {
  font-size: var(--text-xs);
  color: var(--color-gray-500);
  line-height: 1.4;
}

/* ---- Empty state ---- */
.admin-empty {
  text-align: center;
  color: var(--color-gray-400);
  font-size: var(--text-sm);
  padding: var(--space-12) 0;
}

/* ---- Responsive ---- */
@media (max-width: 860px) {
  .admin-card--director {
    grid-template-columns: 200px 1fr;
  }
}

@media (max-width: 600px) {
  .admin-card--director {
    grid-template-columns: 1fr;
  }
  .admin-card--director .admin-card__photo-wrap {
    aspect-ratio: 4/3;
  }
  .admin-card--director .admin-card__info {
    padding: var(--space-6) var(--space-6);
  }
  .admin-group--grid {
    grid-template-columns: 1fr;
  }
}

/* ============================================================
   GALLERY — WordPress [gallery] shortcode, Masonry + Fancybox
   ============================================================ */

/* Скидаємо стандартні WP стилі галереї */
.gallery {
  margin: var(--space-6) 0;
}
.gallery::after {
  content: '';
  display: block;
  clear: both;
}
.gallery-item {
  float: left;
  margin: 0 0 8px 0;
  padding: 0;
  box-sizing: border-box;
}
.gallery-item dt,
.gallery-item .gallery-icon {
  margin: 0;
  padding: 0;
}

/* Ширина колонок — через padding, без margin (щоб Masonry не збивався) */
.gallery-item,
.gallery-sizer {
  box-sizing: border-box;
}
.gallery-item {
  padding: 0 4px 8px;
}

.gallery-columns-1 .gallery-item,
.gallery-columns-1 .gallery-sizer { width: 100%; }
.gallery-columns-2 .gallery-item,
.gallery-columns-2 .gallery-sizer { width: 50%; }
.gallery-columns-3 .gallery-item,
.gallery-columns-3 .gallery-sizer { width: 33.333%; }
.gallery-columns-4 .gallery-item,
.gallery-columns-4 .gallery-sizer { width: 25%; }
.gallery-columns-5 .gallery-item,
.gallery-columns-5 .gallery-sizer { width: 20%; }

/* Зображення */
.gallery-item img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-lg);
  transition: opacity var(--duration-fast);
}
.gallery-item a {
  display: block;
  border-radius: var(--radius-lg);
  overflow: hidden;
}
.gallery-item a:hover img {
  opacity: 0.85;
}

/* Підпис */
.gallery-caption {
  display: none;
}

@media (max-width: 640px) {
  .gallery-columns-3 .gallery-item,
  .gallery-columns-3 .gallery-sizer,
  .gallery-columns-4 .gallery-item,
  .gallery-columns-4 .gallery-sizer,
  .gallery-columns-5 .gallery-item,
  .gallery-columns-5 .gallery-sizer { width: 50%; }
}

