/* Reset and Base Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: 'Montserrat Alternates', sans-serif;
  color: #2d3436;
  background-color: #f7fafc;
  line-height: 1.5;
}

/* Dark Mode */
.dark {
  background-color: #2d3748;
  color: #e2e8f0;
}

/* Header */
.header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  background: linear-gradient(90deg, #3182ce, #2c5282);
  color: white;
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.1);
  z-index: 1000;
}

.header-title {
  font-size: 1.75rem;
  font-weight: 700;
}

.header-nav {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.nav-link {
  color: white;
  text-decoration: none;
  font-size: 1rem;
  font-weight: 600;
  padding: 0.5rem;
  transition: color 0.3s ease, transform 0.3s ease;
}

.nav-link:hover {
  color: #bee3f8;
  transform: translateY(-2px);
}

.dark-mode-toggle {
  background: transparent;
  border: none;
  color: white;
  font-size: 1.25rem;
  cursor: pointer;
  padding: 0.5rem;
  transition: transform 0.3s ease, color 0.3s ease;
}

.dark-mode-toggle:hover {
  color: #bee3f8;
  transform: scale(1.1);
}

.hamburger {
  display: none;
  background: transparent;
  border: none;
  color: white;
  font-size: 1.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

/* Main Content */
main {
  margin-top: 70px;
}

/* Sections */
.section {
  padding: 1.5rem;
  background-color: #f7fafc;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 40vh;
  transition: background-color 0.3s ease;
}

.dark .section {
  background-color: #3b4a5e;
}

.section-title {
  font-size: 2.25rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: #2d3436;
  text-align: center;
}

.dark .section-title {
  color: #e2e8f0;
}

.section-text {
  font-size: 1.1rem;
  text-align: center;
  max-width: 600px;
  color: #4a5568;
  margin-bottom: 1rem;
}

.dark .section-text {
  color: #cbd5e0;
}

/* Homepage */
.home {
  justify-content: center;
  animation: fadeIn 1s ease-in;
}

.announcements {
  margin-top: 1rem;
  text-align: center;
}

.announcements-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3436;
}

.dark .announcements-title {
  color: #e2e8f0;
}

.announcements-text {
  color: #4a5568;
}

.dark .announcements-text {
  color: #cbd5e0;
}

/* Events */
.events-container {
  max-width: 800px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.filter {
  margin-bottom: 1rem;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.filter-label {
  font-size: 1rem;
  font-weight: 600;
  color: #2d3436;
}

.dark .filter-label {
  color: #e2e8f0;
}

.filter-select, .input {
  padding: 0.6rem;
  border-radius: 6px;
  border: 1px solid #e2e8f0;
  background-color: white;
  color: #2d3436;
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 0.95rem;
  width: 100%;
  max-width: 300px;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.dark .filter-select, .dark .input {
  background-color: #4a5568;
  border-color: #718096;
  color: #e2e8f0;
}

.filter-select:focus, .input:focus {
  outline: none;
  border-color: #3182ce;
  box-shadow: 0 0 5px rgba(49, 130, 206, 0.3);
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
  width: 100%;
}

.event-card {
  background-color: white;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

.dark .event-card {
  background-color: #4a5568;
}

.event-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 0.5rem;
}

.dark .event-title {
  color: #e2e8f0;
}

.event-text {
  color: #4a5568;
  font-size: 0.9rem;
}

.dark .event-text {
  color: #cbd5e0;
}

.add-event {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 400px;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.add-event-title {
  font-size: 1.25rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 0.75rem;
}

.dark .add-event-title {
  color: #e2e8f0;
}

.add-event-button {
  background: linear-gradient(90deg, #3182ce, #2c5282);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-family: 'Montserrat Alternates', sans-serif;
  font-weight: 600;
  transition: background 0.3s ease;
}

.add-event-button:hover {
  background: linear-gradient(90deg, #2c5282, #3182ce);
}

/* Sermons */
.youtube-player {
  margin: 1rem auto;
  max-width: 640px;
  width: 100%;
}

.audio-section {
  margin-top: 1.5rem;
  width: 100%;
  max-width: 800px;
  text-align: center;
}

.audio-title {
  font-size: 1.5rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 1rem;
}

.dark .audio-title {
  color: #e2e8f0;
}

.audio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.audio-card {
  background-color: white;
  padding: 1.25rem;
  border-radius: 8px;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.1);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.audio-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 5px 12px rgba(0, 0, 0, 0.15);
}

.dark .audio-card {
  background-color: #4a5568;
}

.audio-card-title {
  font-size: 1.1rem;
  font-weight: 600;
  color: #2d3436;
  margin-bottom: 0.5rem;
}

.dark .audio-card-title {
  color: #e2e8f0;
}

.audio-card-date {
  color: #4a5568;
  font-size: 0.9rem;
  margin-bottom: 0.75rem;
}

.dark .audio-card-date {
  color: #cbd5e0;
}

.audio-download-button {
  background: linear-gradient(90deg, #3182ce, #2c5282);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-family: 'Montserrat Alternates', sans-serif;
  font-weight: 600;
  transition: background 0.3s ease;
}

.audio-download-button:hover {
  background: linear-gradient(90deg, #2c5282, #3182ce);
}

.sermon-button {
  background: linear-gradient(90deg, #3182ce, #2c5282);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-family: 'Montserrat Alternates', sans-serif;
  font-weight: 600;
  transition: background 0.3s ease;
}

.sermon-button:hover {
  background: linear-gradient(90deg, #2c5282, #3182ce);
}

/* Donate */
.donate-button {
  background: linear-gradient(90deg, #38a169, #2f855a);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-family: 'Montserrat Alternates', sans-serif;
  font-weight: 600;
  transition: background 0.3s ease;
}

.donate-button:hover {
  background: linear-gradient(90deg, #2f855a, #38a169);
}

/* Contact */
.contact-form {
  max-width: 400px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.input {
  width: 100%;
  margin: 0.5rem 0;
  padding: 0.6rem;
  border-radius: 6px;
}

.textarea {
  height: 100px;
  resize: vertical;
}

.contact-button {
  background: linear-gradient(90deg, #3182ce, #2c5282);
  color: white;
  padding: 0.6rem 1.25rem;
  border-radius: 6px;
  font-family: 'Montserrat Alternates', sans-serif;
  font-weight: 600;
  transition: background 0.3s ease;
}

.contact-button:hover {
  background: linear-gradient(90deg, #2c5282, #3182ce);
}

.contact-info {
  margin-top: 1rem;
  text-align: center;
  color: #4a5568;
}

.dark .contact-info {
  color: #cbd5e0;
}

.social-link {
  color: #3182ce;
  text-decoration: none;
  font-weight: 600;
}

.social-link:hover {
  color: #2c5282;
}

/* Buttons */
.button {
  border: none;
  cursor: pointer;
  text-decoration: none;
  font-family: 'Montserrat Alternates', sans-serif;
  font-size: 0.95rem;
}

/* Animations */
@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
  from { transform: translateX(100%); }
  to { transform: translateX(0); }
}

/* Responsive Design */
@media (max-width: 768px) {
  .header {
    flex-direction: row;
    align-items: center;
    padding: 0.75rem;
  }

  .hamburger {
    display: block;
  }

  .header-nav {
    display: none;
    position: absolute;
    top: 70px;
    right: 0;
    background: linear-gradient(90deg, #3182ce, #2c5282);
    flex-direction: column;
    width: 200px;
    padding: 1rem;
    box-shadow: -2px 2px 6px rgba(0, 0, 0, 0.2);
    animation: slideIn 0.3s ease;
  }

  .header-nav.open {
    display: flex;
  }

  .nav-link, .dark-mode-toggle {
    padding: 0.75rem;
    width: 100%;
    text-align: center;
  }

  .section-title {
    font-size: 1.75rem;
  }

  .section-text {
    font-size: 1rem;
  }

  .youtube-player {
    width: 100%;
    max-width: 100%;
  }

  .youtube-player iframe {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
  }

  .events-grid, .audio-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 480px) {
  .header-title {
    font-size: 1.5rem;
  }

  .nav-link {
    font-size: 0.9rem;
  }

  .dark-mode-toggle, .hamburger {
    font-size: 1.1rem;
  }
}