/* =========================================================
   Smile Gallery — kompakt galeri (Nanodent siyah / altın)
   ========================================================= */

.sg-page {
  background: #0a0a0a;
  color: #fff;
}

.sg-hero {
  position: relative;
  padding: clamp(48px, 8vw, 72px) 0 clamp(28px, 4vw, 40px);
  overflow: hidden;
  text-align: center;
  background:
    radial-gradient(70% 80% at 50% 0%, rgba(214,161,46,.16), transparent 55%),
    linear-gradient(180deg, #111 0%, #0a0a0a 100%);
}
.sg-hero .container { position: relative; z-index: 1; }
.sg-brand {
  margin: 0 0 10px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .2em;
  text-transform: uppercase;
  color: var(--gold);
}
.sg-hero h1 {
  margin: 0 0 12px;
  font-size: clamp(32px, 5vw, 46px);
  font-weight: 900;
  letter-spacing: -.6px;
  line-height: 1.1;
}
.sg-hero h1 em {
  font-style: normal;
  color: var(--gold-light);
}
.sg-hero-lead {
  margin: 0 auto;
  max-width: 42ch;
  font-size: 15.5px;
  line-height: 1.6;
  color: rgba(255,255,255,.68);
}

.sg-filters {
  position: sticky;
  top: 72px;
  z-index: 20;
  padding: 12px 0;
  background: rgba(10,10,10,.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(214,161,46,.18);
}
.sg-filters-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 8px 22px;
}
.sg-chip {
  appearance: none;
  border: 0;
  background: transparent;
  padding: 4px 0;
  font-family: inherit;
  font-size: 14px;
  font-weight: 700;
  color: rgba(255,255,255,.5);
  cursor: pointer;
  position: relative;
}
.sg-chip::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .2s ease;
}
.sg-chip:hover { color: #fff; }
.sg-chip.is-on { color: var(--gold-light); }
.sg-chip.is-on::after { transform: scaleX(1); }

.sg-gallery {
  padding: 28px 0 56px;
}
.sg-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
}
.sg-item {
  margin: 0;
  display: flex;
  flex-direction: column;
  background: #111;
  border: 1px solid rgba(214,161,46,.18);
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .45s ease, transform .45s ease, border-color .2s;
  cursor: pointer;
}
.sg-item.is-in {
  opacity: 1;
  transform: none;
}
.sg-item.is-hidden { display: none; }
.sg-item img {
  width: 100%;
  height: auto;
  aspect-ratio: 1 / 1;
  object-fit: contain;
  object-position: center;
  display: block;
  background: #0a0a0a;
  vertical-align: top;
}
.sg-item:hover {
  border-color: rgba(214,161,46,.45);
}
.sg-item figcaption {
  padding: 12px 14px 14px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  border-top: 1px solid rgba(214,161,46,.12);
}
.sg-item figcaption strong {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.sg-item figcaption span {
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: .04em;
  color: var(--gold-light);
}

.sg-close {
  position: relative;
  overflow: hidden;
  padding: 64px 0 60px;
  text-align: center;
  border-top: 1px solid rgba(214,161,46,.28);
  background:
    radial-gradient(60% 95% at 50% 0%, rgba(214,161,46,.15), transparent 62%),
    linear-gradient(180deg, #131313 0%, #0a0a0a 100%);
}
.sg-close h2 {
  margin: 0 auto 10px;
  font-size: clamp(24px, 3.5vw, 34px);
  font-weight: 900;
  letter-spacing: -.4px;
  color: #fff;
}
.sg-close p {
  margin: 0 auto 24px;
  max-width: 40ch;
  color: rgba(255,255,255,.66);
  font-size: 15px;
  line-height: 1.6;
}
.sg-close-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: center;
}

@media (max-width: 900px) {
  .sg-grid { grid-template-columns: repeat(2, 1fr); gap: 12px; }
}
@media (max-width: 520px) {
  .sg-grid { grid-template-columns: 1fr; gap: 12px; }
  .sg-filters { top: 64px; }
}

@media (prefers-reduced-motion: reduce) {
  .sg-item { opacity: 1; transform: none; transition: none; }
}

/* --- Lightbox --- */
.sg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 10000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 72px 72px 40px;
}
.sg-lightbox[hidden] {
  display: none !important;
}
.sg-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, .9);
}
.sg-lightbox-stage {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  max-width: 100%;
}
.sg-lightbox-img {
  display: block;
  width: auto;
  height: auto;
  max-width: min(100%, 860px);
  max-height: calc(100vh - 160px);
  object-fit: contain;
  border-radius: 2px;
}
.sg-lightbox-meta {
  margin-top: 16px;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 20px;
  width: 100%;
  max-width: min(100%, 860px);
}
.sg-lightbox-cap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}
.sg-lightbox-cap strong {
  font-size: 15px;
  font-weight: 800;
  color: #fff;
}
.sg-lightbox-cap span {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .04em;
  color: var(--gold-light);
}
.sg-lightbox-count {
  margin: 0;
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .12em;
  color: rgba(255, 255, 255, .45);
}
.sg-lightbox-close,
.sg-lightbox-nav {
  position: absolute;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, .72);
  cursor: pointer;
  transition: color .2s ease, background .2s ease;
}
.sg-lightbox-close svg,
.sg-lightbox-nav svg {
  width: 22px;
  height: 22px;
  display: block;
}
.sg-lightbox-close {
  top: 18px;
  right: 18px;
}
.sg-lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
}
.sg-lightbox-prev { left: 14px; }
.sg-lightbox-next { right: 14px; }
.sg-lightbox-close:hover,
.sg-lightbox-nav:hover:not(:disabled) {
  color: #fff;
  background: rgba(255, 255, 255, .08);
}
.sg-lightbox-nav:disabled {
  opacity: .25;
  cursor: default;
}

@media (max-width: 720px) {
  .sg-lightbox {
    padding: 64px 16px 28px;
  }
  .sg-lightbox-close {
    top: 12px;
    right: 12px;
    width: 40px;
    height: 40px;
  }
  .sg-lightbox-nav {
    width: 40px;
    height: 40px;
  }
  .sg-lightbox-prev { left: 4px; }
  .sg-lightbox-next { right: 4px; }
  .sg-lightbox-img {
    max-width: 100%;
    max-height: calc(100vh - 140px);
  }
  .sg-lightbox-meta {
    margin-top: 12px;
  }
}
