/* ===== EVENTS SECTION =====
   Card grid styled to match calendar.pitt.edu's department listing —
   image on top, title, date, and location underneath.
*/

.events-section {
  width: 100%;
  max-width: 1248px;
  margin: 0 auto;
  padding: 80px 24px;
  position: relative;
}

/* ===== HEADER ===== */
.events-section__header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem;
  flex-wrap: wrap;
  border-bottom: 3px solid #FFB81C;
  padding-bottom: 16px;
  margin-bottom: 32px;
}

.events-section__title {
  font-family: 'Oswald', 'Alternate Gothic Compressed ATF', Impact, sans-serif;
  font-weight: 700;
  font-size: clamp(40px, 6vw, 72px);
  line-height: 0.96;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #003594;
  margin: 0;
}

/* ===== EVENT CARDS GRID ===== */
.events-section__list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
}

@media (min-width: 640px) {
  .events-section__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 1024px) {
  .events-section__list {
    grid-template-columns: repeat(4, 1fr);
  }
}

/* ===== INDIVIDUAL CARD ===== */
.event-card {
  display: flex;
  flex-direction: column;
  background: #FFFFFF;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.event-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(0, 53, 148, 0.12);
}

.event-card__image {
  display: block;
  position: relative;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #f3f4f6;
}

.event-card__image img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  object-fit: cover !important;
  transition: transform 0.4s ease;
}

.event-card:hover .event-card__image img {
  transform: scale(1.04);
}

.event-card__body {
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}

.event-card__title {
  font-family: 'Roboto', sans-serif;
  font-weight: 700;
  font-size: 18px;
  line-height: 1.3;
  color: #013594;
  margin: 0;
}

.event-card__title a {
  color: #013594;
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  transition: color 0.2s ease;
}

.event-card__title a:hover {
  color: #003594;
  text-decoration: underline;
}

.event-card__date {
  font-family: 'Roboto', sans-serif;
  font-weight: 500;
  font-size: 14px;
  line-height: 1.3;
  color: #4b5563;
}

.event-card__location {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: 'Roboto', sans-serif;
  font-size: 13px;
  line-height: 1.3;
  color: #6b7280;
  margin-top: auto;
  padding-top: 4px;
}

.event-card__icon {
  flex-shrink: 0;
  color: #9ca3af;
}

/* Empty state */
.events-section .events-empty {
  font-family: 'Roboto', sans-serif;
  font-size: 16px;
  color: #6b7280;
  padding: 24px 0;
}

/* ===== VIEW ALL EVENTS BUTTON ===== */
.events-section .events_viewmore,
.events-section .viewmore {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-top: 32px;
  padding: 14px 28px;
  background-color: #003594;
  color: #FFFFFF !important;
  font-family: 'Roboto', 'Open Sans', Arial, sans-serif;
  font-weight: 700;
  font-size: 15px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-decoration: none !important;
  border: 0;
  border-radius: 0;
  transition: background-color 0.2s ease, transform 0.2s ease;
}

.events-section .events_viewmore:hover,
.events-section .viewmore:hover {
  background-color: #002470;
  color: #FFFFFF !important;
  text-decoration: none !important;
  transform: translateY(-1px);
}

.events-section .events_viewmore::after,
.events-section .viewmore::after {
  content: ' →';
  margin-left: 8px;
}

/* ===== RESPONSIVE ===== */
@media (max-width: 767px) {
  .events-section {
    padding: 48px 20px;
  }

  .events-section__header {
    margin-bottom: 24px;
  }

  .event-card__body {
    padding: 16px;
  }

  .event-card__title {
    font-size: 16px;
  }

  .events-section .events_viewmore,
  .events-section .viewmore {
    width: 100%;
    margin-top: 24px;
    padding: 14px 20px;
    font-size: 14px;
  }
}
