/* =============================
   SCOPED, THEME-PROOF STYLES
   Everything lives under .macs-events-root
   ============================= */

.macs-events-root {
  /* Provide a stacking context & predictable typography base */
  position: relative;
  isolation: isolate;
  font-family: inherit !important;
}

/* Prevent theme link/button overrides inside the component */
.macs-events-root a,
.macs-events-root button,
.macs-events-root h1,
.macs-events-root h2,
.macs-events-root h3,
.macs-events-root h4,
.macs-events-root h5,
.macs-events-root h6,
.macs-events-root p,
.macs-events-root span,
.macs-events-root strong {
  all: unset;
  display: revert;
  font: revert;
  color: revert;
  line-height: revert;
}

/* Optional diagnostics */
.macs-events-root .macs-diag {
  background: #111;
  color: #eee !important;
  padding: 10px 14px;
  margin: 14px 0;
  border-radius: 10px;
}
.macs-events-root .macs-diag ul{margin:6px 0 0 18px}
.macs-events-root .macs-empty{color:#cfcfcf !important}

/* ========== GRID ========== */
.macs-events-root .macs-events-grid{
  max-width: 1140px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 32px;
}

/* ========== CARD ========== */
.macs-events-root .event-card{
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  background: #07070a;
  box-shadow: 0 20px 40px rgba(0,0,0,.40);
}

/* Thumb: keep crisp, consistent ratio like your demo (3:4) */
.macs-events-root .event-thumb{
  position: relative;
  width: 100%;
  aspect-ratio: 3 / 4;
  overflow: hidden;
  background: #000;
}

/* High-quality poster handling */
.macs-events-root .event-thumb img{
  width: 100% !important;
  height: 100% !important;
  display: block !important;
  object-fit: cover !important;      /* perfect crop */
  object-position: center !important;
  image-rendering: auto;
  transform: scale(1);
  transition: transform .45s ease, filter .3s ease;
  will-change: transform;
  filter: saturate(1.05);
}
.macs-events-root .event-card:hover .event-thumb img{
  transform: scale(1.06);
  filter: saturate(1.1);
}

/* Bottom gradient overlay */
.macs-events-root .event-overlay{
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 35%, rgba(0,0,0,.85) 100%);
  pointer-events: none;
}

/* Content block pinned to bottom */
.macs-events-root .event-info{
  position: absolute;
  left: 26px;
  right: 26px;
  bottom: 26px;
  color: #fff !important;
  z-index: 2;
}

/* Date */
.macs-events-root .event-date{
  display: block;
  font-size: 13px !important;
  font-weight: 800 !important;
  letter-spacing: 0.04em;
  margin: 0 0 8px;
  color: #f5f5f5 !important;
  opacity: .95;
}

/* Title */
.macs-events-root .event-title{
  margin: 0 0 10px !important;
  font-size: 26px !important;
  line-height: 1.22 !important;
  font-weight: 900 !important;
  text-transform: uppercase !important;
  color: #ffffff !important;

  /* clamp to 2 lines */
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Subtitle (optional) */
.macs-events-root .event-sub{
  margin: 0 0 16px !important;
  font-size: 15px !important;
  color: #d4d4d4 !important;

  display: -webkit-box;
  -webkit-line-clamp: 1;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* CTA button (theme-proof) */
.macs-events-root .event-btn{
  display: inline-block !important;
  background: #ff4b58 !important;
  color: #ffffff !important;
  text-decoration: none !important;
  font-weight: 900 !important;
  font-size: 15px !important;
  letter-spacing: .02em !important;
  padding: 14px 26px !important;
  border-radius: 10px !important;
  box-shadow: 0 12px 28px rgba(255,75,88,.32) !important;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease !important;
  cursor: pointer !important;
}
.macs-events-root .event-btn:hover{
  background: #ff2c3c !important;
  transform: translateY(-2px) !important;
  box-shadow: 0 16px 34px rgba(255,75,88,.38) !important;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 1200px){
  .macs-events-root .macs-events-grid{gap:28px}
}
@media (max-width: 1024px){
  .macs-events-root .macs-events-grid{grid-template-columns: repeat(2, minmax(0,1fr))}
}
@media (max-width: 680px){
  .macs-events-root .macs-events-grid{grid-template-columns: 1fr; gap:22px}
  .macs-events-root .event-title{font-size: 22px !important}
  .macs-events-root .event-info{left:20px; right:20px; bottom:20px}
}
