/* Gallery Hero */
.gallery-hero {
  position: relative;
  min-height: 40vh;
  color: #fdfbf8;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 6rem 0 2rem;
  background-image: url("images/cover.jpg");
  background-size: cover;
  background-position: center 30%;
  overflow: hidden;
}

.gallery-hero .overlay {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at top, rgba(0, 0, 0, 0.4), rgba(8, 4, 2, 0.7));
}

/* Gallery hero sparkle overlay */
.gallery-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(2px 2px at 10% 20%, rgba(255, 255, 255, 0.5) 50%, transparent 50%),
    radial-gradient(3px 3px at 30% 50%, rgba(255, 223, 138, 0.6) 50%, transparent 50%),
    radial-gradient(2px 2px at 50% 30%, rgba(255, 255, 255, 0.4) 50%, transparent 50%),
    radial-gradient(3px 3px at 70% 70%, rgba(201, 168, 108, 0.5) 50%, transparent 50%),
    radial-gradient(2px 2px at 90% 40%, rgba(255, 250, 240, 0.6) 50%, transparent 50%),
    radial-gradient(2px 2px at 20% 80%, rgba(255, 223, 138, 0.4) 50%, transparent 50%),
    radial-gradient(3px 3px at 80% 15%, rgba(255, 255, 255, 0.5) 50%, transparent 50%);
  background-size: 300px 300px;
  animation: galleryHeroSparkle 20s linear infinite;
  pointer-events: none;
  z-index: 1;
  opacity: 0.8;
}

@keyframes galleryHeroSparkle {
  0% { background-position: 0 0; }
  100% { background-position: 300px 300px; }
}

/* Gallery Section */
.gallery-section {
  padding: 4rem 0 5rem;
  position: relative;
  overflow: hidden;
}

/* Gallery section glitter overlay */
.gallery-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 20% 30%, rgba(255, 223, 138, 0.06) 0%, transparent 40%),
    radial-gradient(ellipse at 80% 70%, rgba(212, 165, 165, 0.05) 0%, transparent 40%);
  pointer-events: none;
  z-index: 0;
}

.gallery-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(2px 2px at 15% 25%, rgba(255, 255, 255, 0.35) 50%, transparent 50%),
    radial-gradient(2px 2px at 45% 65%, rgba(255, 223, 138, 0.4) 50%, transparent 50%),
    radial-gradient(1px 1px at 75% 35%, rgba(255, 255, 255, 0.45) 50%, transparent 50%),
    radial-gradient(2px 2px at 25% 85%, rgba(201, 168, 108, 0.35) 50%, transparent 50%),
    radial-gradient(1px 1px at 85% 55%, rgba(255, 250, 240, 0.4) 50%, transparent 50%),
    radial-gradient(2px 2px at 55% 15%, rgba(255, 223, 138, 0.35) 50%, transparent 50%);
  background-size: 280px 280px;
  animation: gallerySectionSparkle 18s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.7;
}

@keyframes gallerySectionSparkle {
  0% { background-position: 0 0; }
  100% { background-position: 280px 280px; }
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1.5rem;
}

/* Gallery Items */
.gallery-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  cursor: pointer;
  aspect-ratio: 4/3;
  box-shadow: 0 8px 25px rgba(15, 10, 7, 0.12);
  opacity: 0;
  transform: translateY(40px);
  transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity 0.6s ease, transform 0.6s ease;
  border: 3px solid transparent;
  background: linear-gradient(#0a0a0a, #0a0a0a) padding-box,
              linear-gradient(135deg, #ffb6c1, #87ceeb, #ffb6c1, #87ceeb) border-box;
}

.gallery-item.animate {
  opacity: 1;
  transform: translateY(0);
}

.gallery-item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.3) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.gallery-item:hover {
  transform: scale(1.03) translateY(-8px);
  box-shadow: 
    0 20px 50px rgba(15, 10, 7, 0.25),
    0 0 30px rgba(255, 182, 193, 0.3),
    0 0 40px rgba(135, 206, 235, 0.2);
  border: 3px solid transparent;
  background: linear-gradient(#0a0a0a, #0a0a0a) padding-box,
              linear-gradient(135deg, #ff69b4, #87ceeb, #ff69b4, #87ceeb) border-box;
  animation: borderGlow 2s ease-in-out infinite;
}

@keyframes borderGlow {
  0%, 100% {
    box-shadow: 
      0 20px 50px rgba(15, 10, 7, 0.25),
      0 0 20px rgba(255, 182, 193, 0.4),
      0 0 30px rgba(135, 206, 235, 0.3);
  }
  50% {
    box-shadow: 
      0 20px 50px rgba(15, 10, 7, 0.25),
      0 0 35px rgba(255, 105, 180, 0.5),
      0 0 45px rgba(135, 206, 235, 0.4);
  }
}

.gallery-item:hover::before {
  opacity: 1;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s ease, opacity 0.5s ease;
  background: linear-gradient(135deg, #141113 0%, #0d0b0c 100%);
}

.gallery-item img.loaded {
  opacity: 1;
}

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

/* Glitter effect overlay on hover */
.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(circle at 20% 30%, rgba(255, 255, 255, 0.3) 0%, transparent 3%),
    radial-gradient(circle at 80% 20%, rgba(255, 182, 193, 0.4) 0%, transparent 2%),
    radial-gradient(circle at 40% 70%, rgba(135, 206, 235, 0.4) 0%, transparent 2%),
    radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.3) 0%, transparent 2%),
    radial-gradient(circle at 30% 50%, rgba(255, 182, 193, 0.3) 0%, transparent 2%),
    radial-gradient(circle at 60% 40%, rgba(135, 206, 235, 0.3) 0%, transparent 2%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 2;
  pointer-events: none;
  animation: sparkle 2s ease-in-out infinite;
}

@keyframes sparkle {
  0%, 100% { opacity: 0; }
  50% { opacity: 1; }
}

.gallery-item:hover::after {
  opacity: 1;
}

/* Like Button Styling */
.like-btn {
  position: absolute;
  bottom: 12px;
  right: 12px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.95);
  border: 2px solid rgba(255, 105, 180, 0.3);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
  opacity: 0;
  transform: scale(0.8) translateY(10px);
  transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
  box-shadow: 0 4px 15px rgba(255, 105, 180, 0.2);
}

.like-btn svg {
  width: 22px;
  height: 22px;
  color: #ff6b8a;
  transition: all 0.3s ease;
}

.gallery-item:hover .like-btn {
  opacity: 1;
  transform: scale(1) translateY(0);
}

.like-btn:hover {
  background: linear-gradient(135deg, #ff6b8a, #ff8fab);
  border-color: #ff6b8a;
  transform: scale(1.15);
  box-shadow: 0 6px 20px rgba(255, 105, 180, 0.4);
}

.like-btn:hover svg {
  color: #fff;
  fill: #fff;
  transform: scale(1.1);
}

.like-btn.liked {
  background: linear-gradient(135deg, #ff6b8a, #ff8fab);
  border-color: #ff6b8a;
}

.like-btn.liked svg {
  color: #fff;
  fill: #fff;
  animation: heartBeat 0.6s ease;
}

@keyframes heartBeat {
  0%, 100% { transform: scale(1); }
  25% { transform: scale(1.3); }
  50% { transform: scale(0.9); }
  75% { transform: scale(1.2); }
}

/* Heart burst animation */
.heart-burst {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 1.5rem;
  animation: burstUp 0.6s ease forwards;
  pointer-events: none;
}

@keyframes burstUp {
  0% {
    opacity: 1;
    transform: translate(-50%, -50%) scale(0.5);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -150%) scale(1.5);
  }
}

/* Video item animation */
.video-item {
  opacity: 0;
  transform: translateY(30px);
  transition: opacity 0.6s ease, transform 0.6s ease, box-shadow 0.4s ease;
}

.video-item.animate {
  opacity: 1;
  transform: translateY(0);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 1000;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  animation: fadeIn 0.3s ease;
}

.lightbox.active {
  display: flex;
}

.lightbox-image {
  max-width: 90%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  animation: scaleIn 0.3s ease;
}

.lightbox-close {
  position: absolute;
  top: 1.5rem;
  right: 2rem;
  background: transparent;
  border: none;
  color: #fdfbf8;
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0.5rem;
  line-height: 1;
  transition: all 0.2s ease;
  z-index: 1001;
}

.lightbox-close:hover {
  transform: scale(1.2) rotate(90deg);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(253, 251, 248, 0.15);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(253, 251, 248, 0.2);
  color: #fdfbf8;
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-nav:hover {
  background: rgba(253, 251, 248, 0.3);
  transform: translateY(-50%) scale(1.1);
}

.lightbox-prev {
  left: 2rem;
}

.lightbox-next {
  right: 2rem;
}

/* Animations */
@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Staggered animation delay for items */
.gallery-item:nth-child(1) { transition-delay: 0.05s; }
.gallery-item:nth-child(2) { transition-delay: 0.1s; }
.gallery-item:nth-child(3) { transition-delay: 0.15s; }
.gallery-item:nth-child(4) { transition-delay: 0.2s; }
.gallery-item:nth-child(5) { transition-delay: 0.25s; }
.gallery-item:nth-child(6) { transition-delay: 0.3s; }

/* Videos Section */
.videos-section {
  background: linear-gradient(180deg, #0d0b0c 0%, #141113 50%, #0d0b0c 100%);
  position: relative;
  overflow: hidden;
}

/* Videos section glitter */
.videos-section::before {
  content: '';
  position: absolute;
  inset: 0;
  background: 
    radial-gradient(ellipse at 30% 40%, rgba(201, 168, 108, 0.08) 0%, transparent 45%),
    radial-gradient(ellipse at 70% 60%, rgba(255, 223, 138, 0.06) 0%, transparent 45%);
  pointer-events: none;
  z-index: 0;
}

.videos-section::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: 
    radial-gradient(2px 2px at 20% 30%, rgba(255, 255, 255, 0.4) 50%, transparent 50%),
    radial-gradient(3px 3px at 60% 50%, rgba(201, 168, 108, 0.5) 50%, transparent 50%),
    radial-gradient(2px 2px at 40% 70%, rgba(255, 223, 138, 0.4) 50%, transparent 50%),
    radial-gradient(2px 2px at 80% 25%, rgba(255, 255, 255, 0.35) 50%, transparent 50%),
    radial-gradient(3px 3px at 15% 80%, rgba(255, 223, 138, 0.45) 50%, transparent 50%);
  background-size: 320px 320px;
  animation: videoSectionSparkle 22s linear infinite;
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

@keyframes videoSectionSparkle {
  0% { background-position: 0 0; }
  100% { background-position: 320px 320px; }
}

.videos-heading {
  font-family: "Playfair Display", serif;
  background: linear-gradient(135deg, #fdfbf8, #ffb6c1, #87ceeb, #fdfbf8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% auto;
  animation: shimmerText 3s linear infinite;
}

@keyframes shimmerText {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

.videos-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
  gap: 2rem;
}

.video-item {
  position: relative;
  border-radius: 16px;
  overflow: hidden;
  background: linear-gradient(#0a0a0a, #0a0a0a) padding-box,
              linear-gradient(135deg, #ffb6c1, #87ceeb, #ffb6c1, #87ceeb) border-box;
  border: 3px solid transparent;
  transition: all 0.4s ease;
}

.video-item:hover {
  transform: translateY(-8px);
  box-shadow: 
    0 20px 40px rgba(0, 0, 0, 0.3),
    0 0 30px rgba(255, 182, 193, 0.3),
    0 0 40px rgba(135, 206, 235, 0.2);
  background: linear-gradient(#0a0a0a, #0a0a0a) padding-box,
              linear-gradient(135deg, #ff69b4, #87ceeb, #ff69b4, #87ceeb) border-box;
}

.video-wrapper {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.video-wrapper iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: none;
}

/* Responsive */
@media (max-width: 768px) {
  .gallery-hero {
    min-height: 30vh;
    padding-top: 5rem;
    padding-bottom: 1rem;
  }

  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
  }

  .gallery-item {
    aspect-ratio: 1;
  }

  .like-btn {
    width: 38px;
    height: 38px;
    bottom: 8px;
    right: 8px;
    opacity: 1;
    transform: scale(1) translateY(0);
  }

  .like-btn svg {
    width: 18px;
    height: 18px;
  }

  .videos-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }

  .lightbox-nav {
    width: 40px;
    height: 40px;
    font-size: 1.4rem;
  }

  .lightbox-prev {
    left: 1rem;
  }

  .lightbox-next {
    right: 1rem;
  }
}

@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.8rem;
  }

  .gallery-item {
    border-radius: 12px;
    border-width: 2px;
  }

  .like-btn {
    width: 32px;
    height: 32px;
    bottom: 6px;
    right: 6px;
  }

  .like-btn svg {
    width: 16px;
    height: 16px;
  }

  .lightbox {
    padding: 1rem;
  }

  .lightbox-close {
    top: 1rem;
    right: 1rem;
    font-size: 2rem;
  }

  .lightbox-image {
    max-width: 100%;
    border-radius: 8px;
  }

  .videos-grid {
    gap: 1rem;
  }

  .video-item {
    border-radius: 12px;
  }
}

/* Extra small devices */
@media (max-width: 360px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
  }
  
  .gallery-item {
    border-radius: 8px;
  }
  
  .gallery-hero {
    min-height: 25vh;
    padding-top: 4.5rem;
  }
  
  .lightbox-nav {
    width: 36px;
    height: 36px;
    font-size: 1.2rem;
  }
  
  .lightbox-prev {
    left: 0.5rem;
  }
  
  .lightbox-next {
    right: 0.5rem;
  }
  
  .videos-grid {
    gap: 0.8rem;
  }
}
