/* --- Flexible 3-up desktop grid (auto fits any screen ≥1024px) --- */
.luxury-grid.featured-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: flex-start;
  width: 100%;
  margin: 0 auto;
  padding: 0 24px;
  box-sizing: border-box;
}

/* --- Cards: fixed 586 px target width with 28 px gap --- */
.jj-event-card {
  flex: 1 1 586px;
  max-width: 586px;
  margin-right: 28px;
  margin-bottom: 40px;
  background: transparent;
  border: none;
  box-shadow: none;
  display: flex;
  flex-direction: column;
  transition: transform 0.3s ease;
  box-sizing: border-box;
}

.jj-event-card:nth-child(3n) {
  margin-right: 0;
}

.jj-event-card:hover {
  transform: translateY(-6px);
}

/* --- Image container --- */
.post-thumbnail-container {
  position: relative;
  width: 100%;
  height: var(--jj-img-h, 330px);
  min-height: var(--jj-img-h, 330px);
  overflow: hidden;
  background: #f7f7f7;
}

/* --- Image fill --- */
.jj-card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
  vertical-align: middle;
}

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

/* --- Text blocks --- */
.jj-card-meta,
.jj-card-title,
.jj-card-managed {
  margin: 0;
  padding: 6px 0;
  background: transparent;
  color: #111;
  font-family: inherit;
  line-height: 1.4;
}

.jj-card-meta {
  display: flex;
  justify-content: space-between;
  font-size: 13px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  flex-wrap: wrap;
  gap: 8px;
}

.jj-card-type,
.jj-card-yearloc {
  color: #111;
  white-space: nowrap;
}

.jj-card-title {
  font-size: 26px;
  font-weight: 800;
  line-height: 1.2;
  margin-top: 4px;
  word-break: break-word;
}

.jj-card-managed {
  font-size: 15px;
  font-weight: 600;
  color: #111;
  margin-top: 4px;
}

/* --- Responsive: Tablet --- */
@media (max-width: 1024px) {
  .luxury-grid.featured-grid {
    flex-direction: column;
    padding: 0 16px;
    align-items: stretch !important;
  }

  .jj-event-card {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 0 auto 36px;
  }

  .post-thumbnail-container {
    height: 330px !important;
    min-height: 330px !important;
  }

  .jj-card-img {
    width: 100% !important;
    height: 100% !important;   /* fill container */
    object-fit: cover !important;
  }

  .jj-card-title { font-size: 22px; }
  .jj-card-meta { font-size: 12px; }
  .jj-card-managed { font-size: 14px; }
}

/* --- Responsive: Mobile --- */
/* Widescreen 
@media (min-width: 1920px) {
  .luxury-grid.featured-grid {
    max-width: 1800px;
    margin: 0 auto;
    padding: 0 40px;
    justify-content: flex-start;
  }

  .jj-event-card {
    flex: 1 1 586px;
    max-width: 586px;
    margin-right: 28px;
    margin-bottom: 48px;
  }

  .jj-event-card:nth-child(3n) {
    margin-right: 0;
  }
}*/

/* Laptop */
@media (max-width: 1280px) and (min-width: 1025px) {
  .luxury-grid.featured-grid {
    justify-content: space-between;
    padding: 0 20px;
  }

  .jj-event-card {
    flex: 1 1 calc(50% - 14px);
    max-width: calc(50% - 14px);
    margin-right: 28px;
    margin-bottom: 40px;
  }

  .jj-event-card:nth-child(2n) {
    margin-right: 0;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .luxury-grid.featured-grid {
    flex-direction: column;
    padding: 0 16px;
    align-items: stretch;
  }

  .jj-event-card {
    flex: 1 1 100%;
    max-width: 100%;
    margin: 0 auto 36px;
  }
}

/* Mobile */
@media (max-width: 767px) {
  .luxury-grid.featured-grid {
    flex-direction: column;
    padding: 0 16px;
  }

  .jj-event-card {
    flex: 1 1 100%;
    margin: 0 auto 28px;
  }
}

/* --- Remove Elementor auto-height override --- */
.elementor .jj-card-img {
  width: 100% !important;
  height: 100% !important;   /* let container control height */
  object-fit: cover !important;
  display: block !important;
}