/**
 * Content sections: hero blocks, galleries, forms, tabs, typography
 */
.hero-content {
  position: relative;
  z-index: 1;
  text-align: center;
  padding: 0 16px;
  max-width: 100%;
}
.hero-title {
  font-size: 48px;
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin-bottom: 0;
}

@media (min-width: 768px) {
  .hero-title {
    font-size: 48px;
  }
}

@media (min-width: 1024px) {
  .hero-title {
    font-size: 42px;
  }
}
@media (max-width: 768px) {
  .hero-title--compact .hero-title {
    font-size: 28px !important;
  }
}
.hero-description {
  font-size: 16px;
  font-weight: 500;
  color: #737373;
  margin-bottom: 24px;
  font-family: 'PT Serif', serif;
  margin-top: 16px;
}

.content-section {
  padding-top: 0px;
  padding-bottom: 20px;
  position: relative;
}

.section-title {
  font-size: 22px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 8px;
  text-align: center;
}

.section-subtitle {
  font-size: 17px;
  color: #a3a3a3;
  margin-bottom: 16px;
  text-align: center;
  font-style: italic;
}

@media (min-width: 768px) {
  .content-section {
    padding-top: 48px;
    padding-bottom: 48px;
  }
}

/*
 * Hero-экран: первый экран страницы высотой с окно.
 * Фон не задаётся — используется глобальный fixed-фон body.
 * Контент центрируется, при скролле уезжает вверх (параллакс).
 */
.hero {
  margin-top: 120px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.hero-slider-container .hero-gallery-main {
  position: relative;
}

/* hero-slider-container используется только на странице gallery — см. .gallery-page */

.hero-gallery-main {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  /*background: rgba(0, 0, 0, 0.3);*/
  background: transparent;
  aspect-ratio: 16/10;
}

.gallery-main-image {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  min-width: 0;
  min-height: 0;
  object-fit: contain;
  display: block;
  border-radius: 16px;
}

.gallery-main-stage {
  position: relative;
  width: 100%;
  height: 100%;
}

.gallery-main-stage .gallery-main-image {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  opacity: 0;
  z-index: 1;
  transition: opacity 0.6s ease;
  pointer-events: none;
}

.gallery-main-stage .gallery-main-image.is-visible {
  opacity: 1;
  z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
  .gallery-main-stage .gallery-main-image {
    transition: none;
  }
}

.hero-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 9999px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(0, 0, 0, 0.5);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: opacity 0.6s ease, transform 0.2s, background 0.2s, border-color 0.2s;
  z-index: 10;
  backdrop-filter: blur(10px);
  opacity: 1;
}

.gallery-controls {
  position: absolute;
  bottom: 16px;
  right: 16px;
  z-index: 10;
  display: grid;
  grid-template-columns: repeat(3, auto);
  grid-template-rows: auto auto;
  gap: 8px;
  align-items: center;
  transition: opacity 0.6s ease;
}

.gallery-controls .hero-nav {
  position: static;
  top: auto;
  left: auto;
  right: auto;
  transform: none;
  width: 40px;
  height: 40px;
}

.gallery-controls .hero-nav.prev {
  grid-column: 1;
  grid-row: 1;
}

.gallery-controls .hero-nav.autoplay-btn {
  grid-column: 2;
  grid-row: 1;
}

.gallery-controls .hero-nav.next {
  grid-column: 3;
  grid-row: 1;
}

.gallery-controls .hero-nav.fullscreen-btn {
  grid-column: 3;
  grid-row: 2;
  justify-self: center;
  display: none;
}

@media (min-width: 768px) {
  .gallery-controls .hero-nav.fullscreen-btn {
    display: flex;
  }
}

.hero-nav:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}
@media (min-width: 769px) {
  .hero-gallery-main.controls-hidden .gallery-controls {
    opacity: 0;
    pointer-events: none;
  }
}

.hero-thumbnails-scroll {
  display: flex;
  gap: 8px;
  width: 100%;
  overflow-x: auto;
  padding: 16px max(8px, calc(50% - 40px));
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  justify-content: flex-start;
  flex-wrap: nowrap;
  cursor: grab;
}

.hero-thumbnails-scroll.is-scrolling-programmatically {
  scroll-behavior: auto;
}

.hero-thumbnails-scroll.dragging {
  cursor: grabbing;
  scroll-behavior: auto;
  user-select: none;
}

.hero-thumbnails-scroll::-webkit-scrollbar {
  display: none;
}

.thumb-btn {
  flex-shrink: 0;
  width: 80px;
  height: 60px;
  border-radius: 8px;
  overflow: hidden;
  border: 2px solid transparent;
  background: rgba(0, 0, 0, 0.3);
  cursor: pointer;
  transition: border-color 0.2s, transform 0.2s;
  padding: 0;
}

.thumb-btn:hover {
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.05);
}

.thumb-btn.active {
  border-color: rgba(255, 255, 255, 0.6);
  transform: scale(1.05);
}

.thumb-btn img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.7;
  transition: opacity 0.2s;
}

.thumb-btn:hover img {
  opacity: 1;
}

.thumb-btn.active img {
  opacity: 1;
}
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 12px;
  overflow: hidden;
  cursor: pointer;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.7s ease, filter 0.5s;
  filter: brightness(0.85) saturate(0.9);
  max-width: 100%;
}

.gallery-item:hover img {
  transform: scale(1.05);
  filter: brightness(1) saturate(1);
}

.gallery-item .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.7) 0%, transparent 50%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 16px;
}

.gallery-item:hover .overlay {
  opacity: 1;
}

.gallery-item .overlay span {
  font-size: 13px;
  font-weight: 500;
  color: #ffffff;
}

.card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  overflow: hidden;
  transition: border-color 0.3s, transform 0.3s;
}

.card:hover {
  border-color: rgba(255, 255, 255, 0.12);
  transform: translateY(-4px);
}

.card img {
  width: 100%;
  aspect-ratio: 16/10;
  object-fit: cover;
  filter: brightness(0.85) saturate(0.85);
  transition: filter 0.5s, transform 0.5s;
  max-width: 100%;
}

.card:hover img {
  filter: brightness(1) saturate(1);
  transform: scale(1.02);
}
.timeline-item {
  position: relative;
  padding-left: 32px;
  padding-bottom: 32px;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
}

.timeline-item:last-child {
  padding-bottom: 0;
}

.timeline-item::before {
  content: '';
  position: absolute;
  left: -5px;
  top: 4px;
  width: 10px;
  height: 10px;
  border-radius: 9999px;
  background: #737373;
  box-shadow: 0 0 12px rgba(59, 130, 246, 0.5);
}

.timeline-year {
  font-size: 13px;
  font-weight: 600;
  color: #737373;
  margin-bottom: 4px;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 28px;
  border-radius: 10px;
  border: none;
  background: #fff;
  color: #000;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  transition: background 0.2s, transform 0.2s;
  font-family: 'Inter', sans-serif;
  touch-action: manipulation;
  -webkit-tap-highlight-color: transparent;
}

.btn-primary:hover {
  background: #e5e5e5;
  transform: scale(1.02);
}

.btn-primary:active {
  transform: scale(0.98);
}

.paint-panel {
  display: none;
}

.paint-panel.active {
  display: block;
}

#painting,
#photoarchive {
  scroll-margin-top: 0px;
}

#photoarchive .gallery-item .overlay,
#painting .gallery-item .overlay {
  opacity: 1;
}

.tabs-wrapper {
  margin-bottom: 32px;
}

.tabs-wrapper--bottom {
  margin-bottom: 0;
  margin-top: 32px;
}

@media (min-width: 768px) {
  .tabs-wrapper {
    margin-bottom: 40px;
  }

  .tabs-wrapper--bottom {
    margin-top: 40px;
  }
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}

.tab-btn {
  padding: 10px 20px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.15);
  background: rgba(255, 255, 255, 0.03);
  color: #a3a3a3;
  font-size: 18px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'PT Serif', serif;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.tab-btn:hover {
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}
.book-typesetting {
  text-indent: 2em;
}

.book-typesetting p {
  margin-top: 0;
  margin-bottom: 0;
}

.book-typesetting .prose-lead,
.book-typesetting .prose-signature,
.book-typesetting .prose-epigraph,
.book-typesetting .prose-meta,
.book-typesetting .prose-note,
.book-typesetting .prose-quote {
  text-indent: 0;
}

/* ——— Страница галереи ——— */
.gallery-page {
  position: relative;
  padding: calc(64px + 16px) 0 16px;
}

@media (min-width: 768px) {
  .gallery-page {
    padding: calc(64px + 24px) 0 24px;
  }
}

.gallery-page .container {
  position: relative;
  z-index: 1;
  max-width: none;
  width: 100%;
  padding: 0 16px;
}

@media (min-width: 768px) {
  .gallery-page .container {
    padding: 0 24px;
  }
}

.gallery-page .hero-slider-container {
  max-width: 1200px;
  width: 100%;
  margin: 0 auto;
}

.gallery-page .hero-gallery-main {
  width: 100%;
  height: clamp(300px, calc(100svh - 64px - 48px - 140px), calc(100svh - 180px));
  aspect-ratio: auto;
}

.gallery-page .gallery-main-hit,
.gallery-page .gallery-main-stage {
  width: 100%;
  height: 100%;
}

.gallery-page .gallery-main-stage {
  position: relative;
}

.gallery-main-hit {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: zoom-in;
}

.gallery-main-hit:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 4px;
}

.gallery-slide-caption {
  margin: 16px 0 0;
  text-align: center;
  font-size: 18px;
  font-weight: 500;
  color: #a3a3a3;
  min-height: 1.5em;
}

.hero-gallery-viewport:fullscreen,
.hero-gallery-viewport:-webkit-full-screen {
  display: flex;
  flex-direction: column;
  box-sizing: border-box;
  width: 100%;
  height: 100%;
  padding: 24px;
  background: #000000;
}

.hero-gallery-viewport:fullscreen .hero-gallery-main,
.hero-gallery-viewport:-webkit-full-screen .hero-gallery-main {
  flex: 1;
  min-height: 200px;
  height: auto;
  aspect-ratio: auto;
  border-radius: 8px;
  display: flex;
  flex-direction: column;
}

.hero-gallery-viewport:fullscreen .gallery-slide-caption,
.hero-gallery-viewport:-webkit-full-screen .gallery-slide-caption {
  flex-shrink: 0;
  margin: 20px 0 0;
  padding: 0 24px;
  font-size: 18px;
  line-height: 1.5;
}

.hero-gallery-viewport:fullscreen .gallery-main-hit,
.hero-gallery-viewport:-webkit-full-screen .gallery-main-hit {
  flex: 1;
  min-height: 0;
  height: auto;
  position: relative;
  cursor: default;
}

.hero-gallery-viewport:fullscreen .gallery-main-stage,
.hero-gallery-viewport:-webkit-full-screen .gallery-main-stage {
  position: absolute;
  inset: 0;
  width: auto;
  height: auto;
}

#gallerySlider:focus {
  outline: none;
}

/* ——— Типографика контента ——— */
.icon-accent {
  color: #60a5fa;
}

.prose-quote {
  border-left: 2px solid rgba(96, 165, 250, 0.4);
  padding-left: 24px;
  font-style: italic;
  color: #a3a3a3;
  margin: 24px 0;
}

.prose-quote p {
  margin-bottom: 8px;
}

.prose-quote p:last-child {
  margin-bottom: 0;
}

.prose-epigraph {
  text-align: center;
  font-style: italic;
  color: #a3a3a3;
  margin-top: 32px;
}

.prose-meta {
  text-align: center;
  color: #737373;
  margin-top: 24px;
}

.prose-note {
  text-align: center;
  color: #737373;
  font-style: italic;
  margin-top: 32px;
}

.prose-spacer {
  height: 24px;
}

.prose-lead {
  font-weight: 500;
  color: #ffffff;
  margin-bottom: 16px;
  text-align: left;
  text-indent: 0 !important;
}

.prose-signature {
  text-align: right;
  text-indent: 0 !important;
}

/* ——— Воспоминания ——— */
.memory-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 32px;
  margin-bottom: 32px;
}

.memory-photo {
  flex-shrink: 0;
  align-self: flex-start;
  margin: 0;
}

.memory-photo-img {
  display: block;
  width: 168px;
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  object-fit: cover;
}

.memory-prose {
  margin-top: 0;
}

/* ——— Документы ——— */
.document-list {
  display: flex;
  flex-direction: column;
  gap: 20px;
  max-width: 880px;
  margin: 0 auto;
}

.document-item {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 16px;
  padding: 20px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  transition: border-color 0.25s, background 0.25s;
}

.document-item:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.045);
}

.document-thumb {
  position: relative;
  flex-shrink: 0;
  align-self: center;
  width: min(100%, 200px);
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  background: rgba(0, 0, 0, 0.35);
  overflow: hidden;
  cursor: zoom-in;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.document-thumb:hover,
.document-thumb:focus-visible {
  border-color: rgba(96, 165, 250, 0.45);
  box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.15);
  outline: none;
}

.document-thumb img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.document-thumb-hint {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.45);
  color: #ffffff;
  opacity: 0;
  transition: opacity 0.2s;
}

.document-thumb:hover .document-thumb-hint,
.document-thumb:focus-visible .document-thumb-hint {
  opacity: 1;
}

.document-body {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  min-width: 0;
  flex: 1;
  padding: 0;
  cursor: default;
}

.document-title {
  font-size: 15px;
  font-weight: 100;
  color: #c5c5c5;
  font-family: 'PT Serif', serif;
  margin: 0 0 10px;
  line-height: 1.5;
}

.document-date {
  font-size: 14px;
  color: #737373;
  font-family: 'PT Serif', serif;
  margin: 0;
}

@media (min-width: 640px) {
  .document-item {
    flex-direction: row;
    align-items: center;
    padding: 24px;
    gap: 24px;
  }

  .document-thumb {
    align-self: auto;
    width: 140px;
  }

  .document-body {
    justify-content: center;
    padding: 4px 0;
  }

  .document-title {
    font-size: 18px;
    margin-bottom: 8px;
    line-height: 1.45;
  }
}

@media (min-width: 768px) {
  .document-thumb,
  .gallery-main-hit {
    cursor: pointer;
  }
}

.card-body {
  padding: 24px;
}

.card-body-full {
  padding: 32px;
}

.card-date {
  display: block;
  font-size: 12px;
  color: #737373;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}

.card-title {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
  line-height: 1.35;
}

.card-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #a3a3a3;
  margin-bottom: 16px;
}

.card-type {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: #60a5fa;
  font-family: 'Inter', sans-serif;
}

/* ——— Публикации ——— */
.article-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 768px) {
  .article-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ——— Выставки ——— */
#exhibitions {
  font-family: 'PT Serif', serif;
}

.exhibitions-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 40px;
  max-width: 1080px;
  margin: 0 auto;
  align-items: start;
}

.exhibitions-group {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exhibitions-head-card {
  padding: 24px 28px;
  border-radius: 14px;
  border: 1px solid rgba(167, 139, 250, 0.12);
  background: linear-gradient(145deg, rgba(167, 139, 250, 0.05) 0%, rgba(255, 255, 255, 0.02) 52%);
}

.exhibitions-head-title {
  font-size: 18px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.35;
}

.exhibitions-head-meta {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: #737373;
  margin: 0;
}

.exhibition-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.exhibition-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(255, 255, 255, 0.03);
}

.exhibition-year {
  font-family: 'PT Serif', serif;
  font-size: 18px;
  font-weight: 700;
  color: #d4d4d4;
  letter-spacing: 0.01em;
  font-variant-numeric: tabular-nums;
}

.exhibition-text {
  font-size: 16px;
  line-height: 1.65;
  color: #d4d4d4;
  margin: 0;
}

@media (min-width: 768px) {
  .exhibitions-head-card {
    padding: 28px 32px;
  }

  .exhibitions-head-title {
    font-size: 20px;
  }

  .exhibition-year {
    font-size: 20px;
  }
}

@media (min-width: 992px) {
  .exhibitions-layout {
    grid-template-columns: 1fr 1fr;
    gap: 32px;
  }
}

.timeline {
  max-width: 720px;
  margin: 0 auto;
}

.timeline-title {
  font-size: 17px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 8px;
  font-family: 'Inter', sans-serif;
}

.timeline-desc {
  font-size: 14px;
  line-height: 1.6;
  color: #a3a3a3;
}

.tab-btn.active {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.section-header {
  margin-bottom: 48px;
}

.prose {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  color: #a3a3a3;
  font-size: 18px;
  line-height: 1.7;
}

/* ——— Служебные страницы (Условия использования, Политика конфиденциальности, Обратная связь) ——— */
.terms-of-use__content,
.privacy-policy__content,
.feedback__content {
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
}

.terms-of-use__prose,
.privacy-policy__prose,
.feedback__prose {
  color: #a3a3a3;
  font-size: 18px;
  line-height: 1.7;
}

.terms-of-use__prose h2,
.privacy-policy__prose h2,
.feedback__prose h2 {
  font-size: 24px;
  font-weight: 600;
  color: #e5e5e5;
  margin-top: 32px;
  margin-bottom: 16px;
}

.terms-of-use__prose p:first-child,
.privacy-policy__prose p:first-child,
.feedback__prose p:first-child {
  margin-top: 24px;
}

.terms-of-use__prose p,
.privacy-policy__prose p,
.feedback__prose p {
  margin-bottom: 16px;
}

.terms-of-use__prose ul,
.privacy-policy__prose ul,
.feedback__prose ul {
  margin: 16px 0;
  padding-left: 24px;
}

.terms-of-use__prose li,
.privacy-policy__prose li,
.feedback__prose li {
  margin-bottom: 6px;
}

.terms-of-use__prose strong,
.privacy-policy__prose strong,
.feedback__prose strong {
  color: #e5e5e5;
}

.terms-of-use__prose a,
.privacy-policy__prose a,
.feedback__prose a {
  color: inherit;
  text-decoration: none;
}

.terms-of-use__prose a:hover,
.privacy-policy__prose a:hover,
.feedback__prose a:hover {
  text-decoration: underline;
}

.italic {
  font-style: italic;
}

/* Видеоплеер */
.video-player {
  width: 100%;
  max-width: 800px;
  margin: 0 auto;
}

.video-player video {
  display: block;
  width: 100%;
  max-width: 100%;
  height: auto;
  border-radius: 16px;
  background: rgba(0, 0, 0, 0.3);
}

/* Гостевая книга */
.guestbook-form {
  width: 100%;
  max-width: 560px;
  margin: 32px auto 0;
  text-align: left;
}

.guestbook-form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}

.guestbook-form__field {
  display: flex;
  flex-direction: column;
  margin-bottom: 16px;
}

.guestbook-form__control {
  width: 100%;
  padding: 12px 14px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.6);
  color: #f5f5f5;
  font-size: 15px;
  font-family: 'Inter', sans-serif;
  transition: border-color 0.2s, background 0.2s;
}

.guestbook-form__control::placeholder {
  color: #6b6b6b;
}

.guestbook-form__control:focus {
  outline: none;
  border-color: rgba(255, 255, 255, 0.4);
  background: rgba(20, 20, 20, 0.8);
}

.guestbook-form__textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.6;
}

.guestbook-form__actions {
  display: flex;
  justify-content: center;
  margin-top: 8px;
}

.guestbook-empty {
  text-align: center;
  color: #737373;
  font-size: 16px;
  font-family: 'PT Serif', serif;
  font-style: italic;
}

/* Кнопка "Оставить запись" в форме гостевой книги — дизайн как у "Показать ещё" */
.guestbook-form__submit {
  padding: 13px 36px;
  font-size: 15px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  color: #8892a8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transform: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.25s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

.guestbook-form__submit:hover:not(:disabled) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 8px 30px rgba(96, 165, 250, 0.12), 0 1px 6px rgba(0, 0, 0, 0.35);
  transform: none;
}

.guestbook-form__submit:active {
  transform: none;
}

.guestbook-form__submit:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.6);
  outline-offset: 2px;
  transform: none;
}

.guestbook-form__submit:disabled {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
  transform: none;
}

/* Чекбокс «Запомнить меня» */
.guestbook-checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  user-select: none;
  margin-bottom: 20px;
}

.guestbook-checkbox__input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.guestbook-checkbox__box {
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  border: 1.5px solid rgba(255, 255, 255, 0.35);
  border-radius: 6px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, border-color 0.2s;
}

.guestbook-checkbox__input:checked + .guestbook-checkbox__box {
  background: #ffffff;
  border-color: #ffffff;
}

.guestbook-checkbox__input:checked + .guestbook-checkbox__box::after {
  content: '';
  width: 10px;
  height: 6px;
  border-left: 2px solid #000;
  border-bottom: 2px solid #000;
  transform: rotate(-45deg) translateY(-1px);
}

.guestbook-checkbox__input:focus-visible + .guestbook-checkbox__box {
  outline: 2px solid #ffffff;
  outline-offset: 2px;
}

.guestbook-checkbox:hover .guestbook-checkbox__box {
  border-color: rgba(255, 255, 255, 0.7);
}

.guestbook-checkbox__label {
  font-family: 'Inter', sans-serif;
  font-size: 15px;
  color: #e5e5e5;
}

.guestbook-checkbox:hover .guestbook-checkbox__label {
  color: #ffffff;
}

/* Подсказки и подписи полей */
.guestbook-hint {
  font-size: 14px;
  line-height: 1.6;
  color: #a3a3a3;
  font-family: 'Inter', sans-serif;
  margin: 0 0 20px;
}

.guestbook-hint--center {
  text-align: center;
  margin-bottom: 16px;
}

.guestbook-hint--small {
  font-size: 13px;
  margin: 6px 0 0;
}

.guestbook-form__label {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 600;
  color: #c0c0c0;
  margin-bottom: 8px;
}

.guestbook-modal__remember {
  margin-top: 24px;
  padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.guestbook-modal__remember .guestbook-checkbox {
  margin-bottom: 0;
}

/* Модальное окно ввода кода */
.guestbook-modal {
  position: fixed;
  inset: 0;
  z-index: 650;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.guestbook-modal.open {
  opacity: 1;
  visibility: visible;
}

.guestbook-modal__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
}

.guestbook-modal__dialog {
  position: relative;
  width: 100%;
  max-width: 440px;
  max-height: calc(100vh - 32px);
  overflow-y: auto;
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.6);
  color: #ffffff;
  transform: scale(0.92) translateY(8px);
  transition: transform 0.3s ease;
}

.guestbook-modal.open .guestbook-modal__dialog {
  transform: scale(1) translateY(0);
}

.guestbook-modal__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: none;
  border-radius: 8px;
  background: transparent;
  color: #a3a3a3;
  cursor: pointer;
  transition: color 0.2s, background 0.2s;
}

.guestbook-modal__close:hover {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.1);
}

.guestbook-modal__body {
  padding: 24px 24px 8px;
}

.guestbook-modal__title {
  font-family: 'PT Serif', serif;
  font-size: 20px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 12px;
  padding-right: 32px;
}

.guestbook-modal__text {
  font-size: 14px;
  line-height: 1.6;
  color: #a3a3a3;
  margin-bottom: 20px;
}

.guestbook-modal__email {
  color: #ffffff;
  font-weight: 600;
}

.guestbook-modal__footer {
  display: flex;
  justify-content: center;
  padding: 16px 24px 24px;
}

/* Поля одноразового кода */
.guestbook-code {
  display: flex;
  gap: 10px;
  justify-content: center;
}

.guestbook-code__input {
  width: 46px;
  height: 54px;
  padding: 0;
  text-align: center;
  font-size: 22px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
  color: #f5f5f5;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(10, 10, 10, 0.6);
  transition: border-color 0.2s, background 0.2s;
}

.guestbook-code__input::placeholder {
  color: #6b6b6b;
}

.guestbook-code__input:focus {
  outline: none;
  border-color: rgba(96, 165, 250, 0.7);
  background: rgba(20, 20, 20, 0.8);
}

body:has(.guestbook-modal.open) .back-to-top {
  opacity: 0;
  transform: translateY(20px);
  pointer-events: none;
}

@media (max-width: 480px) {
  .guestbook-code {
    gap: 8px;
  }

  .guestbook-code__input {
    width: 40px;
    height: 48px;
    font-size: 20px;
  }
}

.guestbook-list {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
  max-width: 720px;
  margin: 0 auto;
  align-items: start;
}

.guestbook-card {
  position: relative;
  display: flex;
  flex-direction: column;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 28px 28px 24px;
  transition: border-color 0.25s, background 0.25s, transform 0.25s;
}

.guestbook-card:hover {
  border-color: rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.05);
  transform: translateY(-2px);
}

.guestbook-card__quote {
  color: rgba(255, 255, 255, 0.18);
  margin-bottom: 12px;
}

.guestbook-card__message {
  flex: 1;
  margin: 0 0 20px;
  color: #d4d4d4;
  font-size: 16px;
  line-height: 1.7;
  font-family: 'PT Serif', serif;
}

.guestbook-card__footer {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.guestbook-card__name {
  font-size: 15px;
  font-weight: 600;
  color: #ffffff;
  font-family: 'Inter', sans-serif;
}

.guestbook-card__date {
  font-size: 13px;
  color: #737373;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.guestbook-compose {
  max-width: 560px;
  margin: 56px auto 0;
  padding-top: 40px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.guestbook-compose__title {
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  text-align: center;
  color: #ffffff;
  margin: 0;
}

.guestbook-compose .guestbook-form {
  margin-top: 24px;
}

/* Кнопка «Оставить запись» (Яндекс.Формы): увеличены размер и текст */
.guestbook-compose .publications-media-link {
  font-size: 16px;
  line-height: 1.3;
  padding: 12px 26px;
  border-radius: 8px;
  gap: 8px;
}

@media (max-width: 768px) {
  .hero {
    margin-top: 85px;
  }
  .guestbook-list {
    gap: 16px;
  }
  .guestbook-card {
    padding: 24px 20px 20px;
  }
  .guestbook-card__message {
    font-size: 15px;
    margin-bottom: 16px;
  }
  .guestbook-compose {
    margin-top: 40px;
    padding-top: 32px;
  }
}

@media (max-width: 560px) {
  .guestbook-form__row {
    grid-template-columns: 1fr;
    gap: 0;
  }
}

@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 768px) {
  .gallery-page .hero-gallery-main .gallery-controls {
    display: none;
  }

  .btn-primary,
  .btn-primary:hover,
  .btn-primary:active {
    transform: none;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
  }

  .hero-content h1 {
    font-size: 36px !important;
  }

  .tab-btn {
    padding: 8px 14px;
    font-size: 13px;
  }

  .memory-card {
    padding: 24px 20px;
  }

  .memory-photo {
    grid-column: 1;
    grid-row: 1;
    align-self: end;
  }

  .memory-photo-img {
    width: 132px;
  }
}

@media (max-width: 480px) {
  .tabs {
    gap: 6px;
  }

  .memory-photo-img {
    width: 120px;
  }

  .tab-btn {
    padding: 6px 10px;
    font-size: 12px;
  }
}

/* ===== Публикации - карточная сетка (адаптация publications-region-dark) ===== */
.publications-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  align-items: start;
}
@media (max-width: 900px) { .publications-grid { grid-template-columns: repeat(2, 1fr); gap: 18px; } }
@media (max-width: 640px) { .publications-grid { grid-template-columns: 1fr; gap: 16px; } }

.publications-post {
  display: flex;
  flex-direction: column;
  position: relative;
  border-radius: 10px;
  background: rgba(255,255,255,0.03);
  border: 1px solid rgba(255,255,255,0.08);
  overflow: hidden;
  transition: border-color 0.25s ease, box-shadow 0.3s ease, transform 0.25s ease;
}
.publications-post:hover {
  border-color: rgba(96,165,250,0.4);
  box-shadow: 0 8px 30px rgba(96,165,250,0.12), 0 1px 6px rgba(0,0,0,0.35);
  transform: translateY(2px);
}

.publications-post-thumb {
  position: relative;
  width: 100%;
  aspect-ratio: 380 / 214;
  overflow: hidden;
  padding: 0;
  border: 0;
  background: rgba(0,0,0,0.4);
}
button.publications-post-thumb { cursor: pointer; }
.publications-post-thumb img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
/*.publications-post:hover .publications-post-thumb img { transform: scale(1.04); }*/
.publications-post-thumb:focus-visible { outline: 2px solid rgba(96,165,250,0.5); outline-offset: 2px; }

.publications-play {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%,-50%);
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: rgba(0,0,0,0.65);
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 14px rgba(0,0,0,0.35);
  pointer-events: none;
}
.publications-play svg { fill: currentColor; }

.publications-post-body {
  display: flex;
  flex-direction: column;
  gap: 12px;
  flex: 1;
  min-width: 0;
  padding: 14px 16px;
}
.publications-post-header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}
.publications-post-title {
  font-family: "PT Serif", serif;
  font-size: 15px;
  font-weight: 300;
  line-height: 1.4;
  color: #ffffff;
  margin: 0;
  min-width: 0;
}

.publications-media {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.publications-media-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-self: flex-start;
}
.publications-media-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 12px;
  line-height: 1;
  color: #60a5fa;
  font-family: "Inter", sans-serif;
  border: 1px solid rgba(96,165,250,0.28);
  background: rgba(96,165,250,0.08);
  border-radius: 5px;
  padding: 5px 11px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
/* Интерактивные медиа-кнопки (например, «Видео» — открывает ролик в модальном окне) */
button.publications-media-link { font: inherit; cursor: pointer; }
.publications-media-link:hover { background: rgba(96,165,250,0.16); border-color: rgba(96,165,250,0.5); color: #93c5fd; text-decoration: none; }
.publications-media-link.pdf { color: #f0b44a; border-color: rgba(240,180,74,0.25); background: rgba(240,180,74,0.08); }
.publications-media-link.pdf:hover { background: rgba(240,180,74,0.16); border-color: rgba(240,180,74,0.5); color: #f6cd8a; text-decoration: none; }
.publications-media-link.video { color: #f472b6; border-color: rgba(244,114,182,0.25); background: rgba(244,114,182,0.08); }
span.publications-media-link.video { cursor: default; }
span.publications-media-link.video:hover { background: rgba(244,114,182,0.08); border-color: rgba(244,114,182,0.25); color: #f472b6; }
.publications-media-link.video:hover { background: rgba(244,114,182,0.16); border-color: rgba(244,114,182,0.5); color: #f9a8d4; text-decoration: none; }
/* Неинтерактивные медиа-ссылки (без href) — тот же дизайн, без курсора-указателя и hover-эффектов */
span.publications-media-link:not(.video) { cursor: default; }
span.publications-media-link:not(.video):hover { background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.28); color: #60a5fa; text-decoration: none; }
span.publications-media-link.pdf:hover { background: rgba(240,180,74,0.08); border-color: rgba(240,180,74,0.25); color: #f0b44a; text-decoration: none; }


.publications-post-footer {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  margin-top: auto;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,0.06);
}
.publications-source {
  align-self: flex-start;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 500;
  font-family: "Inter", sans-serif;
  text-decoration: none;
  overflow-wrap: break-word;
  transition: color 0.2s ease;
}
.publications-source:hover { color: #93c5fd; }
/* Неинтерактивный источник (без ссылки) — тот же дизайн, но без курсора-указателя */
span.publications-source { cursor: default; }
span.publications-source:hover { color: #60a5fa; }
.publications-post-date {
  display: inline-flex;
  font-size: 12px;
  color: #a3a3a3;
  font-family: "Inter", sans-serif;
  white-space: nowrap;
  flex-shrink: 0;
  align-self: flex-end;
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(255,255,255,0.04);
  border-radius: 5px;
  padding: 5px 11px;
  line-height: 1;
}

/* ===== Публикации - кнопка "Показать ещё" ===== */
.publications-loadmore-wrap {
  display: flex;
  justify-content: center;
  margin-top: 36px;
}

/* Цветовая палитра как у старых кнопок пагинации (.page-btn) */
.publications-loadmore-btn {
  padding: 13px 36px;
  font-size: 15px;
  justify-content: center;
  background: rgba(255, 255, 255, 0.03);
  color: #8892a8;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  transform: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.25s ease, box-shadow 0.3s ease, transform 0.2s ease;
}

/* Синий эффект при наведении, как у блоков статей (.publications-post:hover) */
.publications-loadmore-btn:hover:not(:disabled) {
  color: #ffffff;
  background: rgba(255, 255, 255, 0.07);
  border-color: rgba(96, 165, 250, 0.4);
  box-shadow: 0 8px 30px rgba(96, 165, 250, 0.12), 0 1px 6px rgba(0, 0, 0, 0.35);
  transform: none;
}

.publications-loadmore-btn:focus-visible {
  outline: 2px solid rgba(96, 165, 250, 0.6);
  outline-offset: 2px;
  transform: none;
}

.publications-loadmore-btn:active {
  transform: none;
}

.publications-loadmore-btn[disabled] {
  opacity: 0.3;
  cursor: default;
  pointer-events: none;
  transform: none;
}

@media (max-width: 640px) {
  .publications-loadmore-wrap {
    margin-top: 28px;
  }

  .publications-loadmore-btn {
    width: 100%;
    font-size: 14px;
  }
}

/* Контейнер кнопок в hero раздела "Гостевая книга" */
.hero-guestbook-actions {
  display: flex;
  flex-direction: row;
  justify-content: center;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 20px;
}


/* ===== Цветная тень при наведении (как в разделе "Публикации") ===== */
.document-item,
.exhibitions-head-card,
.exhibition-card,
.guestbook-card {
  transition: border-color 0.25s ease, background 0.25s ease, box-shadow 0.3s ease, transform 0.25s ease;
}

.document-item:hover,
.exhibitions-head-card:hover,
.exhibition-card:hover,
.guestbook-card:hover {
  border-color: rgba(96,165,250,0.4);
  background: rgba(255,255,255,0.045);
  box-shadow: 0 8px 30px rgba(96,165,250,0.12), 0 1px 6px rgba(0,0,0,0.35);
  transform: translateY(2px);
}

/* ===== Hero: описание на всю ширину окна, макс. ширина = контейнер контента (1200px) ===== */
.hero-content--wide .hero-description {
  width: 100%;
  max-width: 1200px;
  margin-left: auto;
  margin-right: auto;
}

/* ===== Курсор-стрелка над текстом (Биография, Фотоархив, Воспоминания, Живопись, Выставки, Публикации, Галерея, Гостевая книга, 403, 404) ===== */
body.cursor-default main p,
body.cursor-default main li,
body.cursor-default main h1,
body.cursor-default main h2,
body.cursor-default main h3,
body.cursor-default main h4,
body.cursor-default main h5,
body.cursor-default main h6,
body.cursor-default main span,
body.cursor-default main blockquote,
body.cursor-default main figcaption,
body.cursor-default main small,
body.cursor-default main strong,
body.cursor-default main em,
body.cursor-default main label,
body.cursor-default main td,
body.cursor-default main th {
  cursor: default;
}
