/* Gallery page */
body.gallery-page {
  font-family: var(--font-body);
  background: #fff;
}

#nav.gallery-nav {
  background: rgba(255, 255, 255, 0.92);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(10, 132, 255, 0.1);
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
  padding: 1.2rem 3.5rem;
}
#nav.gallery-nav .nav-links a { color: var(--text-gray); }
#nav.gallery-nav .nav-links a:hover,
#nav.gallery-nav .nav-links a.is-active { color: var(--blue-primary); }
#nav.gallery-nav .nav-toggle span { background: var(--text-dark); }
#nav.gallery-nav .nav-logo { background: transparent; padding: 0; }

.gallery-hero {
  position: relative;
  min-height: clamp(320px, 44vh, 480px);
  display: flex;
  align-items: center;
  overflow: hidden;
  margin-top: 5rem;
}
.gallery-hero--animated {
  background: #0c2240;
}
.gallery-hero-canvas {
  position: absolute;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}
.gallery-hero-star {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.55);
  animation: galleryHeroTwinkle 3.4s ease-in-out infinite;
}
.gallery-hero-star--1 { top: 12%; left: 20%; width: 5px; height: 5px; animation-duration: 3.2s; }
.gallery-hero-star--2 { top: 22%; left: 46%; width: 4px; height: 4px; animation-delay: 0.8s; animation-duration: 4s; }
.gallery-hero-star--3 { top: 8%; left: 68%; width: 5px; height: 5px; animation-delay: 1.4s; animation-duration: 3.6s; }

.gallery-hero-bird {
  position: absolute;
  left: -3rem;
  animation: galleryHeroFly 13s linear infinite;
}
.gallery-hero-bird--1 { top: 16%; width: 40px; height: 16px; }
.gallery-hero-bird--2 {
  top: 30%;
  width: 30px;
  height: 12px;
  animation-duration: 17s;
  animation-delay: 4s;
}

.gallery-hero-frame {
  position: absolute;
  border-radius: 2px;
  animation: galleryHeroDrift 7s ease-in infinite;
}
.gallery-hero-frame--1 {
  left: 10%;
  bottom: 28%;
  width: 11px;
  height: 15px;
  border: 1.4px solid rgba(227, 189, 102, 0.8);
}
.gallery-hero-frame--2 {
  left: 22%;
  bottom: 21%;
  width: 9px;
  height: 12px;
  border: 1.2px solid rgba(243, 241, 234, 0.7);
  animation-duration: 8.5s;
  animation-delay: 2s;
}
.gallery-hero-frame--3 {
  left: 8%;
  bottom: 38%;
  width: 8px;
  height: 11px;
  border: 1.2px solid rgba(227, 189, 102, 0.6);
  animation-duration: 6.2s;
  animation-delay: 3.4s;
}

.gallery-hero-boat {
  position: absolute;
  right: clamp(0.5rem, 4vw, 2.5rem);
  bottom: clamp(0.5rem, 2vw, 1.5rem);
  width: clamp(220px, 32vw, 320px);
  height: clamp(220px, 32vw, 320px);
  z-index: 2;
}
.gallery-hero-boat-bob {
  animation: galleryHeroBob 4.5s ease-in-out infinite;
}
.gallery-hero-lantern {
  animation: galleryHeroTwinkle 2.6s ease-in-out infinite;
}

.gallery-hero-wave {
  position: absolute;
  left: 0;
  bottom: 0;
  width: 200%;
  animation: galleryHeroWave 14s linear infinite;
}
.gallery-hero-wave--back { height: 60px; }
.gallery-hero-wave--front {
  height: 46px;
  animation-duration: 9s;
  animation-direction: reverse;
}

@keyframes galleryHeroTwinkle {
  0%, 100% { opacity: 0.2; }
  50% { opacity: 0.9; }
}
@keyframes galleryHeroFly {
  0% { transform: translateX(0); opacity: 0; }
  10% { opacity: 1; }
  85% { opacity: 1; }
  100% { transform: translateX(calc(100vw + 6rem)); opacity: 0; }
}
@keyframes galleryHeroDrift {
  0% { opacity: 0; transform: translate(0, 0) rotate(0deg); }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translate(12px, -150px) rotate(120deg); }
}
@keyframes galleryHeroBob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}
@keyframes galleryHeroWave {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

.gallery-hero-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  max-width: 1320px;
  margin: 0 auto;
  padding: clamp(2.5rem, 5vw, 4rem) clamp(1.5rem, 4vw, 3.5rem);
  padding-right: clamp(1.5rem, 36vw, 22rem);
}
.gallery-hero-label {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--tropical-aqua);
  margin-bottom: 1rem;
}
.gallery-hero-title {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 4.25rem);
  line-height: 1.08;
  color: white;
  font-weight: 500;
  max-width: 16ch;
}
.gallery-hero-title em { font-style: italic; color: var(--sunset-gold-light); }
.gallery-hero-sub {
  margin-top: 1rem;
  max-width: 520px;
  font-size: 1.02rem;
  line-height: 1.8;
  color: rgba(255, 255, 255, 0.78);
}

#gallery-page {
  padding: clamp(3rem, 6vw, 5rem) 0;
  background: white;
}
#gallery-page .gallery-masonry {
  column-count: 4;
}
.gallery-page-count {
  text-align: center;
  margin-top: 1.5rem;
  font-size: 0.82rem;
  color: var(--text-gray);
  letter-spacing: 0.06em;
}

.gallery-cta {
  padding: clamp(2.5rem, 5vw, 4rem) 0;
  background: var(--ocean-deep);
  text-align: center;
}
.gallery-cta-inner { max-width: 640px; margin: 0 auto; padding: 0 1.5rem; }
.gallery-cta h2 {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  color: white;
  margin-bottom: 0.75rem;
  font-weight: 500;
}
.gallery-cta h2 em { font-style: italic; color: var(--sunset-gold-light); }
.gallery-cta p {
  color: rgba(255, 255, 255, 0.7);
  line-height: 1.75;
  margin-bottom: 1.5rem;
}
.gallery-cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: linear-gradient(135deg, var(--blue-primary), var(--blue-ocean));
  color: white;
  padding: 0.95rem 1.75rem;
  border-radius: 50px;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.3s, box-shadow 0.3s;
}
.gallery-cta-btn:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 36px rgba(10, 132, 255, 0.4);
}

@media (max-width: 1024px) {
  #gallery-page .gallery-masonry { column-count: 3; }
}
@media (max-width: 768px) {
  #nav.gallery-nav { padding: 1rem 1.75rem; }
  .gallery-hero { margin-top: 4.5rem; min-height: 300px; align-items: flex-end; }
  .gallery-hero-inner { padding-right: clamp(1.5rem, 4vw, 3.5rem); }
  .gallery-hero-boat {
    width: clamp(180px, 52vw, 240px);
    height: clamp(180px, 52vw, 240px);
    right: -0.5rem;
    bottom: 0.5rem;
    opacity: 0.85;
  }
  .gallery-hero-frame--3 { display: none; }
  #gallery-page .gallery-masonry { column-count: 2; }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-hero-star,
  .gallery-hero-bird,
  .gallery-hero-frame,
  .gallery-hero-boat-bob,
  .gallery-hero-lantern,
  .gallery-hero-wave { animation: none; }
}
