/* ============================================================
   CTLS COMPONENT: TILE
   ------------------------------------------------------------
   Globales Kachel-Design für News, Trainings, Events & Shop
   ============================================================ */

/* === GRID === */
.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 1.8em;
}

/* Exakte 3-Spalten-Layouts (z. B. News oder Events) */
.tile-grid--news,
.tile-grid--events
.tile-grid--training {
  grid-template-columns: repeat(3, 1fr);
}

/* === TILE BASIS === */
.tile,
.kurs-tile {
  background: #fbfbfb;
  border: 1px solid #e0e0e0;
  border-radius: 8px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.tile:hover,
.kurs-tile:hover {

  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

/* === BILD === */
.tile img {
  width: 100%;
  height: 10rem;
  object-fit: cover;
  display: block;
}

/* === INHALT === */
.tile-content {
  padding: 1em 1.2em 1.6em;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}

/* === META-ZEILE === */
.tile-meta {
  font-size: 0.95rem;
  color: #666;
  margin-bottom: 0.4em;
}

.tile-category {
  font-weight: 700;
}

.tile-meta .tile-date::before {
  content: " | ";
  color: #aaa;
  margin: 0 0.2em;
}

/* === TITEL === */
.tile-title {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  margin: 0.3em 0 0.5em;
  font-weight: 700;
  color: #000;
}

/* === EXCERPT === */
.tile-excerpt {
  margin: 0;
  line-height: 1.5;
  font-size: 1rem;
  color: #222;
  flex-grow: 1;
}

/* === BUTTON === */
.tile .button {
  display: block;
  text-align: center;
  margin-top: 1.2em;
  padding: 0.8em;
  border-radius: 6px;
  font-weight: 600;
  text-decoration: none;
  background: var(--color-primary);
  color: #fff;
  transition: background 0.2s ease;
}

.tile .button:hover {
  background: #005fa3;
}

/* === RESPONSIVE === */
@media (max-width: 1024px) {
  .tile-title { font-size: 1.1rem; }
}

@media (max-width: 768px) {
  .tile-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1em;
  }
  .tile img { height: 8rem; }
}

.ctls-promo-badge {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 4px 12px;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 4px;
    color: #fff;
    z-index: 20;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

.ctls-promo-badge.promo-rabatt {
    background-color: #0061A8;
}

.ctls-promo-badge.promo-last {
    background-color: #C00000;
}

.kurs-tile {
    position: relative;
    border-radius: 10px;
    overflow: hidden;
}

.kurs-tile.promo-rabatt {
    border: 2px solid #0061A8;
}

.kurs-tile.promo-last {
    border: 2px solid #C00000;
}