/* web/style.css — Golem Web Interface v11.0 */
/* Дизайн-система: Древняя библиотека, скрипторий */

/* ===== ИМПОРТ ШРИФТОВ ===== */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,400;0,600;0,700;1,400;1,600&family=EB+Garamond:ital,wght@0,400;0,500;0,600;1,400;1,500&display=swap');

/* ===== СБРОС ===== */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  scrollbar-width: thin;
  scrollbar-color: #b8860b #ede0c8;
}
html {
  scroll-behavior: smooth;
}

/* ===== БАЗА ===== */
body {
  font-family: 'EB Garamond', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  line-height: 1.8;
  background: #ede0c8;
  color: #2c1810;
  margin: 0;
}
body.app-mode {
  display: flex;
  height: 100vh;
}
::selection {
  background: #b8860b;
  color: #faf3e0;
}
::-webkit-scrollbar-thumb {
  background: #b8860b;
  border-radius: 2px;
}

/* ===== ТЕКСТУРА ПАПИРУСА (фон) ===== */
body::before {
  content: '';
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: -1;
  background:
    radial-gradient(ellipse at 15% 30%, rgba(210, 180, 140, 0.25) 0%, transparent 50%),
    radial-gradient(ellipse at 85% 70%, rgba(200, 170, 120, 0.2) 0%, transparent 50%),
    radial-gradient(ellipse at 50% 10%, rgba(220, 195, 155, 0.15) 0%, transparent 40%),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(180, 150, 100, 0.03) 2px,
      rgba(180, 150, 100, 0.03) 4px
    );
}

/* ===== САЙДБАР (НАВИГАЦИЯ) ===== */
#sidebar {
  width: 300px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #2c1810;
  border-right: 1px solid #4a3020;
  color: #ede0c8;
}

/* Логотип */
#logo {
  padding: 16px 20px 12px;
  border-bottom: 1px solid #4a3020;
}
#logo pre {
  font-size: 10px;
  line-height: 1.4;
  font-weight: 700;
  margin: 0;
  font-family: 'Courier New', monospace;
  color: #b8860b;
}

/* Фильтры */
#filters {
  padding: 10px 20px;
  position: relative;
  border-bottom: 1px solid #4a3020;
}
#search,
#category-select,
#subcategory-select {
  width: 100%;
  padding: 8px 10px;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 14px;
  outline: none;
  border-radius: 4px;
  background: #3a2215;
  border: 1px solid #5c3a2a;
  color: #ede0c8;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
#search:focus,
#category-select:focus,
#subcategory-select:focus {
  border-color: #b8860b;
  box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.25);
}
#search::placeholder {
  color: #8a7a6a;
}
#category-select {
  margin-top: 6px;
}
#subcategory-select {
  margin-top: 6px;
  display: none;
}
#toggle-theme {
  position: absolute;
  right: 20px;
  top: 14px;
  cursor: pointer;
  font-size: 20px;
  user-select: none;
  color: #b8860b;
  transition: transform 0.4s ease;
}
#toggle-theme:hover {
  transform: rotate(180deg);
}

/* Действия сайдбара */
#sidebar-actions {
  padding: 10px 20px;
  display: flex;
  gap: 16px;
  border-bottom: 1px solid #4a3020;
}
.sidebar-btn {
  font-size: 11px;
  cursor: pointer;
  color: #8a7a6a;
  text-transform: uppercase;
  letter-spacing: 2px;
  font-family: 'EB Garamond', Georgia, serif;
  user-select: none;
  transition: color 0.3s ease;
}
.sidebar-btn:hover {
  color: #b8860b;
}

/* Контроль размера шрифта */
#font-size-controls {
  padding: 8px 20px;
  display: flex;
  gap: 8px;
  border-bottom: 1px solid #4a3020;
}
.font-size-btn {
  cursor: pointer;
  padding: 2px 10px;
  border: 1px solid #5c3a2a;
  border-radius: 4px;
  font-size: 12px;
  color: #8a7a6a;
  font-family: 'Cormorant Garamond', Georgia, serif;
  transition: all 0.2s ease;
}
.font-size-btn:hover,
.font-size-btn.active {
  color: #b8860b;
  border-color: #b8860b;
  background: rgba(184, 134, 11, 0.1);
}

/* Список файлов */
#file-list {
  flex: 1;
  overflow-y: auto;
  scroll-behavior: smooth;
}
.file-icon {
  vertical-align: middle;
  margin-right: 6px;
  display: inline-block;
  flex-shrink: 0;
  width: 18px;
  height: 18px;
}
.file-item {
  display: flex;
  flex-direction: column;
  padding: 8px 20px;
  cursor: pointer;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 14px;
  border-left: 3px solid transparent;
  border-bottom: 1px solid #3a2215;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.file-item:hover {
  background: #3a2215;
  border-left-color: #b8860b;
}
.file-item .title {
  font-weight: 600;
  color: #ede0c8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.file-item .topic {
  font-size: 12px;
  margin-top: 2px;
  padding-left: 24px;
  color: #8a7a6a;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Заголовки категорий */
.cat-header {
  padding: 10px 20px 4px;
  font-size: 10px;
  color: #b8860b;
  text-transform: uppercase;
  letter-spacing: 4px;
  font-weight: 700;
  font-family: 'Cormorant Garamond', Georgia, serif;
  border-bottom: 1px solid #4a3020;
}

/* Статистика */
#stats {
  padding: 10px 20px;
  font-size: 10px;
  letter-spacing: 1px;
  text-transform: uppercase;
  border-top: 1px solid #4a3020;
  color: #8a7a6a;
  font-family: 'EB Garamond', Georgia, serif;
}
#stats span {
  color: #b8860b;
  font-weight: 700;
}

/* ===== ОСНОВНАЯ ОБЛАСТЬ ===== */
#main-area {
  flex: 1;
  display: flex;
  overflow: hidden;
  position: relative;
}
#content {
  flex: 1;
  overflow-y: auto;
  padding: 40px 50px 60px;
  scroll-behavior: smooth;
}
#content.fade-in {
  animation: fadeSlideIn 0.5s ease forwards;
}
@keyframes fadeSlideIn {
  0% { opacity: 0; transform: translateY(8px); }
  100% { opacity: 1; transform: translateY(0); }
}

/* Прогресс-бар */
#progress-bar {
  height: 3px;
  background: #b8860b;
  width: 0;
  transition: width 0.1s ease;
  position: sticky;
  top: 0;
  z-index: 10;
}

/* Хлебные крошки */
#breadcrumbs {
  padding: 0 0 10px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #5c4a3a;
  font-family: 'EB Garamond', Georgia, serif;
}
.bc-sep {
  color: #8a7a6a;
  margin: 0 6px;
}

/* ===== ТИПОГРАФИКА КОНТЕНТА ===== */
#content h1 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: 36px;
  font-weight: 700;
  font-style: italic;
  color: #b8860b;
  margin-bottom: 8px;
  padding-bottom: 12px;
  border-bottom: 2px solid #d4c4a8;
  line-height: 1.3;
}
#content h2 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: 28px;
  font-weight: 600;
  color: #2c1810;
  margin: 32px 0 8px;
  line-height: 1.4;
}
#content h3 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: 22px;
  font-weight: 600;
  color: #2c1810;
  margin: 24px 0 6px;
  line-height: 1.4;
}
#content h4 {
  font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
  font-size: 18px;
  font-weight: 700;
  color: #b8860b;
  margin: 18px 0 4px;
  line-height: 1.4;
  letter-spacing: 1px;
}
#content p {
  line-height: 1.8;
  margin-bottom: 12px;
  font-size: 18px;
  color: #2c1810;
}
#content blockquote {
  border-left: 3px solid #b8860b;
  padding: 12px 20px;
  margin: 16px 0;
  font-style: italic;
  cursor: pointer;
  background: #faf3e0;
  border-radius: 0 4px 4px 0;
  color: #5c4a3a;
  transition: background 0.25s ease;
  position: relative;
}
#content blockquote::before {
  content: '❦';
  position: absolute;
  top: -6px;
  left: 8px;
  font-size: 14px;
  color: #b8860b;
  opacity: 0.5;
}
#content blockquote:hover {
  background: #f5edd5;
}
#content code {
  font-family: 'Courier New', 'Courier', monospace;
  padding: 2px 8px;
  font-size: 15px;
  color: #c0392b;
  background: #faf3e0;
  border-radius: 3px;
  border: 1px solid #e8d5b8;
}
#content strong {
  color: #2c1810;
  font-weight: 700;
}
#content em {
  font-style: italic;
}
#content hr {
  border: none;
  height: 1px;
  margin: 24px 0;
  background: linear-gradient(90deg, transparent, #d4c4a8, #b8860b, #d4c4a8, transparent);
}
#content a,
.related-link {
  color: #b8860b;
  text-decoration: none;
  border-bottom: 1px solid #b8860b;
  cursor: pointer;
  transition: color 0.3s ease, border-color 0.3s ease;
}
#content a:hover,
.related-link:hover {
  color: #8b6508;
  border-bottom-color: #8b6508;
}

/* Декоративный разделитель — меандр */
#content hr.meander {
  border: none;
  height: 16px;
  margin: 24px 0;
  background: transparent;
  position: relative;
  overflow: visible;
}
#content hr.meander::after {
  content: '⩶⩶⩶ ⩶⩶⩶ ⩶⩶⩶';
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  color: #b8860b;
  font-size: 12px;
  letter-spacing: 4px;
  opacity: 0.4;
  white-space: nowrap;
}

/* Пустое состояние */
#empty {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
  font-size: 16px;
  letter-spacing: 3px;
  text-transform: uppercase;
  color: #8a7a6a;
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-style: italic;
  animation: fadePulse 4s ease-in-out infinite;
}
@keyframes fadePulse {
  0%, 100% { opacity: 0.4; }
  50% { opacity: 0.8; }
}

/* Подсказка пути */
.path-hint {
  font-size: 11px;
  margin-bottom: 14px;
  letter-spacing: 1px;
  color: #8a7a6a;
  font-family: 'EB Garamond', Georgia, serif;
}

/* Спиннер */
.spinner {
  border: 2px solid #d4c4a8;
  border-top: 2px solid #b8860b;
  border-radius: 50%;
  width: 24px;
  height: 24px;
  animation: spin 0.8s linear infinite;
  margin: 60px auto;
}
@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* ===== ЗАКЛАДКИ И ИСТОРИЯ ===== */
.bookmark-btn {
  cursor: pointer;
  color: #8a7a6a;
  font-size: 16px;
  margin-left: 8px;
  transition: all 0.3s ease;
}
.bookmark-btn:hover {
  color: #b8860b;
}
.bookmark-btn.active {
  color: #b8860b;
}
.bookmark-item {
  display: flex;
  align-items: center;
  font-size: 12px;
  padding: 4px 20px;
  cursor: pointer;
  color: #b8860b;
  font-family: 'EB Garamond', Georgia, serif;
  transition: background 0.2s ease;
}
.bookmark-item:hover {
  background: #3a2215;
}
.history-item {
  display: flex;
  align-items: center;
  font-size: 12px;
  padding: 4px 20px;
  cursor: pointer;
  color: #8a7a6a;
  font-family: 'EB Garamond', Georgia, serif;
  transition: background 0.2s ease;
}
.history-item:hover {
  color: #b8860b;
  background: #3a2215;
}

/* ===== TOC ПАНЕЛЬ ===== */
#toc-panel {
  width: 200px;
  min-width: 200px;
  overflow-y: auto;
  padding: 20px;
  background: #faf3e0;
  border-left: 1px solid #d4c4a8;
}
.toc-header {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 12px;
  color: #b8860b;
  text-transform: uppercase;
  letter-spacing: 3px;
  font-weight: 700;
  margin-bottom: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid #d4c4a8;
}
.toc-item {
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 14px;
  padding: 3px 0;
  cursor: pointer;
  color: #5c4a3a;
  transition: color 0.3s ease, padding-left 0.3s ease;
}
.toc-item:hover {
  color: #b8860b;
  padding-left: 6px;
}
.toc-item.h3 {
  padding-left: 14px;
  font-size: 13px;
}

/* ===== КНОПКА "НАВЕРХ" ===== */
#back-to-top {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 40px;
  height: 40px;
  background: #b8860b;
  color: #faf3e0;
  border: 1px solid #d4c4a8;
  cursor: pointer;
  font-size: 18px;
  display: none;
  align-items: center;
  justify-content: center;
  font-family: 'Cormorant Garamond', Georgia, serif;
  z-index: 99;
  border-radius: 4px;
  opacity: 0.8;
  transition: all 0.3s ease;
}
#back-to-top:hover {
  opacity: 1;
  background: #8b6508;
  transform: translateY(-2px);
}

/* ===== TOAST ===== */
#copy-toast {
  position: fixed;
  top: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: #2c1810;
  color: #ede0c8;
  padding: 10px 24px;
  font-size: 14px;
  font-family: 'EB Garamond', Georgia, serif;
  opacity: 0;
  pointer-events: none;
  z-index: 999;
  border-radius: 4px;
  border: 1px solid #b8860b;
  transition: opacity 0.4s ease;
}
#copy-toast.show {
  opacity: 1;
}

/* ===== МОБИЛЬНЫЕ СКРЫТИЯ ===== */
#burger-btn,
#burger-overlay,
#burger-menu,
#mobile-controls,
#mobile-list-view,
#stats-mobile,
#file-page {
  display: none;
}

/* ===== HEBREW TEXT SUPPORT ===== */
.hebrew, [lang="he"] {
  font-family: 'Times New Roman', 'SBL Hebrew', 'David', 'Ezra SIL', serif;
  direction: rtl;
  text-align: right;
  font-size: 1.1em;
}

/* ===== АДАПТИВНОСТЬ (МОБИЛЬНЫЕ) ===== */
@keyframes mobileFadeIn {
  0% { opacity: 0; }
  100% { opacity: 1; }
}

@media (max-width: 768px) {
  body {
    flex-direction: column;
    font-size: 16px;
  }
  #sidebar,
  #main-area,
  #toc-panel,
  #back-to-top {
    display: none !important;
  }

  /* Бургер-кнопка */
  #burger-btn {
    display: flex;
    position: fixed;
    top: 10px;
    right: 10px;
    z-index: 200;
    width: 44px;
    height: 44px;
    background: #2c1810;
    border: 1px solid #b8860b;
    cursor: pointer;
    font-size: 22px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    color: #b8860b;
  }

  /* Оверлей */
  #burger-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(44, 24, 16, 0.7);
    z-index: 149;
    opacity: 0;
    transition: opacity 0.35s ease;
  }
  #burger-overlay.show {
    display: block;
    opacity: 1;
  }

  /* Меню */
  #burger-menu {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    right: 0;
    width: 280px;
    height: 100vh;
    z-index: 150;
    background: #2c1810;
    transform: translateX(100%);
    transition: transform 0.35s ease;
    overflow-y: auto;
    color: #ede0c8;
  }
  #burger-menu.open {
    transform: translateX(0);
  }
  #burger-logo {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 8px;
    text-align: center;
    padding: 18px 0;
    color: #b8860b;
    border-bottom: 1px solid #4a3020;
  }
  #burger-actions {
    padding: 8px 20px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    border-bottom: 1px solid #4a3020;
  }
  .burger-item {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 16px;
    padding: 10px 0;
    cursor: pointer;
    color: #ede0c8;
    transition: color 0.3s ease;
  }
  .burger-item:hover {
    color: #b8860b;
  }

  /* Мобильные контролы */
  #mobile-controls {
    display: block;
    padding: 60px 12px 10px;
    animation: mobileFadeIn 0.2s ease;
    background: #ede0c8;
  }
  #mobile-list-view {
    display: block;
    padding: 0 12px 20px;
    animation: mobileFadeIn 0.2s ease;
    background: #ede0c8;
  }
  #search-mobile,
  #category-select-mobile,
  #subcategory-select-mobile {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    height: 44px;
    margin-bottom: 8px;
    font-family: 'EB Garamond', Georgia, serif;
    outline: none;
    border-radius: 4px;
    background: #faf3e0;
    border: 1px solid #d4c4a8;
    color: #2c1810;
  }
  #search-mobile:focus,
  #category-select-mobile:focus {
    border-color: #b8860b;
    box-shadow: 0 0 0 2px rgba(184, 134, 11, 0.2);
  }
  #subcategory-select-mobile {
    display: none;
  }

  /* Мобильные элементы списка */
  .file-item-mobile {
    display: flex;
    flex-direction: column;
    padding: 14px 12px;
    cursor: pointer;
    font-family: 'EB Garamond', Georgia, serif;
    border-bottom: 1px solid #d4c4a8;
    background: #faf3e0;
    border-radius: 4px;
    margin-bottom: 4px;
    transition: background 0.2s ease;
  }
  .file-item-mobile:hover {
    background: #f5edd5;
  }
  .file-item-mobile .title {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 17px;
    font-weight: 600;
    color: #2c1810;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }
  .file-item-mobile .topic {
    font-size: 14px;
    margin-top: 4px;
    padding-left: 24px;
    color: #5c4a3a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  /* Заголовки категорий (моб.) */
  .cat-header-mobile {
    padding: 14px 10px 6px;
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 11px;
    color: #b8860b;
    text-transform: uppercase;
    letter-spacing: 4px;
    font-weight: 700;
    background: #ede0c8;
  }

  /* Статистика моб. */
  #stats-mobile {
    display: block;
    text-align: center;
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 12px;
    padding: 14px 0;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: #8a7a6a;
    border-top: 1px solid #d4c4a8;
    background: #ede0c8;
  }

  /* Страница файла (моб.) */
  #file-page {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: 100;
    overflow-y: auto;
    padding: 56px 16px 40px;
    background: #ede0c8;
  }
  #file-top-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 101;
    padding: 10px 14px;
    background: #2c1810;
    border-bottom: 1px solid #4a3020;
  }
  #back-btn {
    font-size: 22px;
    cursor: pointer;
    background: none;
    border: none;
    color: #b8860b;
    font-family: 'Cormorant Garamond', Georgia, serif;
  }
  #file-path-hint {
    font-family: 'EB Garamond', Georgia, serif;
    font-size: 11px;
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #8a7a6a;
  }
  #file-bookmark-btn {
    font-size: 26px;
    cursor: pointer;
    background: none;
    border: none;
    color: #8a7a6a;
    transition: color 0.3s ease;
  }
  #file-bookmark-btn.active {
    color: #b8860b;
  }
  #file-content-mobile {
    animation: fadeSlideIn 0.4s ease forwards;
  }
  #file-content-mobile h1 {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 28px;
    font-weight: 700;
    font-style: italic;
    color: #b8860b;
    margin-bottom: 8px;
    padding-bottom: 10px;
    border-bottom: 2px solid #d4c4a8;
    line-height: 1.3;
  }
  #file-content-mobile h2 {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 22px;
    font-weight: 600;
    color: #2c1810;
    margin: 24px 0 8px;
    line-height: 1.4;
  }
  #file-content-mobile h3 {
    font-family: 'Cormorant Garamond', Georgia, 'Times New Roman', serif;
    font-size: 18px;
    font-weight: 600;
    color: #2c1810;
    margin: 20px 0 6px;
    line-height: 1.4;
  }
  #file-content-mobile p,
  #file-content-mobile li {
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: 10px;
    color: #2c1810;
  }
  #file-content-mobile blockquote {
    border-left: 3px solid #b8860b;
    padding: 10px 16px;
    margin: 12px 0;
    font-style: italic;
    background: #faf3e0;
    border-radius: 0 4px 4px 0;
    color: #5c4a3a;
  }
  #file-content-mobile code {
    font-family: 'Courier New', monospace;
    font-size: 14px;
    color: #c0392b;
    background: #faf3e0;
    padding: 2px 6px;
    border-radius: 3px;
    border: 1px solid #e8d5b8;
  }
  #file-content-mobile strong {
    color: #2c1810;
    font-weight: 700;
  }
  #file-content-mobile a {
    color: #b8860b;
    text-decoration: none;
    border-bottom: 1px solid #b8860b;
  }
  #file-content-mobile hr {
    border: none;
    height: 1px;
    margin: 20px 0;
    background: linear-gradient(90deg, transparent, #d4c4a8, #b8860b, #d4c4a8, transparent);
  }
}

/* ===== ГАМБУРГЕР-МЕНЮ (для лендингов и внутренних страниц) ===== */
.hamburger-btn {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 36px;
  height: 36px;
  cursor: pointer;
  background: transparent;
  border: 1px solid #5c3a2a;
  border-radius: 4px;
  gap: 5px;
  padding: 6px;
  transition: border-color 0.3s;
  flex-shrink: 0;
}
.hamburger-btn:hover {
  border-color: #b8860b;
}
.hamburger-btn span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ede0c8;
  border-radius: 1px;
  transition: background 0.3s;
}
.hamburger-btn:hover span {
  background: #b8860b;
}

/* Оверлей */
.side-panel-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(44, 24, 16, 0.7);
  z-index: 1999;
  opacity: 0;
  transition: opacity 0.35s ease;
}
.side-panel-overlay.show {
  display: block;
  opacity: 1;
}

/* Боковая панель */
.side-panel {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  right: 0;
  width: 280px;
  height: 100vh;
  z-index: 2000;
  background: #2c1810;
  transform: translateX(100%);
  transition: transform 0.35s ease;
  overflow-y: auto;
  color: #ede0c8;
  box-shadow: -4px 0 15px rgba(0,0,0,0.3);
}
.side-panel.open {
  transform: translateX(0);
}

/* Шапка панели */
.side-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #4a3020;
}
.side-panel-header .logo-text {
  font-family: 'Cormorant Garamond', Georgia, serif;
  font-size: 18px;
  font-weight: 700;
  font-style: italic;
  color: #b8860b;
  letter-spacing: 4px;
}
.side-panel-close {
  font-size: 24px;
  cursor: pointer;
  color: #8a7a6a;
  background: none;
  border: none;
  font-family: 'EB Garamond', Georgia, serif;
  transition: color 0.3s;
  line-height: 1;
}
.side-panel-close:hover {
  color: #b8860b;
}

/* Ссылки панели */
.side-panel-links {
  padding: 10px 0;
}
.side-panel-links a {
  display: block;
  padding: 14px 24px;
  font-family: 'EB Garamond', Georgia, serif;
  font-size: 17px;
  color: #ede0c8;
  text-decoration: none;
  letter-spacing: 1px;
  transition: background 0.2s, color 0.2s;
  border-left: 3px solid transparent;
}
.side-panel-links a:hover {
  background: #3a2215;
  color: #b8860b;
  border-left-color: #b8860b;
}

/* Скрываем гамбургер в мобильном интерфейсе app.js (там свой бургер) */
@media (min-width: 769px) {
  #burger-btn,
  #burger-menu,
  #burger-overlay {
    display: none !important;
  }
}
