/* =============================
   Общий стиль сайта картотеки
   ============================= */

:root {
  --primary: #2f5d50;
  --secondary: #eef3f1;
  --accent: #b85c38;
  --text: #2b2b2b;
  --light: #ffffff;
  --border: #d6e2dd;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Segoe UI", Roboto, Arial, sans-serif;
  background: var(--secondary);
  color: var(--text);
  line-height: 1.5;
}

/* =============================
   Шапка сайта
   ============================= */
.site-header {
  background: var(--primary);
  color: var(--light);
  padding: 1.5rem 2rem;
}

.site-header h1 {
  font-size: 1.8rem;
  margin-bottom: 0.3rem;
}

.site-header p {
  font-size: 0.95rem;
  opacity: 0.9;
}

/* =============================
   Навигация указателей
   ============================= */
.index-menu {
  background: var(--light);
  border-bottom: 1px solid var(--border);
}

.index-menu ul {
  display: flex;
  justify-content: center;
  gap: 2rem;
  list-style: none;
  padding: 0.8rem 1rem;
  max-width: 1200px;
  margin: 0 auto;
}

.index-menu a {
  text-decoration: none;
  font-weight: 600;
  color: var(--primary);
}

.index-menu a:hover {
  text-decoration: underline;
}

/* =============================
   Основной контент
   ============================= */
main {
  max-width: 1200px;
  margin: 0 auto;
  padding: 2rem;
}

h2 {
  color: var(--primary);
  margin-bottom: 0.8rem;
}

p {
  margin-bottom: 0.8rem;
}

ul {
  padding-left: 1.2rem;
}

li {
  margin-bottom: 0.4rem;
}

/* =============================
   Поисковая панель
   ============================= */
.search-panel {
  background: var(--light);
  border-radius: 12px;
  padding: 1.5rem;
  margin-bottom: 2rem;
  box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

.filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

input,
select {
  padding: 0.6rem;
  border: 1px solid var(--border);
  border-radius: 8px;
  font-size: 0.95rem;
}

button {
  padding: 0.7rem 1.2rem;
  border: none;
  border-radius: 8px;
  background: var(--primary);
  color: var(--light);
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  opacity: 0.9;
}

/* =============================
   Карточки статей
   ============================= */
.card-index {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.5rem;
}

.article-card {
  background: var(--light);
  border-radius: 12px;
  padding: 1.3rem;
  box-shadow: 0 4px 10px rgba(0,0,0,0.06);
  border-left: 6px solid var(--primary);
}

.article-card h3 {
  font-size: 1.05rem;
  margin-bottom: 0.5rem;
}

.article-card h3 a {
    font-size: 1.05rem;
    margin-bottom: 0.5rem;
    text-decoration: underline;
    color: var(--text);
}

.meta {
  font-size: 0.85rem;
  color: #666;
}

.keywords {
  font-size: 0.8rem;
  color: var(--accent);
}

/* =============================
   Карточка статьи (детальный вид)
   ============================= */
.article-view {
  background: var(--light);
  border-radius: 12px;
  padding: 2rem;
  margin-top: 3rem;
  box-shadow: 0 6px 16px rgba(0,0,0,0.08);
}

.article-view dt {
  font-weight: 600;
  margin-top: 0.8rem;
}

.article-view dd {
  margin-left: 0;
  margin-bottom: 0.5rem;
}

.scans {
  margin-top: 0.5rem;
}

.scan-link {
  display: inline-block;
  margin-bottom: 0.3rem;
  color: var(--accent);
  font-weight: 600;
  text-decoration: none;
}

.scan-link:hover {
  text-decoration: underline;
}

.access-note {
  font-size: 0.8rem;
  color: #555;
}

.pdf-viewer {
  width: 100%;
  height: 500px;
  border: 1px solid var(--border);
  border-radius: 8px;
  margin-top: 0.5rem;
}

/* =============================
   Подвал сайта
   ============================= */
.site-footer {
  margin-top: 4rem;
  background: #1f3f36;
  color: var(--light);
  padding: 2rem;
  text-align: center;
  font-size: 0.85rem;
}

/* =============================
   Адаптивность
   ============================= */
@media (max-width: 600px) {
  .site-header h1 {
    font-size: 1.4rem;
  }

  .index-menu ul {
    flex-direction: column;
    gap: 0.6rem;
  }
}

/* =============================
   Стили для печати
   ============================= */
@media print {
  body {
    background: white;
    color: black;
  }

  .index-menu,
  button,
  .pdf-viewer {
    display: none;
  }

  .article-card,
  .article-view {
    box-shadow: none;
    border: 1px solid #000;
  }
}