/* ==========================================================================
   Divi API Events Grid — Styles
   Scoped under .api-events-grid to avoid global overrides
   ========================================================================== */

.api-events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  box-sizing: border-box;
  padding: 10px 0;
}

/* --------------------------------------------------------------------------
   Card link container
   -------------------------------------------------------------------------- */
.api-events-grid .api-card-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
  box-shadow: none;
  border: solid 1px #D8E0E7;
}

.api-events-grid .api-card-link:hover {
  transform: translateY(-3px);
  box-shadow: 0 3px 12px rgba(0, 0, 0, 0.08);
}

/* --------------------------------------------------------------------------
   Image container and hover dimming
   -------------------------------------------------------------------------- */
.api-events-grid .calendar_image_container {
  position: relative;
  width: 100%;
  overflow: hidden;
  border-radius: 12px 12px 0 0;
}

.api-events-grid .calendar_image_container img {
  display: block;
  width: 100%;
  height: 200px;
  object-fit: cover;
  transition: filter 0.3s ease;
}

/* ✅ hover: dim image */
.api-events-grid .calendar_image_container:hover img {
  filter: brightness(70%);
}

/* Tag badges overlay */
.api-events-grid .tags-badge-wrap,
.api-events-grid .calendar_image_container .absolute {
  position: absolute;
  top: 0;
  left: 0;
  margin: 8px;
  max-width: 300px;
  z-index: 2;
}

.api-events-grid .tags-row {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 10px;
}

.api-events-grid .tag-chip-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 9999px;
  padding: 4px 12px;
  font-weight: 600;
  font-size: 0.9rem;
  background: #fff;
  color: #0f172a;
  border: 1px solid #cbd5e1;
  transition: background 0.2s ease;
}

.api-events-grid .tag-chip-btn:hover {
  background: #f8fafc;
}

.api-events-grid .mr-1_5 {
  margin-right: 6px;
}

/* --------------------------------------------------------------------------
   Text content below image
   -------------------------------------------------------------------------- */
.api-events-grid h2 {
  margin: 10px 10px 4px;
  font-size: 1.2rem;
  font-weight: 600;
  color: #0f172a;
  line-height: 1.3;
}

.api-events-grid p {
  margin: 0 10px 4px;
  line-height: 1.4;
}

.api-events-grid .text-16 {
  font-size: 1rem;
  color: #111827;
  padding-bottom: 0px;
}

.api-events-grid .text-gray-subtitle {
  font-size: 0.875rem;
  color: #6b7280;
  margin-bottom: 8px;
}

/* --------------------------------------------------------------------------
   Pagination controls
   -------------------------------------------------------------------------- */
.api-events-grid .api-pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  margin-top: 24px;
  flex-wrap: wrap;
}

.api-events-grid .api-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #fff;
  color: #0f172a;
  text-decoration: none;
  font-weight: 500;
  transition: background 0.2s ease, color 0.2s ease;
}

.api-events-grid .api-btn:hover {
  background: #f8fafc;
}

.api-events-grid .api-btn[aria-disabled="true"] {
  opacity: 0.5;
  pointer-events: none;
  cursor: not-allowed;
}

.api-events-grid .api-page-indicator {
  font-size: 0.95rem;
  color: #475569;
  font-weight: 500;
}

/* --------------------------------------------------------------------------
   Utility & layout helpers (Tailwind-like)
   -------------------------------------------------------------------------- */
.api-events-grid .relative {
  position: relative;
}
.api-events-grid .absolute {
  position: absolute;
}
.api-events-grid .top-0 {
  top: 0;
}
.api-events-grid .m-2 {
  margin: 0.5rem;
}
.api-events-grid .max-w-\[300px\] {
  max-width: 300px;
}
.api-events-grid .h-\[200px\] {
  height: 200px;
}
.api-events-grid .w-auto {
  width: auto;
}
.api-events-grid .w-full {
  width: 100%;
}
.api-events-grid .h-full {
  height: 100%;
}
.api-events-grid .mt-2 {
  margin-top: 0.5rem;
}
.api-events-grid .font-semibold {
  font-weight: 600;
}
.api-events-grid .text-xl {
  font-size: 1.25rem;
  line-height: 1.75rem;
  padding-bottom: 0px;
}

/* --------------------------------------------------------------------------
   Responsive tweaks
   -------------------------------------------------------------------------- */
@media (max-width: 640px) {
  .api-events-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
  .api-events-grid .calendar_image_container img {
    height: 160px;
  }
}

.tag-chip {
  display: flex;

/* --------------------------------------------------------------------------
   Safety reset (prevents theme conflicts)
   -------------------------------------------------------------------------- */
.api-events-grid,
.api-events-grid * {
  box-sizing: border-box;
}

.api-events-grid img {
  max-width: none;
  height: auto;
}

.api-events-grid h2,
.api-events-grid p {
  font-family: inherit;
}

