/* ==================================================
   Google Fonts Import
   ================================================== */
@import url('https://fonts.googleapis.com/css2?family=Roboto+Slab:wght@400;700&display=swap');

/* ==================================================
   Root Theme and Global Settings
   ================================================== */
:root {
  color-scheme: light dark;
}

/* ==================================================
   Base Styles for Body and Typography
   ================================================== */
body {
  font-family: 'Segoe UI', sans-serif;
  margin: 0;
  padding: 0;
  background: #121212;
  color: #e0e0e0;
  font-size: 1.1rem;
  line-height: 1.6;
  transition: background 0.3s ease, color 0.3s ease;
}

body.light-mode {
  background: #f0f0f0;
  color: #111;
}

/* ==================================================
   Typography & Headings
   ================================================== */
h1 {
  font-size: 3.5rem;
  font-weight: 800;
  text-align: center;
  color: #ffdb6e;
  background-color: #2c1a00;
  padding: 1rem;
  border-radius: 12px;
  box-shadow:
    0 0 0.5rem #000 inset,
    0 0 8px rgba(255, 219, 110, 0.8),
    0 0 12px rgba(255, 165, 0, 0.6);
  text-shadow:
    1px 1px 2px #000,
    0 0 6px rgba(255, 165, 0, 0.9),
    0 0 10px rgba(255, 165, 0, 0.5);
  letter-spacing: 2px;
  margin-top: 1rem;
  margin-bottom: 1.5rem;
  animation: glowFade 2s ease-in-out;
}

header h1 {
  font-size: 2.4rem;
  margin-bottom: 0.5rem;
}

/* ==================================================
   Layout Containers
   ================================================== */
.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 1rem;
  box-sizing: border-box;
  text-align: center;
}

main {
  padding: 1.5rem;
  max-width: 1000px;
  margin: 0 auto;
}

/* ==================================================
   Header & Footer
   ================================================== */
header > .container,
footer > .container {
  border-radius: 10px;
  background-color: #1e1e1e;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
  padding: 1rem;
}

body.light-mode header > .container,
body.light-mode footer > .container {
  background-color: #ffffff;
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

body.light-mode footer {
  background: #f0f0f0;
  color: #111;
}

/* ==================================================
   Navigation Bar Styles
   ================================================== */
.navbar {
  background-color: #1e1e1e;
  padding: 0.75rem 1rem;
}

.nav-links {
  list-style: none;
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 1.5rem;
  margin: 0;
  padding: 0;
}

.nav-links li a {
  color: white;
  font-weight: bold;
  font-size: 1.1rem;
  padding: 0.5rem 1rem;
  border-radius: 6px;
  transition: background-color 0.25s ease, color 0.25s ease;
  text-decoration: none;
}

.nav-links li a:hover {
  background-color: rgb(201, 201, 232);
  color: #111;
}

body.light-mode .navbar {
  background-color: white;
  color: black;
}

body.light-mode .nav-links li a {
  color: #111;
}

body.light-mode .nav-links li a:hover {
  background-color: #ccc;
  color: black;
}

/* ==================================================
   Search Bar Input
   ================================================== */
#search {
  margin: 1rem auto 2rem auto;
  padding: 0.75rem;
  width: 100%;
  max-width: 600px;
  display: block;
  font-size: 1.25rem;
  border: 2px solid #444;
  border-radius: 6px;
  background-color: #1e1e1e;
  color: #e0e0e0;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
}

body.light-mode #search {
  background-color: #ffffff;
  color: #111;
  border: 2px solid #aaa;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

/* ==================================================
   Unified Button Styling
   ================================================== */
button,
.print-button,
.submit-button,
.toggle-button,
.toggle-details-button,
.toggle-more-button,
.flyer-link {
  font-size: 1.1rem;
  font-weight: bold;
  padding: 0.75rem 1.5rem;
  margin: 0.5rem auto;
  display: inline-block;
  text-align: center;
  text-decoration: none;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.25s ease, transform 0.2s ease;
  background-color: #444;
  color: white;
  box-shadow: 0 2px 6px rgba(0,0,0,0.25);
}

button:hover,
.print-button:hover,
.submit-button:hover,
.toggle-button:hover,
.toggle-details-button:hover,
.toggle-more-button:hover,
.flyer-link:hover {
  background-color: rgb(201, 201, 232);
  color: #111;
  transform: translateY(-1px);
}

body.light-mode button,
body.light-mode .print-button,
body.light-mode .submit-button,
body.light-mode .toggle-button,
body.light-mode .toggle-details-button,
body.light-mode .toggle-more-button,
body.light-mode .flyer-link {
  background-color: #e9e9e9;
  color: #111;
  border: 1px solid #bbb;
}

body.light-mode button:hover,
body.light-mode .print-button:hover,
body.light-mode .submit-button:hover,
body.light-mode .toggle-button:hover,
body.light-mode .toggle-details-button:hover,
body.light-mode .toggle-more-button:hover,
body.light-mode .flyer-link:hover {
  background-color: #ccc;
  color: black;
}

/* ==================================================
   Event Cards
   ================================================== */
.event {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 3rem;
  box-shadow: 0 2px 4px rgba(0,0,0,0.4);
  font-family: 'Roboto Slab', serif;
}

body.light-mode .event {
  background: #ffffff;
  border: 1px solid #bbb;
  color: #111;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.event a {
  color: #4dabf7;
  text-decoration: none;
  transition: color 0.2s ease, opacity 0.2s ease;
}

.event a:hover {
  color: #90caf9;
  opacity: 0.85;
  text-decoration: underline;
}

body.light-mode .event a {
  color: #007acc;
}

body.light-mode .event a:hover {
  color: #005999;
}

.event p {
  word-wrap: break-word;
  white-space: normal;
}

.event img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin-top: 0.5rem;
  cursor: pointer;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event img:hover {
  transform: scale(1.02);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

.event-details {
  display: none;
  margin: 0 auto;
  padding: 0.25rem 0;
  max-width: 500px;
  text-align: center;
  font-size: 1rem;
  white-space: pre-wrap;
  line-height: 1.4;
  overflow: hidden;
}

.flyer-img {
  max-width: 100%;
  max-height: 300px;
  display: block;
  margin-top: 0.5rem;
  border-radius: 8px;
}

.flyer-error.show-error {
  display: block !important;
}

.flyer-preview {
  width: 180px;
  max-height: 200px;
  object-fit: cover;
  border-radius: 6px;
  cursor: pointer;
  transition: transform 0.2s ease-in-out;
  box-shadow: 0 4px 10px rgba(0,0,0,0.3);
}

.flyer-preview:hover {
  transform: scale(1.03);
}

/* ==================================================
   Utility Classes and Media Queries
   ================================================== */
.header-img {
  width: 100%;
  max-width: 800px;
  height: auto;
  max-height: 250px;
  object-fit: cover;
  border-radius: 8px;
  padding: 0 1rem;
  display: block;
  margin: 0 auto;
  box-sizing: border-box;
}

.header-flex {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
  text-align: center;
}

main section ul {
  list-style-position: inside;
  padding: 0;
  text-align: center;
}

main section ul li {
  margin: 0.5rem 0;
}

.mark {
  background-color: rgb(43, 167, 192);
  color: #000;
  padding: 0 2px;
  border-radius: 3px;
}

#back-to-top {
  display: none;
  position: fixed;
  bottom: 40px;
  right: 30px;
  z-index: 999;
  background-color: #555;
  color: #fff;
  padding: 0.7rem 1rem;
  font-size: 1rem;
  border-radius: 6px;
  cursor: pointer;
  box-shadow: 0 2px 5px rgba(0,0,0,0.4);
  transition: background-color 0.3s ease, transform 0.2s ease;
}

#back-to-top:hover {
  background-color: rgb(201, 201, 232);
  transform: translateY(-2px);
}

body.light-mode #back-to-top {
  background-color: #555;
  color: #fff;
}

body.light-mode #back-to-top:hover {
  background-color: #444;
}

@media (max-width: 767px) {
  .toggle-details-button,
  .event-details,
  .print-button {
    display: none !important;
  }
  .header-img {
    max-height: 180px;
  }
  .header-flex {
    flex-direction: column;
    align-items: center;
    text-align: center;
  }
  .mobile-details-msg {
    display: block !important;
    text-align: center;
    font-size: 0.9rem;
    color: #888;
    margin-top: 0.5rem;
  }
}

@media (min-width: 768px) {
  .mobile-details-msg {
    display: none !important;
  }
}

@media print {
  header,
  nav,
  footer,
  #search,
  #back-to-top,
  .toggle-button,
  .toggle-details-button,
  .flyer-img,
  .flyer-link,
  .flyer-error,
  .countdown,
  .event-details,
  .submit-container {
    display: none !important;
  }
  body {
    background: white;
    color: black;
    font-size: 16pt;
  }
  .event {
    border: none;
    box-shadow: none;
    margin-bottom: 2rem;
    page-break-inside: avoid;
  }
  .event h2 {
    font-size: 18pt;
    margin-bottom: 0.5rem;
  }
  .event p {
    font-size: 14pt;
    margin: 0.2rem 0;
  }
}

@keyframes glowFade {
  0% {
    opacity: 0;
    transform: scale(0.95);
    text-shadow: none;
  }
  100% {
    opacity: 1;
    transform: scale(1);
  }
}

.event-card {
  background: #1e1e1e;
  border: 1px solid #333;
  border-radius: 10px;
  padding: 1rem;
  margin-bottom: 2rem;
  box-shadow: 0 2px 5px rgba(0,0,0,0.3);
  font-family: 'Roboto Slab', serif;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
  cursor: pointer;
}

.event-card:hover {
  transform: scale(1.01);
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
}

body.light-mode .event-card {
  background: #ffffff;
  border: 1px solid #bbb;
  color: #111;
  box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

body.light-mode .event-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
/*
.modal-content {
  background-color: #1e1e1e;
  margin: 5% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 90%;
  max-width: 500px;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.5);
  text-align: center;
}

.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.85);
}

#modal-flyer img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
}
*/

#pagination button {
  background-color: #333;
  color: #fff;
  font-weight: bold;
  margin: 5px;
  padding: 8px 14px;
  border: 2px solid #888;
  border-radius: 8px;
  cursor: pointer;
  transition: background-color 0.2s ease;
}

#pagination button:hover {
  background-color: #555;
}

#pagination button.active-page {
  background-color: #fff;
  color: #000;
  border: 2px solid #ccc;
}

