/* ==========================================================================
   03-base.css — базовые стили + карточки документов + полноэкранная галерея
   ========================================================================== */

/* --- Сетка и типографика --- */
.wrap { width: min(1200px, 92%); margin: 0 auto; }
.mono { font-family: var(--mono); }

.kicker {
  font-family: var(--mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: flex;
  align-items: center;
  gap: .7rem;
}
.kicker::before { content: ""; width: 34px; height: 1px; background: var(--accent); }

h1, h2, h3 { font-family: var(--disp); font-weight: 600; line-height: 1.12; }
.h2 { font-size: clamp(1.9rem, 3.6vw, 3rem); margin: .6rem 0 .4rem; }

.sec-note { color: var(--mut); max-width: 52ch; }
.sec-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 2rem;
  flex-wrap: wrap;
  margin-bottom: 2.6rem;
}

/* --- Кнопки --- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  padding: .9rem 1.6rem;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: var(--paper);
  font-weight: 600;
  font-size: .95rem;
  letter-spacing: .02em;
  transition: .25s;
  position: relative;
  cursor: pointer;
}
.btn:hover {
  background: var(--accent);
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 10px 24px -12px rgba(142,47,34,.6);
}
.btn.ghost { background: transparent; color: var(--ink); }
.btn.ghost:hover { background: var(--ink); color: var(--paper); }
.btn.small { padding: .55rem 1.05rem; font-size: .85rem; }

/* --- Анимации появления --- */
.rv { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.6,.2,1); }
.rv.on { opacity: 1; transform: none; }
.lm { overflow: hidden; }
.lm > span { display: block; transform: translateY(112%); transition: transform .95s cubic-bezier(.2,.65,.2,1); }
.lm.on > span { transform: none; }


/* ==========================================================================
   КАРТОЧКИ ДОКУМЕНТОВ (раздел «Документы и практика»)
   Наведение: фото слегка увеличивается — БЕЗ надписи «просмотр»
   ========================================================================== */
.cert-item .img-wrap {
  position: relative;
  overflow: hidden;
  cursor: zoom-in;
}
.cert-item .img-wrap img {
  display: block;
  transition: transform .4s ease, filter .3s ease;
}
.cert-item .img-wrap:hover img {
  transform: scale(1.05);
  filter: brightness(.92);
}


/* ==========================================================================
   ПОЛНОЭКРАННАЯ ГАЛЕРЕЯ ДОКУМЕНТОВ
   ========================================================================== */
.doc-gallery {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(25, 27, 24, .97);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  opacity: 0;
  transition: opacity .3s ease;
  backdrop-filter: blur(6px);
}
.doc-gallery.active {
  display: flex;
  opacity: 1;
}

.doc-gallery-stage {
  position: relative;
  width: 90vw;
  height: 85vh;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}
.doc-gallery-stage img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 4px;
  box-shadow: 0 15px 60px rgba(0,0,0,.6);
  opacity: 1;
  transition: opacity .25s ease;
}
.doc-gallery-stage img.loading { opacity: 0; }

.doc-gallery-loader {
  position: absolute;
  width: 40px;
  height: 40px;
  border: 2px solid rgba(243,239,229,.2);
  border-top-color: #A8823C;
  border-radius: 50%;
  animation: doc-spin .8s linear infinite;
  display: none;
}
.doc-gallery-loader.active { display: block; }
@keyframes doc-spin { to { transform: rotate(360deg); } }

.doc-gallery-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: rgba(243,239,229,.08);
  border: 1px solid rgba(243,239,229,.2);
  color: #F3EFE5;
  font-size: 2rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  z-index: 10002;
  line-height: 1;
}
.doc-gallery-close:hover {
  background: rgba(168,130,60,.3);
  border-color: #A8823C;
  transform: rotate(90deg);
}

.doc-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(243,239,229,.08);
  color: #F3EFE5;
  border: 1px solid rgba(243,239,229,.2);
  font-size: 2.8rem;
  width: 60px;
  height: 60px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .2s;
  z-index: 10001;
  font-family: Georgia, serif;
  line-height: 1;
}
.doc-gallery-nav:hover {
  background: rgba(168,130,60,.3);
  border-color: #A8823C;
}
.doc-gallery-nav.prev { left: 30px; }
.doc-gallery-nav.next { right: 30px; }

.doc-gallery-counter {
  position: absolute;
  top: 30px;
  left: 50%;
  transform: translateX(-50%);
  color: #8E2F22;
  font-family: var(--mono, 'IBM Plex Mono', monospace);
  font-size: 1rem;
  font-weight: 500;
  letter-spacing: 2px;
  background: rgba(25,27,24,.6);
  padding: 6px 14px;
  border-radius: 20px;
  border: 1px solid rgba(243,239,229,.15);
}

.doc-gallery-caption {
  position: absolute;
  bottom: 60px;
  left: 50%;
  transform: translateX(-50%);
  color: color: #A8823C;
  text-shadow: 0 2px 12px rgba(0,0,0,0.8);
  font-family: var(--disp, 'Playfair Display', Georgia, serif);
  font-size: 1.1rem;
  font-weight: 600;
  letter-spacing: 1px;
  text-align: center;
  max-width: 80vw;
}

.doc-gallery-hint {
  position: absolute;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  color: rgba(243,239,229,.45);
  font-family: var(--mono, 'IBM Plex Mono', monospace);
  font-size: .78rem;
  letter-spacing: .5px;
  white-space: nowrap;
}

/* --- Адаптив для мобильных --- */
@media (max-width: 768px) {
  .doc-gallery-nav { width: 44px; height: 44px; font-size: 2rem; }
  .doc-gallery-nav.prev { left: 10px; }
  .doc-gallery-nav.next { right: 10px; }
  .doc-gallery-close { top: 12px; right: 12px; width: 40px; height: 40px; font-size: 1.6rem; }
  .doc-gallery-stage { width: 96vw; height: 75vh; }
  .doc-gallery-caption { font-size: .95rem; bottom: 50px; }
  .doc-gallery-hint { font-size: .7rem; }
}