/* ===========================================================
   SOBUS EVENTS MODULE — FINAL v3.3
   Pixel-perfect match to SOBUS HTML
=========================================================== */

/* ======================================================
   GRID LAYOUT (supports both .sobus-events-grid & .sobus-event-grid)
====================================================== */
.sobus-events-grid,
.sobus-event-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  list-style: none;
  margin: 0;
  padding: 0;
}

@media (max-width: 991px) {
  .sobus-events-grid,
  .sobus-event-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
  }
}

@media (max-width: 640px) {
  .sobus-events-grid,
  .sobus-event-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }
}

/* ======================================================
   EVENT CARD BASE
====================================================== */
.sobus-event-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.05);
  border-left: none;
  border-radius: 12px;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: all 0.3s ease;
  margin: 0;
  padding: 0;
}

.sobus-event-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 8px 20px rgba(158, 23, 77, 0.15);
  border-color: rgba(158, 23, 77, 0.25);
}

/* ======================================================
   EVENT IMAGE — zoom + dark overlay
====================================================== */
.sobus-event-card .event-image {
  position: relative;
  width: 100%;
  height: 220px;
  background-size: cover;
  background-position: center;
  margin: 0;
  padding: 0;
  border: none;
  overflow: hidden;
  transition: transform 0.6s ease;
}

.sobus-event-card .event-image::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0);
  transition: background 0.4s ease;
}

.sobus-event-card:hover .event-image {
  transform: scale(1.06);
}

.sobus-event-card:hover .event-image::after {
  background: rgba(0, 0, 0, 0.25);
}

@media (max-width: 640px) {
  .sobus-event-card .event-image {
    height: 180px;
  }
}

/* ======================================================
   EVENT CONTENT (internal padding only)
====================================================== */
.sobus-event-card .event-content {
  padding: 1.5rem 1.5rem 1.75rem;
  margin: 0;
  background: #fff;
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}

/* ======================================================
   TITLE
====================================================== */
.sobus-event-card .title a {
  color: #111827;
  font-weight: 600;
  text-decoration: none;
  font-size: 1.1rem;
  display: inline-block;
  margin-bottom: 0.6rem;
  transition: color 0.3s ease;
}
.sobus-event-card .title a:hover {
  color: #9E174D;
}

/* ======================================================
   META (date, time, venue)
====================================================== */
.sobus-event-card .event-meta {
  margin-top: 0.4rem;
  margin-bottom: 0;
  display: flex;
  flex-direction: column;
}

.sobus-event-card .event-meta .meta-item {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  margin: 0;
  line-height: 1.5;
  font-size: 0.95rem;
  color: #374151;
}

.sobus-event-card .event-meta .meta-icon {
  color: #9E174D;
  font-size: 1rem;
  line-height: 1;
}

/* ======================================================
   DESCRIPTION
====================================================== */
.sobus-event-card .description {
  margin-top: 1rem;
  margin-bottom: 1rem;
  font-size: 0.95rem;
  line-height: 1.6;
  color: #374151;
  flex-grow: 1;
}

/* ======================================================
   SOBUS EVENTS — BUTTON STYLE (exact match to Amelia)
====================================================== */
.sobus-event-card .read-more-btn,
.sobus-event-card .sobus-btn,
.sobus-btn {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  width: 100% !important;              /* full width same as Amelia */
  height: 2.5rem !important;           /* ~40px */
  gap: 0.5rem !important;
  white-space: nowrap !important;

  /* background + color */
  background-color: hsl(337 65% 36%) !important;  /* plum */
  color: hsl(0 0% 100%) !important;

  /* border + radius */
  border: none !important;
  border-radius: calc(0.75rem - 2px) !important;   /* matches var(--radius) - 2px */

  /* padding + text */
  padding: 0.5rem 1rem !important;   /* py-2 px-4 (tight & clean) */
  font-size: 0.875rem !important;    /* 14px */
  line-height: 1.25rem !important;
  font-weight: 500 !important;       /* medium bold */
  text-decoration: none !important;
  letter-spacing: normal !important;
  font-family: inherit !important;

  /* interaction */
  cursor: pointer !important;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
  box-shadow: 0 4px 14px 0 hsl(337 65% 36% / .3) !important; /* soft shadow */
}

.sobus-event-card .read-more-btn:hover,
.sobus-event-card .sobus-btn:hover,
.sobus-btn:hover {
  background-color: hsl(337 65% 30%) !important;  /* darker hover */
  color: #ffffff !important;
}

/* ======================================================
   ALIGNMENT + EQUAL HEIGHTS
====================================================== */
.sobus-events-grid,
.sobus-event-grid,
.sobus-event-card {
  align-items: stretch;
}

.event-meta,
.event-meta * {
  margin: 0;
  padding: 0;
  line-height: 1.4;
}

/* ======================================================
   FIXES: corner bleed & image clipping
====================================================== */
.sobus-event-card {
  border-radius: 12px;
  background: #fff;
  overflow: hidden;
}

.sobus-event-card .event-image {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
  background-clip: border-box;
  margin: 0;
  padding: 0;
}

/* ======================================================
   RESPONSIVE TWEAKS
====================================================== */
@media (max-width: 991px) {
  .sobus-event-card .event-content {
    padding: 1.25rem 1.25rem 1.5rem;
  }
  .sobus-event-card .title a {
    font-size: 1rem;
  }
}
@media (max-width: 640px) {
  .sobus-event-card {
    border-radius: 10px;
  }
  .sobus-event-card .event-content {
    padding: 1.1rem 1.1rem 1.3rem;
  }
  .sobus-event-card .description {
    font-size: 0.9rem;
  }
  .sobus-event-card .read-more-btn,
  .sobus-event-card .sobus-btn {
    padding: 8px 18px;
    font-size: 0.9rem;
  }
}
