*,
*::before,
*::after {
  box-sizing: border-box;
}

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background-color: #f8fafc;
  color: #1e293b;
  transition: background-color 0.3s ease, color 0.3s ease;
  line-height: 1.6;
}

body.dark-mode {
  background-color: #0f172a;
  color: #cbd5e1;
}

.container {
  max-width: 1024px;
  margin: 0 auto;
  padding: 1.5rem;
}

.header {
  text-align: center;
  padding: 2.5rem 1rem;
  background: linear-gradient(90deg, #9db513, #1e40af);
  color: white;
  position: relative;
}

.header-title {
  margin: 0 0 0.5rem 0;
  font-size: 2.5rem;
  font-weight: 700;
}

.header-subtitle {
  margin: 0;
  font-size: 1.2rem;
  font-weight: 400;
  max-width: 600px;
  margin-left: auto;
  margin-right: auto;
}

.dark-mode-btn {
  position: absolute;
  top: 1rem;
  right: 1rem;
  padding: 0.5rem 1rem;
  background-color: #fff;
  border: none;
  border-radius: 0.375rem;
  cursor: pointer;
  font-weight: 600;
  color: #2563eb;
  transition: background-color 0.3s ease;
}

.dark-mode-btn:hover {
  background-color: #bfdbfe;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  background-color: white;
  padding: 1rem 0;
  box-shadow: 0 2px 6px rgb(0 0 0 / 0.1);
  margin: 0;
}

.nav-link {
  margin: 0 1rem;
  text-decoration: none;
  color: #2563eb;
  font-weight: 600;
  font-size: 1rem;
  padding: 0.25rem 0;
  transition: color 0.3s ease;
}

.nav-link:hover {
  color: #1e40af;
}

body.dark-mode .nav {
  background-color: #1e293b;
  box-shadow: none;
}

body.dark-mode .nav-link {
  color: #93c5fd;
}

body.dark-mode .nav-link:hover {
  color: #60a5fa;
}

.section-title {
  font-size: 2rem;
  font-weight: 700;
  margin-bottom: 1rem;
  text-align: center;
  color: inherit;
}

.grid {
  display: grid;
  gap: 1.5rem;
}

.grid-3 {
  grid-template-columns: 1fr;
}

.grid-2 {
  grid-template-columns: 1fr;
}

@media (min-width: 768px) {
  .grid-3 {
    grid-template-columns: repeat(3, 1fr);
  }
  .grid-2 {
    grid-template-columns: repeat(2, 1fr);
  }
}

.subsection {
  background-color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 3px 6px rgb(0 0 0 / 0.1);
  color: #334155;
  display: flex;
  flex-direction: column;
}

body.dark-mode .subsection {
  background-color: #334155;
  color: #cbd5e1;
  box-shadow: none;
}

.download-list,
.video-list {
  list-style: none;
  padding-left: 0;
  margin-top: 0.5rem;
}

.download-list li,
.video-list li {
  margin-bottom: 0.5rem;
}

.download-list a,
.video-list a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  transition: color 0.3s ease;
}

.download-list a:hover,
.video-list a:hover {
  color: #1e40af;
  text-decoration: underline;
}

.download-grid {
  list-style: none;
  padding-left: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 0.75rem;
}

.download-grid li a {
  display: block;
  padding: 0.5rem 1rem;
  background-color: #f3f4f6;
  border-radius: 0.375rem;
  text-align: center;
  font-weight: 600;
  color: #2563eb;
  text-decoration: none;
  transition: background-color 0.3s ease;
}

.download-grid li a:hover {
  background-color: #e0e7ff;
}

body.dark-mode .download-grid li a {
  background-color: #475569;
  color: #cbd5e1;
}

body.dark-mode .download-grid li a:hover {
  background-color: #64748b;
}

.contact-section {
  padding-top: 2rem;
  padding-bottom: 2rem;
}

.contact-grid {
  display: grid;
  gap: 1.5rem;
}

.contact-column {
  background-color: #fff;
  padding: 1rem 1.25rem;
  border-radius: 0.5rem;
  box-shadow: 0 3px 6px rgb(0 0 0 / 0.1);
  color: #334155;
}

body.dark-mode .contact-column {
  background-color: #334155;
  color: #cbd5e1;
  box-shadow: none;
}

.contact-column h3 {
  margin-top: 0;
}

.contact-column a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
}

.contact-column a:hover {
  text-decoration: underline;
}

@media (min-width: 768px) {
  .contact-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.footer {
  text-align: center;
  padding: 1rem 1rem;
  font-size: 0.875rem;
  color: #64748b;
  background-color: #072c0f;
}

body.dark-mode .footer {
  background-color: #1e293b;
  color: #94a3b8;
}

.footer-links {
  margin-bottom: 0.5rem;
}

.footer-links a {
  color: #2563eb;
  text-decoration: none;
  font-weight: 600;
  margin: 0 0.3rem;
  transition: color 0.3s ease;
}

.footer-links a:hover {
  color: #1e40af;
}

.home {
  padding: 3rem 1rem;
  margin-bottom: 3rem;
  color: #0f172a;
  background: url('images/home-background.jpg') no-repeat center center/cover;
  border-radius: 0.75rem;
  box-shadow: 0 10px 15px rgb(0 0 0 / 0.1);
  text-align: center;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  transition: background-color 0.3s ease, color 0.3s ease;
}

body.dark-mode .home {
  color: #e0e7ff;
  background-color: #1e293b;
  background-image: url('images/home-background-dark.jpg');
  box-shadow: none;
}

@media (max-width: 600px) {
  .home {
    padding: 2rem 1rem;
    background-position: top center;
  }
}

.modal {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  justify-content: center;
  align-items: center;
  background-color: rgba(15, 23, 42, 0.8);
  z-index: 1000;
}

.modal-content {
  background-color: #6ea822;
  max-width: 600px;
  width: 90%;
  padding: 2rem;
  border-radius: 0.5rem;
  position: relative;
  color: #1e293b;
  box-shadow: 0 10px 20px rgb(0 0 0 / 0.25);
  max-height: 80vh;
  overflow-y: auto;
}

body.dark-mode .modal-content {
  background-color: #293814;
  color: #1ca515;
  box-shadow: 0 10px 20px rgb(0 0 0 / 0.75);
}

.modal .close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  background: transparent;
  border: none;
  font-size: 2rem;
  font-weight: 700;
  color: #4ca00b;
  cursor: pointer;
  transition: color 0.3s ease;
}

.modal .close:hover {
  color: #1e40af;
}

.modal.hidden {
  display: none !important;
}

.modal:not(.hidden) {
  display: flex;
}
