/*
 * Responsive Lao Wisdom key-visual backgrounds.
 * The approved master artwork is stored at /background image.jpg.
 * CSS art direction changes crop, contrast, and overlay by viewport without
 * stretching the artwork or baking live text into the image.
 */

#cta {
  background-color: #0b0820;
  min-height: clamp(430px, 34vw, 620px);
  display: grid;
  place-items: center;
}

#cta .cta-bg {
  background-color: #0b0820 !important;
  background-image:
    radial-gradient(
      ellipse at center,
      rgba(11, 8, 32, 0.62) 0%,
      rgba(11, 8, 32, 0.40) 42%,
      rgba(11, 8, 32, 0.08) 72%
    ),
    linear-gradient(
      90deg,
      rgba(11, 8, 32, 0.48) 0%,
      rgba(23, 18, 63, 0.42) 48%,
      rgba(11, 8, 32, 0.18) 100%
    ),
    url('/background%20image.jpg') !important;
  background-repeat: no-repeat !important;
  background-size: cover, cover, cover !important;
  background-position: center, center, center 52% !important;
  filter: saturate(1.06) contrast(1.03) brightness(1.06);
  transform: translateZ(0);
}

#cta .cta-bg::after {
  content: '';
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
}

#cta .cta-inner {
  width: min(680px, 100%);
  text-shadow:
    0 2px 14px rgba(6, 4, 22, 0.72),
    0 0 34px rgba(6, 4, 22, 0.48);
}

.admin-managed-content-page .managed-content-hero {
  position: relative;
  isolation: isolate;
  min-height: clamp(440px, 62vh, 680px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: clamp(6rem, 9vw, 8rem) 1.5rem clamp(4rem, 7vw, 6rem) !important;
  background-color: #0b0820 !important;
  background-image:
    radial-gradient(
      ellipse at center,
      rgba(11, 8, 32, 0.66) 0%,
      rgba(11, 8, 32, 0.42) 40%,
      rgba(11, 8, 32, 0.08) 72%
    ),
    linear-gradient(
      90deg,
      rgba(11, 8, 32, 0.52) 0%,
      rgba(23, 18, 63, 0.44) 48%,
      rgba(11, 8, 32, 0.18) 100%
    ),
    url('/background%20image.jpg') !important;
  background-repeat: no-repeat !important;
  background-size: cover, cover, cover !important;
  background-position: center, center, center 50% !important;
  filter: saturate(1.06) contrast(1.03) brightness(1.05);
  border-bottom: 1px solid rgba(201, 160, 61, 0.16);
}

.admin-managed-content-page .managed-content-hero::before {
  content: '';
  display: none;
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.admin-managed-content-page .managed-content-hero > * {
  position: relative;
  z-index: 1;
  text-shadow:
    0 2px 14px rgba(6, 4, 22, 0.76),
    0 0 34px rgba(6, 4, 22, 0.50);
}

.admin-managed-content-page .managed-content-hero > p:last-child {
  max-width: 680px;
}

@media (min-width: 1600px) {
  #cta .cta-bg,
  .admin-managed-content-page .managed-content-hero {
    background-position: center, center, center 50% !important;
  }
}

@media (max-width: 1199px) {
  #cta {
    min-height: clamp(440px, 46vw, 600px);
  }

  #cta .cta-bg {
    background-image:
      radial-gradient(
        ellipse at center,
        rgba(11, 8, 32, 0.66) 0%,
        rgba(11, 8, 32, 0.44) 44%,
        rgba(11, 8, 32, 0.10) 74%
      ),
      linear-gradient(
        90deg,
        rgba(11, 8, 32, 0.54) 0%,
        rgba(23, 18, 63, 0.46) 52%,
        rgba(11, 8, 32, 0.22) 100%
      ),
      url('/background%20image.jpg') !important;
    background-position: center, center, 54% 51% !important;
  }

  .admin-managed-content-page .managed-content-hero {
    min-height: clamp(440px, 58vw, 640px);
    background-image:
      radial-gradient(
        ellipse at center,
        rgba(11, 8, 32, 0.68) 0%,
        rgba(11, 8, 32, 0.46) 44%,
        rgba(11, 8, 32, 0.10) 74%
      ),
      linear-gradient(
        90deg,
        rgba(11, 8, 32, 0.56) 0%,
        rgba(23, 18, 63, 0.48) 54%,
        rgba(11, 8, 32, 0.22) 100%
      ),
      url('/background%20image.jpg') !important;
    background-position: center, center, 54% 50% !important;
  }
}

@media (max-width: 767px) {
  #cta {
    min-height: clamp(500px, 68svh, 620px);
  }

  #cta .cta-bg {
    background-image:
      radial-gradient(
        ellipse at center,
        rgba(11, 8, 32, 0.74) 0%,
        rgba(11, 8, 32, 0.50) 48%,
        rgba(11, 8, 32, 0.12) 78%
      ),
      linear-gradient(
        180deg,
        rgba(11, 8, 32, 0.40) 0%,
        rgba(23, 18, 63, 0.50) 48%,
        rgba(11, 8, 32, 0.54) 100%
      ),
      url('/background%20image.jpg') !important;
    background-size: cover, cover, auto 100% !important;
    background-position: center, center, left center !important;
  }

  #cta .cta-bg::after {
    display: block;
    background: url('/background%20image.jpg') right center / auto 100% no-repeat;
    opacity: 0.92;
    -webkit-mask-image: linear-gradient(135deg, transparent 0%, transparent 34%, #000 68%, #000 100%);
    mask-image: linear-gradient(135deg, transparent 0%, transparent 34%, #000 68%, #000 100%);
  }

  #cta .cta-inner {
    max-width: 560px;
  }

  .admin-managed-content-page .managed-content-hero {
    min-height: clamp(500px, 72svh, 680px);
    padding: 6.5rem 1.1rem 4.5rem !important;
    background-image:
      radial-gradient(
        ellipse at center,
        rgba(11, 8, 32, 0.76) 0%,
        rgba(11, 8, 32, 0.52) 48%,
        rgba(11, 8, 32, 0.12) 78%
      ),
      linear-gradient(
        180deg,
        rgba(11, 8, 32, 0.42) 0%,
        rgba(23, 18, 63, 0.52) 49%,
        rgba(11, 8, 32, 0.56) 100%
      ),
      url('/background%20image.jpg') !important;
    background-size: cover, cover, auto 100% !important;
    background-position: center, center, left center !important;
  }

  .admin-managed-content-page .managed-content-hero::before {
    display: block;
    background: url('/background%20image.jpg') right center / auto 100% no-repeat;
    opacity: 0.90;
    -webkit-mask-image: linear-gradient(145deg, transparent 0%, transparent 36%, #000 70%, #000 100%);
    mask-image: linear-gradient(145deg, transparent 0%, transparent 36%, #000 70%, #000 100%);
  }
}

@media (max-width: 420px) {
  #cta .cta-bg,
  .admin-managed-content-page .managed-content-hero {
    background-position: center, center, 8% center !important;
  }
}

@media (prefers-reduced-data: reduce) {
  #cta .cta-bg::after,
  .admin-managed-content-page .managed-content-hero::before {
    display: none;
  }
}

@media (prefers-contrast: more) {
  #cta .cta-bg,
  .admin-managed-content-page .managed-content-hero {
    filter: saturate(1.08) contrast(1.12) brightness(1.04);
  }
}
