/* ================================================================
   FOTOS DISTRIBUÍDAS — FalleN Tribute
   Fonte: HLTV.org | Fotógrafos: David Renger, Adela Sznajder,
   Stephanie Lindgren, Helena Kristiansson, ESL/BLAST/PGL/Valve
   ================================================================ */

/* ────────────────────────────────────────────────────────────────
   1. CRÉDITOS GLOBAIS — badge flutuante
   ──────────────────────────────────────────────────────────────── */
.photo-credit-badge {
  position: fixed;
  bottom: 18px;
  right: 18px;
  z-index: 9999;
  background: rgba(0, 0, 0, 0.75);
  backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 210, 0, 0.3);
  border-radius: 8px;
  padding: 7px 12px;
  font-size: 0.68rem;
  color: rgba(255,255,255,0.7);
  line-height: 1.4;
  pointer-events: none;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 0.4s, transform 0.4s;
  max-width: 240px;
}
.photo-credit-badge.visible {
  opacity: 1;
  transform: translateY(0);
}
.photo-credit-badge strong {
  color: #ffd200;
  font-weight: 600;
}

/* ────────────────────────────────────────────────────────────────
   2. FILM STRIP — fita de fotos no hero
   ──────────────────────────────────────────────────────────────── */
.film-strip-wrapper {
  position: absolute;
  bottom: 40px;
  left: 0;
  right: 0;
  width: 100%;
  overflow: hidden;
  z-index: 3;
  pointer-events: none;
  mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 10%, black 90%, transparent 100%);
}

.film-strip-track {
  display: flex;
  gap: 6px;
  width: max-content;
  animation: filmScroll 60s linear infinite;
}

.film-strip-track:nth-child(2) {
  animation-direction: reverse;
  animation-duration: 45s;
  margin-top: 6px;
}

@keyframes filmScroll {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.film-frame {
  position: relative;
  width: 130px;
  height: 80px;
  flex-shrink: 0;
  border-radius: 4px;
  overflow: hidden;
  border: 2px solid rgba(255,210,0,0.15);
  background: #111;
}

.film-frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.7;
  transition: opacity 0.3s;
  display: block;
}

/* sprocket holes effect */
.film-frame::before,
.film-frame::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 6px;
  background: repeating-linear-gradient(
    to right,
    transparent 0px, transparent 6px,
    rgba(0,0,0,0.6) 6px, rgba(0,0,0,0.6) 14px
  );
  z-index: 2;
}
.film-frame::before { top: 0; }
.film-frame::after  { bottom: 0; }

/* credit tooltip em cada frame */
.film-frame .frame-credit {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.9));
  padding: 10px 4px 3px;
  font-size: 0.52rem;
  color: rgba(255,210,0,0.8);
  text-align: center;
  opacity: 0;
  transition: opacity 0.3s;
  z-index: 3;
  pointer-events: auto;
}
.film-frame:hover .frame-credit { opacity: 1; }
.film-frame:hover img { opacity: 0.9; }

/* ────────────────────────────────────────────────────────────────
   3. PARALLAX CURTAIN — entre seções
   ──────────────────────────────────────────────────────────────── */
.parallax-curtain {
  position: relative;
  height: 320px;
  overflow: hidden;
  background: #0a0a0a;
}

.parallax-curtain-inner {
  position: absolute;
  top: -30%;
  left: 0;
  right: 0;
  bottom: -30%;
  display: flex;
  align-items: center;
  gap: 4px;
  will-change: transform;
}

.curtain-photo {
  flex-shrink: 0;
  width: 260px;
  height: 120%;
  position: relative;
  overflow: hidden;
}

.curtain-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.55;
  display: block;
  transition: opacity 0.5s;
}

.curtain-photo:hover img {
  opacity: 0.85;
}

/* info pill on hover */
.curtain-photo-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  background: linear-gradient(transparent, rgba(0,0,0,0.85));
  padding: 20px 10px 8px;
  transform: translateY(100%);
  transition: transform 0.3s ease;
  z-index: 2;
}
.curtain-photo:hover .curtain-photo-info {
  transform: translateY(0);
}
.curtain-photo-info .info-source {
  display: block;
  font-size: 0.6rem;
  color: #ffd200;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.curtain-photo-info .info-credit {
  display: block;
  font-size: 0.58rem;
  color: rgba(255,255,255,0.65);
  margin-top: 1px;
}

/* overlay glow top/bottom */
.parallax-curtain::before,
.parallax-curtain::after {
  content: '';
  position: absolute;
  left: 0; right: 0;
  height: 80px;
  z-index: 3;
  pointer-events: none;
}
.parallax-curtain::before {
  top: 0;
  background: linear-gradient(to bottom, var(--bg-primary, #0a0a0a) 0%, transparent 100%);
}
.parallax-curtain::after {
  bottom: 0;
  background: linear-gradient(to top, var(--bg-primary-dark, #111) 0%, transparent 100%);
}

/* label HLTV over curtain */
.curtain-label {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 5;
  text-align: center;
  pointer-events: none;
}
.curtain-label span {
  display: block;
  font-family: 'Bebas Neue', sans-serif;
  font-size: clamp(2rem, 5vw, 4rem);
  color: rgba(255,210,0,0.12);
  letter-spacing: 0.15em;
  white-space: nowrap;
}

/* ────────────────────────────────────────────────────────────────
   4. SECTION BACKGROUND ROTATIVO
   ──────────────────────────────────────────────────────────────── */
.section-photo-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.section-photo-bg img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.8s ease;
}

.section-photo-bg img.active {
  opacity: 0.08;
}

.section-photo-credit {
  position: absolute;
  bottom: 10px;
  right: 14px;
  font-size: 0.6rem;
  color: rgba(255,210,0,0.5);
  z-index: 2;
  pointer-events: none;
  letter-spacing: 0.04em;
}

/* ────────────────────────────────────────────────────────────────
   5. MASONRY GALLERY — galeria principal
   ──────────────────────────────────────────────────────────────── */
.masonry-gallery {
  column-count: 4;
  column-gap: 8px;
  padding: 0;
}

@media (max-width: 1200px) { .masonry-gallery { column-count: 3; } }
@media (max-width: 768px)  { .masonry-gallery { column-count: 2; } }
@media (max-width: 480px)  { .masonry-gallery { column-count: 1; } }

.masonry-item {
  break-inside: avoid;
  margin-bottom: 8px;
  position: relative;
  overflow: hidden;
  border-radius: 4px;
  cursor: pointer;
  background: #111;
  display: block;
}

.masonry-item img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.5s ease, opacity 0.3s;
  opacity: 0.88;
}

.masonry-item:hover img {
  transform: scale(1.04);
  opacity: 1;
}

.masonry-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0,0,0,0.85) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 12px;
}

.masonry-item:hover .masonry-overlay {
  opacity: 1;
}

.masonry-credit {
  font-size: 0.62rem;
  color: #ffd200;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  line-height: 1.2;
}

.masonry-credit-name {
  font-size: 0.58rem;
  color: rgba(255,255,255,0.65);
  margin-top: 2px;
}

.masonry-zoom {
  position: absolute;
  top: 10px;
  right: 10px;
  width: 30px;
  height: 30px;
  background: rgba(255,210,0,0.15);
  border: 1px solid rgba(255,210,0,0.4);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  opacity: 0;
  transition: opacity 0.3s, background 0.2s;
}
.masonry-item:hover .masonry-zoom {
  opacity: 1;
}
.masonry-zoom:hover {
  background: rgba(255,210,0,0.35);
}

/* Gallery toolbar */
.gallery-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.gallery-count-badge {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  padding: 4px 14px;
}

.gallery-count-badge strong {
  color: #ffd200;
}

.gallery-credit-info {
  font-size: 0.68rem;
  color: rgba(255,210,0,0.7);
  display: flex;
  align-items: center;
  gap: 6px;
}

.gallery-credit-info a {
  color: #ffd200;
  text-decoration: none;
  font-weight: 600;
  border-bottom: 1px solid rgba(255,210,0,0.3);
  transition: border-color 0.2s;
}

.gallery-credit-info a:hover {
  border-color: #ffd200;
}

/* Load More button */
.gallery-load-more-wrap {
  text-align: center;
  margin-top: 36px;
}

.btn-load-more-photos {
  background: transparent;
  border: 1px solid rgba(255,210,0,0.4);
  color: #ffd200;
  font-family: 'Inter', sans-serif;
  font-size: 0.85rem;
  font-weight: 600;
  padding: 12px 36px;
  border-radius: 4px;
  cursor: pointer;
  transition: background 0.25s, border-color 0.25s, transform 0.2s;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.btn-load-more-photos:hover {
  background: rgba(255,210,0,0.08);
  border-color: #ffd200;
  transform: translateY(-2px);
}

.btn-load-more-photos:disabled {
  opacity: 0.4;
  cursor: default;
  transform: none;
}

/* Sentinel (infinite scroll) */
#gallery-sentinel {
  height: 1px;
  margin-top: 40px;
}

/* Spinner embed */
.masonry-spinner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 24px 0;
  color: rgba(255,255,255,0.4);
  font-size: 0.8rem;
}
.masonry-spinner-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #ffd200;
  animation: spinDot 1.2s ease-in-out infinite;
}
.masonry-spinner-dot:nth-child(2) { animation-delay: 0.2s; }
.masonry-spinner-dot:nth-child(3) { animation-delay: 0.4s; }
@keyframes spinDot {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.3; }
  40%           { transform: scale(1.0); opacity: 1; }
}

/* ────────────────────────────────────────────────────────────────
   6. LIGHTBOX UPGRADE — com crédito HLTV
   ──────────────────────────────────────────────────────────────── */
.lb-photo-credit {
  margin-top: 8px;
  font-size: 0.65rem;
  color: rgba(255,210,0,0.65);
  text-align: center;
}

.lb-photo-credit a {
  color: #ffd200;
  text-decoration: none;
  font-weight: 600;
}

.lb-photo-credit a:hover {
  text-decoration: underline;
}

/* ────────────────────────────────────────────────────────────────
   7. RESPONSIVIDADE
   ──────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .film-strip-wrapper {
    bottom: 30px;
  }
  .film-frame {
    width: 90px;
    height: 58px;
  }
  .parallax-curtain {
    height: 200px;
  }
  .curtain-photo {
    width: 160px;
  }
}

@media (max-width: 480px) {
  .film-frame {
    width: 70px;
    height: 46px;
  }
}
