/* En Baba Organizasyon - turist rehberi galeri deneyimi
   Google İşletme görsel vitrinine benzer: solda seçilebilir kareler, sağda büyük medya sahnesi. */

section#galeri .enb-gallery[data-gallery]{
  --enb-guide-gallery-radius:30px;
  --enb-guide-gallery-thumb-radius:18px;
  display:grid !important;
  grid-template-columns:minmax(220px,280px) minmax(0,1fr) !important;
  gap:14px !important;
  align-items:stretch !important;
  width:min(100%,1120px);
  margin-inline:auto;
  padding:14px !important;
  border:1px solid rgba(15,23,42,.10) !important;
  border-radius:var(--enb-guide-gallery-radius) !important;
  background:linear-gradient(135deg,rgba(255,255,255,.96),rgba(248,250,252,.98)) !important;
  box-shadow:0 24px 70px rgba(15,23,42,.12) !important;
  contain:layout paint;
}

section#galeri .enb-gallery-stage{
  order:2 !important;
  position:relative !important;
  min-width:0;
  min-height:clamp(340px,42vw,590px) !important;
  height:clamp(340px,42vw,590px) !important;
  overflow:hidden !important;
  border:1px solid rgba(2,6,23,.14) !important;
  border-radius:calc(var(--enb-guide-gallery-radius) - 8px) !important;
  background:#050505 !important;
  box-shadow:0 18px 44px rgba(2,6,23,.18) !important;
  isolation:isolate;
}

section#galeri .enb-gallery-stage::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:linear-gradient(180deg,rgba(0,0,0,.28),transparent 34%,transparent 68%,rgba(0,0,0,.35));
}

section#galeri .enb-gallery-stage__media{
  display:block !important;
  width:100% !important;
  height:100% !important;
  min-height:100% !important;
  aspect-ratio:auto !important;
  background:#050505 !important;
}

section#galeri .enb-gallery-stage__media img,
section#galeri .enb-gallery-stage__media video{
  display:block !important;
  width:100% !important;
  height:100% !important;
  min-height:100% !important;
  object-fit:cover !important;
  object-position:center !important;
  background:#050505 !important;
}

section#galeri .enb-gallery-stage__count{
  right:14px !important;
  bottom:14px !important;
  z-index:4 !important;
  padding:7px 12px !important;
  border:1px solid rgba(255,255,255,.24) !important;
  border-radius:999px !important;
  background:rgba(0,0,0,.64) !important;
  color:#fff !important;
  font-size:12px !important;
  font-weight:900 !important;
  letter-spacing:.01em;
  box-shadow:0 12px 30px rgba(0,0,0,.24);
  backdrop-filter:blur(10px);
}

section#galeri .enb-gallery-open{
  position:absolute;
  left:14px;
  bottom:14px;
  z-index:4;
  display:inline-flex;
  align-items:center;
  gap:8px;
  min-height:36px;
  padding:8px 12px;
  border:1px solid rgba(255,255,255,.26);
  border-radius:999px;
  background:rgba(255,255,255,.94);
  color:#0f172a;
  font-size:12px;
  font-weight:900;
  line-height:1;
  box-shadow:0 14px 36px rgba(0,0,0,.22);
  cursor:pointer;
  backdrop-filter:blur(10px);
}

section#galeri .enb-gallery-open::before{
  content:"▣";
  font-size:13px;
  line-height:1;
}

section#galeri .enb-gallery-open:focus-visible,
section#galeri .enb-gallery-thumb:focus-visible{
  outline:3px solid rgba(37,99,235,.40) !important;
  outline-offset:3px;
}

section#galeri .enb-gallery-track{
  order:1 !important;
  display:grid !important;
  grid-template-columns:repeat(2,minmax(0,1fr)) !important;
  grid-auto-rows:minmax(106px,1fr) !important;
  align-content:start !important;
  gap:8px !important;
  height:clamp(340px,42vw,590px) !important;
  max-height:clamp(340px,42vw,590px) !important;
  overflow-x:hidden !important;
  overflow-y:auto !important;
  padding:0 4px 0 0 !important;
  border:0 !important;
  background:transparent !important;
  scroll-snap-type:y proximity;
  -webkit-overflow-scrolling:touch;
}

section#galeri .enb-gallery-track::-webkit-scrollbar{width:7px !important;height:7px !important;}
section#galeri .enb-gallery-track::-webkit-scrollbar-track{background:rgba(15,23,42,.05);border-radius:999px;}
section#galeri .enb-gallery-track::-webkit-scrollbar-thumb{background:rgba(15,23,42,.22);border-radius:999px;}

section#galeri .enb-gallery-thumb{
  position:relative !important;
  display:block !important;
  width:auto !important;
  min-width:0 !important;
  max-width:none !important;
  min-height:106px !important;
  height:100% !important;
  flex:none !important;
  padding:0 !important;
  border:0 !important;
  border-radius:var(--enb-guide-gallery-thumb-radius) !important;
  background:#0f172a !important;
  cursor:pointer !important;
  overflow:hidden !important;
  scroll-snap-align:start;
  box-shadow:0 12px 26px rgba(15,23,42,.12) !important;
  transform:translateZ(0);
}

section#galeri .enb-gallery-thumb:first-child{
  grid-column:span 2;
  min-height:128px !important;
}

section#galeri .enb-gallery-thumb:nth-child(4){
  grid-row:span 2;
}

section#galeri .enb-gallery-thumb__img{
  position:absolute !important;
  inset:0;
  display:block !important;
  width:100% !important;
  height:100% !important;
  min-height:100% !important;
  aspect-ratio:auto !important;
  border:0 !important;
  border-radius:inherit !important;
  background-size:cover !important;
  background-position:center !important;
  background-repeat:no-repeat !important;
  box-shadow:none !important;
  transition:transform .24s ease, filter .24s ease, opacity .24s ease;
}

section#galeri .enb-gallery-thumb::after{
  content:"";
  position:absolute;
  inset:0;
  border:2px solid transparent;
  border-radius:inherit;
  background:linear-gradient(180deg,transparent 46%,rgba(0,0,0,.38));
  pointer-events:none;
  transition:border-color .2s ease, background .2s ease;
}

section#galeri .enb-gallery-thumb:hover .enb-gallery-thumb__img,
section#galeri .enb-gallery-thumb:focus-visible .enb-gallery-thumb__img{
  transform:scale(1.045);
}

section#galeri .enb-gallery-thumb.is-active::after{
  border-color:#2563eb;
  background:linear-gradient(180deg,rgba(37,99,235,.10),rgba(0,0,0,.30));
}

section#galeri .enb-gallery-thumb.is-active .enb-gallery-thumb__img{
  filter:saturate(1.08) contrast(1.04);
}

section#galeri .enb-gallery-thumb__badge{
  position:absolute !important;
  left:8px !important;
  bottom:8px !important;
  z-index:3 !important;
  display:inline-flex;
  align-items:center;
  min-height:24px;
  padding:5px 9px !important;
  border:1px solid rgba(255,255,255,.22);
  border-radius:999px !important;
  background:rgba(0,0,0,.68) !important;
  color:#fff !important;
  font-size:11px !important;
  font-weight:900 !important;
  line-height:1;
  backdrop-filter:blur(8px);
}

.enb-tour-gallery-open{overflow:hidden !important;}

.enb-tour-gallery-modal{
  position:fixed;
  inset:0;
  z-index:99999;
  display:grid;
  place-items:center;
  padding:20px;
  background:rgba(2,6,23,.82);
  backdrop-filter:blur(12px);
}

.enb-tour-gallery-modal[hidden]{display:none !important;}

.enb-tour-gallery-modal__dialog{
  position:relative;
  display:grid;
  grid-template-rows:minmax(0,1fr) auto;
  width:min(100%,1120px);
  max-height:min(88vh,820px);
  overflow:hidden;
  border:1px solid rgba(255,255,255,.14);
  border-radius:28px;
  background:#050505;
  color:#fff;
  box-shadow:0 36px 110px rgba(0,0,0,.45);
}

.enb-tour-gallery-modal__media{
  display:grid;
  place-items:center;
  min-height:min(64vh,620px);
  background:#050505;
}

.enb-tour-gallery-modal__media img,
.enb-tour-gallery-modal__media video{
  display:block;
  width:100%;
  height:100%;
  max-height:calc(88vh - 92px);
  object-fit:contain;
  background:#050505;
}

.enb-tour-gallery-modal__bar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:14px 18px;
  background:rgba(0,0,0,.72);
  border-top:1px solid rgba(255,255,255,.12);
}

.enb-tour-gallery-modal__caption{
  margin:0;
  color:#fff;
  font-size:14px;
  font-weight:850;
  line-height:1.45;
}

.enb-tour-gallery-modal__count{
  color:rgba(255,255,255,.72);
  font-size:12px;
  font-weight:850;
  white-space:nowrap;
}

.enb-tour-gallery-modal__close,
.enb-tour-gallery-modal__nav{
  position:absolute;
  z-index:3;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.20);
  background:rgba(15,23,42,.70);
  color:#fff;
  box-shadow:0 12px 30px rgba(0,0,0,.25);
  cursor:pointer;
  backdrop-filter:blur(10px);
}

.enb-tour-gallery-modal__close{
  top:14px;
  right:14px;
  width:42px;
  height:42px;
  border-radius:999px;
  font-size:26px;
  line-height:1;
}

.enb-tour-gallery-modal__nav{
  top:50%;
  width:46px;
  height:64px;
  border-radius:999px;
  transform:translateY(-50%);
  font-size:30px;
  line-height:1;
}

.enb-tour-gallery-modal__nav--prev{left:14px;}
.enb-tour-gallery-modal__nav--next{right:14px;}

.enb-tour-gallery-modal__close:focus-visible,
.enb-tour-gallery-modal__nav:focus-visible{
  outline:3px solid rgba(255,255,255,.42);
  outline-offset:3px;
}

@media (max-width:900px){
  section#galeri .enb-gallery[data-gallery]{
    grid-template-columns:1fr !important;
    gap:10px !important;
    padding:10px !important;
    border-radius:24px !important;
  }
  section#galeri .enb-gallery-stage{
    order:1 !important;
    height:clamp(250px,62vw,420px) !important;
    min-height:clamp(250px,62vw,420px) !important;
    border-radius:20px !important;
  }
  section#galeri .enb-gallery-track{
    order:2 !important;
    display:flex !important;
    height:auto !important;
    max-height:none !important;
    overflow-x:auto !important;
    overflow-y:hidden !important;
    padding:2px 2px 8px !important;
    scroll-snap-type:x mandatory;
  }
  section#galeri .enb-gallery-thumb,
  section#galeri .enb-gallery-thumb:first-child,
  section#galeri .enb-gallery-thumb:nth-child(4){
    flex:0 0 112px !important;
    width:112px !important;
    min-width:112px !important;
    max-width:112px !important;
    height:92px !important;
    min-height:92px !important;
    grid-column:auto;
    grid-row:auto;
    border-radius:16px !important;
  }
  section#galeri .enb-gallery-open{
    left:10px;
    bottom:10px;
    min-height:34px;
    padding:7px 10px;
    font-size:11px;
  }
  section#galeri .enb-gallery-stage__count{
    right:10px !important;
    bottom:10px !important;
  }
}

@media (max-width:560px){
  section#galeri .enb-gallery[data-gallery]{
    margin-inline:-2px;
    border-radius:20px !important;
  }
  section#galeri .enb-gallery-stage{
    height:240px !important;
    min-height:240px !important;
    border-radius:18px !important;
  }
  section#galeri .enb-gallery-thumb,
  section#galeri .enb-gallery-thumb:first-child,
  section#galeri .enb-gallery-thumb:nth-child(4){
    flex-basis:96px !important;
    width:96px !important;
    min-width:96px !important;
    max-width:96px !important;
    height:78px !important;
    min-height:78px !important;
  }
  .enb-tour-gallery-modal{
    padding:10px;
  }
  .enb-tour-gallery-modal__dialog{
    border-radius:20px;
    max-height:90vh;
  }
  .enb-tour-gallery-modal__media{
    min-height:58vh;
  }
  .enb-tour-gallery-modal__bar{
    align-items:flex-start;
    flex-direction:column;
    gap:5px;
    padding:12px 14px;
  }
  .enb-tour-gallery-modal__nav{
    width:40px;
    height:54px;
    font-size:24px;
  }
}
