/* =========================================================
   Termine – Mobile Sofort-Fix
   behebt zerdrückte Bilder + gequetschten Text in Termin-Karten
   ========================================================= */

/* Agenda-/Listenkarte sauber aufbauen */
.tec-ag-item {
  display: grid !important;
  grid-template-columns: minmax(180px, 240px) minmax(0, 1fr);
  gap: 16px !important;
  align-items: start !important;
}

.tec-ag-img {
  width: 100%;
  aspect-ratio: 4 / 3;
  height: auto;
  max-height: 220px;
  object-fit: contain;
  object-position: center;
  display: block;
  border-radius: 14px;
  background: #f3f4f6;
  border: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px;
}

.tec-ag-body {
  min-width: 0;
}

.tec-ag-item h3,
.tec-ag-body p,
.tec-ag-desc,
.tec-ag-meta span {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.tec-ag-body p {
  margin: 10px 0 0;
  line-height: 1.55;
  color: rgba(17, 24, 39, 0.82);
}

.tec-ag-meta {
  display: grid;
  gap: 6px;
}

/* Tagesansicht unter dem Kalender */
.tec-dayagenda .tec-ag-item {
  grid-template-columns: minmax(150px, 200px) minmax(0, 1fr);
}

/* Rückblick-/Blog-Karten sicher machen */
.ns-card,
.tblog-card {
  min-width: 0;
}

.ns-card__img,
.tblog-thumb img {
  width: 100%;
  height: auto;
  display: block;
}

/* =========================
   Tablet
========================= */
@media (max-width: 900px) {
  .tec-ag-item {
    grid-template-columns: 180px minmax(0, 1fr);
    padding: 20px;
  }

  .tec-ag-img {
    max-height: 200px;
  }

  .tec-dayagenda .tec-ag-item {
    grid-template-columns: 160px minmax(0, 1fr);
  }
}

/* =========================
   Handy
========================= */
@media (max-width: 700px) {
  .tec-agenda {
    padding: 14px;
  }

  .tec-ag-item {
    grid-template-columns: 1fr;
    gap: 14px !important;
    padding: 16px;
    border-radius: 16px;
  }

  .tec-ag-img {
    max-height: 220px;
    aspect-ratio: 16 / 10;
    padding: 10px;
  }

  .tec-ag-item h3 {
    font-size: 1.1rem;
    line-height: 1.25;
  }

  .tec-ag-meta {
    font-size: 0.95rem;
  }

  .tec-dayagenda .tec-ag-item {
    grid-template-columns: 1fr;
    padding: 14px;
  }

  .ns-card__img {
    aspect-ratio: 16 / 10;
    max-height: 220px;
    object-fit: cover;
  }

  .tblog-thumb {
    height: auto;
    aspect-ratio: 16 / 10;
  }

  .tblog-thumb img {
    height: 100%;
    object-fit: cover;
  }
}

/* =========================
   Sehr kleine Geräte
========================= */
@media (max-width: 480px) {
  .tec-wrap {
    width: min(var(--tec-max), 100% - 16px);
    margin: 16px auto 56px;
  }

  .tec-agenda {
    padding: 12px;
  }

  .tec-ag-item {
    padding: 14px;
  }

  .tec-ag-img {
    max-height: 190px;
  }
}
