/* Baykuş Akademi — menü altı hareketli fotoğraf galerisi */

.photo-gallery {
  position: relative;
  padding: 1.1rem 0 0.4rem;
}

.photo-gallery[hidden],
.photo-gallery-arrow[hidden],
.photo-gallery-dots[hidden],
.gallery-lightbox-button[hidden] {
  display: none;
}

.photo-gallery.is-static .photo-gallery-track {
  justify-content: center;
}

.photo-gallery-inner {
  position: relative;
}

.photo-gallery-frame {
  position: relative;
  padding: 0.85rem;
  border-radius: var(--radius-xl);
  border: 1px solid rgba(255, 255, 255, 0.74);
  background: rgba(252, 247, 239, 0.76);
  box-shadow: var(--shadow-soft);
}

.photo-gallery-viewport {
  --per-view: 4;
  --gap: 0.85rem;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
  border-radius: var(--radius-lg);
  outline: none;
  -webkit-overflow-scrolling: touch;
}

.photo-gallery-viewport::-webkit-scrollbar {
  display: none;
}

.photo-gallery-viewport:focus-visible {
  box-shadow: 0 0 0 3px rgba(199, 155, 71, 0.55);
}

.photo-gallery-track {
  display: flex;
  gap: var(--gap);
  margin: 0;
  padding: 0;
  list-style: none;
}

.photo-gallery-slide {
  flex: 0 0 calc((100% - (var(--per-view) - 1) * var(--gap)) / var(--per-view));
  scroll-snap-align: start;
  min-width: 0;
}

.photo-gallery-card {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: var(--sand);
  cursor: zoom-in;
  box-shadow: 0 10px 24px rgba(17, 24, 22, 0.08);
  transition: transform 260ms ease, box-shadow 260ms ease;
}

.photo-gallery-card img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 1122 / 1402;
  object-fit: cover;
  transition: transform 600ms ease;
}

.photo-gallery-card:hover,
.photo-gallery-card:focus-visible {
  transform: translateY(-3px);
  box-shadow: 0 18px 36px rgba(17, 24, 22, 0.14);
}

.photo-gallery-card:hover img {
  transform: scale(1.03);
}

.photo-gallery-card:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.photo-gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 3;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.9rem;
  height: 2.9rem;
  padding: 0;
  border: 1px solid rgba(16, 63, 60, 0.16);
  border-radius: 50%;
  background: rgba(255, 253, 249, 0.92);
  color: var(--forest);
  box-shadow: var(--shadow-soft);
  cursor: pointer;
  transform: translateY(-50%);
  transition: background-color 180ms ease, color 180ms ease, transform 180ms ease;
}

.photo-gallery-arrow:hover,
.photo-gallery-arrow:focus-visible {
  background: var(--forest);
  color: #f5fbfa;
}

.photo-gallery-arrow:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.photo-gallery-arrow svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.photo-gallery-arrow[data-gallery-prev] {
  left: -0.4rem;
}

.photo-gallery-arrow[data-gallery-next] {
  right: -0.4rem;
}

.photo-gallery-dots {
  display: flex;
  justify-content: center;
  gap: 0.45rem;
  margin-top: 0.8rem;
}

.photo-gallery-dot {
  width: 0.55rem;
  height: 0.55rem;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: rgba(16, 63, 60, 0.2);
  cursor: pointer;
  transition: width 240ms ease, background-color 240ms ease;
}

.photo-gallery-dot[aria-current="true"] {
  width: 1.6rem;
  background: var(--gold);
}

.photo-gallery-dot:focus-visible {
  outline: 2px solid var(--forest);
  outline-offset: 2px;
}

/* Büyütülmüş görünüm */
.gallery-lightbox {
  width: 100vw;
  max-width: 100vw;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
  color: #f5fbfa;
}

.gallery-lightbox::backdrop {
  background: rgba(11, 46, 43, 0.9);
  backdrop-filter: blur(6px);
}

.gallery-lightbox-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 3.8rem 4.5rem 2.8rem;
  box-sizing: border-box;
}

.gallery-lightbox-image {
  display: block;
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-strong);
  user-select: none;
}

.gallery-lightbox-counter {
  position: absolute;
  bottom: 0.9rem;
  left: 50%;
  transform: translateX(-50%);
  font-family: var(--font-heading);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--gold-soft);
}

.gallery-lightbox-button {
  position: absolute;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 3rem;
  height: 3rem;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, 0.24);
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.1);
  color: #f5fbfa;
  cursor: pointer;
  transition: background-color 180ms ease;
}

.gallery-lightbox-button:hover,
.gallery-lightbox-button:focus-visible {
  background: rgba(255, 255, 255, 0.24);
}

.gallery-lightbox-button:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

.gallery-lightbox-button svg {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.gallery-lightbox-close {
  top: 0.8rem;
  right: 0.8rem;
}

.gallery-lightbox-prev,
.gallery-lightbox-next {
  top: 50%;
  transform: translateY(-50%);
}

.gallery-lightbox-prev {
  left: 0.8rem;
}

.gallery-lightbox-next {
  right: 0.8rem;
}

body.gallery-lightbox-open {
  overflow: hidden;
}

@media (max-width: 1100px) {
  .photo-gallery-viewport {
    --per-view: 3;
  }
}

@media (max-width: 820px) {
  .photo-gallery-viewport {
    --per-view: 2;
    --gap: 0.7rem;
  }

  .photo-gallery-frame {
    padding: 0.7rem;
    border-radius: 26px;
  }
}

@media (max-width: 620px) {
  .photo-gallery {
    padding-top: 0.8rem;
  }

  .photo-gallery-arrow {
    width: 2.5rem;
    height: 2.5rem;
  }

  .photo-gallery-arrow[data-gallery-prev] {
    left: 0.2rem;
  }

  .photo-gallery-arrow[data-gallery-next] {
    right: 0.2rem;
  }

  .gallery-lightbox-stage {
    padding: 3.8rem 0.6rem 3.4rem;
  }

  .gallery-lightbox-prev,
  .gallery-lightbox-next {
    top: auto;
    bottom: 0.4rem;
    transform: none;
    width: 2.6rem;
    height: 2.6rem;
  }
}

@media (max-width: 480px) {
  .photo-gallery-viewport {
    --per-view: 1.35;
  }
}

@media (prefers-reduced-motion: reduce) {
  .photo-gallery-card,
  .photo-gallery-card img,
  .photo-gallery-dot {
    transition: none;
  }
}
