body {
  font-family: Arial, sans-serif;
  background-color: #f5f7fa;
  margin: 0;
  padding: 0;
}

.navbar {
  background: #0b3a5b;
  color: #fff;
  padding: 15px 0;
}

.nav-container {
  max-width: 1000px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0 20px;
}

.nav-links ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
}

.nav-links a {
  text-decoration: none;
  color: #fff;
  transition: color 0.3s ease;
}

.nav-links a:hover {
  color: #d9e6f2;
}

.faq-container {
  max-width: 800px;
  margin: 40px auto;
  padding: 20px;
  background: #fff;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.faq-item {
  border-bottom: 1px solid #ccc;
  padding: 15px 0;
  cursor: pointer;
  transition: background 0.3s ease;
}

.faq-item:hover {
  background: #f0f8ff;
}

.faq-question {
  font-weight: bold;
  font-size: 18px;
  color: #0b3a5b;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
  color: #333;
  font-size: 16px;
  line-height: 1.5;
}

.faq-item.active .faq-answer {
  max-height: 300px;
  opacity: 1;
  margin-top: 8px;
}

.faq-toggle {
  font-size: 22px;
  color: #0b3a5b;
  transition: transform 0.3s ease;
}

.faq-item.active .faq-toggle {
  transform: rotate(45deg);
}

.footer-site {
  text-align: center;
  padding: 15px;
  background-color: #0b3a5b;
  color: white;
}

.footer-site a {
  color: #fff;
  text-decoration: underline;
  transition: color 0.2s ease;
}

.footer-site a:hover {
  color: #d0e8ff;
}

/* TOGGLE BUTTON Dark/Light Mode */
.theme-btn {
  margin-top: 10px;
  padding: 8px 14px;
  border: 1px solid #ffffff66;
  border-radius: 8px;
  background: #ffffff1a;
  color: #fff;
  font-weight: 600;
  cursor: pointer;
  transition: background .2s, transform .2s;
}
.theme-btn:hover {
  background: #ffffff2a;
  transform: translateY(-2px);
}

/* ===== DARK MODE ===== */
body.dark-mode {
  background: #0f172a;
  color: #f1f5f9;
}

/* Header */
body.dark-mode header.navbar {
  background: linear-gradient(180deg, #1e293b 0%, #0f172a 100%);
  color: #f1f5f9;
}

/* Links in nav */
body.dark-mode .nav-links a {
  color: #f1f5f9;
}
body.dark-mode .nav-links a:hover {
  color: #93c5fd;
}

/* FAQ box */
body.dark-mode .faq-container {
  background: #1e293b;
  color: #f1f5f9;
  box-shadow: 0 2px 6px rgba(0,0,0,.4);
}

body.dark-mode .faq-container h2 {
  color: #93c5fd;
}

body.dark-mode .faq-question {
  color: #f1f5f9;
}

body.dark-mode .faq-answer {
  color: #e2e8f0;
}

body.dark-mode .faq-toggle {
  color: #60a5fa;
}

/* Footer */
body.dark-mode .footer-site {
  background: #1e293b;
  color: #f1f5f9;
}

body.dark-mode .footer-site a {
  color: #93c5fd;
}

body.dark-mode .footer-site a:hover {
  color: #60a5fa;
}

/* Button stays consistent */
body.dark-mode .theme-btn {
  background: #ffffff1a;
  border-color: #ffffff33;
  color: #fff;
}

body.dark-mode .faq-question {
  background: transparent;
  color: #e2e8f0;
  border-bottom: 1px solid #475569;
  transition: background 0.25s ease, color 0.25s ease;
}

/* при наведении на вопрос в dark mode */
body.dark-mode .faq-question:hover {
  background: #334155 !important; /* тёмно-серый hover */
  color: #ffffff !important;
}

/* активный вопрос (раскрытый) */
body.dark-mode .faq-item.active .faq-question {
  background: #475569 !important; /* немного светлее */
  color: #ffffff !important;
}

/* ответ под вопросом */
body.dark-mode .faq-answer {
  background: #1e293b !important;
  color: #e2e8f0 !important;
  border-radius: 0 0 6px 6px;
  padding: 0.8rem 1rem;
  transition: all 0.3s ease;
}

/* анимация для открытия */
.faq-answer {
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.4s ease;
}
.faq-item.active .faq-answer {
  max-height: 200px; /* регулируй под контент */
  opacity: 1;
}

/* общий фон контейнера */
body.dark-mode .faq-container {
  background: #1e293b;
  border-radius: 10px;
  padding: 2rem;
}


/* Smooth transitions for theme change */
* {
  transition: background-color .25s ease, color .25s ease, border-color .25s ease;
}