/* GALLERY PAGE */

body[data-page="gallery"] .section {
  padding: 88px 0;
}

/* HERO */
.gallery-hero {
  position: relative;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(7, 5, 6, 0.16) 0%, rgba(7, 5, 6, 0.26) 36%, rgba(7, 5, 6, 0.82) 100%),
    linear-gradient(135deg, #070506 0%, #14090d 100%);
}

.gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 18% 22%, rgba(242, 196, 205, 0.16), transparent 24%),
    radial-gradient(circle at 82% 76%, rgba(221, 176, 107, 0.12), transparent 22%);
  pointer-events: none;
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 5, 6, 0.08), rgba(7, 5, 6, 0.22));
  pointer-events: none;
}

.gallery-hero-glow {
  position: absolute;
  border-radius: 999px;
  filter: blur(60px);
  opacity: 0.18;
  pointer-events: none;
}

.gallery-hero-glow-left {
  width: 280px;
  height: 280px;
  left: -80px;
  top: 120px;
  background: rgba(242, 196, 205, 0.62);
}

.gallery-hero-glow-right {
  width: 240px;
  height: 240px;
  right: -60px;
  bottom: 50px;
  background: rgba(221, 176, 107, 0.4);
}

.gallery-hero-inner {
  position: relative;
  z-index: 2;
  display: block;
  padding-top: 138px;
  padding-bottom: 24px;
}

.gallery-hero-copy {
  width: 100%;
  max-width: 980px;
  margin: 0 auto;
  text-align: center;
}

.gallery-title {
  margin: 0;
  font-family: var(--font-heading);
  font-size: clamp(32px, 8vw, 68px);
  line-height: 0.94;
  color: var(--gold-soft);
  text-align: center;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.08);
}

.gallery-title-line {
  display: block;
}

.gallery-title-line + .gallery-title-line {
  margin-top: 4px;
}

.gallery-hero-text {
  max-width: 760px;
  margin: 22px auto 0;
  font-size: 16px;
  line-height: 1.72;
  color: var(--text-muted);
  text-align: center;
}

.gallery-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* PROOF CARDS */
.gallery-proof-section {
  padding-top: 12px;
  padding-bottom: 18px;
}

.gallery-proof-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
}

.gallery-proof-card,
.gallery-side-card,
.gallery-seo-copy,
.gallery-lightbox-panel,
.gallery-cta-wrap {
  border-radius: 30px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(13, 7, 10, 0.92);
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}

.gallery-proof-card {
  padding: 24px;
}

.gallery-proof-card h3 {
  margin: 0 0 12px;
  font-family: var(--font-body);
  font-size: 23px;
  font-weight: 800;
  line-height: 1.18;
  color: var(--text-main);
  letter-spacing: 0;
  text-transform: none;
}

.gallery-proof-card p:last-child {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-muted);
  line-height: 1.68;
  font-size: 15.5px;
}

/* INTRO */
.gallery-intro-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}

.gallery-intro-copy h2,
.gallery-seo-copy h2,
.gallery-cta-wrap h2 {
  margin: 0 0 16px;
  font-family: var(--font-heading);
  font-size: clamp(28px, 6.8vw, 40px);
  line-height: 0.98;
  color: var(--gold-soft);
}

.gallery-intro-copy p,
.gallery-seo-copy p,
.gallery-cta-wrap p {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.72;
  font-size: 15.5px;
}

.gallery-intro-copy p + p,
.gallery-seo-copy p + p,
.gallery-cta-wrap p + p {
  margin-top: 14px;
}

.gallery-side-card {
  padding: 22px;
}

.gallery-check-list {
  margin: 20px 0 0;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 12px;
}

.gallery-check-list li {
  position: relative;
  padding-left: 28px;
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 15.5px;
  line-height: 1.72;
}

.gallery-check-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  top: 0.04em;
  color: var(--gold-soft);
  font-weight: 700;
}

/* TOOLBAR */
.gallery-toolbar {
  margin-bottom: 26px;
}

.gallery-filter-scroll {
  display: flex;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 4px;
  scrollbar-width: none;
}

.gallery-filter-scroll::-webkit-scrollbar {
  display: none;
}

.gallery-filter {
  appearance: none;
  border: 1px solid rgba(243, 214, 167, 0.26);
  background: rgba(255, 255, 255, 0.04);
  color: var(--gold-soft);
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition:
    background 0.25s ease,
    border-color 0.25s ease,
    transform 0.25s ease,
    color 0.25s ease;
}

.gallery-filter:hover {
  transform: translateY(-2px);
  border-color: rgba(217, 148, 166, 0.45);
}

.gallery-filter.is-active {
  color: #1a1113;
  background: linear-gradient(135deg, var(--blush) 0%, var(--rose) 42%, var(--gold) 100%);
  border-color: transparent;
}

/* GRID */
.gallery-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
}

.gallery-card {
  transition:
    transform 0.28s ease,
    opacity 0.28s ease;
  opacity: 1;
  visibility: visible;
}

.gallery-card.is-hidden {
  display: none;
}

.gallery-item {
  appearance: none;
  width: 100%;
  padding: 0;
  border: 0;
  background: transparent;
  position: relative;
  border-radius: 24px;
  overflow: hidden;
  cursor: pointer;
  box-shadow: var(--shadow);
  display: block;
}

.gallery-item::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(7, 5, 6, 0.02) 24%, rgba(7, 5, 6, 0.2) 62%, rgba(7, 5, 6, 0.84) 100%);
  pointer-events: none;
}

.gallery-item img {
  width: 100%;
  aspect-ratio: 1 / 1.08;
  object-fit: cover;
  display: block;
  transition: transform 0.45s ease;
  background: rgba(255, 255, 255, 0.03);
  opacity: 1;
  visibility: visible;
}

.gallery-item:hover img,
.gallery-item:focus-visible img {
  transform: scale(1.04);
}

.gallery-item-overlay {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  padding: 16px;
  display: grid;
  gap: 8px;
  text-align: left;
}

.gallery-item-tag {
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(7, 5, 6, 0.82);
  border: 1px solid rgba(243, 214, 167, 0.22);
  color: var(--gold-soft);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.gallery-item-title {
  font-size: 18px;
  font-weight: 700;
  color: #fff;
  line-height: 1.15;
}

/* SEO COPY / CTA */
.gallery-seo-copy {
  padding: 24px;
}

.gallery-cta-section {
  padding-top: 42px;
}

.gallery-cta-wrap {
  max-width: 980px;
  margin: 0 auto;
  padding: 30px 26px;
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(242, 196, 205, 0.12), transparent 42%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
    rgba(13, 7, 10, 0.94);
}

.gallery-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}

/* LIGHTBOX */
.gallery-lightbox {
  position: fixed;
  inset: 0;
  z-index: 3500;
  display: none;
}

.gallery-lightbox.is-open {
  display: block;
}

.gallery-lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.82);
  backdrop-filter: blur(8px);
}

.gallery-lightbox-panel {
  position: relative;
  width: min(1080px, calc(100% - 20px));
  max-height: min(92vh, 980px);
  margin: 3vh auto 0;
  overflow: auto;
  padding: 18px;
}

.gallery-lightbox-close {
  appearance: none;
  position: absolute;
  top: 12px;
  right: 12px;
  width: 42px;
  height: 42px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
  z-index: 4;
}

.gallery-lightbox-nav {
  appearance: none;
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 46px;
  height: 46px;
  border: 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 4;
}

.gallery-lightbox-prev {
  left: 12px;
}

.gallery-lightbox-next {
  right: 12px;
}

.gallery-lightbox-nav span {
  font-size: 28px;
  line-height: 1;
}

.gallery-lightbox-image-wrap {
  overflow: hidden;
  border-radius: 22px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  touch-action: pan-y;
}

.gallery-lightbox-image-wrap img {
  width: 100%;
  display: block;
  max-height: 68vh;
  object-fit: contain;
  background: #0a0608;
}

.gallery-lightbox-copy {
  padding: 18px 4px 4px;
}

.gallery-lightbox-copy h3 {
  margin: 0 0 10px;
  font-size: 24px;
  color: var(--text-main);
}

.gallery-lightbox-copy p:last-child {
  margin: 0;
  color: var(--text-muted);
  line-height: 1.7;
}

.gallery-lightbox-count {
  margin-top: 12px !important;
  font-size: 13px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(243, 214, 167, 0.78);
}

/* TABLET */
@media (min-width: 641px) {
  .gallery-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
  }

  .gallery-card-featured {
    grid-column: span 2;
  }

  .gallery-card-featured .gallery-item img {
    aspect-ratio: 16 / 9;
  }

  .gallery-card-tall .gallery-item img {
    aspect-ratio: 4 / 5;
  }

  .gallery-proof-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-intro-grid {
    grid-template-columns: 1.02fr 0.98fr;
    gap: 28px;
    align-items: start;
  }
}

/* DESKTOP */
@media (min-width: 981px) {
  .gallery-hero {
    background:
      linear-gradient(180deg, rgba(7, 5, 6, 0.14) 0%, rgba(7, 5, 6, 0.24) 34%, rgba(7, 5, 6, 0.8) 100%),
      linear-gradient(135deg, #070506 0%, #14090d 100%);
  }

  .gallery-hero-copy {
    max-width: 920px;
  }

  .gallery-title {
    font-size: clamp(42px, 5.3vw, 72px);
  }

  .gallery-hero-text {
    max-width: 780px;
    margin: 24px auto 0;
    font-size: clamp(16px, 1.35vw, 18px);
  }

  .gallery-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .gallery-card-featured {
    grid-column: span 2;
  }

  .gallery-card-featured .gallery-item img {
    aspect-ratio: 16 / 10;
  }

  .gallery-card-tall {
    grid-row: span 2;
  }

  .gallery-card-tall .gallery-item img {
    height: 100%;
    min-height: 100%;
    aspect-ratio: 4 / 5.2;
  }

  .gallery-item-overlay {
    padding: 20px;
  }

  .gallery-item-title {
    font-size: 20px;
  }

  .gallery-lightbox-panel {
    padding: 22px;
  }

  .gallery-cta-wrap {
    padding: 38px 42px;
  }
}

/* MOBILE */
@media (max-width: 640px) {
  body[data-page="gallery"] .section {
    padding: 72px 0;
  }

  .gallery-hero-inner {
    padding-top: 96px;
    padding-bottom: 20px;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .gallery-card,
  .gallery-card-featured,
  .gallery-card-tall {
    display: block;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  .gallery-item {
    display: block;
    min-height: 260px;
  }

  .gallery-item img {
    width: 100%;
    height: 260px;
    min-height: 260px;
    aspect-ratio: auto;
    object-fit: cover;
    display: block;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .gallery-lightbox-nav {
    width: 42px;
    height: 42px;
  }

  .gallery-lightbox-prev {
    left: 8px;
  }

  .gallery-lightbox-next {
    right: 8px;
  }
}