/* =========================================================
   Crema Coffee House | gallery.css
   ========================================================= */

.gallery-tabs{
  display:flex;
  flex-wrap:wrap;
  justify-content:center;
  gap:10px;
  margin-bottom:clamp(32px,5vw,52px);
}
.gallery-tabs button{
  padding:10px 22px;
  border:1.5px solid var(--line);
  border-radius:3px;
  color:var(--ink);
  font-family:var(--display);
  font-size:.95rem;
  font-weight:500;
  letter-spacing:.05em;
  text-transform:uppercase;
  transition:background .3s ease, color .3s ease, border-color .3s ease, transform .3s var(--ease);
}
.gallery-tabs button:hover{ border-color:var(--accent); color:var(--accent); transform:translateY(-2px); }
.gallery-tabs button[aria-pressed="true"]{ border-color:var(--accent); background:var(--accent); color:#fff; }

/* masonry columns: photos keep their own shapes */
.gallery{
  columns:3 280px;
  column-gap:clamp(12px,2vw,20px);
}
.shot{
  position:relative;
  display:block;
  overflow:hidden;
  margin-bottom:clamp(12px,2vw,20px);
  break-inside:avoid;
  border-radius:var(--radius);
  cursor:zoom-in;
  transition:opacity .35s ease, transform .35s var(--ease);
}
.shot img{
  width:100%;
  height:auto;
  transition:transform 1s var(--ease);
}
.shot::after{
  content:'';
  position:absolute;
  inset:0;
  background:rgba(20,18,24,.45) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cpath d='M20 20l-4-4M11 8v6M8 11h6'/%3E%3C/svg%3E") center / 40px no-repeat;
  opacity:0;
  transition:opacity .4s ease;
}
.shot:hover img{ transform:scale(1.07); }
.shot:hover::after,
.shot:focus-visible::after{ opacity:1; }
.js .gallery .shot.is-out{ opacity:0; transform:scale(.96); }
.shot[hidden]{ display:none; }
.js .gallery .shot.is-in{ animation:shotIn .5s var(--ease); }
@keyframes shotIn{ from{ opacity:0; transform:scale(.95); } }

/* ---------- Lightbox ---------- */
.lightbox{
  position:fixed;
  inset:0;
  z-index:300;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:60px 70px;
  background:rgba(12,12,16,.94);
  opacity:0;
  transition:opacity .35s ease;
}
.lightbox[hidden]{ display:none; }
.lightbox.is-open{ opacity:1; }
.lb-figure{
  max-width:1100px;
  max-height:100%;
  text-align:center;
}
.lb-img{
  max-width:100%;
  max-height:calc(100vh - 160px);
  margin:0 auto;
  border-radius:var(--radius);
  box-shadow:0 30px 80px rgba(0,0,0,.6);
  transform:scale(.96);
  opacity:0;
  transition:transform .45s var(--ease), opacity .45s ease;
}
.lightbox.is-open .lb-img.is-loaded{ transform:none; opacity:1; }
.lb-caption{
  margin-top:14px;
  color:rgba(255,255,255,.75);
  font-size:.9rem;
}
.lb-close,
.lb-arrow{
  position:absolute;
  display:grid;
  place-items:center;
  width:48px;
  height:48px;
  border-radius:50%;
  background:rgba(255,255,255,.08);
  color:#fff;
  transition:background .3s ease, transform .3s var(--ease);
}
.lb-close:hover,
.lb-arrow:hover{ background:var(--accent); }
.lb-close{ top:16px; right:16px; }
.lb-close svg{ width:22px; height:22px; }
.lb-arrow svg{ width:28px; height:28px; }
.lb-prev{ left:14px; }
.lb-next{ right:14px; }

@media (max-width:600px){
  .lightbox{ padding:70px 12px 90px; }
  .lb-arrow{ top:auto; bottom:18px; }
  .lb-prev{ left:calc(50% - 60px); }
  .lb-next{ right:calc(50% - 60px); }
}
