/* =========================================================
   TRAIN MOBIL / MODELLBAHN / WERKSTATT
   Content & Detail Polish 1.2
   Nur seitenspezifischer Contentbereich.
   ========================================================= */

/* Kartenbilder auf ein gemeinsames ruhiges Format bringen */
.tm-werkstatt-grid .tm-werkstatt-card:not(.tm-werkstatt-card--lead) .tm-werkstatt-card__image{
  min-height:0;
  aspect-ratio:16/9;
}

.tm-werkstatt-grid .tm-werkstatt-card:not(.tm-werkstatt-card--lead) .tm-werkstatt-card__image img{
  min-height:0;
  aspect-ratio:16/9;
  object-fit:cover;
}

.tm-werkstatt-card--lead .tm-werkstatt-card__image{
  min-height:390px;
}

.tm-werkstatt-card--lead .tm-werkstatt-card__image img{
  min-height:390px;
  object-fit:cover;
}

/* Technische Kategorie statt generischem "WERKSTATT" */
.tm-werkstatt-card__meta span{
  max-width:72%;
  line-height:1.25;
}

.tm-werkstatt-card__body{
  min-height:230px;
}

.tm-werkstatt-card--lead .tm-werkstatt-card__body{
  min-height:auto;
}

/* Button etwas klarer als echte Interaktion */
.tm-werkstatt-more{
  display:inline-flex;
  align-items:center;
  min-height:30px;
  margin-top:auto;
  padding-top:20px;
}

.tm-werkstatt-card__excerpt + .tm-werkstatt-more{
  margin-top:auto;
}

/* Geöffneter Beitrag */
.tm-werkstatt-detail{
  padding:0;
  background:#080a0c;
}

.tm-werkstatt-detail.is-open{
  display:block;
}

.tm-werkstatt-detail__head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:34px;
  align-items:end;
  padding:38px 40px 30px;
  border-bottom:1px solid #272c30;
  background:linear-gradient(90deg,#0d1013,#0a0c0e);
}

.tm-werkstatt-detail__eyebrow{
  margin:0 0 9px;
  color:#ffd000;
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
}

.tm-werkstatt-detail__head h3{
  margin:0;
  max-width:900px;
  color:#f4f4f2;
  font-size:clamp(25px,2.4vw,38px);
  line-height:1.04;
  letter-spacing:-.025em;
}

.tm-werkstatt-detail__date{
  color:#7e868c;
  font-size:11px;
  white-space:nowrap;
}

.tm-werkstatt-detail__layout{
  display:grid;
  grid-template-columns:minmax(0,1.12fr) minmax(330px,.88fr);
  gap:38px;
  padding:38px 40px 44px;
}

.tm-werkstatt-detail__text{
  max-width:none;
  color:#d0d3d5;
  font-size:15px;
  line-height:1.8;
}

.tm-werkstatt-detail__text::first-line{
  color:#f0f1f1;
}

.tm-werkstatt-gallery{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  align-content:start;
  gap:10px;
  margin-top:0;
}

.tm-werkstatt-gallery button{
  aspect-ratio:4/3;
}

.tm-werkstatt-gallery button:first-child{
  grid-column:1/-1;
  aspect-ratio:16/9;
}

.tm-werkstatt-gallery img{
  transition:transform .2s ease, opacity .2s ease;
}

.tm-werkstatt-gallery button:hover img{
  transform:scale(1.025);
  opacity:.94;
}

.tm-werkstatt-detail__foot{
  display:flex;
  justify-content:flex-end;
  padding:0 40px 34px;
}

.tm-werkstatt-detail__close{
  border:0;
  padding:0;
  background:none;
  color:#ffd000;
  font-size:11px;
  font-weight:900;
  cursor:pointer;
}

/* Geöffnete Karte klar absetzen */
.tm-werkstatt-card:has(.tm-werkstatt-detail.is-open){
  border-color:#41474c;
}

/* Responsive */
@media(max-width:1000px){
  .tm-werkstatt-detail__layout{
    grid-template-columns:1fr;
  }

  .tm-werkstatt-gallery{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }

  .tm-werkstatt-gallery button:first-child{
    grid-column:span 2;
  }
}

@media(max-width:760px){
  .tm-werkstatt-card__body{
    min-height:auto;
  }

  .tm-werkstatt-detail__head{
    grid-template-columns:1fr;
    gap:12px;
    padding:28px 22px 24px;
  }

  .tm-werkstatt-detail__layout{
    padding:28px 22px 32px;
  }

  .tm-werkstatt-detail__foot{
    padding:0 22px 28px;
  }

  .tm-werkstatt-gallery{
    grid-template-columns:repeat(2,minmax(0,1fr));
  }
}

@media(max-width:480px){
  .tm-werkstatt-gallery{
    grid-template-columns:1fr;
  }

  .tm-werkstatt-gallery button:first-child{
    grid-column:auto;
  }
}
