/* БАЗА */
body {
    background: #f5f7f9;
    font-family: system-ui, sans-serif;
    color: #212529;
}

/* HEADER */
.header {
    background: linear-gradient(90deg, #198754, #157347);
    color: white;
    padding: 15px 0;
}

.logo {
    font-weight: 600;
    font-size: 18px;
}

.contacts {
    font-size: 13px;
    opacity: 0.85;
}

/* MAIN CARD */
.main-card {
    background: #ffffff;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
    border-left: 6px solid #198754;
}

/* SIDEBAR */
.side-card {
    background: #ffffff;
    padding: 20px;
    border-radius: 14px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.05);
}

.side-card h5 {
    font-size: 14px;
    color: #198754;
    margin-bottom: 15px;
    text-transform: uppercase;
}

/* НАВИГАЦИЯ */
.small-nav a {
    display: block;
    font-size: 13px;
    color: #333;
    padding: 6px 8px;
    border-radius: 6px;
    text-decoration: none;
    line-height: 1.3;
    transition: 0.2s;
}

.small-nav a:hover {
    background: #f1f3f5;
    color: #dc3545;
}

/* FOOTER */
.footer {
    margin-top: 40px;
    background: #ffffff;
    border-top: 1px solid #e5e7eb;
    padding: 25px 0;
}

.footer-title {
    font-weight: 600;
    color: #198754;
}

.footer-text {
    font-size: 14px;
    color: #6c757d;
}

.footer-link {
    color: #dc3545;
    text-decoration: none;
}

.footer-bottom {
    border-top: 1px solid #e5e7eb;
    padding-top: 15px;
    font-size: 13px;
    color: #6c757d;
}

/* =========================
   ACCESSIBILITY (УЛУЧШЕННАЯ)
========================= */

body.accessible {
    background: #000 !important;
    color: #fff !important;
    font-size: 20px;
    line-height: 1.7;
}

/* Убираем декоративные эффекты */
body.accessible * {
    box-shadow: none !important;
    text-shadow: none !important;
    transition: none !important;
}

/* Заголовки */
body.accessible h1 { font-size: 2.4rem; }
body.accessible h2 { font-size: 2rem; }
body.accessible h5 { font-size: 1.3rem; }

/* Текст */
body.accessible p,
body.accessible li {
    font-size: 1.25rem;
}

/* Контейнеры */
body.accessible .header,
body.accessible .main-card,
body.accessible .side-card,
body.accessible .footer,
body.accessible details {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
}

/* Навигация */
body.accessible .small-nav a {
    font-size: 1.2rem;
    padding: 12px;
    color: #fff !important;
    background: transparent;
    border: 2px solid transparent;
}

/* Активный пункт */
body.accessible .small-nav a.active {
    background: #fff !important;
    color: #000 !important;
    border-color: #fff;
}

/* Hover = явный контраст */
body.accessible .small-nav a:hover {
    background: #fff !important;
    color: #000 !important;
}

/* Ссылки */
body.accessible a {
    color: #ffff00 !important; /* жёлтый — лучший контраст */
    text-decoration: underline;
}

body.accessible a:hover {
    background: #ffff00;
    color: #000 !important;
}

/* Фокус (КРИТИЧНО) */
body.accessible a:focus,
body.accessible button:focus,
body.accessible summary:focus {
    outline: 3px solid #ffff00;
    outline-offset: 3px;
}

/* Кнопки */
body.accessible .btn {
    font-size: 1.2rem;
    background: #fff !important;
    color: #000 !important;
    border: 2px solid #fff;
}

/* Accordion */
body.accessible summary {
    font-size: 1.3rem;
}

body.accessible summary::after {
    color: #fff;
}

/* Галерея */
body.accessible .mini-gallery img {
    width: 160px; /* крупнее */
    border: 2px solid #fff;
}

/* Lightbox */
body.accessible .lightbox {
    background: #000;
}

body.accessible .lightbox .close,
body.accessible .lightbox .nav {
    color: #fff;
}

/* Отключаем hover-анимации */
body.accessible .mini-gallery img:hover {
    transform: none;
}

/* Убираем зелёные цвета (важно для дальтонизма) */
body.accessible .footer-title,
body.accessible .side-card h5 {
    color: #fff !important;
}
/* =========================
   TABLE FIX (ACCESSIBILITY)
========================= */

body.accessible table {
    background: #000 !important;
    color: #fff !important;
    border-collapse: collapse;
    width: 100%;
}

body.accessible th,
body.accessible td {
    background: #000 !important;
    color: #fff !important;
    border: 2px solid #fff !important;
    padding: 10px;
}

/* Заголовки таблицы */
body.accessible th {
    font-weight: 700;
}

/* Убираем зебру (если есть) */
body.accessible tr:nth-child(even),
body.accessible tr:nth-child(odd) {
    background: #000 !important;
}

/* Hover строки */
body.accessible tr:hover {
    background: #fff !important;
    color: #000 !important;
}

/* Caption (если используется) */
body.accessible caption {
    color: #fff;
    font-size: 1.2rem;
    margin-bottom: 10px;
}

/* LIGHTBOX */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.9);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 8px;
}

.lightbox .close {
  position: absolute;
  top: 20px;
  right: 25px;
  font-size: 40px;
  color: white;
  cursor: pointer;
}

.lightbox .nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  font-size: 60px;
  color: white;
  cursor: pointer;
  user-select: none;
}

.lightbox .prev { left: 20px; }
.lightbox .next { right: 20px; }
/* =========================
   ACCORDION (в стиле сайта)
========================= */

details {
  background: #ffffff;
  border-radius: 12px;
  margin-bottom: 12px;
  border: 1px solid #e5e7eb;
  overflow: hidden;
  transition: 0.25s ease;
}

/* активное состояние */
details[open] {
  border-color: #198754;
  box-shadow: 0 8px 20px rgba(0,0,0,0.06);
}

/* заголовок */
summary {
  padding: 16px 20px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  position: relative;
  list-style: none;
  transition: 0.2s;
}

/* hover */
summary:hover {
  background: #f5f7f9;
}

/* убираем дефолтную стрелку */
summary::-webkit-details-marker {
  display: none;
}

/* кастомная стрелка */
summary::after {
  content: "+";
  position: absolute;
  right: 20px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 18px;
  color: #198754;
  transition: 0.3s;
}

/* при открытии */
details[open] summary::after {
  content: "–";
}

/* разделитель */
details .mini-gallery {
  border-top: 1px solid #f1f3f5;
  padding-top: 15px;
}

/* =========================
   ГАЛЕРЕЯ (улучшение)
========================= */

.mini-gallery img {
  width: 120px;
  border-radius: 8px;
  cursor: pointer;
  transition: 0.2s;
  box-shadow: 0 4px 10px rgba(0,0,0,0.05);
}

.mini-gallery img:hover {
  transform: scale(1.06);
  box-shadow: 0 8px 18px rgba(0,0,0,0.12);
}