/* Galeri: ana sayfa bölümü, /galeri sayfası ve büyütme penceresi */
.gal-home { padding: 72px 0 40px; }
.gal-home[hidden] { display: none; }
.gal-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 26px; }
.gal-head h2 { margin: 0; font-family: var(--display); font-size: clamp(1.8rem, 3.6vw, 2.8rem); letter-spacing: -0.04em; line-height: 1.05; }
.gal-page { padding: 72px 0 80px; }
.gal-desc { margin: 0 0 8px; color: var(--muted); max-width: 52ch; }
.gal-page .sub-tabs { margin-bottom: 32px; }
.gal-empty { color: var(--muted); padding: 32px 0; }
.gal-empty[hidden] { display: none; }

.gal-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.gal-item {
  position: relative; display: block; padding: 0; margin: 0; width: 100%;
  aspect-ratio: 16 / 10; overflow: hidden; cursor: zoom-in;
  border: 1px solid var(--line); border-radius: 18px;
  background: var(--bg-elev);
  transition: border-color .25s ease, box-shadow .25s ease, transform .25s ease;
}
.gal-item img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
.gal-item:hover { border-color: var(--accent); transform: translateY(-3px); box-shadow: 0 14px 34px color-mix(in srgb, var(--accent) 22%, transparent); }
.gal-item:hover img { transform: scale(1.06); }
.gal-item:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }

.gal-lb {
  position: fixed; inset: 0; margin: 0; padding: 0; border: 0;
  width: 100%; height: 100%; max-width: none; max-height: none;
  background: transparent; color: #fff;
}
.gal-lb[open] { display: grid; place-items: center; }
.gal-lb::backdrop { background: rgba(7, 6, 11, .9); backdrop-filter: blur(6px); }
.gal-lb-img { max-width: min(94vw, 1400px); max-height: 82dvh; object-fit: contain; border-radius: 14px; box-shadow: 0 20px 70px rgba(0, 0, 0, .6); }
.gal-lb-count { position: absolute; left: 0; right: 0; bottom: 22px; margin: 0; text-align: center; font-size: .9rem; font-weight: 600; letter-spacing: .08em; color: rgba(255, 255, 255, .75); }
.gal-lb-btn {
  position: absolute; width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center; font-size: 1.7rem; line-height: 1; cursor: pointer;
  color: #fff; background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .25);
  transition: background .2s ease, border-color .2s ease;
}
.gal-lb-btn:hover { background: rgba(168, 85, 247, .45); border-color: #d8b4fe; }
.gal-lb-btn:focus-visible { outline: 2px solid #d8b4fe; outline-offset: 2px; }
.gal-lb-btn[hidden] { display: none; }
.gal-lb-close { top: 18px; right: 18px; }
.gal-lb-prev { left: 18px; top: 50%; transform: translateY(-50%); }
.gal-lb-next { right: 18px; top: 50%; transform: translateY(-50%); }

@media (max-width: 760px) {
  .gal-home { padding-top: 48px; }
  .gal-page { padding-top: 56px; }
  .gal-grid { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .gal-item { border-radius: 14px; }
  .gal-lb-prev, .gal-lb-next { top: auto; bottom: 14px; transform: none; }
  .gal-lb-prev { left: 18px; } .gal-lb-next { right: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  .gal-item, .gal-item img { transition: none; }
  .gal-item:hover, .gal-item:hover img { transform: none; }
}
