/* TSL Photo Gallery - frontend styling matching TSL Video Gallery / Tracks */
.tslgallery{
  --tsl-dark:#222831;
  --tsl-dark2:#1d232b;
  --tsl-accent:#ff315f;
  --tsl-accent-soft:#ff5b7d;
  --tsl-text:#222831;
  --tsl-muted:#6f7b87;
  --tsl-line:#dfe4e9;
  max-width:1500px;
  margin:0 auto;
  padding:20px 18px 34px;
  color:var(--tsl-text)!important;
  font-family:inherit;
}
.tslgallery,.tslgallery *{box-sizing:border-box}
.tslgallery h1,.tslgallery h2,.tslgallery h3,.tslgallery h4,
.tslgallery p,.tslgallery span,.tslgallery small,.tslgallery strong,.tslgallery b{color:inherit}

/* Main header - same palette as Video Gallery */
.tslgallery .tslgallery-hero{
  position:relative;
  min-height:125px;
  padding:28px 32px;
  margin:0 0 22px;
  overflow:hidden;
  border:1px solid #252c34;
  border-left:5px solid var(--tsl-accent);
  border-radius:14px;
  background:var(--tsl-dark);
  box-shadow:0 10px 28px rgba(0,0,0,.10);
}
.tslgallery .tslgallery-hero:after{display:none}
.tslgallery .tslgallery-hero>span,
.tslgallery .album-hero>span{
  display:block;
  margin:0 0 7px;
  color:var(--tsl-accent)!important;
  font-size:11px;
  line-height:1.2;
  letter-spacing:.20em;
  font-weight:900;
  text-transform:uppercase;
}
.tslgallery .tslgallery-hero h1,
.tslgallery .album-hero h1{
  margin:0 0 9px!important;
  padding:0!important;
  color:#fff!important;
  font-size:30px!important;
  line-height:1.05!important;
  font-weight:900!important;
  text-transform:none;
}
.tslgallery .tslgallery-hero p,
.tslgallery .album-hero p{
  margin:0!important;
  color:#d8dee5!important;
  font-size:14px;
  font-weight:500;
}

/* Category sections */
.tslgallery .tslgallery-section{margin:0 0 20px}
.tslgallery .tslgallery-banner{
  position:relative;
  min-height:92px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  padding:21px 26px 21px 30px;
  border:1px solid #2a3038;
  border-left:5px solid var(--tsl-accent);
  border-radius:13px;
  overflow:hidden;
  background:var(--tsl-dark);
  background-position:center;
  background-size:cover;
  box-shadow:0 7px 18px rgba(0,0,0,.07);
}
.tslgallery .tslgallery-banner:before{display:none}
.tslgallery .tslgallery-banner h2{
  margin:0 0 5px!important;
  padding:0!important;
  color:#fff!important;
  font-size:20px!important;
  line-height:1.15!important;
  font-weight:800!important;
}
.tslgallery .tslgallery-banner p{
  margin:0!important;
  color:#c7d0d9!important;
  font-size:13px;
}
.tslgallery .tslgallery-banner.compact{min-height:78px;padding-top:17px;padding-bottom:17px}

/* Album cards - white cards like the rest of TSL frontend */
.tslgallery .tslgallery-albums{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:15px;
  margin-top:14px;
}
.tslgallery a.tslgallery-album{
  display:block;
  overflow:hidden;
  border:1px solid var(--tsl-line);
  border-radius:12px;
  background:#fff;
  color:var(--tsl-text)!important;
  text-decoration:none!important;
  box-shadow:0 6px 18px rgba(20,28,36,.06);
  transition:transform .18s ease,border-color .18s ease,box-shadow .18s ease;
}
.tslgallery a.tslgallery-album:hover{
  transform:translateY(-3px);
  border-color:#cfd5db;
  box-shadow:0 10px 24px rgba(20,28,36,.11);
}
.tslgallery .tslgallery-cover{
  position:relative;
  aspect-ratio:16/8.8;
  background:#e9edf1 center/cover no-repeat;
  border-bottom:1px solid var(--tsl-line);
}
.tslgallery .tslgallery-cover:after{
  content:"";
  position:absolute;
  inset:0;
  background:linear-gradient(180deg,transparent 62%,rgba(0,0,0,.28));
  pointer-events:none;
}
.tslgallery .tslgallery-cover span{
  position:absolute;
  z-index:1;
  right:10px;
  bottom:10px;
  padding:5px 8px;
  border:0;
  border-radius:7px;
  background:var(--tsl-accent);
  color:#fff!important;
  font-size:10px;
  font-weight:900;
}
.tslgallery .tslgallery-cardbody{padding:14px 16px 16px}
.tslgallery .tslgallery-cardbody small{
  display:block;
  margin-bottom:4px;
  color:var(--tsl-accent)!important;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.tslgallery .tslgallery-cardbody h3{
  margin:0 0 4px!important;
  padding:0!important;
  color:#252b32!important;
  font-size:18px!important;
  line-height:1.2!important;
  font-weight:800!important;
}
.tslgallery .tslgallery-cardbody p{
  min-height:20px;
  margin:0 0 12px!important;
  color:#7a8692!important;
  font-size:12px;
}
.tslgallery .tslgallery-cardbody b{
  color:var(--tsl-accent)!important;
  font-size:10px;
  letter-spacing:.08em;
  font-weight:900;
}

/* Latest photos */
.tslgallery .tslgallery-latest,
.tslgallery .photo-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:11px;
  margin-top:14px;
}
.tslgallery .tslgallery-latest a{
  position:relative;
  display:block;
  aspect-ratio:16/10;
  overflow:hidden;
  border:1px solid var(--tsl-line);
  border-radius:10px;
  background:#f1f3f5;
  text-decoration:none!important;
}
.tslgallery .tslgallery-latest img,
.tslgallery .photo-item img{display:block;width:100%;height:100%;object-fit:cover;transition:transform .22s ease}
.tslgallery .tslgallery-latest a:hover img,
.tslgallery .photo-item:hover img{transform:scale(1.035)}
.tslgallery .tslgallery-latest span{
  position:absolute;left:9px;bottom:9px;max-width:calc(100% - 18px);overflow:hidden;white-space:nowrap;text-overflow:ellipsis;
  padding:5px 7px;border-radius:6px;background:rgba(32,38,45,.88);color:#fff!important;font-size:10px;font-weight:700;
}

/* Album page */
.tslgallery a.back{
  display:inline-flex;align-items:center;gap:7px;margin:0 0 13px;color:var(--tsl-accent)!important;
  font-size:11px;font-weight:900;letter-spacing:.06em;text-decoration:none!important;
}
.tslgallery .album-hero{
  padding:25px 28px;margin:0 0 14px;border:1px solid #2a3038;border-left:5px solid var(--tsl-accent);
  border-radius:13px;background:var(--tsl-dark);
}
.tslgallery .album-hero h1{font-size:28px!important}
.tslgallery .album-hero strong{
  display:inline-block;margin-top:10px;padding:5px 9px;border:1px solid rgba(255,49,95,.55);border-radius:7px;
  background:rgba(255,49,95,.12);color:#ff8ba5!important;font-size:10px;letter-spacing:.07em;
}
.tslgallery .photo-item{
  position:relative;aspect-ratio:4/3;overflow:hidden;padding:0;border:1px solid var(--tsl-line);border-radius:10px;background:#f1f3f5;cursor:pointer;
}
.tslgallery .photo-item span{
  position:absolute;top:8px;left:8px;padding:4px 6px;border-radius:5px;background:var(--tsl-accent);color:#fff!important;font-size:9px;font-weight:900;
}

/* Lightbox */
.tslg-lightbox{position:fixed;inset:0;z-index:99999;display:none;align-items:center;justify-content:center;background:rgba(0,0,0,.94)}
.tslg-lightbox.open{display:flex}
.tslg-lightbox figure{max-width:85vw;max-height:88vh;margin:0;text-align:center}
.tslg-lightbox img{max-width:85vw;max-height:80vh;object-fit:contain}
.tslg-lightbox figcaption{margin-top:10px;color:#fff!important}
.tslg-lightbox button{position:absolute;width:48px;height:48px;border:0;border-radius:50%;background:rgba(34,40,49,.88);color:#fff!important;font-size:32px;cursor:pointer}
.tslg-lightbox button:hover{background:var(--tsl-accent)}
.tslg-lightbox .close{right:22px;top:22px}.tslg-lightbox .prev{left:22px}.tslg-lightbox .next{right:22px}

@media(max-width:1000px){
  .tslgallery .tslgallery-albums{grid-template-columns:repeat(2,1fr)}
  .tslgallery .tslgallery-latest,.tslgallery .photo-grid{grid-template-columns:repeat(3,1fr)}
}
@media(max-width:640px){
  .tslgallery{padding:10px}
  .tslgallery .tslgallery-hero{min-height:auto;padding:24px 21px}
  .tslgallery .tslgallery-hero h1,.tslgallery .album-hero h1{font-size:26px!important}
  .tslgallery .tslgallery-albums{grid-template-columns:1fr}
  .tslgallery .tslgallery-latest,.tslgallery .photo-grid{grid-template-columns:repeat(2,1fr)}
  .tslgallery .tslgallery-banner{min-height:82px;padding:19px 19px 19px 23px}
  .tslgallery .tslgallery-banner h2{font-size:19px!important}
}
