/* gallery.css - Enhanced mobile-responsive styles for the Gallery page */

/* Enhanced Brand Styling */
.brand-container {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.brand-logo {
  width: 40px;
  height: 40px;
  object-fit: contain;
  filter: drop-shadow(0 2px 8px rgba(59, 130, 246, 0.3));
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.brand-text {
  font-family: 'Playfair Display', serif;
  font-size: clamp(1.3rem, 2vw, 1.7rem);
  font-weight: 700;
  background: linear-gradient(135deg, #3b82f6, #1d4ed8);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  letter-spacing: -0.02em;
}

.brand-subtitle {
  font-family: 'Dancing Script', cursive;
  font-size: clamp(0.9rem, 1.5vw, 1.1rem);
  color: #06b6d4;
  font-weight: 600;
  margin-left: -0.5rem;
  transform: rotate(-3deg);
  opacity: 0.95;
}

.navbar-brand:hover .brand-logo {
  transform: scale(1.08) rotate(3deg);
}

/* Page Header */
.page-header {
  padding: var(--spacing-3xl) 0 var(--spacing-2xl);
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

.page-header::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: var(--ocean-gradient);
  opacity: 0.1;
  z-index: 0;
}

.section-header {
  position: relative;
  z-index: 1;
}

.section-tagline {
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue-accent);
  margin-bottom: var(--spacing-sm);
}

.section-title {
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  color: var(--text-dark);
}

.section-subtitle {
  font-size: clamp(1rem, 2vw, 1.25rem);
  color: var(--text-muted);
  max-width: 700px;
  margin: 0 auto;
}

/* Gallery Listing */
.gallery-listing {
  padding: var(--spacing-3xl) 0;
  background: var(--bg-light);
}

.gallery-grid-wrapper {
  display: flex;
  flex-wrap: nowrap;
  overflow-x: auto;
  scroll-behavior: smooth;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: var(--spacing-md);
  padding-bottom: var(--spacing-md);
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  transition: var(--transition-normal);
  cursor: pointer;
  flex: 0 0 auto;
  width: 300px;
  scroll-snap-align: center;
}

.gallery-item img {
  width: 100%;
  height: 250px;
  object-fit: cover;
  transition: var(--transition-normal);
}

.gallery-item:hover img {
  transform: scale(1.05);
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: var(--z-modal);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-normal);
}

.lightbox[aria-hidden="false"] {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  background: var(--white);
  border-radius: var(--radius-md);
  padding: var(--spacing-md);
  box-shadow: var(--shadow-xl);
}

.lightbox-content img {
  max-width: 100%;
  max-height: 70vh;
  object-fit: contain;
  border-radius: var(--radius-sm);
}

.lightbox-content figcaption {
  margin-top: var(--spacing-sm);
  text-align: center;
  color: var(--text-dark);
  font-size: clamp(0.9rem, 1.5vw, 1rem);
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: none;
  color: var(--text-white);
  font-size: 1.5rem;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition-normal);
  cursor: pointer;
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: var(--blue-accent);
  transform: scale(1.1);
}

.lightbox-close {
  top: 1rem;
  right: 1rem;
}

.lightbox-prev {
  left: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next {
  right: 1rem;
  top: 50%;
  transform: translateY(-50%);
}

/* Responsive Adjustments */
@media (min-width: 769px) {
  .gallery-grid-wrapper {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
    overflow-x: visible;
  }

  .gallery-item {
    width: auto;
  }
}

@media (max-width: 768px) {
  .gallery-item {
    width: 280px;
    height: 200px;
  }

  .gallery-item img {
    height: 200px;
  }

  .lightbox-close,
  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
    font-size: 1.2rem;
  }

  .brand-text {
    font-size: 1.3rem;
  }

  .brand-subtitle {
    font-size: 0.85rem;
  }
}

@media (max-width: 576px) {
  .gallery-item {
    width: 240px;
    height: 180px;
  }

  .gallery-item img {
    height: 180px;
  }

  .lightbox-content img {
    max-height: 60vh;
  }

  .brand-text {
    font-size: 1.2rem;
  }

  .brand-subtitle {
    font-size: 0.8rem;
  }
}

/* Accessibility Enhancements */
@media (prefers-reduced-motion: reduce) {
  .gallery-item,
  .gallery-item img,
  .lightbox,
  .lightbox-content {
    transition: none;
  }
}