/* ---------------------------------------------------------------------------
   EVENTS PAGE — Fullscreen layout matching Browse page style
--------------------------------------------------------------------------- */

/* General Page Layout */
body {
  margin: 0;
  padding: 0;
  font-family: "Open Sans", sans-serif;
  background-color: #ffffff;
}

/* Sticky Navbar */
/* Navbar styles are now handled in main.css */
/* Removed old red navbar styles to match home.html design */

/* ---------------------------------------------------------------------------
   EVENTS SECTION
--------------------------------------------------------------------------- */
#events-section {
  margin-top: 100px;
  padding: 0 2vw;
  width: 100vw;
  max-width: 100vw;
  box-sizing: border-box;
}

/* Header container for back button, title, and date toggles */
.events-header {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  margin-bottom: 30px;
  gap: 10px;
}

@media (min-width: 768px) {
  .events-header {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
    text-align: left;
  }
}

/* ---------------------------------------------------------------------------
   BACK BUTTON
--------------------------------------------------------------------------- */
.back-button {
  background-color: var(--red);
  color: white;
  border: none;
  border-radius: 25px;
  padding: 8px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.back-button:hover {
  background-color: var(--light-gray);
  color: var(--gray);
}

/* ---------------------------------------------------------------------------
   PAGE TITLE + DATE TOGGLE
--------------------------------------------------------------------------- */
.events-title {
  color: var(--red);
  font-size: 32px;
  font-weight: 700;
  margin: 0;
  text-align: center;
}

.date-toggle {
  display: flex;
  justify-content: center;
  gap: 12px;
}

.date-toggle button {
  padding: 10px 20px;
  border-radius: 25px;
  border: 2px solid var(--red);
  background-color: white;
  color: var(--red);
  font-weight: 600;
  cursor: pointer;
  transition: all 0.25s ease;
}

.date-toggle button.active,
.date-toggle button:hover {
  background-color: var(--red);
  color: white;
}

/* ---------------------------------------------------------------------------
   EVENT GRID LAYOUT
--------------------------------------------------------------------------- */
#events-container {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 25px;
  width: 100%;
  margin: 0 auto;
  padding-bottom: 60px;
  box-sizing: border-box;
}

/* Individual event card */
.event-card {
  background-color: #ffffff;
  border-radius: 16px;
  box-shadow: 0px 3px 8px rgba(0, 0, 0, 0.15);
  overflow: hidden;
  text-align: left;
  display: flex;
  flex-direction: column;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.event-card:hover {
  transform: translateY(-5px);
  box-shadow: 0px 6px 16px rgba(0, 0, 0, 0.25);
}

.event-image {
  width: 100%;
  height: 180px;
  object-fit: cover;
}

.event-content {
  padding: 15px 18px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

.event-content h3 {
  color: var(--red);
  font-size: 20px;
  margin: 0 0 8px 0;
}

.event-content p {
  font-size: 15px;
  color: #444;
  margin: 4px 0;
  line-height: 1.4;
}

/* ---------------------------------------------------------------------------
   BUTTONS
--------------------------------------------------------------------------- */
.event-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: auto;
}

.go-button,
.website-button {
  font-size: 13px;
  font-weight: bold;
  padding: 7px 16px;
  border-radius: 20px;
  cursor: pointer;
  transition: all 0.25s ease;
}

.go-button {
  background-color: var(--red);
  color: white;
  border: none;
}

.website-button {
  background-color: transparent;
  border: 2px solid var(--red);
  color: var(--red);
}

.website-button:hover,
.go-button:hover {
  background-color: var(--light-gray);
  color: var(--gray);
}

/* ---------------------------------------------------------------------------
   RESPONSIVE DESIGN
--------------------------------------------------------------------------- */
@media (max-width: 1024px) {
  #events-container {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    padding: 0 20px;
  }

  .events-title {
    font-size: 28px;
  }
}

@media (max-width: 600px) {
  #events-section {
    padding: 0 15px;
  }

  .events-header {
    flex-direction: column;
    gap: 15px;
  }

  #events-container {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .event-image {
    height: 160px;
  }

  .events-title {
    font-size: 26px;
  }
}

/* ---------------------------------------------------------------------------
   FIX: Override global flex rule from main.css for this page only
--------------------------------------------------------------------------- */
#events-page #events-section {
  display: block !important;
}
