/* ===========================================================
   The CosmoCare Clinic — Gallery page
   =========================================================== */

/* Filter tabs */
.gal-filters { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin-bottom: clamp(30px, 4vw, 48px); }
.gal-filter {
  padding: 10px 20px; border-radius: 100px; border: 1.5px solid var(--line);
  background: var(--white); color: var(--ink-soft); font-weight: 700; font-size: .9rem;
  cursor: pointer; transition: all .3s var(--ease);
}
.gal-filter:hover { border-color: var(--teal); color: var(--teal-deep); transform: translateY(-2px); }
.gal-filter.active { background: var(--teal); border-color: var(--teal); color: #fff; box-shadow: 0 10px 24px -12px var(--teal-deep); }

/* Masonry grid */
.gal-grid { columns: 3; column-gap: 20px; }
.gal-card {
  break-inside: avoid; margin-bottom: 20px; position: relative; border-radius: var(--r-lg);
  overflow: hidden; box-shadow: var(--shadow-sm); cursor: pointer; background: var(--mint-2);
  opacity: 0; transform: translateY(26px); transition: opacity .7s var(--ease), transform .7s var(--ease), box-shadow .4s;
}
.gal-card.in { opacity: 1; transform: none; }
.gal-card.hide { display: none; }
.gal-card:hover { box-shadow: var(--shadow-md); }
.gal-card img { width: 100%; display: block; transition: transform .7s var(--ease); }
.gal-card:hover img { transform: scale(1.05); }
.gal-card__type {
  position: absolute; top: 12px; right: 12px; z-index: 3; font-size: .68rem; font-weight: 700;
  letter-spacing: .06em; text-transform: uppercase; background: rgba(10,42,46,.78); color: #fff;
  padding: 5px 11px; border-radius: 100px; backdrop-filter: blur(6px);
}
.gal-card__ba { position: absolute; top: 12px; left: 12px; z-index: 3; display: flex; gap: 6px; }
.gal-card__ba span { font-size: .62rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; border-radius: 100px; background: rgba(255,255,255,.9); color: var(--teal-deep); }
.gal-card__overlay {
  position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; justify-content: flex-end;
  padding: 18px; color: #fff; background: linear-gradient(180deg, transparent 45%, rgba(10,42,46,.82));
  opacity: 0; transition: opacity .4s var(--ease);
}
.gal-card:hover .gal-card__overlay { opacity: 1; }
.gal-card__overlay b { font-family: var(--display); font-size: 1.15rem; }
.gal-card__overlay span { font-size: .82rem; color: #bfe3e8; }
.gal-card__zoom { position: absolute; bottom: 16px; right: 16px; width: 38px; height: 38px; border-radius: 50%; background: rgba(255,255,255,.92); display: grid; place-items: center; color: var(--teal-deep); }
.gal-card__zoom svg { width: 18px; height: 18px; }

@media (max-width: 900px) { .gal-grid { columns: 2; } }
@media (max-width: 560px) { .gal-grid { columns: 1; } }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 1100; display: none;
  align-items: center; justify-content: center; padding: 24px;
  background: rgba(6,24,27,.92); backdrop-filter: blur(8px);
}
.lightbox.open { display: flex; animation: lbFade .3s var(--ease); }
@keyframes lbFade { from { opacity: 0; } to { opacity: 1; } }
.lightbox__stage { max-width: min(900px, 92vw); max-height: 86vh; position: relative; text-align: center; }
.lightbox__img { max-width: 100%; max-height: 78vh; border-radius: var(--r-md); box-shadow: var(--shadow-lg); animation: lbZoom .35s var(--ease); }
@keyframes lbZoom { from { opacity: 0; transform: scale(.95); } to { opacity: 1; transform: scale(1); } }
.lightbox__cap { color: #dff3f5; margin-top: 16px; }
.lightbox__cap b { font-family: var(--display); font-size: 1.3rem; display: block; }
.lightbox__cap span { font-size: .85rem; color: #9fc0c4; }
.lightbox__close, .lightbox__nav {
  position: absolute; background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.2);
  color: #fff; border-radius: 50%; cursor: pointer; display: grid; place-items: center;
  transition: background .3s, transform .3s;
}
.lightbox__close:hover, .lightbox__nav:hover { background: rgba(255,255,255,.28); }
.lightbox__close { top: -54px; right: 0; width: 44px; height: 44px; font-size: 22px; }
.lightbox__nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; }
.lightbox__nav svg { width: 24px; height: 24px; }
.lightbox__nav:hover { transform: translateY(-50%) scale(1.08); }
.lightbox__prev { left: -70px; }
.lightbox__next { right: -70px; }
@media (max-width: 820px) {
  .lightbox__prev { left: 8px; } .lightbox__next { right: 8px; }
  .lightbox__nav { width: 44px; height: 44px; background: rgba(255,255,255,.2); }
  .lightbox__close { top: 8px; right: 8px; }
}
