/* Section container */
.events-section {
  padding: 5rem 2rem;
  text-align: center;
}

.section-wrapper {
  max-width: 2000px; /* 👈 controls how wide the whole section can go */
  margin: 0 auto;     /* 👈 centers it */
  padding: 0 1rem;    /* 👈 adds side breathing room */
  box-sizing: border-box;
}

/* Section title */
.events-title {
  font-family: 'Tan Pearl', serif;
  font-size: 2.5rem;
  color: #574937;
  margin-bottom: 2.5rem;
}

.event-description {
  margin: 0.8rem 0rem 0.8rem 0rem; /* 👈 adds space above and below the description */
  line-height: 1.6; /* 👈 improves readability */
  color: #574937;
  font-size: 1rem;
}

/* Grid layout */
.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 2rem;
  justify-items: center;
}

.events-grid-wrapper {
  max-width: 2000px;     /* ✅ controls total width of the grid */
  margin: 0 auto;        /* ✅ centers the wrapper */
  padding: 0 2rem 0rem 2rem;       /* ✅ adds breathing room on small screens */
}

/* Individual event card */
.event-card {
  background-color: #f6ebe2; /*#f5ede5	#f6ebe2*/
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  text-align: left;
  font-size: 0.95rem;
  font-family: 'Open Sans', serif;
  color: #574937;
  line-height: 2;
}

/* Event image */
.event-card img {
  width: 100%;
  border-radius: 8px;
  margin-bottom: 1rem;
}

/* Label at top of card */
.event-label {
  display: inline-block;
  background-color: #627045;
  color: white;
  font-size: 0.8rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  margin-bottom: 0.5rem;
  font-family: 'Open Sans', sans-serif;
}

/* Event title */
.event-card h3 {
  font-family: 'Crimson', serif;
  font-size: 1.25rem;
  color: #362817;
  margin: 0.5rem 0;
  margin-bottom: -0.5rem;
}

/* RSVP button */
.rsvp-button {
  display: inline-block;
  margin-top: 1.5rem auto 0 auto;
  background-color: #dbb5b1;
  color: black;
  padding: 0.6rem 1.2rem;
  border-radius: 6px;
  text-decoration: none;
  font-weight: 700;
  font-family: 'Inter', sans-serif;
  transition: background-color 0.3s ease;
  width: 100%;
  font-size: 0.9rem;
}

.rsvp-wrapper {
  text-align: center;
  margin-top: 1.5rem;
}

.rsvp-button:hover {
  background-color: #c9a4a0;
}

/* Icons before details */
.event-card i {
  color: #627045; /* Green icons */
  margin-right: 0.4rem;
  align-items: center; /* 👈 This centers the button horizontally */
}

/* Age range */
.event-age {
  margin-top: 0rem;
  color: #574937; /* Same as other details */
  font-style: normal; /* Remove italic */
  font-weight: normal;
}

.view-all-button {
  display: inline-block;
  margin-top: 3rem;
  background-color: #627045; /* Green background */
  color: white;
  padding: 0.8rem 1.6rem;
  border-radius: 6px;
  font-family: 'Marcellus', sans-serif;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.2rem;
  transition: background-color 0.3s ease;
}

.view-all-button i {
  margin-left: 0.5rem;
  color: white; /* Arrow stays white */
}

.view-all-button:hover {
  background-color: #7a8a5c; /* Slightly lighter green on hover */
}

/* Image wrapper for overlay label */
.image-wrapper {
  position: relative;
  width: 100%;
  height: 120px;
  overflow: hidden;
  border-radius: 8px 8px 0 0;
  margin-bottom: 1rem;
}

/* Cropped image preview */
.event-preview {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  display: block;
}

/* Green tag over image */
.event-label {
  position: absolute;
  top: 8px;
  left: 8px;
  background-color: #627045;
  color: white;
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 4px;
  font-family: 'Inter', sans-serif;
  z-index: 2;
}

@media (max-width: 600px) {
  .events-title {
    font-family: 'Tan Pearl', serif;
    font-size: 2.2rem;
    color: #574937;
    margin-bottom: 2.5rem;
  }

  .view-all-button {
    font-size: 1.05rem;
    padding: 0.7rem 1.4rem;
  }
}
