/* ==============================
   MINIMALIST FOOTER STYLES
   ============================== */

/* --- Переменные тем: Светлая (по умолчанию) и Темная --- */
:root {
  --footer-bg: #f8f9fa;
  --footer-text: #333;
  --footer-text-secondary: #666;
  --footer-border: #e0e0e0;
  --footer-link: #1976d2;
  --footer-link-hover: #1565c0;
  --footer-heading: #1976d2;
  --footer-transition-color: rgba(25, 118, 210, 0.3);
  --footer-underline: rgba(25, 118, 210, 0.3);
  --body-bg: #fff; /* Глобальный фон */
}

.dark-mode {
  --footer-bg: #1a1a1a;
  --footer-text: #e0e0e0;
  --footer-text-secondary: #aaa;
  --footer-border: #333;
  --footer-link: #64b5f6;
  --footer-link-hover: #90caf9;
  --footer-heading: #bb86fc;
  --footer-transition-color: rgba(187, 134, 252, 0.5);
  --footer-underline: rgba(100, 181, 246, 0.5);
  --body-bg: #1a1a1a; /* Темный фон для темной темы */
}

/* --- Глобальный фон для всего документа --- */
body {
  background-color: var(--body-bg);
  transition: background-color 0.5s ease;
}

/* --- Основной контейнер подвала --- */
.site-footer {
  background-color: var(--footer-bg);
  color: var(--footer-text);
  padding: 50px 0 30px;
  position: relative;
  margin-top: 60px;
  transition: all 0.5s ease;
  opacity: 0;
  transform: translateY(20px);
  animation: footerFadeIn 0.6s ease forwards;
}

@keyframes footerFadeIn {
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* --- Визуальный разделитель между контентом и подвалом --- */
.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: linear-gradient(90deg,
    transparent,
    var(--footer-transition-color),
    transparent);
  opacity: 0.6;
}

/* --- Контейнер секции --- */
.page-section {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 20px;
}

.footer-content {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 60px;
  padding: 30px 0;
}

/* --- Колонки подвала --- */
.footer-column {
  display: flex;
  flex-direction: column;
  background: transparent;
  padding: 0;
  box-shadow: none;
  transition: all 0.3s ease;
}

/* --- Заголовки колонок (визуально скрыты) --- */
.footer-heading {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  margin: -1px !important;
  padding: 0 !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* --- Навигация --- */
.footer-nav ul {
  list-style: none;
  padding: 0;
  margin: 0;
}

.footer-links li {
  margin-bottom: 12px;
}

.footer-link {
  color: var(--footer-link);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
  transition: all 0.2s ease;
  display: inline-block;
  position: relative;
  padding: 2px 0;
}

.footer-link:hover,
.footer-link:focus {
  color: var(--footer-link-hover);
  padding-left: 5px;
}

.footer-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--footer-underline);
  transition: width 0.3s ease;
}

.footer-link:hover::after {
  width: 100%;
}

/* --- Контакты --- */
.footer-contacts {
  font-style: normal;
}

.contact-item {
  margin-bottom: 15px;
  line-height: 1.6;
  font-size: 0.95rem;
}

.contact-item strong {
  font-weight: 600;
  color: var(--footer-heading);
  margin-right: 8px;
}

.contact-item a,
.contact-item span {
  color: var(--footer-text);
  text-decoration: none;
  transition: color 0.2s ease;
}

.contact-item a:hover {
  color: var(--footer-link);
  text-decoration: underline;
}

/* --- Реквизиты --- */
.footer-info {
  font-size: 0.95rem;
}

.info-item {
  margin-bottom: 12px;
  line-height: 1.6;
}

.info-item strong {
  font-weight: 600;
  color: var(--footer-heading);
  margin-right: 8px;
}

/* --- Нижняя часть подвала --- */
.footer-bottom {
  padding: 25px 0 0;
  margin-top: 20px;
  border-top: 1px solid var(--footer-border);
  opacity: 0.8;
}

.footer-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 15px;
}

.footer-copyright {
  margin: 0;
  font-size: 0.9rem;
  color: var(--footer-text-secondary);
  line-height: 1.5;
}

/* --- Юридические ссылки --- */
.footer-legal {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 0.9rem;
}

.footer-legal-link {
  color: var(--footer-link);
  text-decoration: none;
  transition: color 0.2s ease;
  position: relative;
  padding: 2px 0;
  font-weight: 500;
}

.footer-legal-link:hover {
  color: var(--footer-link-hover);
}

.footer-legal-link::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 1px;
  background-color: var(--footer-underline);
  transition: width 0.3s ease;
}

.footer-legal-link:hover::after {
  width: 100%;
}

.footer-divider {
  color: var(--footer-text-secondary);
  opacity: 0.7;
}

/* ==============================
   АДАПТИВНОСТЬ
   ============================== */

/* --- Планшеты --- */
@media (max-width: 992px) {
  .footer-content {
    gap: 40px;
    padding: 25px 0;
  }

  .page-section {
    padding: 0 15px;
  }

  .footer-heading {
    font-size: 1rem;
    margin-bottom: 20px;
  }

  .contact-item,
  .info-item,
  .footer-link {
    font-size: 0.9rem;
  }
}

/* --- Мобильные устройства --- */
@media (max-width: 768px) {
  .site-footer {
    padding: 40px 0 25px;
    margin-top: 40px;
  }

  .footer-content {
    grid-template-columns: 1fr;
    gap: 35px;
    padding: 20px 0;
  }

  .footer-column {
    text-align: center;
  }

  .footer-links {
    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .footer-links li {
    margin-bottom: 10px;
  }

  .contact-item strong {
    display: inline;
    margin-right: 5px;
  }

  .footer-bottom {
    padding: 20px 0 0;
    margin-top: 15px;
  }

  .footer-meta {
    flex-direction: column;
    text-align: center;
    gap: 12px;
  }

  .footer-copyright {
    font-size: 0.85rem;
  }

  .footer-legal {
    font-size: 0.85rem;
    gap: 8px;
  }

  .footer-divider {
    display: none;
  }

  .footer-legal::before {
    content: '•';
    margin: 0 6px;
    color: var(--footer-text-secondary);
    opacity: 0.7;
  }
}

/* --- Маленькие экраны --- */
@media (max-width: 480px) {
  .page-section {
    padding: 0 10px;
  }

  .site-footer {
    padding: 30px 0 20px;
  }

  .footer-content {
    padding: 15px 0;
    gap: 25px;
  }

  .footer-heading {
    font-size: 0.95rem;
    margin-bottom: 15px;
  }

  .contact-item,
  .info-item,
  .footer-link {
    font-size: 0.85rem;
  }

  .contact-item {
    margin-bottom: 12px;
  }

  .footer-bottom {
    padding: 15px 0 0;
  }

  .footer-copyright,
  .footer-legal {
    font-size: 0.8rem;
  }

  .footer-legal-link {
    padding: 2px 4px; /* Минимальная область нажатия */
  }
}

/* ==============================
   ПЕЧАТЬ
   ============================== */
@media print {
  .site-footer {
    background: none !important;
    color: #000 !important;
    border-top: 1px solid #000 !important;
  }

  .site-footer::before {
    background: #000 !important;
    opacity: 1 !important;
  }

  .footer-link,
  .footer-legal-link {
    color: #000 !important;
    text-decoration: underline !important;
  }

  .footer-heading::after {
    background-color: #000 !important;
  }

  .footer-bottom {
    border-top-color: #000 !important;
  }
}

/* ==============================
   ИСПРАВЛЕНИЕ БЕЛОЙ ПОЛОСЫ
   ============================== */

/* Исправление перехода от контента к подвалу в темной теме */
.dark-mode .site-footer::before {
  background: linear-gradient(90deg,
    transparent,
    var(--footer-transition-color, rgba(187, 134, 252, 0.5)),
    transparent);
}