/* =========================================================
   DVS TECH — GALLERY PAGE
   Hero slideshow + full-page card carousels
========================================================= */

/* =========================
   HERO
========================= */

.gallery-hero {
  position: relative;
  min-height: calc(100vh - 82px);
  display: grid;
  align-items: center;
  overflow: hidden;
  padding: clamp(6rem, 10vw, 8rem) 0 clamp(4.5rem, 8vw, 7rem);
  border-bottom: 1px solid rgba(92, 244, 236, 0.12);
  background: #020607;
}

.gallery-hero-bg-slides {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.gallery-hero-slide {
  position: absolute;
  inset: 0;
  background-image: var(--gallery-hero-bg-desktop);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transform: scale(1.04);
  animation: galleryHeroSlideshow 24s infinite;
}

.gallery-slide-one {
  animation-delay: 0s;
}

.gallery-slide-two {
  animation-delay: 6s;
}

.gallery-slide-three {
  animation-delay: 12s;
}

.gallery-slide-four {
  animation-delay: 18s;
}

.gallery-hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  background:
    linear-gradient(90deg, rgba(2, 7, 8, 0.94) 0%, rgba(2, 7, 8, 0.82) 34%, rgba(2, 7, 8, 0.52) 68%, rgba(2, 7, 8, 0.72) 100%),
    radial-gradient(circle at 72% 35%, rgba(92, 244, 236, 0.16), transparent 42%),
    linear-gradient(180deg, rgba(2, 7, 8, 0.54), rgba(2, 7, 8, 0.9));
  pointer-events: none;
}

.gallery-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(92, 244, 236, 0.018) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 244, 236, 0.03) 1px, transparent 1px);
  background-size: 72px 72px;
  opacity: 0.55;
  mask-image: linear-gradient(to bottom, black, transparent 92%);
}

.gallery-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 32%;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(3, 7, 8, 0.98));
}

.gallery-hero-content {
  position: relative;
  z-index: 3;
  max-width: none;
}

.gallery-hero-content h1 {
  width: min(76vw, 980px);
  max-width: 980px;
  text-wrap: balance;
  text-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.gallery-hero-content h1::after {
  content: "";
  display: block;
  width: 150px;
  height: 3px;
  margin-top: 1.35rem;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--cyan), transparent);
  box-shadow: 0 0 22px rgba(92, 244, 236, 0.28);
}

.gallery-hero-lead {
  max-width: 690px;
  margin-top: 1.45rem;
  color: rgba(245, 255, 255, 0.76);
  font-size: clamp(1rem, 1.7vw, 1.18rem);
  text-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}

.gallery-hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  margin-top: 2rem;
}

@keyframes galleryHeroSlideshow {
  0% {
    opacity: 0;
    transform: scale(1.04);
  }

  7% {
    opacity: 1;
  }

  25% {
    opacity: 1;
    transform: scale(1);
  }

  32% {
    opacity: 0;
    transform: scale(1);
  }

  100% {
    opacity: 0;
    transform: scale(1.04);
  }
}

/* =========================
   SHARED SECTIONS
========================= */

.gallery-showcase,
.gallery-final {
  position: relative;
  overflow: hidden;
  background:
    radial-gradient(circle at 18% 8%, rgba(92, 244, 236, 0.035), transparent 30%),
    linear-gradient(180deg, rgba(2, 6, 7, 0.99), rgba(1, 3, 4, 0.99));
}

.gallery-showcase::before,
.gallery-final::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 82% 12%, rgba(92, 244, 236, 0.04), transparent 30%),
    linear-gradient(120deg, transparent 0%, rgba(92, 244, 236, 0.012) 45%, transparent 68%);
}

.gallery-showcase-alt {
  background:
    radial-gradient(circle at 82% 0%, rgba(92, 244, 236, 0.035), transparent 30%),
    linear-gradient(180deg, rgba(5, 8, 10, 0.99), rgba(1, 3, 4, 0.99));
}

.gallery-showcase-head {
  position: relative;
  z-index: 2;
  max-width: 920px;
  margin-bottom: clamp(1.8rem, 5vw, 3rem);
}

.gallery-showcase-head h2 {
  max-width: 900px;
}

.gallery-showcase-head > p:not(.eyebrow),
.gallery-final-shell > p:not(.eyebrow) {
  max-width: 760px;
  margin-top: 1.25rem;
  color: rgba(220, 232, 234, 0.74);
  font-size: clamp(1rem, 1.55vw, 1.1rem);
  line-height: 1.65;
}

/* =========================
   BIG CARD CAROUSELS
========================= */

.gallery-card-carousel {
  position: relative;
  z-index: 2;
  width: 100%;
}

.gallery-card-track {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(78vw, 78vw);
  gap: clamp(1rem, 2vw, 1.35rem);
  width: 100%;
  overflow-x: auto;
  overflow-y: hidden;
  scroll-snap-type: x mandatory;
  scroll-padding-inline: max(1rem, calc((100vw - var(--container)) / 2));
  padding: 0 max(1rem, calc((100vw - var(--container)) / 2)) 0.8rem;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}

.gallery-card-track::-webkit-scrollbar {
  display: none;
}

.gallery-photo-card {
  position: relative;
  min-height: min(78vh, 720px);
  display: grid;
  align-items: end;
  scroll-snap-align: center;
  border: 1px solid rgba(92, 244, 236, 0.18);
  border-radius: 24px;
  background:
    radial-gradient(circle at 50% 28%, rgba(92, 244, 236, 0.12), transparent 44%),
    linear-gradient(145deg, rgba(255, 255, 255, 0.038), transparent 38%),
    linear-gradient(180deg, rgba(20, 30, 37, 0.86), rgba(5, 8, 10, 0.97));
  box-shadow:
    0 34px 105px rgba(0, 0, 0, 0.42),
    0 0 40px rgba(92, 244, 236, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.045);
  overflow: hidden;
  transform: translateY(0);
  transition:
    transform 220ms ease,
    border-color 220ms ease,
    box-shadow 220ms ease;
}

.gallery-photo-card:hover,
.gallery-photo-card:focus-within {
  transform: translateY(-6px);
  border-color: rgba(92, 244, 236, 0.34);
  box-shadow:
    0 44px 130px rgba(0, 0, 0, 0.52),
    0 0 50px rgba(92, 244, 236, 0.13),
    inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
/* Subtle stacked-photo feeling without crooked cards */
.gallery-photo-card::marker {
  display: none;
}

.gallery-photo-card img {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
  opacity: 0.96;
}

.gallery-photo-fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(circle at 50% 30%, rgba(92, 244, 236, 0.18), transparent 42%),
    linear-gradient(120deg, transparent 0%, rgba(92, 244, 236, 0.055) 44%, transparent 64%),
    linear-gradient(180deg, rgba(18, 27, 34, 0.96), rgba(1, 4, 6, 0.98));
}

.gallery-photo-fallback::before {
  content: "New Gallery Coming Soon";
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(92%, 780px);
  transform: translate(-50%, -50%);
  color: rgba(245, 255, 255, 0.08);
  font-family: var(--font-heading);
  font-size: clamp(3.8rem, 10vw, 9rem);
  font-weight: 900;
  letter-spacing: -0.07em;
  line-height: 0.88;
  text-align: center;
  text-transform: uppercase;
}

.gallery-photo-fallback::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(92, 244, 236, 0.028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(92, 244, 236, 0.028) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black, transparent 88%);
  opacity: 0.7;
}

.gallery-photo-card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(0, 0, 0, 0.08), rgba(1, 4, 6, 0.34)),
    radial-gradient(circle at 50% 50%, transparent 52%, rgba(0, 0, 0, 0.18));
}

.gallery-photo-card::after {
  content: "";
  position: absolute;
  left: 1.2rem;
  top: 0;
  z-index: 4;
  width: 46%;
  height: 1px;
  background: linear-gradient(90deg, rgba(92, 244, 236, 0.88), transparent);
  box-shadow: 0 0 16px rgba(92, 244, 236, 0.26);
  pointer-events: none;
}

.gallery-glass-caption {
  position: absolute;
  left: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  z-index: 5;
  width: min(440px, calc(100% - 2rem));
  padding: 0.85rem 1rem;
  border: 1px solid rgba(245, 255, 255, 0.13);
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.025)),
    rgba(2, 7, 8, 0.34);
  backdrop-filter: blur(16px);
  box-shadow:
    0 18px 55px rgba(0, 0, 0, 0.3),
    0 0 24px rgba(92, 244, 236, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.08);
}

.gallery-glass-caption span {
  display: block;
  color: rgba(245, 255, 255, 0.62);
  font-family: var(--font-accent);
  font-size: 0.62rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  line-height: 1;
  text-transform: uppercase;
}

.gallery-glass-caption strong {
  display: block;
  margin-top: 0.35rem;
  color: rgba(245, 255, 255, 0.9);
  font-family: var(--font-accent);
  font-size: clamp(0.78rem, 1.25vw, 0.96rem);
  font-weight: 900;
  letter-spacing: 0.08em;
  line-height: 1.15;
  text-transform: uppercase;
}

/* Subtle side arrows */
.gallery-arrow {
  position: absolute;
  top: 50%;
  z-index: 8;
  width: 44px;
  height: 108px;
  display: grid;
  place-items: center;
  transform: translateY(-50%);
  border: 1px solid rgba(92, 244, 236, 0.16);
  background:
    linear-gradient(180deg, rgba(10, 15, 18, 0.58), rgba(1, 4, 5, 0.72));
  color: rgba(245, 255, 255, 0.72);
  font-size: 2.15rem;
  line-height: 1;
  box-shadow:
    0 18px 54px rgba(0, 0, 0, 0.3),
    0 0 20px rgba(92, 244, 236, 0.07);
  opacity: 0.66;
  transition:
    opacity 180ms ease,
    color 180ms ease,
    border-color 180ms ease,
    background 180ms ease;
}

.gallery-arrow:hover {
  opacity: 1;
  color: var(--cyan);
  border-color: rgba(92, 244, 236, 0.42);
  background:
    linear-gradient(180deg, rgba(18, 26, 32, 0.78), rgba(1, 4, 5, 0.9));
}

.gallery-arrow-left {
  left: 0.7rem;
  border-radius: 0 999px 999px 0;
}

.gallery-arrow-right {
  right: 0.7rem;
  border-radius: 999px 0 0 999px;
}

/* =========================
   FINAL CTA
========================= */

.gallery-final-shell {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: clamp(1.35rem, 4vw, 2.4rem);
  border: 1px solid rgba(92, 244, 236, 0.2);
  border-radius: 18px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.035), transparent 38%),
    linear-gradient(180deg, rgba(18, 26, 32, 0.82), rgba(5, 8, 10, 0.96));
  box-shadow:
    0 28px 90px rgba(0, 0, 0, 0.34),
    0 0 34px rgba(92, 244, 236, 0.07),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

.gallery-final-shell h2,
.gallery-final-shell > p {
  margin-inline: auto;
}

.gallery-final-actions {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 2rem;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 980px) {
  .gallery-hero {
    min-height: auto;
    padding: 6rem 0 5rem;
  }

  .gallery-hero-content h1 {
    width: min(92vw, 850px);
  }

  .gallery-hero-overlay {
    background:
      linear-gradient(90deg, rgba(2, 7, 8, 0.88) 0%, rgba(2, 7, 8, 0.72) 34%, rgba(2, 7, 8, 0.42) 68%, rgba(2, 7, 8, 0.62) 100%),
      radial-gradient(circle at 70% 30%, rgba(92, 244, 236, 0.14), transparent 42%),
      linear-gradient(180deg, rgba(2, 7, 8, 0.48), rgba(2, 7, 8, 0.94));
  }

  .gallery-card-track {
    grid-auto-columns: minmax(86vw, 86vw);
  }

  .gallery-photo-card {
    min-height: min(72vh, 660px);
  }
}

@media (max-width: 620px) {
  .gallery-hero {
    min-height: calc(100vh - 74px);
    padding: 5.4rem 0 4.4rem;
  }

  .gallery-hero-slide {
    background-image: var(--gallery-hero-bg-mobile);
    background-position: center;
  }

  .gallery-hero-overlay {
    background:
      linear-gradient(90deg, rgba(2, 7, 8, 0.95), rgba(2, 7, 8, 0.82)),
      radial-gradient(circle at 50% 18%, rgba(92, 244, 236, 0.15), transparent 46%),
      linear-gradient(180deg, rgba(2, 7, 8, 0.42), rgba(2, 7, 8, 0.96));
  }

  .gallery-hero-content h1 {
    width: 100%;
  }

  .gallery-hero-lead {
    max-width: 100%;
  }

  .gallery-hero-actions,
  .gallery-final-actions {
    display: grid;
  }

  .gallery-card-track {
    grid-auto-columns: minmax(88vw, 88vw);
    gap: 0.85rem;
  }

  .gallery-photo-card {
    min-height: 76vh;
    border-radius: 18px;
    transform: none;
  }

.gallery-photo-card:hover,
.gallery-photo-card:focus-within {
  transform: none;
}

  .gallery-glass-caption {
    left: 0.85rem;
    bottom: 0.85rem;
    width: calc(100% - 1.7rem);
    border-radius: 16px;
  }

  .gallery-arrow {
    width: 34px;
    height: 82px;
    font-size: 1.55rem;
    opacity: 0.58;
  }

  .gallery-arrow-left {
    left: 0;
  }

  .gallery-arrow-right {
    right: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-hero-slide {
    animation: none;
    opacity: 0;
    transform: none;
  }

  .gallery-hero-slide:first-child {
    opacity: 1;
  }

  .gallery-card-track {
    scroll-behavior: auto;
  }
}