/* Independence Day image popup */
#festivalPopup {
  position: fixed;
  inset: 0;
  z-index: 99999;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 18px;
  background: rgba(2, 18, 14, .78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

#festivalPopup.is-open {
  display: flex;
  animation: festivalPopupBackdrop .35s ease both;
}

#festivalPopup .festival-popup-card {
  position: relative;
  width: min(920px, 96vw);
  overflow: hidden;
  border-radius: 24px;
  background: #082c22;
  box-shadow: 0 30px 90px rgba(0,0,0,.42);
  transform: scale(.78) translateY(25px);
  opacity: 0;
  animation: festivalPopupIn .65s cubic-bezier(.16,1,.3,1) .05s forwards;
}

#festivalPopup .festival-popup-image {
  display: block;
  width: 100%;
  height: auto;
  max-height: 78vh;
  object-fit: cover;
  transform: scale(1.04);
  animation: festivalPopupImageZoom 8s ease-out forwards;
}

#festivalPopup .festival-popup-shine {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(110deg, transparent 20%, rgba(255,255,255,.28) 48%, transparent 58%);
  transform: translateX(-120%);
  animation: festivalPopupShine 2.2s ease .55s forwards;
}

#festivalPopup .festival-popup-particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  overflow: hidden;
}

#festivalPopup .festival-popup-particles i {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: rgba(255,255,255,.9);
  box-shadow: 0 0 14px rgba(255,255,255,.8);
  animation: festivalPopupParticle 3.5s linear infinite;
}

#festivalPopup .festival-popup-particles i:nth-child(1) { left: 18%; top: 80%; animation-delay: -.5s; }
#festivalPopup .festival-popup-particles i:nth-child(2) { left: 35%; top: 72%; animation-delay: -1.4s; }
#festivalPopup .festival-popup-particles i:nth-child(3) { left: 67%; top: 75%; animation-delay: -2.2s; }
#festivalPopup .festival-popup-particles i:nth-child(4) { left: 82%; top: 82%; animation-delay: -2.9s; }
#festivalPopup .festival-popup-particles i:nth-child(5) { left: 56%; top: 65%; animation-delay: -1.8s; }

#festivalPopup .festival-popup-close {
  position: absolute;
  top: 12px;
  right: 12px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: rgba(0,0,0,.48);
  color: #fff;
  font-size: 1.35rem;
  cursor: pointer;
  transition: transform .2s ease, background .2s ease;
}

#festivalPopup .festival-popup-close:hover {
  transform: rotate(90deg) scale(1.06);
  background: rgba(0,0,0,.72);
}

#festivalPopup .festival-popup-footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 24px;
  display: flex;
  justify-content: flex-end;
  background: linear-gradient(transparent, rgba(0,0,0,.62));
}

#festivalPopup .festival-popup-close-bottom {
  border: 1px solid rgba(255,255,255,.3);
  border-radius: 999px;
  padding: 9px 17px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
}

@keyframes festivalPopupBackdrop {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes festivalPopupIn {
  0% { opacity: 0; transform: scale(.78) translateY(25px); }
  65% { opacity: 1; transform: scale(1.025) translateY(0); }
  100% { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes festivalPopupImageZoom {
  from { transform: scale(1.04); }
  to { transform: scale(1.12); }
}

@keyframes festivalPopupShine {
  to { transform: translateX(120%); }
}

@keyframes festivalPopupParticle {
  0% { transform: translateY(30px) scale(.4); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translateY(-180px) scale(1.1); opacity: 0; }
}

@media (max-width: 600px) {
  #festivalPopup { padding: 10px; }
  #festivalPopup .festival-popup-card { border-radius: 16px; }
  #festivalPopup .festival-popup-image { max-height: 82vh; }
  #festivalPopup .festival-popup-footer { padding: 14px; }
}

@media (prefers-reduced-motion: reduce) {
  #festivalPopup *,
  #festivalPopup {
    animation: none !important;
    transition: none !important;
  }
}

body.festival-popup-open { overflow: hidden; }
