/* =============================================================
   MAPLE HEAD SPA — GALLERY PAGE STYLES
============================================================= */

/* === HERO === */
.gallery-hero {
  position: relative; min-height: 75vh; overflow: hidden;
  display: flex; align-items: center; justify-content: center;
  text-align: center; padding: 140px 24px 80px;
  background: linear-gradient(rgba(26,17,9,.55), rgba(26,17,9,.78)),
    url('https://images.unsplash.com/photo-1540555700478-4be289fbecef?q=80&w=2000&auto=format&fit=crop')
    center/cover no-repeat;
}
.gallery-hero::before {
  content: ''; position: absolute; inset: 0;
  background: radial-gradient(circle at center, rgba(201,169,110,.1), transparent 60%);
  pointer-events: none;
}
.hero-content { position: relative; z-index: 2; max-width: 820px; }
.hero-sub {
  color: var(--bronze); letter-spacing: 6px; text-transform: uppercase; font-size: 11px;
  margin-bottom: 24px; opacity: 0; transform: translateY(20px);
  animation: fadeUp 1s .3s forwards;
}
.hero-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(48px,8vw,100px); line-height: .95;
  color: var(--light); font-weight: 300; margin-bottom: 28px;
  opacity: 0; transform: translateY(30px); animation: fadeUp 1s .5s forwards;
}
.hero-title em { color: var(--bronze); font-style: italic; }
.hero-text {
  max-width: 600px; margin: auto; color: rgba(244,238,226,.78);
  line-height: 1.9; font-size: 16px;
  opacity: 0; transform: translateY(20px); animation: fadeUp 1s .8s forwards;
}

/* === GALLERY GRID === */
.gallery-section { padding: 120px 0 140px; background: var(--cream); }
.container { width: 100%; max-width: 1340px; margin: auto; padding: 0 40px; }
.filter-bar {
  display: flex; flex-wrap: wrap; justify-content: center; align-items: center;
  gap: 8px; margin-bottom: 64px;
}
.filter-btn {
  padding: 12px 26px;
  font-family: 'Jost', sans-serif; font-size: 11px; letter-spacing: 3.5px;
  text-transform: uppercase; color: var(--brown);
  background: transparent; border: 1px solid rgba(201,169,110,.3);
  border-radius: 999px; cursor: pointer; transition: all .45s var(--ease-soft);
}
.filter-btn:hover { border-color: var(--bronze); color: var(--bronze-d); }
.filter-btn.active { background: var(--brown); color: var(--light); border-color: var(--brown); }
.gallery-grid {
  display: grid; grid-template-columns: repeat(3,1fr);
  grid-auto-rows: 280px; grid-auto-flow: dense; gap: 18px;
}
.g-item {
  position: relative; overflow: hidden; cursor: pointer;
  background: #e7dfd1; transition: opacity .5s ease, transform .5s ease;
}
.g-item.hidden { opacity: 0; transform: scale(.95); pointer-events: none; position: absolute; width: 0; height: 0; visibility: hidden; }
.g-item.wide  { grid-column: span 2; }
.g-item.tall  { grid-row: span 2; }
.g-item.large { grid-column: span 2; grid-row: span 2; }
.g-item img   { width: 100%; height: 100%; object-fit: cover; transition: transform 1.1s var(--ease-soft); }
.g-item:hover img { transform: scale(1.06); }
.g-overlay {
  position: absolute; inset: 0;
  background: linear-gradient(to top, rgba(26,17,9,.75) 0%, rgba(26,17,9,.15) 50%, transparent 100%);
  opacity: 0; transition: opacity .5s ease;
  display: flex; align-items: flex-end; padding: 24px;
}
.g-item:hover .g-overlay { opacity: 1; }
.g-caption { color: var(--light); transform: translateY(8px); transition: transform .5s var(--ease-soft); }
.g-item:hover .g-caption { transform: translateY(0); }
.g-caption .tag { display: inline-block; font-size: 9px; letter-spacing: 3px; color: var(--bronze); text-transform: uppercase; margin-bottom: 6px; }
.g-caption h4 { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 400; line-height: 1.2; }
.g-view {
  position: absolute; top: 18px; right: 18px; width: 38px; height: 38px;
  border-radius: 50%; background: rgba(246,241,230,.92);
  display: flex; align-items: center; justify-content: center;
  opacity: 0; transform: scale(.8); transition: all .4s ease;
}
.g-item:hover .g-view { opacity: 1; transform: scale(1); }
.g-view svg { width: 16px; height: 16px; stroke: var(--brown); fill: none; stroke-width: 1.6; }
.g-item.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s ease, transform .9s ease; }
.g-item.reveal.in-view { opacity: 1; transform: translateY(0); }

/* === CTA === */
.cta-section {
  position: relative; padding: 140px 24px; text-align: center;
  background: var(--dark); color: var(--light); overflow: hidden;
}
.cta-section::before,
.cta-section::after {
  content: ""; position: absolute; left: 50%; transform: translateX(-50%);
  width: 140px; height: 1px; background: rgba(201,169,110,.35);
}
.cta-section::before { top: 0; }
.cta-section::after  { bottom: 0; }
.cta-inner { max-width: 680px; margin: auto; position: relative; z-index: 1; }
.cta-sub   { font-size: 10px; letter-spacing: 5px; text-transform: uppercase; color: var(--bronze); margin-bottom: 20px; }
.cta-section h2 { font-family: 'Cormorant Garamond', serif; font-size: clamp(34px,5vw,56px); font-weight: 300; line-height: 1.1; margin-bottom: 24px; }
.cta-section h2 em { color: var(--bronze); font-style: italic; }
.cta-section p { color: rgba(244,238,226,.7); line-height: 1.9; font-size: 15px; margin-bottom: 42px; }
.cta-btn {
  position: relative; overflow: hidden;
  display: inline-flex; align-items: center; justify-content: center; gap: 14px;
  height: 58px; padding: 0 38px; border-radius: 999px;
  background: var(--bronze); color: var(--dark);
  letter-spacing: 4px; text-transform: uppercase; font-size: 11px; font-weight: 600;
  transition: all .45s var(--ease-soft);
}
.cta-btn::before {
  content: ''; position: absolute; inset: 0; background: var(--brown);
  transform: translateX(-100%); transition: transform .5s var(--ease-soft);
}
.cta-btn > * { position: relative; z-index: 2; transition: color .4s ease, transform .4s ease; }
.cta-btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.cta-btn:hover { transform: translateY(-4px); color: var(--light); box-shadow: 0 16px 40px rgba(201,169,110,.25); }
.cta-btn:hover::before { transform: translateX(0); }
.cta-btn:hover svg { transform: translateX(5px); }

/* === LIGHTBOX === */
.lightbox {
  position: fixed; inset: 0; background: rgba(10,7,3,.94);
  backdrop-filter: blur(12px); z-index: 99999;
  display: flex; align-items: center; justify-content: center; padding: 40px;
  opacity: 0; pointer-events: none; transition: opacity .4s ease;
}
.lightbox.active { opacity: 1; pointer-events: auto; }
.lightbox-inner {
  position: relative; max-width: 1100px; width: 100%; max-height: 90vh;
  display: flex; align-items: center; justify-content: center;
  transform: scale(.96); transition: transform .4s var(--ease-soft);
}
.lightbox.active .lightbox-inner { transform: scale(1); }
.lightbox-inner img { max-width: 100%; max-height: 85vh; object-fit: contain; box-shadow: 0 30px 80px rgba(0,0,0,.5); }
.lb-btn {
  position: absolute; width: 48px; height: 48px; border-radius: 50%;
  background: rgba(246,241,230,.12); border: 1px solid rgba(201,169,110,.3);
  color: var(--light); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  backdrop-filter: blur(10px); transition: all .45s var(--ease-soft);
}
.lb-btn:hover { background: var(--bronze); color: var(--dark); border-color: var(--bronze); }
.lb-btn svg { width: 18px; height: 18px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.lb-close { top: 30px; right: 30px; }
.lb-prev  { left: 30px; top: 50%; transform: translateY(-50%); }
.lb-next  { right: 30px; top: 50%; transform: translateY(-50%); }
.lb-counter { position: absolute; bottom: 30px; left: 50%; transform: translateX(-50%); font-family: 'Cormorant Garamond', serif; font-size: 14px; letter-spacing: 3px; color: rgba(244,238,226,.7); }

/* === ANIMATIONS === */
@keyframes fadeUp { to { opacity: 1; transform: translateY(0); } }

/* === RESPONSIVE === */
@media (max-width: 991px) {
  .gallery-grid { grid-template-columns: repeat(2,1fr); grid-auto-rows: 240px; gap: 14px; }
  .g-item.large { grid-column: span 2; }
}
@media (max-width: 600px) {
  .container { padding: 0 20px; }
  .gallery-section { padding: 80px 0 100px; }
  .filter-bar { margin-bottom: 40px; gap: 6px; }
  .filter-btn { padding: 10px 18px; font-size: 10px; letter-spacing: 2.5px; }
  .gallery-grid { grid-template-columns: 1fr; grid-auto-rows: 240px; gap: 12px; }
  .g-item.wide, .g-item.tall, .g-item.large { grid-column: span 1; grid-row: span 1; }
  .gallery-hero { min-height: 65vh; padding: 110px 20px 60px; }
  .cta-section { padding: 90px 20px; }
  .lb-close { top: 18px; right: 18px; }
  .lb-prev, .lb-next { display: none; }
  .lightbox { padding: 20px; }
  .footer-container { padding: 0 24px; }
}
