/* === Сброс и базовые стили === */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --primary: #030213;
  --secondary: #ececf0;
  --text: #1e1e28;
  --text-muted: #717182;
  --border: #0000001a;
  --bg-white: #ffffff;
  --bg-muted: #f3f3f5;
  --bg-muted2: #ececf0;
  --radius: 10px;
  --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
  --transition: all 0.3s ease-in-out;
}

/* === Sticky Footer Setup === */
html {
  height: 100%;
}

body {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  font-family: 'Inter', sans-serif;
  color: var(--text);
  line-height: 1.6;
  background-color: var(--bg-white);
}

main {
  flex: 1 0 auto;
}

.container {
  width: 100%;
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

/* === Хедер === */
.header {
  position: sticky;
  top: 0;
  background-color: rgba(255, 255, 255, 0.95);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
  z-index: 50;
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 0;
}

.logo {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  font-size: 18px;
}

.logo-icon {
  width: 64px;
  height: 64px;
}

.logo-icon img {
  height: 64px;
}

.nav {
  display: flex;
  gap: 24px;
}

.nav-link {
  text-decoration: none;
  color: var(--text);
  font-weight: 500;
  transition: color 0.2s;
}

.nav-link:hover {
  color: var(--primary);
}

/* === Общие стили секций === */
.section {
  padding: 128px 0;
}

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-header h2 {
  font-size: 32px;
  font-weight: 600;
  margin-bottom: 16px;
}

.section-subtitle {
  color: var(--text-muted);
  max-width: 600px;
  margin: 0 auto;
}

.bg-gray {
  background-color: color-mix(in oklab, var(--bg-muted2) 30%, transparent);
}

/* === Блог === */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 32px;
}

.blog-card-link {
  text-decoration: none;
  color: inherit;
  display: block;
  height: 100%;
}

.blog-card-link:hover .blog-card {
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
  transition: var(--transition);
}

.blog-image {
  height: 200px;
  background-size: cover;
  background-position: center;
}

.blog-content {
  padding: 24px 24px 16px;
}

.blog-content h3 {
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 12px;
}

.blog-content p {
  color: var(--text-muted);
  font-size: 15px;
}

.blog-footer {
  display: flex;
  justify-content: space-between;
  padding: 0 24px 24px;
  color: var(--text-muted);
  font-size: 14px;
}

/* === О нас === */
.about-main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
  margin-bottom: 60px;
}

.about-image {
  height: 300px;
  background-size: cover;
  background-position: center;
  border-radius: var(--radius);
  cursor: pointer;
  transition: transform 0.3s ease;
}

.zoom-checkbox {
  display: none;
}

.zoom-checkbox:checked + .about-image {
  transform: scale(2);
  z-index: 10;
}

.about-text h3 {
  font-size: 24px;
  margin-bottom: 16px;
}

.about-text p {
  margin-bottom: 16px;
  color: var(--text-muted);
}

.values-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
}

.value-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
}

.value-icon {
  font-size: 28px;
  margin-bottom: 16px;
}

.value-card h4 {
  font-size: 18px;
  margin-bottom: 12px;
}

.value-card p {
  color: var(--text-muted);
  font-size: 15px;
}

/* === Контакты === */
.contacts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 24px;
}

.contact-card {
  background: var(--bg-white);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.contact-card h3 {
  font-size: 20px;
  margin-bottom: 20px;
}

.contact-item {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
  align-items: flex-start;
}

.contact-icon {
  width: 40px;
  height: 40px;
  background-color: #f0f0ff;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  font-size: 18px;
}

.contact-label {
  font-size: 12px;
  color: var(--text-muted);
  margin-bottom: 4px;
}

.contact-hours {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
  font-size: 14px;
  color: var(--text-muted);
}

/* === Таблицы === */
.table-wrapper,
.documents-table-wrapper {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.data-table,
.documents-table {
  width: 100%;
  min-width: 800px;
  border-collapse: collapse;
  background: var(--bg-white);
}

@media (max-width: 768px) {
  .data-table,
  .documents-table {
    min-width: 700px;
  }
}

.data-table th,
.data-table td,
.documents-table th,
.documents-table td {
  padding: 16px 20px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  vertical-align: top;
}

.data-table th,
.documents-table th {
  font-weight: 600;
  font-size: 15px;
  color: var(--text);
  background-color: var(--bg-muted);
}

.data-table tbody tr:last-child td,
.documents-table tbody tr:last-child td {
  border-bottom: none;
}

tbody tr:hover {
  background-color: var(--bg-muted);
  transition: background-color 0.15s ease;
}

td.cnt,
th.cnt {
  text-align: center;
  vertical-align: middle;
}

td.cnt_right,
th.cnt_right {
  text-align: right;
  vertical-align: middle;
}

td.cnt_left,
th.cnt_left {
  text-align: left;
  vertical-align: middle;
}

.data-table td {
  font-size: 14px;
  color: var(--text-muted);
}

.download-link,
.documents-table a.download-link {
  color: var(--primary);
  font-weight: 600;
  text-decoration: none;
}

.download-link:hover,
.documents-table a.download-link:hover {
  text-decoration: underline;
}

/* === Бейджи === */
.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
}

.badge-success {
  background-color: #dcfce7;
  color: #166534;
}

.badge-archived {
  background-color: #f3f4f6;
  color: #4b5563;
}

.badge-draft {
  background-color: #fef3c7;
  color: #92400e;
}

/* === Документы ЦБ === */
#documents .section-header {
  text-align: center;
  margin-bottom: 32px;
}

#documents .section-header h2 {
  font-size: 32px;
  margin-bottom: 12px;
}

/* === Реквизиты === */
#requisites .section-header {
  text-align: left;
  margin-bottom: 24px;
}

#requisites .section-header h2 {
  font-size: 32px;
  margin-bottom: 0;
}

.requisites-content {
  background-color: color-mix(in oklab, var(--bg-muted2) 30%, transparent);
  padding: 24px;
  border-radius: var(--radius);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
}

.requisites-content p {
  margin-bottom: 12px;
}

.requisites-content p:last-child {
  margin-bottom: 0;
}

.requisites-content strong {
  font-weight: 600;
  color: var(--primary);
}

/* === Статьи === */
.article-content {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
}

.article-content h2,
.article-content h3,
.article-content h4 {
  margin: 1.5em 0 1em;
  font-weight: 600;
}

.article-content p {
  margin-bottom: 1em;
}

.article-content img {
  display: block !important;
  margin: 1.5em auto !important;
  max-width: 100% !important;
  height: auto !important;
  border-radius: var(--radius) !important;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.article-content ul,
.article-content ol {
  margin-left: 20px;
  margin-bottom: 1em;
}

.article-content blockquote {
  margin: 1.5em 0;
  padding-left: 16px;
  border-left: 3px solid var(--secondary);
  color: var(--text-muted);
  font-style: italic;
}

/* === Футер === */
.footer {
  background-color: var(--bg-muted);
  border-top: 1px solid var(--border);
  padding: 32px 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-content p {
  color: var(--text-muted);
}

/* === Адаптивность === */
@media (max-width: 768px) {
  .header-content {
    flex-direction: column;
    gap: 16px;
  }

  .nav {
    gap: 16px;
  }

  .about-main {
    grid-template-columns: 1fr;
  }

  .blog-footer {
    flex-direction: column;
    gap: 8px;
  }

  .footer-content {
    flex-direction: column;
    text-align: center;
  }

  .table-wrapper {
    margin: 0 -20px;
    padding: 0 20px;
  }
}

@media (max-width: 480px) {
  .section {
    padding: 40px 0;
  }

  .section-header h2 {
    font-size: 26px;
  }

  .blog-grid,
  .contacts-grid,
  .data-table,
  .documents-table {
    grid-template-columns: 1fr;
  }
}