/* GovState LiveWhale featured events - 3-up layout */

/* Center the widget wrapper inside the full-width Site Studio column */
.lwcw {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

/* Grid applies ONLY to the outer container.
   LiveWhale reuses .lwc-featured-events on the inner title wrapper,
   so scope by parent to avoid nesting a grid inside a grid. */
.lwcw > .lwc-featured-events {
  --lwc-badge-width: 60px;
  --lwc-image-height: 180px;
  --lwc-card-max: 320px;
  --lwc-widget-max: 1100px;

  display: grid;
  grid-template-columns: repeat(3, minmax(0, var(--lwc-card-max)));
  justify-content: center;
  align-items: start;
  gap: 2rem;

  width: 100%;
  max-width: var(--lwc-widget-max);
  margin-left: auto;
  margin-right: auto;
}

.lwc-featured-event {
  position: relative;
  display: block;
  width: 100%;
  min-width: 0;
  box-sizing: border-box;
}

/* Kill the inherited grid on the inner wrapper, make it full width */
.lwc-featured-event .lwc-featured-events {
  display: block;
  width: 100%;
  max-width: none;
  min-width: 0;
  box-sizing: border-box;
  text-align: center;
}

/* Date badge - inline styles already set position/top/left */
.lwc-featured-event .lwc-event-cal-date {
  z-index: 2;
  width: auto;
  text-align: center;
}

/* Image wrapper: pad past the badge so the logo centers
   in the remaining space, flush with the badge top */
.lwc-featured-event .lw_item_thumb {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding-left: var(--lwc-badge-width);
  margin: 0 0 0.75rem;
  text-align: center;
}

.lwc-featured-event .lw_item_thumb a {
  display: block;
  width: 100%;
  text-align: center;
}

.lwc-featured-event .lw_item_thumb img {
  display: block;
  max-width: 100%;
  height: var(--lwc-image-height);
  object-fit: contain;
  object-position: center;
  margin: 0 auto;
}

/* Title: full card width, centered, no underline */
.lwc-featured-event .lwc-featured-events a,
.lwc-featured-event .lwc-featured-events a:link,
.lwc-featured-event .lwc-featured-events a:visited {
  display: block;
  width: 100%;
  max-width: none;
  box-sizing: border-box;
  text-align: center;
  text-decoration: none;
  line-height: 1.35;
  overflow-wrap: break-word;
}

.lwc-featured-event .lwc-featured-events a:hover,
.lwc-featured-event .lwc-featured-events a:focus {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 991px) {
  .lwcw > .lwc-featured-events {
    grid-template-columns: repeat(2, minmax(0, var(--lwc-card-max)));
    gap: 1.5rem;
  }
}

@media (max-width: 575px) {
  .lwcw > .lwc-featured-events {
    grid-template-columns: minmax(0, var(--lwc-card-max));
    gap: 1.25rem;
  }
}