/* ============================================
   GALLERY HERO — CSS Parallax Image Wall
   Full-viewport cinematic wall with centered text overlay
   ============================================ */
:root {
  --gallery-duration: 15s;
}

.qs-gallery-hero {
  position: relative;
  width: 100%;
  min-height: 100vh;
  max-height: 880px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #131520;
}

/* ============================================
   PARALLAX IMAGE WALL — Background Layer
   ============================================ */
.qs-gallery-hero__wall {
  position: absolute;
  display: flex;
  flex-direction: column;
  justify-content: center;
  height: 150vh;
  left: 50%;
  top: 50%;
  opacity: 0.8;
  transform: translate3d(-50%, -50%, 0) perspective(800px) rotateY(10deg) rotateX(-10deg);
  z-index: 0;
}

/* ── Image Rows ────────────────────────────── */
.qs-gallery-hero__row {
  display: flex;
  animation: galleryRunner var(--gallery-duration) linear infinite;
  transform: translateX(23%);
}

/* Even rows scroll slower for depth */
.qs-gallery-hero__row:nth-child(even) {
  animation-duration: calc(var(--gallery-duration) * 1.5);
}

/* ── Individual Cards ──────────────────────── */
.qs-gallery-hero__card {
  flex: none;
  width: 20vh;
  height: 29vh;
  margin: clamp(10px, 2vw, 20px);
  position: relative;
  border-radius: 1rem;
  background-position: 50% 50%;
  background-size: cover;
  transition: ease-in-out all 0.3s;
}

/* Inner image layer (for scale-on-hover) */
.qs-gallery-hero__card-img {
  position: absolute;
  z-index: 2;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-position: 50% 50%;
  background-size: cover;
  transition: ease-in-out all 0.3s;
  overflow: hidden;
  border-radius: 1rem;
}

/* Blur glow behind card */
.qs-gallery-hero__card::after {
  content: "";
  background: inherit;
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  top: 3vh;
  position: absolute;
  background-size: cover;
  z-index: -1;
  transition: ease-in-out all 0.3s;
  filter: blur(25px) opacity(0.8);
}

/* Hover — scale image + intensify glow */
.qs-gallery-hero__card:hover .qs-gallery-hero__card-img {
  cursor: pointer;
  transform: scale(1.1) translateZ(0);
}
.qs-gallery-hero__card:hover::after {
  filter: blur(35px) opacity(0.8);
}

/* Infinite scroll keyframe */
@keyframes galleryRunner {
  to {
    transform: translateX(-10.4%);
  }
}

/* ============================================
   DARK OVERLAY — Text Readability
   ============================================ */
.qs-gallery-hero__overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: radial-gradient(
    ellipse 80% 70% at 50% 50%,
    rgba(0, 0, 0, 0.35) 0%,
    rgba(0, 0, 0, 0.45) 40%,
    rgba(0, 0, 0, 0.85) 70%,
    #131520 90%
  );
}

/* ── Bottom Fade Mask ──────────────────────── */
.qs-gallery-hero__fade {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 180px;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    to bottom,
    transparent 0%,
    rgba(2, 6, 23, 0.15) 20%,
    rgba(2, 6, 23, 0.45) 45%,
    rgba(2, 6, 23, 0.75) 65%,
    rgba(2, 6, 23, 0.92) 80%,
    #020617 100%
  );
}

/* ============================================
   COPY OVERLAY — Centered (matching studies/testimonials)
   ============================================ */
.qs-gallery-hero__wrapper {
  position: relative;
  z-index: 3;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: clamp(2.5rem, 8vh, 6rem) 2rem 4rem;
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  pointer-events: none;
}

/* ── Center Content ─────────────────────────── */
.qs-gallery-hero__center {
  text-align: center;
  max-width: 800px;
  width: 100%;
  pointer-events: none;
}

/* Only interactive elements capture clicks */
.qs-gallery-hero__btn,
.qs-gallery-hero__stats {
  pointer-events: auto;
}

/* ── Tag Pill ───────────────────────────────── */
.qs-gallery-hero__tag {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.5rem 1rem 0.5rem 0.6rem;
  background: rgba(3, 3, 5, 0.5);
  border: 1px solid rgba(56, 189, 248, 0.25);
  border-radius: 100px;
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--qs-accent, #38bdf8);
  margin-bottom: 1.5rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.qs-gallery-hero__tag-icon {
  width: 20px;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.qs-gallery-hero__tag-icon svg {
  width: 16px;
  height: 16px;
}

/* ── Title ───────────────────────────────── */
.qs-gallery-hero__title {
  margin-bottom: 1.25rem;
}

.qs-gallery-hero__title-top {
  display: block;
  font-family: var(--qs-font-display, "Syncopate", sans-serif);
  font-size: clamp(1.25rem, 3.5vw, 2rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 0.5rem;
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

.qs-gallery-hero__title-main {
  display: block;
  font-family: var(--qs-font-display, "Syncopate", sans-serif);
  font-size: clamp(2.5rem, 9vw, 6rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: uppercase;
  line-height: 0.95;
  background: linear-gradient(
    135deg,
    #fff 0%,
    #fff 40%,
    var(--qs-accent, #38bdf8) 60%,
    var(--qs-secondary, #818cf8) 100%
  );
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ── Subtitle ───────────────────────────────── */
.qs-gallery-hero__subtitle {
  font-size: clamp(1rem, 2vw, 1.15rem);
  line-height: 1.7;
  color: var(--qs-text-muted, #94a3b8);
  max-width: 520px;
  margin: 0 auto 2rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.5);
}

/* ── Stats Pill ─────────────────────────────── */
.qs-gallery-hero__stats {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 2rem;
  margin-bottom: 2rem;
  padding: 1.5rem 2rem;
  background: rgba(3, 3, 5, 0.55);
  border: 1px solid var(--qs-glass-border, rgba(255, 255, 255, 0.08));
  border-radius: 100px;
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.qs-gallery-hero__stat {
  text-align: center;
}

.qs-gallery-hero__stat-value {
  display: block;
  font-family: var(--qs-font-display, "Syncopate", sans-serif);
  font-size: 1.75rem;
  font-weight: 700;
  color: #fff;
  letter-spacing: 0.02em;
}

.qs-gallery-hero__stat-label {
  display: block;
  font-size: 0.65rem;
  color: var(--qs-text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  margin-top: 0.25rem;
}

.qs-gallery-hero__stat-divider {
  width: 1px;
  height: 40px;
  background: var(--qs-glass-border, rgba(255, 255, 255, 0.08));
}

/* ── Actions ────────────────────────────────── */
.qs-gallery-hero__actions {
  display: flex;
  justify-content: center;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.qs-gallery-hero__btn {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  padding: 1rem 2rem;
  border-radius: 100px;
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: all 0.4s ease;
  cursor: pointer;
  border: none;
}

.qs-gallery-hero__btn--primary {
  background: var(--qs-accent, #38bdf8);
  color: #000;
  box-shadow: 0 0 40px rgba(56, 189, 248, 0.3);
}

.qs-gallery-hero__btn--primary:hover {
  background: #fff;
  box-shadow: 0 0 60px rgba(255, 255, 255, 0.4);
  transform: translateY(-2px);
}

.qs-gallery-hero__btn--ghost {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #fff;
}

.qs-gallery-hero__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.3);
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 1080px) {
  .qs-gallery-hero__wrapper {
    padding: 2.5rem 1.5rem 2rem;
  }

  .qs-gallery-hero__stats {
    flex-wrap: wrap;
    gap: 1.5rem;
    padding: 1.25rem 1.5rem;
    border-radius: 24px;
  }

  .qs-gallery-hero__stat-value {
    font-size: 1.5rem;
  }

  .qs-gallery-hero__card {
    width: 18vh;
    height: 26vh;
  }
}

@media (max-width: 760px) {
  .qs-gallery-hero {
    min-height: 100svh;
    max-height: none;
  }

  .qs-gallery-hero__wrapper {
    padding: clamp(5rem, 10vh, 7rem) 1.5rem 0;
  }

  .qs-gallery-hero__tag {
    font-size: 0.65rem;
  }

  .qs-gallery-hero__stats {
    flex-direction: column;
    gap: 1rem;
    padding: 1.25rem;
  }

  .qs-gallery-hero__stat-divider {
    width: 60px;
    height: 1px;
  }

  .qs-gallery-hero__actions {
    flex-direction: column;
    width: 100%;
    max-width: 280px;
    margin: 0 auto 1rem;
  }

  .qs-gallery-hero__btn {
    width: 100%;
    justify-content: center;
  }

  .qs-gallery-hero__card {
    width: 15vh;
    height: 22vh;
    margin: clamp(6px, 1.5vw, 12px);
  }

  .qs-gallery-hero__wall {
    opacity: 0.65;
  }
}
