/* ============================================
   Aloha Beach Festival - Tropical Gallery
   ============================================ */

/* Year Tabs */
.gallery-tabs {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xl);
}

.gallery-tab {
  padding: 0.5rem 1.5rem;
  font-family: var(--font-heading);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-semibold);
  color: var(--color-deep-teal);
  background-color: var(--color-white);
  border: 2px solid var(--color-light-gray);
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: all var(--transition-bounce);
}

.gallery-tab:hover {
  border-color: var(--color-ocean-teal);
  background-color: rgba(0, 109, 119, 0.06);
  transform: translateY(-2px);
}

.gallery-tab.active {
  background: linear-gradient(135deg, var(--color-ocean-teal), var(--color-ocean-medium));
  border-color: transparent;
  color: var(--color-white);
  box-shadow: 0 4px 15px rgba(0, 153, 204, 0.25);
}

/* Year Sections */
.gallery-year {
  display: none;
}

.gallery-year.active {
  display: block;
  animation: fadeInUp 0.4s ease-out;
}

/* Photo Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-sm);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-xl);
  cursor: pointer;
  aspect-ratio: 4 / 3;
  background: linear-gradient(135deg, var(--color-page-blue), var(--color-page-blue-alt));
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-base);
}

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

.gallery-item::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(255, 107, 53, 0), rgba(0, 109, 119, 0));
  transition: background var(--transition-base);
  pointer-events: none;
}

.gallery-item:hover::after {
  background: linear-gradient(135deg, rgba(255, 107, 53, 0.1), rgba(0, 109, 119, 0.15));
}

.gallery-item:hover {
  box-shadow: 0 0 0 3px var(--color-sunset-gold);
}

/* Empty State */
.gallery-empty {
  text-align: center;
  padding: var(--space-3xl) var(--space-lg);
  color: #999;
}

.gallery-empty-icon {
  font-size: 4rem;
  margin-bottom: var(--space-md);
  animation: float 4s ease-in-out infinite;
}

.gallery-empty p {
  font-size: var(--font-size-h4);
}

/* Lightbox */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background-color: rgba(10, 22, 40, 0.95);
  align-items: center;
  justify-content: center;
}

.lightbox.is-open {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
}

.lightbox-content img {
  max-width: 90vw;
  max-height: 85vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
}

.lightbox-close {
  position: fixed;
  top: var(--space-md);
  right: var(--space-md);
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 183, 3, 0.2);
  color: var(--color-white);
  font-size: 1.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  z-index: 1001;
}

.lightbox-close:hover {
  background-color: rgba(255, 183, 3, 0.4);
}

.lightbox-nav {
  position: fixed;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: rgba(255, 183, 3, 0.15);
  color: var(--color-white);
  font-size: 1.5rem;
  border-radius: var(--radius-full);
  cursor: pointer;
  transition: background-color var(--transition-fast);
  z-index: 1001;
}

.lightbox-nav:hover {
  background-color: rgba(255, 183, 3, 0.35);
}

.lightbox-prev {
  left: var(--space-md);
}

.lightbox-next {
  right: var(--space-md);
}

/* Responsive */
@media (min-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-md);
  }
}

@media (min-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(4, 1fr);
  }
}
