
/* ==========================================================
   TRAIN MOBIL – MODELLBAHN GALERIEN DESIGN FIX 1.1
   Dunkles Grundgerüst passend zu eingefrorenen Projektseiten
   ========================================================== */

.tm-gal-page{
  padding:0;
  background:#050607;
  color:#f5f5f3;
}

.tm-gal-frame{
  width:min(1534px,100%);
  margin:0 auto;
  box-sizing:border-box;
  border-left:1px solid #17191c;
  border-right:1px solid #17191c;
}

.tm-gal-inner{
  width:min(1500px,calc(100% - 32px));
  margin:0 auto;
}

/* HERO */
.tm-gal-hero{
  min-height:500px;
  position:relative;
  display:flex;
  align-items:center;
  overflow:hidden;
  background:#0b0e10;
}

.tm-gal-hero:before{
  content:"";
  position:absolute;
  inset:0;
  background:
    linear-gradient(90deg,
      rgba(3,4,5,.98) 0%,
      rgba(3,4,5,.88) 30%,
      rgba(3,4,5,.50) 58%,
      rgba(3,4,5,.08) 100%
    ),
    var(--hero);
  background-size:100% 100%,cover;
  background-position:center;
}

.tm-gal-hero__inner{
  position:relative;
  z-index:1;
  min-height:500px;
  padding:64px 34px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  align-items:flex-start;
}

.tm-gal-kicker,
.tm-gal-eyebrow{
  margin:0;
  color:#ffd000;
  font-size:11px;
  font-weight:900;
  letter-spacing:.15em;
}

.tm-gal-hero h1{
  margin:12px 0 0;
  font-size:clamp(42px,4.3vw,74px);
  line-height:.94;
  letter-spacing:-.04em;
}

.tm-gal-lead{
  max-width:760px;
  margin:26px 0 0;
  color:#dfe3e5;
  font-size:17px;
  line-height:1.6;
}

/* CONTENT */
.tm-gal-content{
  padding:0;
  background:linear-gradient(90deg,#0d1013,#0a0c0e);
}

.tm-gal-content > .tm-gal-inner{
  padding:34px;
}

/* TABS */
.tm-gal-tabs{
  display:flex;
  flex-wrap:wrap;
  gap:9px;
  padding:0 0 26px;
  border-bottom:1px solid #282d31;
}

.tm-gal-tab{
  min-height:42px;
  padding:0 16px;
  border:1px solid #343a3f;
  background:#0a0d0f;
  color:#cbd0d3;
  font-size:11px;
  font-weight:900;
  letter-spacing:.04em;
  cursor:pointer;
  transition:border-color .18s ease,background .18s ease,color .18s ease;
}

.tm-gal-tab:hover{
  color:#fff;
  border-color:#626970;
}

.tm-gal-tab span{
  margin-left:7px;
  color:#858d93;
}

.tm-gal-tab.is-active{
  background:#ffd000;
  border-color:#ffd000;
  color:#050607;
}

.tm-gal-tab.is-active span{
  color:#514400;
}

/* SECTION */
.tm-gal-section{
  display:none;
  padding:42px 0 8px;
}

.tm-gal-section.is-active{
  display:block;
}

.tm-gal-section__head{
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  gap:42px;
  align-items:end;
  margin:0 0 28px;
}

.tm-gal-section__head h2{
  margin:8px 0 12px;
  color:#f5f5f3;
  font-size:clamp(30px,2.7vw,44px);
  line-height:1;
  letter-spacing:-.03em;
}

.tm-gal-section__head p{
  max-width:820px;
  margin:0;
  color:#ccd1d4;
  font-size:15px;
  line-height:1.72;
}

.tm-gal-section__head strong{
  align-self:end;
  padding-bottom:4px;
  color:#ffd000;
  font-size:11px;
  font-weight:900;
  letter-spacing:.10em;
  white-space:nowrap;
}

/* GRID */
.tm-gal-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:10px;
  padding-bottom:24px;
}

.tm-gal-card{
  display:block;
  width:100%;
  padding:0;
  border:1px solid #2e3438;
  background:#07090a;
  aspect-ratio:16/10;
  overflow:hidden;
  cursor:zoom-in;
}

.tm-gal-card img{
  width:100%;
  height:100%;
  display:block;
  object-fit:cover;
  transition:transform .22s ease,filter .22s ease;
}

.tm-gal-card:hover img{
  transform:scale(1.025);
  filter:brightness(1.06);
}

/* Bestehende Lightbox – nur optisch an Projektseiten angleichen */
.tm-gal-lightbox{
  position:fixed;
  z-index:99999;
  inset:0;
  display:none;
  align-items:center;
  justify-content:center;
  padding:26px 34px;
  background:rgba(0,0,0,.93);
}

.tm-gal-lightbox.is-open{
  display:flex;
}

.tm-gal-lightbox__panel{
  width:min(1420px,96vw);
  max-height:94vh;
  height:auto;
  display:flex;
  flex-direction:column;
  gap:0;
  background:#0b0e10;
  border:1px solid #20262a;
  box-shadow:0 24px 80px rgba(0,0,0,.55);
}

.tm-gal-lightbox__head{
  flex:0 0 auto;
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:24px;
  padding:20px 22px 10px;
  color:#fff;
}

.tm-gal-lightbox__close{
  position:static;
  width:38px;
  height:38px;
  border:0;
  background:none;
  color:#fff;
  font-size:30px;
  cursor:pointer;
}

.tm-gal-lightbox__stage{
  position:relative;
  min-height:0;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:0 22px;
}

.tm-gal-lightbox__stage img{
  max-width:100%;
  max-height:calc(94vh - 190px);
  margin:auto;
  display:block;
  object-fit:contain;
}

.tm-gal-lightbox__nav{
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:52px;
  height:72px;
  border:1px solid #2a3035;
  background:rgba(8,10,12,.92);
  color:#ffd000;
  font-size:34px;
  cursor:pointer;
}

.tm-gal-lightbox__nav.prev{left:-1px}
.tm-gal-lightbox__nav.next{right:-1px}

.tm-gal-lightbox__counter{
  padding:10px 22px 0;
  color:#b9c0c4;
  text-align:left;
  font-size:13px;
  font-weight:700;
}

.tm-gal-lightbox__thumbs{
  flex:0 0 auto;
  display:flex;
  gap:8px;
  overflow-x:auto;
  overflow-y:hidden;
  padding:14px 22px 16px;
  scrollbar-width:thin;
  scrollbar-color:#4a5055 #111518;
}

.tm-gal-lightbox__thumb{
  flex:0 0 110px;
  height:68px;
  padding:0;
  border:2px solid transparent;
  background:#090b0d;
  overflow:hidden;
  opacity:.62;
  cursor:pointer;
}

.tm-gal-lightbox__thumb img{
  width:100%;
  height:100%;
  object-fit:cover;
}

.tm-gal-lightbox__thumb.is-active{
  opacity:1;
  border-color:#ffd000;
}

@media(max-width:1100px){
  .tm-gal-grid{
    grid-template-columns:repeat(3,minmax(0,1fr));
  }
}

@media(max-width:760px){
  .tm-gal-content > .tm-gal-inner{
    padding:24px 18px 30px;
  }

  .tm-gal-hero__inner{
    padding:50px 24px;
  }

  .tm-gal-section__head{
    grid-template-columns:1fr;
    gap:16px;
  }

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

  .tm-gal-lightbox{
    padding:10px;
  }

  .tm-gal-lightbox__nav{
    width:42px;
    height:62px;
  }
}

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