/* =====================================================
   EVENTS GRID LAYOUT
   ===================================================== */

.cms-events-grid {
  display: grid;
  gap: 32px;
}

/* Column modifiers from shortcode: [cms_events columns="X"] */
.cms-events-grid--cols-1 {
  grid-template-columns: minmax(0, 1fr);
}

.cms-events-grid--cols-2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.cms-events-grid--cols-3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

/* Stack to single column on smaller screens */
@media (max-width: 980px) {
  .cms-events-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* =====================================================
   EVENT CARD
   ===================================================== */

.cms-event-card {
  position: relative;
}

/* Inner card – matches Calm Mind “panel” style */
.cms-event-card__inner {
  position: relative;
  background: #ffffff;
  border-radius: 20px;
  padding: 32px 36px;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.04);
  border-top: 4px solid transparent;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, #b8abf6, #ffcea5) border-box;
}

/* Title */
.cms-event-card__title {
  color: #1b3b5b;
  font-size: 1.25rem;
  line-height: 1.4;
  margin: 0;
  padding: 0;
}

/* Meta list reset */
.cms-event-card__meta {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  list-style: none;
  margin: 0;
  padding: 0 !important;
}

/* Each row: icon + text */
.cms-event-card__meta-item {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 15px;
  line-height: 1.5;
}

/* Icon wrapper */
.cms-event-card__meta-icon {
  flex: 0 0 auto;
  line-height: 1;
}

/* If your [icon] shortcode outputs <i> tags, keep them neat */
.cms-event-card__meta-icon i {
  font-size: 16px;
}

/* Text wrapper */
.cms-event-card__meta-text {
  flex: 1 1 auto;
}

/* Optional description block when show_desc="true" */
.cms-event-card__excerpt {
  color: #4b5666;
  margin: 0;
  font-size: 0.97rem;
}

/* Keep button pushed to the bottom when there is a description */
.cms-event-card--with-desc .cms-event-card__actions {
  margin-top: auto;
}

/* Let Divi handle the visual style – just spacing/layout */
.cms-event-card__actions {
  margin-top: auto;
  padding-top: 20px;
}

.cms-event-card__button.et_pb_button {
  margin-top: 0;
}

/* Prevent Divi from inserting <br> in button text */
.cms-event-card__button.et_pb_button,
.cms-event-card__button.et_pb_button span {
  white-space: nowrap !important;
  line-height: 1.2em !important; /* Optional but helps prevent wrapping */
}

.cms-event-card__button.et_pb_button br {
  display: none !important;
}

/* Empty-state message */
.cms-events-grid__empty {
  margin: 24px 0 0;
  font-size: 0.98rem;
  color: #4b5666;
}

.cms-events-card {
  margin: 0 auto;
  border-radius: 20px;
  padding: 36px 40px;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.04);
  border-top: 4px solid transparent;
  border-radius: 20px;
  background: linear-gradient(#ffffff, #ffffff) padding-box,
    linear-gradient(90deg, #b8abf6, #ffcea5) border-box;
  width: 100%;
}
