/* assets/service-gallery.css */
/* Luxury fade gallery (no dependencies) */

.service-gallery {
  --gold: #f0c040;
  --frame: rgba(240, 192, 64, 0.28);
  --glass: rgba(0, 0, 0, 0.40);

  position: relative;

  /* ✅ FIX: stay inside the content “gold frame” width */
  width: 100%;
  max-width: 900px;           /* ✅ adjust if your content box is wider/narrower */
  box-sizing: border-box;

  height: clamp(240px, 42vw, 440px);
  margin: 22px auto 0;
  border-radius: 22px;
  overflow: hidden;

  border: 1px solid var(--frame);
  background: #0b0b0b;
  box-shadow:
    0 18px 55px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(255,255,255,.04);
}

.sg-stage {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.sg-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 900ms ease;
  will-change: opacity;
  pointer-events: none;
}

.sg-slide.is-active {
  opacity: 1;
  pointer-events: auto;
}

/* Image layer */
.sg-slide img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transform: scale(1.06);
  transition: transform 5200ms ease;
  filter: contrast(1.04) saturate(1.03);
}

/* subtle luxury motion */
.sg-slide.is-active img {
  transform: scale(1.12);
}

/* Gradient overlay (lux) */
.sg-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(1200px 500px at 70% 15%, rgba(240,192,64,.10), transparent 60%),
    linear-gradient(to bottom, rgba(0,0,0,.18), rgba(0,0,0,.55));
}

/* Bottom glass bar */
.sg-bar {
  position: absolute;
  left: 14px;
  right: 14px;
  bottom: 14px;
  padding: 10px 12px;
  border-radius: 16px;

  background: linear-gradient(to bottom, rgba(0,0,0,.40), rgba(0,0,0,.62));
  border: 1px solid rgba(255,255,255,.08);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);

  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.sg-caption {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
}

.sg-title {
  color: rgba(240,192,64,.95);
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
  font-size: .78rem;
  white-space: nowrap;
}

.sg-sub {
  color: rgba(226,232,240,.9);
  font-size: .86rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Dots */
.sg-dots {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: flex-end;
}

.sg-dot {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  border: 1px solid rgba(240,192,64,.55);
  background: rgba(255,255,255,.06);
  box-shadow: 0 0 0 2px rgba(0,0,0,.22);
  cursor: pointer;
  transition: transform 200ms ease, background 200ms ease, border-color 200ms ease;
}

.sg-dot:hover {
  transform: scale(1.1);
  border-color: rgba(240,192,64,.9);
  background: rgba(240,192,64,.18);
}

.sg-dot.is-active {
  background: rgba(240,192,64,.70);
  border-color: rgba(240,192,64,.95);
}

/* Arrows */
.sg-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border-radius: 999px;
  border: 1px solid rgba(240,192,64,.35);
  background: rgba(0,0,0,.40);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: rgba(240,192,64,.95);
  display: grid;
  place-items: center;
  cursor: pointer;
  transition: transform 200ms ease, border-color 200ms ease, background 200ms ease, opacity 200ms ease;
  opacity: .92;
}

.sg-arrow:hover {
  transform: translateY(-50%) scale(1.04);
  border-color: rgba(240,192,64,.75);
  background: rgba(0,0,0,.55);
}

.sg-arrow:active {
  transform: translateY(-50%) scale(0.98);
}

.sg-arrow.prev { left: 14px; }
.sg-arrow.next { right: 14px; }

@media (max-width: 640px) {
  .service-gallery { border-radius: 18px; }
  .sg-bar { left: 10px; right: 10px; bottom: 10px; padding: 9px 10px; }
  .sg-sub { display: none; }
  .sg-arrow { width: 40px; height: 40px; }
}