/* =====================================================================
   service-gallery.css — Servis detay sayfası görsel galerisi (slider)

   public/assets/images/services/{slug}/ klasöründeki fotoğraflar
   Services controller'ı tarafından otomatik bulunur ve burada
   kaydırmalı bir slider olarak gösterilir. Mevcut koyu "yeni" tema
   ve mavi vurgu diliyle uyumludur. Tek görsel varsa ok/nokta gizlenir.
   ===================================================================== */

.service-gallery {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius, 18px);
    background-color: var(--bg-3);
    background-image: var(--blueprint), var(--placeholder-dark);
    background-size: var(--blueprint-size), cover;
    background-position: center;
    isolation: isolate;
}

/* --- Kaydırma rayı + slaytlar ------------------------------------- */
.service-gallery__viewport {
    position: absolute;
    inset: 0;
    overflow: hidden;
    touch-action: pan-y;
}

.service-gallery__track {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 480ms cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform;
}

.service-gallery__slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    margin: 0;
}

.service-gallery__slide img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Oklar -------------------------------------------------------- */
.service-gallery__nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 2;
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    color: var(--ink-1);
    background: color-mix(in srgb, var(--bg-0) 58%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
    cursor: pointer;
    transition: background 200ms ease, color 200ms ease, opacity 200ms ease;
}

.service-gallery__nav:hover {
    background: var(--blue-bright);
    color: #fff;
}

.service-gallery__nav:focus-visible {
    outline: 2px solid var(--blue-bright);
    outline-offset: 2px;
}

.service-gallery__nav svg {
    width: 22px;
    height: 22px;
}

.service-gallery__nav--prev { left: 12px; }
.service-gallery__nav--next { right: 12px; }

/* RTL: oklar yer ve yön değiştirir */
[dir="rtl"] .service-gallery__nav--prev { left: auto; right: 12px; }
[dir="rtl"] .service-gallery__nav--next { right: auto; left: 12px; }
[dir="rtl"] .service-gallery__nav svg { transform: scaleX(-1); }

/* --- Sayaç (1/4) -------------------------------------------------- */
.service-gallery__count {
    position: absolute;
    top: 12px;
    right: 12px;
    z-index: 2;
    padding: 4px 10px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1;
    letter-spacing: 0.02em;
    color: var(--ink-1);
    background: color-mix(in srgb, var(--bg-0) 58%, transparent);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
}

[dir="rtl"] .service-gallery__count { right: auto; left: 12px; }

/* --- Noktalar ----------------------------------------------------- */
.service-gallery__dots {
    position: absolute;
    left: 50%;
    bottom: 12px;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    gap: 8px;
    padding: 6px 10px;
    border-radius: 999px;
    background: color-mix(in srgb, var(--bg-0) 40%, transparent);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
}

.service-gallery__dot {
    width: 8px;
    height: 8px;
    padding: 0;
    border: 0;
    border-radius: 999px;
    background: color-mix(in srgb, var(--ink-1) 45%, transparent);
    cursor: pointer;
    transition: width 220ms ease, background 220ms ease;
}

.service-gallery__dot:hover { background: color-mix(in srgb, var(--ink-1) 70%, transparent); }

.service-gallery__dot.is-active {
    width: 22px;
    background: var(--blue-bright);
}

.service-gallery__dot:focus-visible {
    outline: 2px solid var(--blue-bright);
    outline-offset: 2px;
}

/* --- Tek görsel: kontroller gizli --------------------------------- */
.service-gallery.is-single .service-gallery__nav,
.service-gallery.is-single .service-gallery__dots,
.service-gallery.is-single .service-gallery__count {
    display: none;
}

/* --- Hareketi azalt tercihi --------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    .service-gallery__track { transition: none; }
}

/* Masaüstünde orijinal "yapışkan" (sticky) davranışı koru: galeri
   position:relative olduğundan, .service-detail__media'nın sticky kuralını
   daha yüksek özgüllükle burada geri veriyoruz (mobilde relative kalır). */
@media (min-width: 900px) {
    .service-detail__media.service-gallery {
        position: sticky;
        top: calc(var(--header-h) + var(--space-5));
    }
}
