/* ==============================
   ТЁМНАЯ ТЕМА (под палитру #FFE9BF / #000000)
============================== */

/* Переменные и базовые цвета */
body.dark-theme {
  --primary: #FFE9BF;   /* беж */
  --secondary: #000000; /* чёрный */
  --text: #f5f5f5;      /* текст на тёмном */
  --bg-light: #1e1e1e;
  --secondary-70: rgba(0,0,0,0.7);
  --secondary-40: rgba(0,0,0,0.6);

  background-color: #121212 !important;
  color: var(--text) !important;
}

/* Ссылки */
body.dark-theme a {
  color: var(--primary) !important;
  text-decoration: none;
}
body.dark-theme a:hover { color: #ffffff !important; }

/* Топ-меню (фон полосы) */
body.dark-theme .top-menu {
  background-color: var(--secondary-40) !important;
  box-shadow: none !important;
}

/* Кнопки меню — точно как в светлой (беж заливка, чёрный текст) */
body.dark-theme .top-menu__link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary) !important;
  border-radius: 40px !important;
  padding: 0 20px !important;
  min-height: 40px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  text-transform: uppercase;
  color: var(--secondary) !important;          /* чёрный текст */
  background-color: var(--primary) !important; /* беж фон */
  transition: all 0.3s ease-in-out;
}
body.dark-theme .top-menu__link:hover {
  background-color: var(--secondary) !important;
  color: var(--primary) !important;
}

/* Хэдер */
body.dark-theme .header,
body.dark-theme .header p,
body.dark-theme .header__title,
body.dark-theme .header__subtitle {
  background-color: transparent !important;
  color: #f5f5f5 !important;
}

/* Карточки/блоки */
body.dark-theme .card,
body.dark-theme .card__item,
body.dark-theme .project__card,
body.dark-theme .team__card,
body.dark-theme .contacts__card,
body.dark-theme .review__card,
body.dark-theme .file__card,
body.dark-theme .project__specs {
  background-color: #1e1e1e !important;
  color: var(--text) !important;
  box-shadow: 0 5px 20px rgba(0,0,0,0.5) !important;
  border-color: rgba(255,255,255,0.06) !important;
}

/* Заголовки */
body.dark-theme .card__title,
body.dark-theme .card__subtitle,
body.dark-theme .team__name,
body.dark-theme .team__role,
body.dark-theme .team__phrase,
body.dark-theme .contacts__title,
body.dark-theme .contacts__subtitle,
body.dark-theme .file__title,
body.dark-theme .project__header,
body.dark-theme .project__subtitle,
body.dark-theme .portfolio__title {
  color: var(--text) !important;
}

/* Кнопки (тот же вид и размер, что в светлой) */
body.dark-theme .project__btn-manual,
body.dark-theme .file__btn-download,
body.dark-theme .file__btn-back,
body.dark-theme .project__btn-back,
body.dark-theme .footer__contacts-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary) !important;
  border-radius: 40px !important;
  padding: 0 20px !important;
  min-height: 40px !important;
  font-weight: 600 !important;
  font-size: 14px !important;
  line-height: 20px !important;
  text-decoration: none;
  text-transform: uppercase;
  color: var(--secondary) !important;          /* чёрный текст */
  background-color: var(--primary) !important; /* беж фон */
  transition: all 0.3s ease-in-out;
}
body.dark-theme .project__btn-manual:hover,
body.dark-theme .file__btn-download:hover,
body.dark-theme .file__btn-back:hover,
body.dark-theme .project__btn-back:hover,
body.dark-theme .footer__contacts-btn:hover {
  background-color: var(--secondary) !important; /* чёрный фон */
  color: var(--primary) !important;              /* беж текст */
}

/* Футер: фон ЧЁРНЫЙ, всё содержимое читаемо */
body.dark-theme .footer { background-color: #000 !important; color: var(--text) !important; }

/* обычные ссылки в футере — бежевые */
body.dark-theme .footer a:not(.footer__contacts-btn) { color: var(--primary) !important; }

/* текст в футере, который в светлой был чёрным — перекрашиваем в светлый */
body.dark-theme .footer__row,
body.dark-theme .footer__copyright,
body.dark-theme .footer__contacts-description {
  color: var(--text) !important;
}

/* Иконки/изображения немного темнее */
body.dark-theme .footer__icon-list img,
body.dark-theme .team__photo,
body.dark-theme .card__image,
body.dark-theme .project__img img { filter: brightness(0.9) !important; }

/* Кнопка переключения темы (в тёмной — как все кнопки) */
body.dark-theme .theme-toggle-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--primary);
  border-radius: 40px;
  padding: 6px 14px;
  min-height: 34px;
  font-weight: 600;
  font-size: 14px;
  line-height: 1;
  cursor: pointer;
  background-color: var(--primary);
  color: var(--secondary);
  transition: all 0.3s ease-in-out;
}
body.dark-theme .theme-toggle-btn:hover {
  background-color: var(--secondary);
  color: var(--primary);
}
