/* events.css - Specific styles for the Events page gallery.
   Relies on variables defined in styles.css.
*/

/* --- Gallery Layout --- */

.event-gallery {
  display: grid;
  grid-template-columns: 1fr; /* Single item per row, as requested */
  gap: 2.5rem;
  margin-top: 3rem;
  margin-bottom: 3rem;
  padding-top: 2rem;
}

/* Styles for the individual figure/card */
.event-gallery figure {
  background: var(--bg-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
  transition: transform 0.3s ease, box-shadow 0.3s ease;

  /* Make the card centered and wider for a prominent display */
  width: 100%;
  max-width: 900px; /* Limits the max width of the card */
  margin: 0 auto;

  /* Core Fix: Use Flexbox to manage internal height (keeps figcaption uniform) */
  display: flex;
  flex-direction: column;
  height: 100%;
}

.event-gallery figure:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.15);
}

.event-gallery img {
  width: 100%;
  aspect-ratio: 16/9; /* Use a fixed aspect ratio for the image */
  object-fit: contain;
  flex-shrink: 0;
}

.event-gallery figcaption {
  /* Core Fix: Set a minimum height for the caption container */
  min-height: 80px;

  padding: 1.25rem;
  font-weight: 600;
  font-size: 1.1rem;
  text-align: center;
  color: var(--dark-green);
  background-color: var(--very-light-green);

  /* Flexbox settings for the caption to vertically center the text */
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Reused utility styles from programs.css for consistency */
.section-subtitle {
    font-family: 'Poppins', sans-serif;
    font-size: 1.8rem;
    color: var(--medium-green);
    text-align: center;
    margin-top: 2rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 600px) {
    .event-gallery figcaption {
        min-height: 60px; /* Adjust min height for mobile */
    }
}
