/* ============================================
   DIVE IN HURGHADA — GALLERY PAGE STYLES
   gallery.css — Used only by gallery.html
   ============================================ */

/* ── PAGE HERO ── */
.page-hero {
  position: relative; z-index: 1;
  min-height: 55vh;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  text-align: center; padding: 8rem 2rem 4rem; overflow: hidden;
}
.page-hero-bg {
  position: absolute; inset: -40px;
  background-size: cover; background-position: center 35%;
  filter: saturate(1.2) brightness(0.4);
  z-index: 0;
}
.page-hero-overlay {
  position: absolute; inset: 0; z-index: 1;
  background: linear-gradient(to bottom, rgba(2,12,24,0.4) 0%, rgba(2,12,24,0.2) 50%, rgba(2,12,24,0.95) 100%);
}
.page-hero > *:not(.page-hero-bg):not(.page-hero-overlay) { position: relative; z-index: 2; }
.page-tag {
  display: inline-block; font-size: 0.72rem; font-weight: 600; letter-spacing: 0.2em;
  text-transform: uppercase; color: var(--glow); border: 1px solid rgba(0,200,255,0.35);
  padding: 0.35rem 1rem; border-radius: 100px; margin-bottom: 1.2rem;
  animation: fadeUp 0.7s 0.1s both;
}
.page-title {
  font-family: var(--font-display); font-size: clamp(2.8rem, 6vw, 5rem);
  font-weight: 700; line-height: 1.1; animation: fadeUp 0.7s 0.2s both;
}
.page-title em { font-style: italic; color: var(--glow); }
.page-sub {
  margin-top: 1.2rem; font-size: 1rem; color: var(--muted); max-width: 620px; line-height: 1.7;
  animation: fadeUp 0.7s 0.3s both;
}

/* ── FILTER TABS ── */
.filter-wrap {
  position: relative; z-index: 1;
  display: flex; justify-content: center; gap: 0.8rem; flex-wrap: wrap;
  padding: 0 2rem 3rem;
}
.filter-btn {
  background: transparent; border: 1px solid rgba(0,200,255,0.2);
  color: var(--muted); padding: 0.55rem 1.4rem; border-radius: 100px;
  font-family: var(--font-body); font-size: 0.82rem; font-weight: 500;
  letter-spacing: 0.07em; text-transform: uppercase; cursor: pointer;
  transition: all 0.25s;
}
.filter-btn:hover, .filter-btn.active {
  background: rgba(0,200,255,0.12); border-color: var(--glow); color: var(--glow);
}

/* ── GALLERY SECTION ── */
.gallery-section {
  position: relative; z-index: 1;
  padding: 0 4rem 6rem;
}
.gallery-grid {
  max-width: 1400px; margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  grid-auto-rows: 280px;
  grid-auto-flow: dense;
  gap: 1rem;
}
.gallery-item {
  border-radius: 16px; overflow: hidden;
  position: relative; cursor: pointer;
  transition: transform 0.4s cubic-bezier(.23,1,.32,1), box-shadow 0.4s, opacity 0.3s;
  opacity: 0; animation: fadeInScale 0.6s ease forwards;
}
.gallery-item.reveal { opacity: 1; }
.gallery-item.tall { grid-row: span 2; }
.gallery-item.wide { grid-column: span 2; }
.gallery-item:hover {
  transform: translateY(-6px) scale(1.02);
  box-shadow: 0 30px 60px rgba(0,0,0,0.5), 0 0 25px rgba(0,200,255,0.15);
  z-index: 2;
}
.gallery-img-wrap {
  width: 100%; height: 100%; position: relative; overflow: hidden;
}
.gallery-img-wrap img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.6s cubic-bezier(.23,1,.32,1), filter 0.4s;
  filter: brightness(0.9) saturate(1.1);
}
.gallery-item:hover .gallery-img-wrap img {
  transform: scale(1.1);
  filter: brightness(0.7) saturate(1.3);
}
.gallery-overlay {
  position: absolute; inset: 0;
  display: flex; flex-direction: column; justify-content: flex-end;
  padding: 1.5rem;
  background: linear-gradient(to top, rgba(2,12,24,0.95) 0%, rgba(2,12,24,0.3) 50%, transparent 100%);
  opacity: 0; transition: opacity 0.4s;
  pointer-events: none;
}
.gallery-item:hover .gallery-overlay {
  opacity: 1;
}
.gallery-cat {
  font-size: 0.65rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--glow);
  margin-bottom: 0.4rem;
}
.gallery-overlay h3 {
  font-family: var(--font-display); font-size: 1.1rem; font-weight: 600;
  color: var(--light); margin-bottom: 0.8rem;
}
.gallery-zoom {
  position: absolute; top: 1rem; right: 1rem;
  width: 40px; height: 40px; border-radius: 50%;
  background: rgba(0,200,255,0.2); border: 1px solid rgba(0,200,255,0.4);
  color: var(--glow); font-size: 1rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s; opacity: 0; transform: scale(0.8);
  pointer-events: auto;
}
.gallery-item:hover .gallery-zoom {
  opacity: 1; transform: scale(1);
}
.gallery-zoom:hover {
  background: rgba(0,200,255,0.4); transform: scale(1.1);
}

/* ── LIGHTBOX ── */
.lightbox {
  position: fixed; inset: 0; z-index: 1000;
  background: rgba(2,12,24,0.97);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.lightbox.active {
  opacity: 1; pointer-events: auto;
}
.lightbox-content {
  position: relative; max-width: 90vw; max-height: 85vh;
  display: flex; flex-direction: column; align-items: center;
}
.lightbox-content img {
  max-width: 100%; max-height: 75vh; object-fit: contain;
  border-radius: 12px; box-shadow: 0 40px 80px rgba(0,0,0,0.6);
  animation: lightboxZoom 0.4s cubic-bezier(.23,1,.32,1);
}
@keyframes lightboxZoom {
  from { transform: scale(0.9); opacity: 0; }
  to { transform: scale(1); opacity: 1; }
}
.lightbox-caption {
  text-align: center; margin-top: 1.2rem;
}
.lightbox-cat {
  font-size: 0.7rem; font-weight: 700; letter-spacing: 0.15em;
  text-transform: uppercase; color: var(--glow); display: block; margin-bottom: 0.3rem;
}
.lightbox-caption h3 {
  font-family: var(--font-display); font-size: 1.3rem; color: var(--light);
}
.lightbox-close, .lightbox-prev, .lightbox-next {
  position: absolute; z-index: 1001;
  width: 50px; height: 50px; border-radius: 50%;
  background: rgba(0,200,255,0.15); border: 1px solid rgba(0,200,255,0.3);
  color: var(--glow); font-size: 1.5rem; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: all 0.3s;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(0,200,255,0.3); transform: scale(1.1);
}
.lightbox-close { top: 2rem; right: 2rem; }
.lightbox-prev { left: 2rem; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 2rem; top: 50%; transform: translateY(-50%); }
.lightbox-prev:hover { transform: translateY(-50%) scale(1.1); }
.lightbox-next:hover { transform: translateY(-50%) scale(1.1); }

/* ── CTA BANNER ── */
.cta-banner {
  position: relative; z-index: 1;
  margin: 0 4rem 6rem;
  max-width: 1200px; margin-left: auto; margin-right: auto;
  background: linear-gradient(135deg, rgba(0,60,120,0.5), rgba(0,180,255,0.1));
  border: 1px solid rgba(0,200,255,0.2); border-radius: 20px;
  padding: 3rem; text-align: center;
}
.cta-banner h2 { font-family: var(--font-display); font-size: 2rem; margin-bottom: 0.8rem; }
.cta-banner p { color: var(--muted); margin-bottom: 1.8rem; font-size: 0.95rem; }

/* ── GALLERY RESPONSIVE ── */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    grid-auto-rows: 240px;
  }
  .gallery-item.wide { grid-column: span 1; }
}
@media (max-width: 900px) {
  .gallery-section { padding: 0 1.5rem 4rem; }
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 200px;
  }
  .gallery-item.tall { grid-row: span 1; }
  .cta-banner { margin: 0 1.5rem 4rem; padding: 2rem; }
  .lightbox-prev { left: 1rem; }
  .lightbox-next { right: 1rem; }
  .lightbox-close { top: 1rem; right: 1rem; }
}
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    grid-auto-rows: 250px;
  }
  .gallery-item.wide { grid-column: span 1; }
}

/* ── ANIMATIONS ── */
@keyframes fadeInScale {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}
