/* === GALLERY - EMO GRID === */
.gallery-page { min-height: 100vh; padding: 30px; }

.gallery-title {
  text-align: center; color: #ff0033; font-size: 2.8rem;
  text-shadow: 2px 2px #000; margin-bottom: 6px;
  animation: bounceIn 0.8s ease-out both;
}

.gallery-subtitle {
  text-align: center; color: #cc00ff; font-size: 1.15rem;
  margin-bottom: 32px; animation: fadeInUp 0.6s ease-out 0.3s both;
}

.gallery-grid {
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 20px; max-width: 1100px; margin: 0 auto;
}

.gallery-item {
  position: relative; cursor: pointer; aspect-ratio: 1; overflow: hidden;
  border: 3px solid; filter: url(#crayon);
  transition: transform 0.3s, box-shadow 0.3s, border-color 0.3s;
  animation: fadeInUp 0.5s ease-out both;
}
.gallery-item:nth-child(1) { animation-delay: 0.1s; }
.gallery-item:nth-child(2) { animation-delay: 0.2s; }
.gallery-item:nth-child(3) { animation-delay: 0.3s; }
.gallery-item:nth-child(4) { animation-delay: 0.4s; }
.gallery-item:nth-child(5) { animation-delay: 0.5s; }
.gallery-item:nth-child(6) { animation-delay: 0.6s; }

.gallery-item:nth-child(odd) { border-color: #ff0033; transform: rotate(-1deg); }
.gallery-item:nth-child(even) { border-color: #cc00ff; transform: rotate(1deg); }
.gallery-item:nth-child(3n) { transform: rotate(-0.5deg); }

.gallery-item:hover {
  border-color: #ff66aa; transform: rotate(0deg) scale(1.06);
  box-shadow: 0 0 25px rgba(255, 0, 51, 0.3);
}

.gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform 0.4s; }
.gallery-item:hover img { transform: scale(1.08); }

.gallery-item .badge-new {
  position: absolute; top: 8px; right: 8px;
  background: #ff0033; color: #000; font-size: 0.8rem; font-weight: bold;
  padding: 4px 10px; transform: rotate(3deg);
  animation: wiggle 2s ease-in-out infinite, pulseGlow 2s ease-in-out infinite;
}

.gallery-item .item-title {
  position: absolute; bottom: 0; left: 0; right: 0;
  background: rgba(0, 0, 0, 0.9); color: #ff3366;
  font-size: 0.95rem; padding: 10px 12px;
  opacity: 0; transform: translateY(100%);
  transition: opacity 0.3s, transform 0.3s;
}
.gallery-item:hover .item-title { opacity: 1; transform: translateY(0); }

.gallery-pagination {
  text-align: center; color: #ff0033; font-size: 1.15rem;
  margin-top: 32px; padding: 16px;
  animation: fadeInUp 0.5s ease-out 1s both;
}
.gallery-pagination a {
  color: #cc00ff; text-decoration: none; border-bottom: none;
  padding: 4px 14px; transition: color 0.3s, transform 0.2s; display: inline-block;
}
.gallery-pagination a:hover { color: #ff66aa; transform: scale(1.15); }

/* Lightbox */
.lightbox-overlay {
  display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.97); z-index: 1000;
  align-items: center; justify-content: center;
}
.lightbox-overlay.active { display: flex; animation: fadeInUp 0.3s ease-out; }
.lightbox-content { position: relative; max-width: 90vw; max-height: 90vh; animation: bounceIn 0.5s ease-out; }
.lightbox-content img {
  max-width: 90vw; max-height: 85vh;
  border: 4px solid #ff0033; display: block; filter: url(#crayon);
}
.lightbox-title { text-align: center; color: #ff3366; font-size: 1.2rem; margin-top: 14px; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  color: #ff0033; font-size: 3rem; cursor: pointer; padding: 14px;
  user-select: none; transition: color 0.3s, transform 0.2s;
}
.lightbox-nav:hover { color: #ff66aa; transform: translateY(-50%) scale(1.2); }
.lightbox-prev { left: -60px; }
.lightbox-next { right: -60px; }
.lightbox-close {
  position: absolute; top: -40px; right: 0; color: #ff0033;
  font-size: 1.8rem; cursor: pointer; transition: color 0.3s, transform 0.3s;
}
.lightbox-close:hover { color: #ff66aa; transform: rotate(90deg) scale(1.2); }

@media (max-width: 600px) {
  .gallery-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; }
  .gallery-title { font-size: 2rem; }
}
@media (max-width: 400px) { .gallery-grid { grid-template-columns: 1fr; } }
