/********************************************************

Events: Eventlisten, Styling Kacheloptik im Grid.
Listen werden durch Shortcode crc_filtered_events erstellt

*********************************************************/



/* ================================
   GRID-LAYOUT (3–2–1)
   ================================ */
.crc-events-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
}

@media (max-width: 1024px) {
  .crc-events-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 640px) {
  .crc-events-grid {
    grid-template-columns: 1fr;
  }
}

/* ================================
   KACHEL / CARD
   ================================ */
.crc-events-grid .crc-event-card {
  background: #fff;
  border-radius: 10px;

  /* Normale leicht graublaue Border */
  border: 1px solid rgba(5, 8, 153, 0.1);

  /* Hover-Transition */
  transition: border-color 0.2s ease, box-shadow 0.2s ease;

  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
  padding: 1.5rem 1.5rem 0 1.5rem;

  display: flex;
  flex-direction: column;
  height: 100%;
}

/* Hover: kräftiger Border */
.crc-events-grid .crc-event-card:hover {
  border-color: var(--crc-blau);
}

.crc-event-card__inner {
  display: flex;
  flex-direction: column;
  height: 100%;
}

/* ================================
   MEDIA / BILD
   ================================ */
.crc-event-card__media img {
  width: 100%;
  height: auto;
  display: block;
  margin-bottom: 1rem;
}

/* ================================
   TITLE
   ================================ */
.crc-event-card__title {
  font-size: 1.2rem;
  font-weight: bold;
  line-height: 1.5;
  margin-bottom: 1rem;
}

/* ================================
   BODY / META
   ================================ */
.crc-event-card__body {
  flex: 1 1 auto;
}

.crc-event-card__meta,
.crc-event-card__venue {
  font-size: 0.9rem;
  line-height: 1.4;
}

.crc-event-card__meta {
  font-weight: bold;
}

.crc-event-card__excerpt {
  margin-top: 1rem;
  overflow-wrap: break-word;
  hyphens: auto;
}

/* ================================
   FOOTER / BUTTON
   ================================ */
.crc-event-card__footer {
  margin-top: auto;
}

.crc-event-card__more {
  display: inline-block;
  margin-top: 1rem;
  color: var(--crc-blau);
  font-weight: 600;
  text-decoration: none;
}

.crc-event-card__more:hover,
.crc-event-card__more:focus {
  text-decoration: underline;
}

/* ================================
   WORTTRENNUNG
   ================================ */
.crc-event-card,
.crc-event-card h3,
.crc-event-card p,
.crc-event-card__excerpt {
  overflow-wrap: break-word;
  hyphens: auto;
}

.crc-event-card a {
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  hyphens: auto;
}

/* ==============================================
   CRC Pagination Styling
   ============================================== */
.crc-pagination {
  display: flex;
  gap: 0.5rem;
  margin-top: 2.5rem;
  justify-content: center;
}

.crc-pagination a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  min-width: 2.2rem;
  height: 2.2rem;

  padding: 0 0.6rem;
  border-radius: 6px;

  font-size: 0.95rem;
  font-weight: 500;

  color: #033d67;
  background: #f4f7fa;

  border: 1px solid transparent;

  transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.crc-pagination a:hover,
.crc-pagination a:focus {
  background: #e7f1f9;
  border-color: var(--crc-blau);
  color: #022f4f;
}

.crc-pagination a.active {
  background: var(--crc-blau);
  color: #fff !important;
  border-color: var(--crc-blau);
  cursor: default;
  text-decoration: none;
}

.crc-pagination a.active:focus {
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px var(--crc-blau);
}

@media (max-width: 480px) {
  .crc-pagination {
    flex-wrap: wrap;
    gap: 0.4rem;
  }

  .crc-pagination a {
    min-width: 2rem;
    height: 2rem;
    font-size: 0.85rem;
  }
}
/** Schatten ***/
/* Normale Topic-Karte */
.topic-card {
  border-radius: 10px;
  overflow: hidden; /* wichtig für saubere Schattenkante */
  transition: box-shadow 0.25s ease, border-color 0.25s ease;
  
  /* leichter Grund-Schatten, wie Events */
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

/* Hover / Fokus */
.topic-card__inner:hover,
.topic-card__inner:focus {
  text-decoration: none; /* Unterstreichung nur an HL */

  /* Schatten wie Event Cards, aber etwas kräftiger für dunkle Kachel */
}

.topic-card:hover,
.topic-card:focus-within {
  /* identisch zu .crc-event-card:hover */
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.12);
  border-color: var(--crc-blau);
}
