/* sp-common-gallery-system */
/*
 * Portal Ortak Galeri Sistemi
 * Kapsam: yalnız public galeri görünümü.
 * Diğer modül ayarlarına, tipografiye, renklere, kartlara veya işleyişe dokunmaz.
 */

/* JS tarafından ortaklaştırılan bütün galeri konteynerleri. */
body:not(.wp-admin) .sp-common-gallery{
  display:grid!important;
  grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr)!important;
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
  grid-auto-flow:row!important;
  gap:6px!important;
  width:100%!important;
  height:480px!important;
  min-height:0!important;
  max-height:480px!important;
  overflow:hidden!important;
  align-items:stretch!important;
  align-content:stretch!important;
}

/* Ortak galeri öğeleri: başlık/caption yüksekliği mozaiği bozamaz. */
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item{
  position:relative!important;
  display:block!important;
  min-width:0!important;
  min-height:0!important;
  width:100%!important;
  height:100%!important;
  margin:0!important;
  padding:0!important;
  overflow:hidden!important;
  border-radius:10px!important;
  grid-column:auto!important;
  grid-row:auto!important;
  aspect-ratio:auto!important;
}

/* Ana görsel: sol blok, iki satırı kaplar. */
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item:nth-child(1){
  grid-column:1!important;
  grid-row:1 / span 2!important;
}
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item:nth-child(2){grid-column:2!important;grid-row:1!important}
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item:nth-child(3){grid-column:3!important;grid-row:1!important}
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item:nth-child(4){grid-column:2!important;grid-row:2!important}
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item:nth-child(5){grid-column:3!important;grid-row:2!important}

/* Her türde gerçek medya, kendi oranı ne olursa olsun alanı doldurur. */
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item :is(img,video),
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item > :is(img,video),
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item > :is(a,button) :is(img,video){
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-width:100%!important;
  min-height:100%!important;
  max-width:none!important;
  max-height:none!important;
  object-fit:cover!important;
  object-position:center!important;
}

/* Link / buton sarmalayıcıları da kartı tamamen doldurur. */
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item > :is(a,button),
body:not(.wp-admin) .sp-common-gallery > :is(a,button).sp-common-gallery-item{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:100%!important;
  padding:0!important;
  margin:0!important;
  overflow:hidden!important;
  border:0!important;
}

/* Galeri kartına ait açıklamalar mozaiğin ölçüsünü büyütmesin. Lightbox/veri korunur. */
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item > :is(figcaption,.spmg-caption){display:none!important}

/* 5'ten sonrası ilk ekranda görünmez; lightbox öğeleri DOM'da kalır. */
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-hidden{display:none!important}

/* Fazla görsel sayacı. */
body:not(.wp-admin) .sp-common-gallery-more{
  position:absolute!important;
  inset:0!important;
  z-index:20!important;
  display:grid!important;
  place-items:center!important;
  pointer-events:none!important;
  background:rgba(10,18,28,.58)!important;
  color:#fff!important;
  font-size:clamp(22px,3vw,34px)!important;
  line-height:1!important;
  font-weight:900!important;
  letter-spacing:-.02em!important;
}

/* Tek görsel: alanın tamamını dolduran tek kapak. */
body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="1"]{
  display:block!important;
  height:480px!important;
  max-height:480px!important;
}
body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="1"] > .sp-common-gallery-item:first-child{
  display:block!important;
  width:100%!important;
  height:100%!important;
  min-height:100%!important;
  grid-column:auto!important;
  grid-row:auto!important;
}

/* 2 görsel: ana görsel + sağda tam yüksek ikinci görsel. */
body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="2"]{
  grid-template-columns:minmax(0,2fr) minmax(0,1fr)!important;
}
body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="2"] > .sp-common-gallery-item:nth-child(2){
  grid-column:2!important;
  grid-row:1 / span 2!important;
}

/* 3 görsel: ana görsel + sağda üst/alt iki görsel. */
body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="3"]{
  grid-template-columns:minmax(0,2fr) minmax(0,1fr)!important;
}
body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="3"] > .sp-common-gallery-item:nth-child(2){grid-column:2!important;grid-row:1!important}
body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="3"] > .sp-common-gallery-item:nth-child(3){grid-column:2!important;grid-row:2!important}

/* 4 görsel: ana görsel + sağ üstte iki, altta tek tam genişlik. */
body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="4"] > .sp-common-gallery-item:nth-child(4){
  grid-column:2 / span 2!important;
  grid-row:2!important;
}

/* Mobil: ana görsel üstte, küçükler 2x2; hiçbir boş hücre yok. */
@media (max-width:767px){
  body:not(.wp-admin) .sp-common-gallery,
  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="2"],
  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="3"],
  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="4"]{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:auto!important;
    grid-auto-rows:auto!important;
    height:auto!important;
    max-height:none!important;
    gap:4px!important;
  }

  body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item,
  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="2"] > .sp-common-gallery-item:nth-child(2),
  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="3"] > .sp-common-gallery-item:nth-child(2),
  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="3"] > .sp-common-gallery-item:nth-child(3),
  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="4"] > .sp-common-gallery-item:nth-child(4){
    grid-column:auto!important;
    grid-row:auto!important;
    aspect-ratio:1/1!important;
    height:auto!important;
    min-height:0!important;
  }

  body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item:first-child{
    grid-column:1 / -1!important;
    grid-row:auto!important;
    aspect-ratio:16/9!important;
    height:auto!important;
  }

  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="1"]{
    display:block!important;
    height:auto!important;
    max-height:none!important;
  }
  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="1"] > .sp-common-gallery-item:first-child{
    aspect-ratio:16/9!important;
    height:auto!important;
  }

  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="2"] > .sp-common-gallery-item:nth-child(2){
    grid-column:1 / -1!important;
    aspect-ratio:16/9!important;
  }

  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="3"] > .sp-common-gallery-item:nth-child(2),
  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="3"] > .sp-common-gallery-item:nth-child(3){
    grid-column:auto!important;
    aspect-ratio:1/1!important;
  }

  body:not(.wp-admin) .sp-common-gallery[data-sp-common-count="4"] > .sp-common-gallery-item:nth-child(4){
    grid-column:1 / -1!important;
    aspect-ratio:16/9!important;
  }
}


/* Çoklu galeri sağlamlaştırma.
   Eski modüllerdeki yüksek özgüllüklü grid kurallarını yalnız ortak galeri
   etkin olduğunda kesin olarak geçersiz kılar. Diğer görünümlere dokunmaz. */
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item.sp-common-gallery-hidden,
body:not(.wp-admin) .sp-common-gallery > .sp-common-gallery-item[data-sp-common-hidden="1"],
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item.sp-common-gallery-hidden,
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item[data-sp-common-hidden="1"]{
  display:none!important;
  width:0!important;
  height:0!important;
  min-width:0!important;
  min-height:0!important;
  margin:0!important;
  padding:0!important;
}

/* Firma / seri ilan / etkinlik detayındaki eski mobil galeri kurallarını
   ortak 1 büyük + 4 küçük düzene sabitle. */
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery{
  display:grid!important;
  grid-template-columns:minmax(0,2fr) minmax(0,1fr) minmax(0,1fr)!important;
  grid-template-rows:repeat(2,minmax(0,1fr))!important;
  grid-auto-rows:0!important;
  height:480px!important;
  min-height:0!important;
  max-height:480px!important;
  gap:6px!important;
  overflow:hidden!important;
}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item{
  width:100%!important;
  height:100%!important;
  min-height:0!important;
  aspect-ratio:auto!important;
  margin:0!important;
}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item:nth-child(1){grid-column:1!important;grid-row:1 / span 2!important}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item:nth-child(2){grid-column:2!important;grid-row:1!important}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item:nth-child(3){grid-column:3!important;grid-row:1!important}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item:nth-child(4){grid-column:2!important;grid-row:2!important}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item:nth-child(5){grid-column:3!important;grid-row:2!important}

/* 1 ve 2 fotoğraflı detay galerilerinde boş mozaik hücresi kalmaz. */
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery[data-sp-common-count="1"]{grid-template-columns:minmax(0,1fr)!important;grid-template-rows:minmax(0,1fr)!important}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery[data-sp-common-count="1"] > .sp-common-gallery-item:nth-child(1){grid-column:1!important;grid-row:1!important}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery[data-sp-common-count="2"]{grid-template-columns:repeat(2,minmax(0,1fr))!important;grid-template-rows:minmax(0,1fr)!important}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery[data-sp-common-count="2"] > .sp-common-gallery-item:nth-child(1){grid-column:1!important;grid-row:1!important}
body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery[data-sp-common-count="2"] > .sp-common-gallery-item:nth-child(2){grid-column:2!important;grid-row:1!important}

@media (max-width:767px){
  body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    grid-template-rows:auto!important;
    grid-auto-rows:auto!important;
    height:auto!important;
    max-height:none!important;
    gap:4px!important;
  }
  body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item{
    grid-column:auto!important;
    grid-row:auto!important;
    aspect-ratio:1/1!important;
    height:auto!important;
  }
  body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery > .sp-common-gallery-item:first-child{
    grid-column:1/-1!important;
    grid-row:auto!important;
    aspect-ratio:16/9!important;
  }
  body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery[data-sp-common-count="2"] > .sp-common-gallery-item:nth-child(2){
    grid-column:1/-1!important;
    aspect-ratio:16/9!important;
  }
  body:is(.single-sp_directory,.single-sp_classified,.single-sp_event):not(.wp-admin) .sp-dir-webpage .sp-dir-gallery.sp-dir-gallery-mosaic.sp-common-gallery[data-sp-common-count="4"] > .sp-common-gallery-item:nth-child(4){
    grid-column:1/-1!important;
    aspect-ratio:16/9!important;
  }
}

/* sp-dark-mode-repair-1046 */
/*
 * Koyu tema okunabilirlik onarımı
 *
 * Kontrast taraması (28 sayfa, masaüstü + mobil) ile bulunan, açık tema için sabit yazılmış
 * zemin/yazı renklerinin koyu temada okunmaz kalan bileşenleri. Kurallar yalnız
 * html[data-sp-theme="dark"] altında çalışır; açık tema DEĞİŞMEZ (404 düğmesi hariç, o iki temada da hatalıydı).
 * Renkler Görünüm Ayarları › Koyu Tema değişkenlerinden gelir.
 */

/* --- İki tema: 404 "Ana Sayfaya Dön" düğmesi kırmızı zemin üstünde kırmızı yazıydı. --- */
html body:not(.wp-admin) .sp-error-page a.sp-button,
html body:not(.wp-admin) .sp-error-page a.sp-button:visited{color:#fff!important}

/* --- Footer: Kolay Ulaşım menüsü bağlantıları ve başlığı (açık kutu üstünde açık yazı). --- */
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-app-footer .sp-footer-menu-list a{
  background:var(--sp-ui-surface-soft,#17263A)!important;
  color:var(--sp-text,#F8FAFC)!important;
  border-color:var(--sp-border,#40516A)!important;
}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-app-footer .sp-footer-menu-list a:hover,
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-app-footer .sp-footer-menu-list a:focus-visible{color:#fff!important;border-color:var(--sp-footer-hover,#A51D31)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-app-footer .sp-footer-access-hub-title,
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-app-footer .sp-footer-panel-heading{
  background:var(--sp-ui-surface-soft,#17263A)!important;
  color:var(--sp-heading,#FFFFFF)!important;
  border-color:var(--sp-border,#40516A)!important;
}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-app-footer .sp-footer-panel-heading :is(strong,span,h2,h3){color:var(--sp-heading,#FFFFFF)!important}

/* --- İçerik metni: Hesabım/uygulama görünümünün açık tema metin rengi koyu temaya taşıyordu. --- */
html[data-sp-theme="dark"] body:not(.wp-admin) :is(.sp-entry-content,.entry-content),
html[data-sp-theme="dark"] body:not(.wp-admin) :is(.sp-entry-content,.entry-content) :is(p,li,dd,dt,blockquote){color:var(--sp-text,#F8FAFC)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) :is(.sp-entry-content,.entry-content) a:not(.button):not(.sp-button){color:color-mix(in srgb,var(--sp-link,#A51D31) 45%,#ffffff)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) :is(.sp-entry-content,.entry-content) a.button{color:#fff!important;background:var(--sp-primary,#A51D31)!important;border-color:var(--sp-primary,#A51D31)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-preferred-source :is(strong,h2,h3){color:var(--sp-heading,#FFFFFF)!important}

/* --- Açık zemini sabit kalmış kutular: zemin koyu yüzeye, yazı açık renge. --- */
html[data-sp-theme="dark"] body:not(.wp-admin) :is(
  .sp-sport-subhead,
  .sp-discover-all-link,.sp-discover-stat,
  .sp-kent-app-shell,.sp-kent-directory-all,
  .sp-values-card,
  .sp-social-share.sp-social-share-global,
  .sp-place-route-facts > div){
  background-color:var(--sp-ui-surface-soft,#17263A)!important;
  color:var(--sp-text,#F8FAFC)!important;
  border-color:var(--sp-border,#40516A)!important;
}
html[data-sp-theme="dark"] body:not(.wp-admin) :is(.sp-kent-app-shell,.sp-values-card,.sp-social-share.sp-social-share-global) :is(h2,h3,h3 a,strong){color:var(--sp-heading,#FFFFFF)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) :is(.sp-kent-app-shell,.sp-sport-subhead,.sp-place-route-facts > div) :is(p,span,small,strong){color:var(--sp-text,#F8FAFC)!important}


/* --- Koyu zemin üstünde fazla koyu kalan yazılar. --- */
html[data-sp-theme="dark"] body:not(.wp-admin) .spmc-event-card :is(h3,h3 a){color:var(--sp-heading,#FFFFFF)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-dir-rating-field :is(span,label){color:var(--sp-muted,#CBD5E1)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-kr-link{color:#8CC4FF!important}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-kr-content-card span{color:#FF8E9C!important}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-mobile-bottom-nav :is(.is-active,[aria-current="page"]) .sp-mobile-nav-label{color:color-mix(in srgb,var(--sp-mobile-nav-active,#A51D31) 45%,#ffffff)!important}

/* --- Kent Bilgi: bölüm içindeki kurum / acil / rehber kartları ve üst etiketler beyaz kalıyordu. --- */
html[data-sp-theme="dark"] body:not(.wp-admin) :is(.sp-kent-app-card,.sp-kent-official-card,.sp-kent-emergency-card,.sp-kent-directory-card,.sp-kent-app-group-head,.sp-kent-directory-count,.sp-kent-eyebrow){
  background-color:var(--sp-ui-surface-soft,#17263A)!important;
  background-image:none!important;
  color:var(--sp-text,#F8FAFC)!important;
  border-color:var(--sp-border,#40516A)!important;
}
html[data-sp-theme="dark"] body:not(.wp-admin) :is(.sp-kent-app-card,.sp-kent-official-card,.sp-kent-emergency-card,.sp-kent-directory-card) :is(small,p,span:not([class*="icon"])){color:var(--sp-muted,#CBD5E1)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) :is(.sp-kent-app-icon,.sp-kent-directory-icon,.sp-kent-emergency-icon){background-color:rgba(255,255,255,.08)!important}

/* --- Kent Rehberi etiketleri, Spor alt başlıkları ve Değerler "Devamını Gör". --- */
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-kr-tag{background-color:rgba(8,17,31,.82)!important;color:#F8FAFC!important;border-color:var(--sp-border,#40516A)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-values-card :is(p,.sp-values-more){color:var(--sp-muted,#CBD5E1)!important}
html[data-sp-theme="dark"] body:not(.wp-admin) .sp-values-card .sp-values-more{color:color-mix(in srgb,var(--sp-primary,#A51D31) 40%,#ffffff)!important}

