﻿/* ===========================
   SERENOVA - GALLERY PAGE CSS
   =========================== */

/* PAGE BANNER (shared style - same as about) */
.page-banner {
  position: relative;
  height: 220px;
  background: url("https://images.unsplash.com/photo-1519823551278-64ac92734fb1?w=1400&q=80")
    center/cover no-repeat;
  display: flex;
  align-items: flex-end;
  padding-bottom: 2.5rem;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    to bottom,
    rgba(92, 45, 120, 0.6) 0%,
    rgba(40, 10, 60, 0.75) 100%
  );
}
.banner-content {
  position: relative;
  z-index: 1;
  padding: 0 3rem;
}
.banner-content h1 {
  font-family: var(--font-display);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--white);
  letter-spacing: 0.02em;
  margin-bottom: 0.4rem;
}
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.7);
}
.breadcrumb a {
  color: rgba(255, 255, 255, 0.7);
  transition: var(--transition);
}
.breadcrumb a:hover {
  color: var(--gold);
}
.breadcrumb span {
  color: rgba(255, 255, 255, 0.5);
}

/* ── GALLERY SECTION ── */
.gallery-section {
  padding: 5rem 0 4rem;
  background: var(--white);
  min-height: 60vh;
}

/* Filter Tabs */
.gallery-filters {
  display: flex;
  justify-content: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 3.5rem;
}
.gfilter {
  padding: 0.55rem 1.4rem;
  border: 1.5px solid var(--border);
  background: var(--off-white);
  border-radius: 30px;
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  transition: var(--transition);
}
.gfilter:hover {
  border-color: var(--purple-light);
  color: var(--purple);
  background: var(--purple-pale);
}
.gfilter.active {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2.5rem 2rem;
  margin-bottom: 3rem;
}

/* Gallery Item */
.gallery-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.8rem;
  cursor: pointer;
  transition: var(--transition);
}
.gallery-item.hidden {
  display: none;
}
.gallery-item:hover {
  transform: translateY(-6px);
}

/* Bloom / flower shape */
.bloom-wrap {
  width: 200px;
  height: 200px;
  position: relative;
}

.bloom-shape {
  width: 100%;
  height: 100%;
  background-size: cover;
  background-position: center;
  position: relative;
  /* 12-point star/flower using clip-path */
  clip-path: polygon(
    50% 0%,
    61% 15%,
    79% 9%,
    75% 27%,
    93% 30%,
    83% 46%,
    98% 55%,
    83% 63%,
    91% 80%,
    74% 80%,
    72% 98%,
    55% 88%,
    45% 98%,
    28% 82%,
    10% 88%,
    14% 70%,
    0% 60%,
    12% 47%,
    2% 32%,
    20% 28%,
    18% 10%,
    36% 15%
  );
  transition: var(--transition);
}

/* Coloured border ring effect - achieved with a pseudo behind clip */
.bloom-wrap::before {
  content: "";
  position: absolute;
  inset: -5px;
  background: linear-gradient(135deg, var(--purple-light), var(--gold));
  clip-path: polygon(
    50% 0%,
    61% 15%,
    79% 9%,
    75% 27%,
    93% 30%,
    83% 46%,
    98% 55%,
    83% 63%,
    91% 80%,
    74% 80%,
    72% 98%,
    55% 88%,
    45% 98%,
    28% 82%,
    10% 88%,
    14% 70%,
    0% 60%,
    12% 47%,
    2% 32%,
    20% 28%,
    18% 10%,
    36% 15%
  );
  z-index: 0;
  transition: var(--transition);
  opacity: 0.6;
}
.bloom-shape {
  z-index: 1;
}
.gallery-item:hover .bloom-wrap::before {
  opacity: 1;
  inset: -8px;
}

/* Hover overlay */
.bloom-overlay {
  position: absolute;
  inset: 0;
  background: rgba(92, 45, 120, 0.6);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}
.bloom-shape:hover .bloom-overlay {
  opacity: 1;
}

.bloom-zoom {
  width: 46px;
  height: 46px;
  background: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--purple);
  font-size: 1rem;
  transition: var(--transition);
}
.bloom-zoom:hover {
  background: var(--gold);
  color: var(--white);
  transform: scale(1.15);
}

.gitem-label {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 600;
  color: var(--text);
  text-align: center;
  letter-spacing: 0.02em;
}

/* Pagination */
.gallery-pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.5rem;
  margin-top: 1rem;
}
.gpage,
.gpage-next {
  width: 40px;
  height: 40px;
  border: 1.5px solid var(--border);
  background: var(--off-white);
  border-radius: 6px;
  font-family: var(--font-body);
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  cursor: pointer;
  transition: var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
}
.gpage:hover,
.gpage-next:hover {
  background: var(--purple-pale);
  color: var(--purple);
  border-color: var(--purple-light);
}
.gpage.active {
  background: var(--purple);
  color: var(--white);
  border-color: var(--purple);
}

/* ── LIGHTBOX ── */
.lb-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(15, 5, 25, 0.92);
  z-index: 2000;
  backdrop-filter: blur(6px);
}
.lb-backdrop.open {
  display: block;
}

.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 2100;
  align-items: center;
  justify-content: center;
}
.lightbox.open {
  display: flex;
}

.lb-img-wrap {
  max-width: 80vw;
  max-height: 85vh;
  text-align: center;
  animation: lbFadeIn 0.3s ease;
}
@keyframes lbFadeIn {
  from {
    opacity: 0;
    transform: scale(0.92);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
.lb-img-wrap img {
  max-width: 100%;
  max-height: 78vh;
  border-radius: 12px;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.5);
  display: block;
  margin: 0 auto;
}
.lb-caption {
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.85rem;
  margin-top: 0.8rem;
  font-family: var(--font-display);
  font-style: italic;
}

.lb-close,
.lb-prev,
.lb-next {
  position: fixed;
  background: rgba(255, 255, 255, 0.12);
  border: none;
  color: var(--white);
  cursor: pointer;
  transition: var(--transition);
  z-index: 2200;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lb-close:hover,
.lb-prev:hover,
.lb-next:hover {
  background: var(--purple);
}
.lb-close {
  top: 1.5rem;
  right: 1.5rem;
  width: 44px;
  height: 44px;
  font-size: 1.1rem;
}
.lb-prev {
  top: 50%;
  left: 1.5rem;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1rem;
}
.lb-next {
  top: 50%;
  right: 1.5rem;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  font-size: 1rem;
}

/* FOOTER top logo (shared with about) */
.footer-top-logo {
  text-align: center;
  padding-bottom: 2.5rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  margin-bottom: 2.5rem;
}
.footer-brand-center {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

/* ── RESPONSIVE ── */
@media (max-width: 1024px) {
  .gallery-grid {
    grid-template-columns: repeat(3, 1fr);
  }
  .bloom-wrap {
    width: 170px;
    height: 170px;
  }
}
@media (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem 1.5rem;
  }
  .bloom-wrap {
    width: 150px;
    height: 150px;
  }
  .banner-content {
    padding: 0 1.5rem;
  }
  .banner-content h1 {
    font-size: 1.8rem;
  }
  .lb-prev {
    left: 0.5rem;
  }
  .lb-next {
    right: 0.5rem;
  }
}
@media (max-width: 480px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 1rem;
  }
  .bloom-wrap {
    width: 130px;
    height: 130px;
  }
}
