/* Atılım Hizmet Galerileri - Frontend */
.ahg-gallery,
.ahg-gallery * {
  box-sizing: border-box;
}

.ahg-gallery {
  --ahg-aspect-ratio: 4 / 3;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  gap: 16px;
  width: 100%;
  align-items: start;
}

.ahg-gallery .ahg-item {
  position: relative !important;
  display: block !important;
  width: 100% !important;
  height: auto !important;
  aspect-ratio: var(--ahg-aspect-ratio) !important;
  min-width: 0 !important;
  min-height: 0 !important;
  max-width: none !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 0 !important;
  border-radius: 8px;
  overflow: hidden !important;
  background: #ececec;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  line-height: 0;
  vertical-align: top;
  isolation: isolate;
}

.ahg-gallery .ahg-item > .ahg-media,
.ahg-gallery .ahg-item > img.ahg-media,
.ahg-gallery .ahg-item > video.ahg-media {
  position: absolute !important;
  inset: 0 !important;
  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;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  object-fit: cover !important;
  transform-origin: center center;
  transition: transform .28s ease;
}

.ahg-gallery .ahg-item:hover > .ahg-media {
  transform: scale(1.025);
}

.ahg-gallery .ahg-item:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 2px;
}

.ahg-play {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.92);
  color: #111;
  font-size: 18px;
  line-height: 1;
  padding-left: 3px;
  box-shadow: 0 4px 20px rgba(0,0,0,.18);
}

.ahg-lightbox,
.ahg-lightbox * {
  box-sizing: border-box;
}

.ahg-lightbox {
  position: fixed;
  inset: 0;
  z-index: 999999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 28px 76px;
  background: rgba(0,0,0,.90);
}

.ahg-lightbox[hidden] {
  display: none !important;
}

.ahg-lightbox-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(1280px, 100%);
  height: min(92vh, 960px);
  max-width: 100%;
  max-height: 92vh;
}

.ahg-lightbox-content {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
}

.ahg-lightbox img,
.ahg-lightbox video {
  display: block;
  max-width: 100%;
  max-height: 88vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 2px;
}

.ahg-lightbox-close,
.ahg-lightbox-nav {
  border: 0;
  background: rgba(255,255,255,.96);
  color: #111;
  cursor: pointer;
  box-shadow: 0 4px 24px rgba(0,0,0,.22);
}

.ahg-lightbox-close {
  position: fixed;
  z-index: 3;
  right: 22px;
  top: 18px;
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  font-size: 27px;
  line-height: 1;
}

.ahg-lightbox-nav {
  position: fixed;
  z-index: 3;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  font-size: 38px;
  line-height: 1;
  padding: 0 0 5px;
}

.ahg-lightbox-nav[hidden],
.ahg-lightbox-counter[hidden] {
  display: none !important;
}

.ahg-lightbox-prev { left: 18px; }
.ahg-lightbox-next { right: 18px; }

.ahg-lightbox-close:hover,
.ahg-lightbox-nav:hover {
  background: #fff;
  transform-origin: center;
}

.ahg-lightbox-nav:hover {
  transform: translateY(-50%) scale(1.05);
}

.ahg-lightbox-close:focus-visible,
.ahg-lightbox-nav:focus-visible {
  outline: 3px solid #fff;
  outline-offset: 3px;
}

.ahg-lightbox-counter {
  position: fixed;
  left: 50%;
  bottom: 18px;
  transform: translateX(-50%);
  z-index: 3;
  min-width: 58px;
  padding: 7px 12px;
  border-radius: 999px;
  background: rgba(0,0,0,.58);
  color: #fff;
  text-align: center;
  font-size: 13px;
  line-height: 1.2;
  letter-spacing: .02em;
}

@media (max-width: 900px) {
  .ahg-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .ahg-gallery {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .ahg-lightbox {
    padding: 58px 12px 52px;
  }

  .ahg-lightbox-inner {
    width: 100%;
    height: 100%;
  }

  .ahg-lightbox-close {
    right: 12px;
    top: 10px;
    width: 38px;
    height: 38px;
  }

  .ahg-lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 33px;
    background: rgba(255,255,255,.88);
  }

  .ahg-lightbox-prev { left: 8px; }
  .ahg-lightbox-next { right: 8px; }
  .ahg-lightbox-counter { bottom: 10px; }
}
