.fotograflar-hero {
  background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
  padding: clamp(64px, 8vw, 92px) 0 clamp(56px, 7vw, 80px);
  text-align: center;
  color: #ffffff;
  position: relative;
  overflow: hidden;
}

.fotograflar-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 20%, rgba(220, 38, 38, 0.18), transparent 45%),
    radial-gradient(circle at 82% 80%, rgba(59, 130, 246, 0.2), transparent 42%);
  pointer-events: none;
}

.fotograflar-hero .container {
  position: relative;
  z-index: 1;
}

.fotograflar-hero h1 {
  font-size: clamp(34px, 6vw, 56px);
  font-weight: 900;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
  text-wrap: balance;
}

.fotograflar-hero p {
  color: #f8fafc;
  font-size: clamp(17px, 2.4vw, 26px);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: rgba(15, 23, 42, 0.45);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 999px;
  padding: 10px 22px;
  box-shadow: 0 14px 35px rgba(2, 6, 23, 0.35);
  text-wrap: balance;
}

.gallery-section {
  background: #f9fafb;
  padding: clamp(44px, 6vw, 64px) 0 clamp(64px, 9vw, 92px);
}

.gallery-section .section-title {
  width: auto;
  position: static;
  left: auto;
  right: auto;
  margin: 0 auto 14px;
  padding: 0;
  background: none;
  box-shadow: none;
  border: 0;
  color: #991b1b;
  text-transform: none;
  letter-spacing: 0;
  font-size: clamp(30px, 5vw, 46px);
}

.gallery-section .section-title::after {
  content: "";
  display: block;
  width: 90px;
  height: 4px;
  margin: 12px auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, #dc2626 0%, #991b1b 100%);
}

.gallery-intro {
  margin: 0 auto clamp(22px, 3.4vw, 34px);
  max-width: 760px;
  text-align: center;
  color: #475569;
  font-size: clamp(15px, 2vw, 17px);
  line-height: 1.8;
}

.photo-gallery {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: clamp(12px, 2vw, 20px);
}

.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  aspect-ratio: 4 / 3;
  cursor: pointer;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  border: 0;
  padding: 0;
  background: #111827;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.14);
  touch-action: manipulation;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.5s ease;
}

.gallery-caption {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.82));
  color: #ffffff;
  padding: 40px 16px 16px;
  font-size: 14px;
  font-weight: 600;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  text-align: left;
}

.gallery-item:hover .gallery-caption,
.gallery-item:focus-visible .gallery-caption {
  transform: translateY(0);
}

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

@media (hover: hover) {
  .gallery-item:hover {
    transform: scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
  }

  .gallery-item:hover img {
    transform: scale(1.1);
  }
}

@media (hover: none) {
  .gallery-caption {
    transform: translateY(0);
    padding: 26px 12px 12px;
    font-size: 13px;
  }
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  justify-content: center;
  align-items: center;
  padding:
    max(16px, env(safe-area-inset-top))
    max(16px, env(safe-area-inset-right))
    max(16px, env(safe-area-inset-bottom))
    max(16px, env(safe-area-inset-left));
}

.lightbox.active {
  display: flex;
}

.lightbox img {
  max-width: min(100%, 1200px);
  max-height: calc(100svh - 120px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: max(16px, env(safe-area-inset-top));
  right: max(16px, env(safe-area-inset-right));
  font-size: 40px;
  color: #ffffff;
  cursor: pointer;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  transition: all 0.3s ease;
  border: 0;
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 36px;
  line-height: 1;
  cursor: pointer;
  color: #ffffff;
  background: rgba(15, 23, 42, 0.75);
  transition: background 0.25s ease, transform 0.25s ease;
}

.lightbox-prev {
  left: max(14px, env(safe-area-inset-left));
}

.lightbox-next {
  right: max(14px, env(safe-area-inset-right));
}

.lightbox-nav:hover {
  background: rgba(220, 38, 38, 0.95);
  transform: translateY(-50%) scale(1.06);
}

.lightbox-nav:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 3px;
}

.lightbox-close:hover {
  background: rgba(220, 38, 38, 0.8);
  transform: rotate(90deg);
}

@media (max-width: 1200px) {
  .photo-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

  .fotograflar-hero {
    padding: 58px 0 52px;
  }

  .fotograflar-hero p {
    max-width: min(100%, 560px);
    width: 100%;
    justify-content: center;
    border-radius: 16px;
    padding: 10px 16px;
  }

  .gallery-section {
    padding: 40px 0 64px;
  }

  .lightbox img {
    max-height: calc(100svh - 140px);
  }
}

@media (max-width: 768px) {
  .fotograflar-hero h1 {
    font-size: clamp(30px, 9vw, 44px);
  }

  .gallery-section .section-title {
    font-size: clamp(28px, 8vw, 38px);
  }

  .lightbox {
    align-items: center;
    padding-bottom: max(16px, env(safe-area-inset-bottom));
  }

  .lightbox-nav {
    top: auto;
    bottom: max(16px, env(safe-area-inset-bottom));
    transform: none;
    width: 48px;
    height: 48px;
    font-size: 28px;
  }

  .lightbox-prev {
    left: max(16px, env(safe-area-inset-left));
  }

  .lightbox-next {
    right: max(16px, env(safe-area-inset-right));
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
    font-size: 34px;
    width: 44px;
    height: 44px;
  }

  .lightbox-nav:hover {
    transform: none;
  }
}

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

  .gallery-item {
    border-radius: 14px;
  }

  .gallery-caption {
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-item img,
  .gallery-caption,
  .lightbox-nav,
  .lightbox-close {
    transition: none;
  }
}
