/* Events container */
#ccc-events-widget {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  justify-content: flex-start;
  margin-top: 20px;
}

/* Detail view container */
#event-details-view {
  margin: 20px;
  display: none;
}

/* Card Body */
.card-body {
  margin: 0px 10px;
}

/* Each card */
.event-card {
  background-color: #fff;
  border: 1px solid #ccc;
  border-radius: 20px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
  overflow: hidden;
  width: calc(50% - 20px);
  min-width: 280px;
  max-width: calc(50% - 20px);
  display: flex;
  flex-direction: column;
}

/* Image wrapper */
.event-image-wrapper {
  padding: 20px;
}

/* Card image */
.event-image {
  width: calc(100% - 40px);
  aspect-ratio: 3 / 2;
  object-fit: cover;
  margin: 20px;
  height: auto;
  display: block;
  border-radius: 12px;
}

/* Event title */
.event-title {
  font-size: 1.5rem;
  font-weight: 700;
  margin: 20px 20px 10px 20px;
  color: #003366;
}

/* Tags */
.event-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 0 20px 10px 20px;
}
.event-tags:empty {
  display: none;
}
.event-tag {
  display: inline-block;
  padding: 2px 15px;
  font-size: 0.75rem;
  border-radius: 20px;
  background-color: #ecf0f4;
  color: #003e7e;
  font-weight: 700;
}
.event-tag.building-tag {
  background-color: #d1e9ff;
  color: #005fa9;
}

/* Refined tag spacing */
.event-card .event-tags {
  margin-bottom: 12px;
}

/* Date, time, and location */
.event-date,
.event-time,
.event-location,
.event-description {
  font-size: 1rem;
  margin: 0 20px 20px 20px;
}
.event-date strong,
.event-time strong,
.event-location strong {
  font-weight: 600;
}
.event-location {
  white-space: normal;
  word-break: break-word;
  line-height: 1.4;
  margin-bottom: 10px;
}
.event-location i {
  margin-right: 6px;
}

/* Extra space under description in detail view */
#event-details-view .event-description {
  margin-bottom: 16px;
}

/* Pill Buttons (View Details, Register, Back) */
.event-pill-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-size: 1.2rem;
  font-weight: bold;
  color: #fff;
  background-color: #005fa9;
  padding: 16px 20px;
  border: none;
  border-radius: 999px;
  text-align: center;
  text-decoration: none;
  width: auto;
  max-width: none;
  margin: 20px 0 0 20px;
  transition: background-color 0.3s ease, transform 0.1s ease;
  cursor: pointer;
  box-sizing: border-box;
}

.event-pill-button:hover {
  background-color: #004a85;
}

.event-pill-button:active {
  transform: scale(0.98);
}

.event-pill-button i {
  font-size: 1.1em;
  margin-right: 8px;
}

/* Button color variants */
.event-pill-orange {
  background-color: #ef9021;
}

.event-pill-orange:hover {
  background-color: #d67e1c;
}

.event-pill-blue {
  background-color: #005fa9;
}

.event-pill-blue:hover {
  background-color: #004a85;
}

/* Click animation */
.event-pill-button:active {
  transform: scale(0.97);
}

/* Only applies inside event cards */
.event-card .event-pill-button {
  width: calc(100% - 40px);
  margin: 20px;
}

/* Extra spacing in detail view under tags */
#event-details-view .event-tags {
  margin-bottom: 30px;
}

/* Responsive layout */
@media (max-width: 900px) {
  .event-card {
    width: calc(100% - 20px);
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  .event-card {
    width: 100%;
    max-width: 100%;
  }
  .event-pill-button {
    display: flex;
    width: 100%;
    max-width: 100%;
    margin: 20px auto;
  }
}
