/* =============================================
   HERYERPARKOUR — Photo Wall (Graffiti Duvarı)
   Polaroid kartlar, maskeleme bandı, sürükleme
   ============================================= */

.photo-section {
  background: var(--bg-wall);
  padding: 100px 0 120px;
  position: relative;
  overflow-x: clip;
  overflow-y: visible;
}

/* Brick texture */
.photo-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(0deg, transparent, transparent 48px, rgba(0, 0, 0, 0.15) 48px, rgba(0, 0, 0, 0.15) 50px),
    repeating-linear-gradient(90deg, transparent, transparent 98px, rgba(0, 0, 0, 0.08) 98px, rgba(0, 0, 0, 0.08) 100px);
  opacity: 0.5;
  pointer-events: none;
}

/* Graffiti paint splashes */
.photo-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 30% 40% at 10% 30%, rgba(255, 77, 0, 0.07) 0%, transparent 70%),
    radial-gradient(ellipse 25% 35% at 85% 20%, rgba(0, 229, 255, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 35% 25% at 50% 80%, rgba(198, 245, 38, 0.05) 0%, transparent 70%),
    radial-gradient(ellipse 20% 30% at 75% 70%, rgba(255, 45, 123, 0.06) 0%, transparent 70%),
    radial-gradient(ellipse 28% 20% at 20% 75%, rgba(245, 230, 66, 0.05) 0%, transparent 70%);
  pointer-events: none;
}

/* Transition from video dark */
.wall-transition {
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 120px;
  background: linear-gradient(180deg, var(--bg-dark), var(--bg-wall));
  z-index: 1;
  pointer-events: none;
}

.photo-section > .container {
  position: relative;
  z-index: 2;
}

.photo-header {
  margin-bottom: 48px;
  position: relative;
}

/* Title overrides */
.photo-title .letter {
  color: white !important;
  -webkit-text-fill-color: white !important;
}

.photo-title .letter.accent-letter {
  color: var(--accent) !important;
  -webkit-text-fill-color: var(--accent) !important;
}

.photo-title .letter.accent-letter.landed:hover {
  color: white !important;
  -webkit-text-fill-color: white !important;
  filter: drop-shadow(0 4px 16px rgba(255, 255, 255, 0.3));
}

.photo-title .letter.stroke-letter {
  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.5) !important;
  -webkit-text-fill-color: transparent !important;
}

.photo-section .sec-label { color: var(--lime); }

/* Ghost graffiti tag */
.wall-tag {
  position: absolute;
  right: -5%;
  top: -10px;
  font-family: var(--ff-handwrite);
  font-size: clamp(50px, 8vw, 110px);
  color: rgba(255, 77, 0, 0.06);
  transform: rotate(-8deg);
  pointer-events: none;
  line-height: 1;
  white-space: nowrap;
}

/* ===== WALL GALLERY — Scattered Cards ===== */
.wall-gallery {
  position: relative;
  height: 680px;
  /* 1920px baz: her iki yanda 150px sabit boşluk */
  margin: 24px 150px 0;
  width: calc(100% - 300px);
  z-index: 2;
}

/* ===== POLAROID CARD ===== */
.polaroid {
  position: absolute;
  cursor: grab;
  z-index: 2;
  user-select: none;
  opacity: 0;
  transition: opacity var(--duration-slow) var(--ease-out);
}

.polaroid.visible { opacity: 1; }
.polaroid:hover { z-index: 100 !important; }
.polaroid:active { cursor: grabbing; }

/* Frame — realistic photo paper with grain */
.pol-frame {
  position: relative;
  padding: 8px 8px 36px;
  background: #f0e8d8;
  background-image:
    url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)' opacity='0.05'/%3E%3C/svg%3E");
  transition: all 0.4s var(--ease-out);
  box-shadow:
    2px 3px 0 #d4c8b0,
    4px 6px 0 #c8bca4,
    3px 12px 24px rgba(0, 0, 0, 0.45),
    0 2px 6px rgba(0, 0, 0, 0.2);
}

/* Bottom edge slight darkening to imply thickness */
.pol-frame::after {
  content: '';
  display: block;
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 36px;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.03) 100%);
  pointer-events: none;
}

.polaroid:hover .pol-frame {
  box-shadow:
    2px 3px 0 #d4c8b0,
    8px 16px 40px rgba(0, 0, 0, 0.6),
    0 0 24px rgba(255, 77, 0, 0.07);
  transform: scale(1.04);
}

/* Image area */
.pol-img {
  width: 100%;
  aspect-ratio: 1;
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 0 3px rgba(0, 0, 0, 0.18);
}

/* Slight vignette on photo */
.pol-img::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, 0.12) 100%);
  z-index: 1;
  pointer-events: none;
}

.pol-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: opacity 0.4s ease;
}

/* Gloss sweep on hover */
.pol-img::after {
  content: '';
  position: absolute;
  top: 0;
  left: -120%;
  width: 60%;
  height: 100%;
  background: linear-gradient(105deg, transparent 40%, rgba(255, 255, 255, 0.13) 45%, rgba(255, 255, 255, 0.13) 55%, transparent 60%);
  transition: left 0.55s var(--ease-out);
  z-index: 2;
}

.polaroid:hover .pol-img::after { left: 140%; }

/* Caption — hidden (JS renders no caption) */
.pol-caption { display: none; }

/* ===== TAPE — Realistic masking tape ===== */
.tape {
  position: absolute;
  z-index: 5;
  /* Semi-transparent tan tape with woven texture */
  background:
    repeating-linear-gradient(
      90deg,
      transparent,
      transparent 3px,
      rgba(0, 0, 0, 0.03) 3px,
      rgba(0, 0, 0, 0.03) 4px
    ),
    repeating-linear-gradient(
      0deg,
      transparent,
      transparent 2px,
      rgba(255, 255, 255, 0.06) 2px,
      rgba(255, 255, 255, 0.06) 3px
    ),
    rgba(218, 200, 158, 0.78);
  box-shadow:
    0 1px 3px rgba(0, 0, 0, 0.18),
    inset 0 1px 0 rgba(255, 255, 255, 0.25),
    inset 0 -1px 0 rgba(0, 0, 0, 0.1);
  /* Torn edges via mask */
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='30'%3E%3Cfilter id='tear'%3E%3CfeTurbulence baseFrequency='0.06 0.4' numOctaves='3' seed='2'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='3' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Crect width='100' height='30' filter='url(%23tear)'/%3E%3C/svg%3E");
  -webkit-mask-size: 100% 100%;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='100' height='30'%3E%3Cfilter id='tear'%3E%3CfeTurbulence baseFrequency='0.06 0.4' numOctaves='3' seed='2'/%3E%3CfeDisplacementMap in='SourceGraphic' scale='3' xChannelSelector='R' yChannelSelector='G'/%3E%3C/filter%3E%3Crect width='100' height='30' filter='url(%23tear)'/%3E%3C/svg%3E");
  mask-size: 100% 100%;
  height: 26px;
}

/* Top-center tape */
.tape-top {
  width: 82px;
  top: -12px;
  left: 50%;
  transform: translateX(-50%) rotate(var(--tape-rot, 2deg));
}

/* Corner tape — right */
.tape-corner {
  width: 62px;
  height: 22px;
  top: -9px;
  right: -14px;
  transform: rotate(var(--tape-rot, 32deg));
}

/* Corner tape — left */
.tape-corner.tape-left {
  right: auto;
  left: -14px;
  transform: rotate(var(--tape-rot, -32deg));
}

/* Hide legacy elements */
.pol-stripe,
.pol-corner,
.pol-bottom,
.pol-left,
.pol-print,
.pol-placeholder,
.pin { display: none; }

.pol-frame::before { display: none; }

/* Instagram link */
.insta-wall {
  text-align: center;
  margin-top: 60px;
  position: relative;
}

.insta-wall a {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 16px 40px;
  font-family: var(--ff-handwrite);
  font-size: 20px;
  color: white;
  text-decoration: none;
  border: 2px solid rgba(255, 255, 255, 0.15);
  transition: all var(--duration-normal);
}

.insta-wall a:hover {
  border-color: var(--accent);
  color: var(--accent);
  transform: rotate(-1deg) scale(1.03);
}

/* ===== LIGHTBOX ===== */
.gal-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9000;
  background: rgba(0, 0, 0, 0.92);
  backdrop-filter: blur(10px);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.gal-lightbox.visible {
  opacity: 1;
  pointer-events: auto;
}

.gal-lb-inner {
  position: relative;
  max-width: min(85vw, 900px);
  max-height: 85vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
}

.gal-lb-img {
  max-width: 100%;
  max-height: calc(85vh - 60px);
  object-fit: contain;
  display: block;
  box-shadow: 0 30px 100px rgba(0, 0, 0, 0.7);
  transition: opacity 0.3s ease;
  border: 6px solid #f0e8d8;
}

.gal-lb-counter {
  font-family: var(--ff-heading);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 3px;
  color: rgba(255, 255, 255, 0.45);
  text-transform: uppercase;
}

/* Prev / Next buttons */
.gal-lb-prev,
.gal-lb-next {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 9001;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}

.gal-lb-prev {
  left: 20px;
  transform: translateY(-50%) scaleX(-1);
}

.gal-lb-next {
  right: 20px;
}

.gal-lb-prev:hover,
.gal-lb-next:hover {
  background: var(--accent);
  border-color: var(--accent);
}

/* Close button */
.gal-lb-close {
  position: fixed;
  top: 20px;
  right: 24px;
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: white;
  font-size: 18px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 9001;
  clip-path: polygon(10% 0, 100% 0, 90% 100%, 0 100%);
}

.gal-lb-close:hover {
  background: rgba(255, 77, 0, 0.7);
  border-color: var(--accent);
}

/* ===== RESPONSIVE ===== */

/* 1440px: margin biraz azalt */
@media (max-width: 1440px) {
  .wall-gallery {
    margin-left: 100px;
    margin-right: 100px;
    width: calc(100% - 200px);
  }
}

/* 1200px: daha az margin */
@media (max-width: 1200px) {
  .wall-gallery {
    margin-left: 60px;
    margin-right: 60px;
    width: calc(100% - 120px);
    height: 600px;
  }
}

/* Tablet */
@media (max-width: 1024px) {
  .wall-gallery {
    margin-left: 32px;
    margin-right: 32px;
    width: calc(100% - 64px);
    height: 540px;
  }
}

/* Mobil — grid layout */
@media (max-width: 768px) {
  .wall-gallery {
    min-height: auto;
    height: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    position: static;
    margin: 16px 16px 0;
    width: calc(100% - 32px);
  }

  .polaroid {
    position: relative !important;
    left: auto !important;
    top: auto !important;
    width: auto !important;
    opacity: 1;
  }

  /* Limit to 6 photos on mobile */
  .polaroid:nth-child(n+7) { display: none; }

  .polaroid:nth-child(odd)  { transform: rotate(-2deg); }
  .polaroid:nth-child(even) { transform: rotate(1.5deg); }

  .pol-frame { padding: 5px 5px 24px; }
  .pol-frame::after { height: 24px; }

  .photo-section { padding: 60px 0; }
  .wall-tag { display: none; }
  .insta-wall { margin-top: 32px; }

  .gal-lb-prev { left: 8px; }
  .gal-lb-next { right: 8px; }
  .gal-lb-img  { border-width: 4px; }
}
