/* ==========================================================================
   Listing band — slim branded header for category / archive listings
   (not the homepage carousel)
   Media: generic Unsplash/Pexels stills in assets/img/listing-bands/ (see helpers.php credits).
   Fade + hex tramage only — no hex+orange section mark.
   ========================================================================== */

.gg-listing-band {
  margin-top: 0; /* <main> already clears the sticky header */
  position: relative;
}

.gg-listing-band__inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 5.5rem;
  padding-block: var(--space-4);
  padding-inline: var(--space-4);
  border: 1px solid rgb(var(--color-border));
  background: rgb(var(--color-surface));
  overflow: hidden;
  isolation: isolate;
}

.light-mode .gg-listing-band__inner {
  background: rgb(var(--color-surface-elevated));
}

.gg-listing-band__media {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.gg-listing-band__media img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 78% center;
  -webkit-mask-image: linear-gradient(
    90deg,
    transparent 0%,
    transparent 12%,
    rgb(255 255 255 / 0.35) 36%,
    #fff 58%,
    #fff 100%
  );
  mask-image: linear-gradient(
    90deg,
    transparent 0%,
    transparent 12%,
    rgb(255 255 255 / 0.35) 36%,
    #fff 58%,
    #fff 100%
  );
}

.gg-listing-band__mist {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgb(var(--color-surface)) 0%,
    rgb(var(--color-surface) / 0.92) 26%,
    rgb(var(--color-surface) / 0.55) 48%,
    rgb(var(--color-surface) / 0.18) 68%,
    transparent 86%
  );
}

.light-mode .gg-listing-band__mist {
  background: linear-gradient(
    90deg,
    #fff 0%,
    rgb(255 255 255 / 0.96) 28%,
    rgb(255 255 255 / 0.62) 50%,
    rgb(255 255 255 / 0.22) 70%,
    transparent 88%
  );
}

/* Same hex tramage as hero / footer, kept subtle over the photo. */
.gg-listing-band__tramage {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.gg-listing-band__tramage-sweep {
  position: absolute;
  inset: 0;
  -webkit-mask-image: linear-gradient(
    113deg,
    transparent 0%,
    transparent 30%,
    rgb(255 255 255 / 0.18) 52%,
    rgb(255 255 255 / 0.5) 68%,
    #fff 82%,
    #fff 100%
  );
  mask-image: linear-gradient(
    113deg,
    transparent 0%,
    transparent 30%,
    rgb(255 255 255 / 0.18) 52%,
    rgb(255 255 255 / 0.5) 68%,
    #fff 82%,
    #fff 100%
  );
}

.gg-listing-band__tramage-mesh {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 160%;
  height: 220%;
  pointer-events: none;
  background-color: rgb(var(--color-brand));
  opacity: 0.16;
  transform: translate(-50%, -50%) rotate(-9deg);
  transform-origin: center center;
  -webkit-mask-repeat: repeat;
  mask-repeat: repeat;
  -webkit-mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%23fff' fill-rule='nonzero' d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/svg%3E");
  -webkit-mask-size: 28px 49px;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='49' viewBox='0 0 28 49'%3E%3Cpath fill='%23fff' fill-rule='nonzero' d='M13.99 9.25l13 7.5v15l-13 7.5L1 31.75v-15l12.99-7.5zM3 17.9v12.7l10.99 6.34 11-6.35V17.9l-11-6.34L3 17.9zM0 15l12.98-7.5V0h-2v6.35L0 12.69v2.3zm0 18.5L12.98 41v8h-2v-6.85L0 35.81v-2.3zM15 0v7.5L27.99 15H28v-2.31h-.01L17 6.35V0h-2zm0 49v-8l12.99-7.5H28v2.31h-.01L17 42.15V49h-2z'/%3E%3C/svg%3E");
  mask-size: 28px 49px;
}

.light-mode .gg-listing-band__tramage-mesh {
  opacity: 0.11;
}

.gg-listing-band__copy {
  position: relative;
  z-index: 3;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
  max-width: min(42rem, 68%);
}

.gg-listing-band__kicker {
  margin: 0;
  color: rgb(var(--color-brand));
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  line-height: 1.3;
  text-transform: uppercase;
}

.gg-listing-band__title {
  margin: 0;
  color: rgb(var(--color-ink));
  font-size: clamp(1.25rem, 2.2vw, 1.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.gg-listing-band__lede {
  margin: 0;
  max-width: 44rem;
  color: rgb(var(--color-ink-muted));
  font-size: 0.875rem;
  line-height: 1.45;
}

@media (min-width: 640px) {
  .gg-listing-band__inner {
    min-height: 7rem;
    padding-block: var(--space-5);
    padding-inline: var(--space-5);
  }
}

@media (min-width: 1024px) {
  .gg-listing-band__inner {
    min-height: 8rem;
    padding-block: var(--space-6);
    padding-inline: var(--space-6);
  }
}

@media (max-width: 639px) {
  .gg-listing-band__inner {
    min-height: 4.5rem;
    padding-block: var(--space-3);
  }

  .gg-listing-band__copy {
    max-width: 78%;
  }

  .gg-listing-band__lede {
    display: none;
  }

  .gg-listing-band__media img {
    opacity: 0.55;
    object-position: 85% center;
  }

  .gg-listing-band__mist {
    background: linear-gradient(
      90deg,
      rgb(var(--color-surface)) 0%,
      rgb(var(--color-surface) / 0.94) 38%,
      rgb(var(--color-surface) / 0.62) 62%,
      transparent 92%
    );
  }

  .light-mode .gg-listing-band__mist {
    background: linear-gradient(
      90deg,
      #fff 0%,
      rgb(255 255 255 / 0.96) 40%,
      rgb(255 255 255 / 0.68) 64%,
      transparent 94%
    );
  }
}
