/* ───────────────────────────────────────────── */
/* ЛОКАЛЬНЫЙ ШРИФТ — CORMORANT GARAMOND */
/* ───────────────────────────────────────────── */

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/static/custom/fonts/CormorantGaramond-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/static/custom/fonts/CormorantGaramond-Italic.woff2') format('woff2');
  font-weight: 400;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: 'Cormorant Garamond';
  src: url('/static/custom/fonts/CormorantGaramond-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ───────────────────────────────────────────── */
/* ГЛОБАЛЬНАЯ ТИПОГРАФИЯ (поверх Bootstrap) */
/* ───────────────────────────────────────────── */

body {
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.15rem;
  line-height: 1.8;
  color: #212529;
  background-color: #f6f4ef;
}

/* Ограничение ширины текстовых страниц */
.container-narrow {
  max-width: 820px;
  margin: 0 auto;
}


/* ───────────────────────────────────────────── */
/* ЗАГОЛОВКИ */
/* ───────────────────────────────────────────── */

h1, h2, h3, h4, h5 {
  font-weight: 600;
  letter-spacing: 0.03em;
  margin-top: 2.5rem;
  margin-bottom: 1.2rem;
  color: #111;
}

h1 { font-size: 2.3rem; }
h2 { font-size: 1.9rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }


/* ───────────────────────────────────────────── */
/* ТЕКСТ И СТАТЬИ */
/* ───────────────────────────────────────────── */

.article-body {
  font-size: 1.18rem;
  line-height: 1.9;
  color: #222;
}

.article-body p {
  margin-bottom: 1.3rem;
}

.article-body ul,
.article-body ol {
  padding-left: 1.6rem;
  margin-bottom: 1.3rem;
}

.article-body li {
  margin-bottom: 0.4rem;
}

.article-body strong {
  font-weight: 600;
}

.article-body em {
  font-style: italic;
}

/* Первая буква статьи */
.article-body p:first-of-type::first-letter {
  font-size: 2.4rem;
  float: left;
  line-height: 1;
  padding-right: 0.15em;
  padding-top: 0.05em;
  font-weight: 600;
}


/* ───────────────────────────────────────────── */
/* ССЫЛКИ */
/* ───────────────────────────────────────────── */

a {
  color: #1f3a5f;
  text-decoration: none;
  transition: color 0.2s ease;
}

a:hover {
  color: #000;
  text-decoration: underline;
}


/* ───────────────────────────────────────────── */
/* МЕНЮ (Bootstrap-совместимое) */
/* ───────────────────────────────────────────── */

.main-nav {
  background-color: #3f3454;
  padding: 0.65rem 0;
}

.main-nav .nav-link {
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: #ffffff !important;
  padding: 0.3rem 1rem;
  transition: opacity 0.2s ease;
}

.main-nav .nav-link:hover {
  opacity: 0.7;
}

.main-nav .nav-link.active {
  border-bottom: 1px solid #ffffff;
}

/* убираем bootstrap underline */
.nav-link {
  text-decoration: none !important;
}


/* ───────────────────────────────────────────── */
/* КНОПКИ */
/* ───────────────────────────────────────────── */

.btn-outline-primary {
  border-color: #444;
  color: #222;
}

.btn-outline-primary:hover {
  background-color: #222;
  border-color: #222;
  color: #fff;
}


/* ───────────────────────────────────────────── */
/* ПОДВАЛ */
/* ───────────────────────────────────────────── */

footer {
  font-size: 0.95rem;
  color: #6c757d;
  border-top: 1px solid #dee2e6;
  margin-top: 4rem;
  padding: 2rem 0;
}

.link-footer {
  color: #6c757d;
}

.link-footer:hover {
  color: #000;
}


/* ───────────────────────────────────────────── */
/* ИЗОБРАЖЕНИЯ */
/* ───────────────────────────────────────────── */

img {
  max-width: 100%;
  height: auto;
}


/* ───────────────────────────────────────────── */
/* ЦИТАТЫ */
/* ───────────────────────────────────────────── */

blockquote {
  border-left: 2px solid #bbb;
  padding-left: 1rem;
  margin: 2rem 0;
  font-style: italic;
  color: #444;
}


/* ───────────────────────────────────────────── */
/* ГЛАВНАЯ СТРАНИЦА — ИЗДАТЕЛЬСКАЯ ШАПКА */
/* ───────────────────────────────────────────── */

.home-header {
  padding-top: 4rem;
  padding-bottom: 3rem;
  text-align: center;
}

.portrait-wrapper {
  margin-bottom: 1.5rem;
}

.portrait-img {
  max-height: 180px;
  filter: contrast(110%);
}

.site-title {
  font-size: 2.2rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.site-subtitle {
  font-size: 1rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #555;
  margin-bottom: 2rem;
}















/* ─────────── ГЛАВНАЯ: АНИМАЦИЯ АВАТАРА ─────────── */

.profile-fade {
  animation: fadeIn 1.2s ease-in-out both;
  background: transparent;
}

@keyframes fadeIn {
  0% {
    opacity: 0;
    transform: scale(0.95);
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

/* ───── Коллекционные карточки: адаптивное изображение ───── */

.stamp-images img {
  max-width: 100%;
  height: auto;
  display: block;
}
.stamp-images {
  overflow: hidden;
  gap: 0.5rem;
}
.stamp-img {
  max-height: 350px;
  object-fit: contain;
  border: 1px solid #dee2e6;
  background-color: white;
}


/* ─────────── ПОДВАЛ: Плашка куки ─────────── */

/* Плашка куки */
.cookie-banner {
  z-index: 9999;
  box-shadow: 0 -1px 5px rgba(0,0,0,0.1);
}



/* ───────────────────────────────────────────── */
/* СТРАНИЦА КОНТАКТОВ — ИЗДАТЕЛЬСКИЙ СТИЛЬ */
/* ───────────────────────────────────────────── */

.page-title {
  font-size: 2rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 3rem;
}

.contact-section {
  margin-bottom: 4rem;
}

.section-title {
  font-size: 1.3rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 1.8rem;
  padding-bottom: 0.6rem;
  border-bottom: 1px solid #d8d3ca;
}

.section-description {
  margin-bottom: 1.5rem;
  color: #444;
}

.contact-list {
  list-style: none;
  padding-left: 0;
  margin-bottom: 1.5rem;
}

.contact-list li {
  margin-bottom: 0.4rem;
}

.license-note {
  font-size: 0.95rem;
  color: #555;
  border-left: 2px solid #d8d3ca;
  padding-left: 1rem;
  margin-top: 1.5rem;
}

.friend-item {
  margin-bottom: 2.5rem;
  padding-bottom: 2rem;
  border-bottom: 1px solid #e6e1d8;
}

.friend-item:last-child {
  border-bottom: none;
}

.friend-name {
  font-size: 1.2rem;
  margin-bottom: 0.4rem;
}

.friend-description {
  margin-bottom: 0.6rem;
  color: #444;
}

.friend-meta {
  font-size: 0.95rem;
  color: #555;
  margin-bottom: 0.8rem;
}


/* ───────────────────────────────────────────── */
/* КАРТА — ТИПОГРАФСКАЯ НАВИГАЦИЯ КАТЕГОРИЙ */
/* ───────────────────────────────────────────── */

.map-categories {
  margin-bottom: 3rem;
}

.categories-label {
  font-size: 0.85rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 0.8rem;
}

.categories-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 1.4rem;
  line-height: 1.8;
}



.category-link {
  text-decoration: none !important;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  text-decoration: none;
  color: #222;
  position: relative;
  padding-bottom: 3px;
  transition: opacity 0.2s ease;
}

.category-link:hover {
  text-decoration: none !important;
  opacity: 0.6;
}




.category-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 1px;
  background: #222;
  transition: width 0.25s ease;
}

.category-link:hover::after {
  width: 100%;
}

.category-link.active::after {
  width: 100%;
}




/* ─────────── ПОЛИТИКА: ЯЗЫКОВОЙ ПЕРЕКЛЮЧАТЕЛЬ ─────────── */

.policy-lang-switch {
  display: inline-flex;
  gap: 1.6rem;
}

.policy-lang-link {
  all: unset;                 /* полностью убираем bootstrap и браузер */
  cursor: pointer;
  font-family: 'Cormorant Garamond', serif;
  font-size: 0.95rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #222;
  position: relative;
}

.policy-lang-link:hover {
  opacity: 0.7;
}

/* подчёркивание активного языка */
.policy-lang-link.active::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 100%;
  height: 1px;
  background-color: #000;
}





/* ───────────────────────────────────────────── */
/* КАРТА — ВСПЛЫВАЮЩЕЕ ОКНО */
/* ───────────────────────────────────────────── */

.maplibregl-popup-content {
  background-color: #fdfbf7;
  border: 1px solid #e6e1d8;
  border-radius: 0;
  padding: 1.4rem;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.06);
  font-family: 'Cormorant Garamond', serif;
}

.map-popup {
  max-width: 260px;
}

.popup-image img {
  width: 100%;
  height: auto;
  margin-bottom: 1rem;
}

.popup-title {
  font-size: 1.15rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.popup-description {
  font-size: 0.95rem;
  line-height: 1.7;
  color: #444;
  margin-bottom: 1rem;
}

.popup-link a {
  all: unset;
  cursor: pointer;
  font-size: 0.95rem;
  letter-spacing: 0.05em;
  position: relative;
  color: #222;
}

.popup-link a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #222;
  transition: width 0.25s ease;
}

.popup-link a:hover::after {
  width: 100%;
}

/* полностью убираем синий фокус */
.popup-link a:focus,
.popup-link a:focus-visible {
  outline: none;
  box-shadow: none;
}





/* ───────────────────────────────────────────── */
/* ТЕКСТЫ — ИЗДАТЕЛЬСКИЙ СПИСОК */
/* ───────────────────────────────────────────── */

.article-preview {
  margin-bottom: 4rem;
  padding-bottom: 3rem;
  border-bottom: 1px solid #e6e1d8;
}

.article-preview:last-child {
  border-bottom: none;
}

.article-preview-title {
  font-size: 1.6rem;
  margin-bottom: 0.8rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.article-preview-title a {
  color: #111;
  text-decoration: none;
}

.article-preview-title a:hover {
  opacity: 0.7;
}

.article-preview-abstract {
  font-size: 1.05rem;
  line-height: 1.8;
  color: #444;
  margin-bottom: 1.2rem;
}

.article-preview-meta {
  font-size: 0.9rem;
  color: #666;
  margin-bottom: 1rem;
  letter-spacing: 0.05em;
}

.meta-separator {
  margin: 0 0.5rem;
}

.article-preview-link a {
  all: unset;
  cursor: pointer;
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  position: relative;
  color: #222;
}

.article-preview-link a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 0;
  height: 1px;
  background: #222;
  transition: width 0.25s ease;
}

.article-preview-link a:hover::after {
  width: 100%;
}


/* ───────────────────────────────────────────── */
/* HOME — ТИТУЛЬНЫЙ ЛИСТ */
/* ───────────────────────────────────────────── */

.home-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  background-color: #f6f4ef;
}

.home-inner {
  max-width: 600px;
}

.home-portrait img {
  max-height: 160px;
  margin-bottom: 2.5rem;
}

.home-name {
  font-size: 2.4rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  margin-bottom: 2.5rem;
}

.home-nav {
  display: flex;
  justify-content: center;
  gap: 2.5rem;
  font-size: 0.95rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.home-nav a {
  color: #3f3454;
  position: relative;
  text-decoration: none;
}

.home-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -6px;
  width: 0;
  height: 1px;
  background: #3f3454;
  transition: width 0.3s ease;
}

.home-nav a:hover::after {
  width: 100%;
}



