/**
 * Full-width hero — `.hero-full` / `.dgcs-hero` (Drupal + HeroFull.astro).
 *
 * Text sits in a centered content column; vertical placement via modifier class.
 */

:root {
  --hero-content-max: 82rem;
  --hero-content-pad-x: 1rem;
  --hero-content-align: center;
  --hero-content-pad-y: 1.75rem;
  --hero-title-max: 42rem;
}

@media (min-width: 768px) {
  :root {
    --hero-content-pad-x: 1.5rem;
    --hero-content-pad-y: 2.25rem;
  }
}

@media (min-width: 992px) {
  :root {
    --hero-content-pad-y: 2.75rem;
  }
}

.hero-full,
.dgcs-hero {
  height: auto !important;
  margin-top: -20px;
  overflow: hidden !important;
}

.hero-full .row,
.dgcs-hero .row {
  margin-left: 0;
  margin-right: 0;
}

.hero-full .hero,
.dgcs-hero .hero {
  display: grid;
  grid-template-areas: "hero-stack";
  align-items: stretch;
  min-height: clamp(16rem, 72vw, 22rem);
  isolation: isolate;
}

@media (min-width: 768px) {
  .hero-full .hero,
  .dgcs-hero .hero {
    min-height: clamp(18rem, 42vw, 24rem);
  }
}

@media (min-width: 992px) {
  .hero-full .hero,
  .dgcs-hero .hero {
    min-height: clamp(20rem, 32vw, 28rem);
  }
}

@media (min-width: 1200px) {
  .hero-full .hero,
  .dgcs-hero .hero {
    min-height: clamp(22rem, 28vw, 37.5rem);
  }
}

.hero-full .hero > *,
.dgcs-hero .hero > * {
  grid-area: hero-stack;
}

.hero-full .hero > div:has(.field--name-field-media-image),
.hero-full .hero .dgcs-hero__media,
.hero-full .hero .field--name-field-media-image,
.dgcs-hero .hero > div:has(.field--name-field-media-image),
.dgcs-hero .hero .dgcs-hero__media,
.dgcs-hero .hero .field--name-field-media-image {
  min-height: inherit;
  height: 100%;
  width: 100% !important;
}

.hero-full .hero picture,
.dgcs-hero .hero picture {
  display: block;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

.hero-full .hero img,
.dgcs-hero .hero img {
  display: block;
  width: 100% !important;
  height: 100%;
  min-height: inherit;
  object-fit: cover;
  object-position: center;
}

.hero-full .hero .overlay-bg,
.hero-full .hero .dgcs-hero__overlay,
.dgcs-hero .hero .overlay-bg,
.dgcs-hero .hero .dgcs-hero__overlay {
  inset: 0 !important;
  top: 0 !important;
  width: 100% !important;
  height: 100% !important;
  margin-top: 0 !important;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    rgba(0, 0, 0, 0.62) 0%,
    rgba(0, 0, 0, 0.38) 38%,
    rgba(0, 0, 0, 0.12) 72%,
    rgba(0, 0, 0, 0.04) 100%
  ) !important;
}

@media (max-width: 991px) {
  .hero-full .hero .overlay-bg,
  .hero-full .hero .dgcs-hero__overlay,
  .dgcs-hero .hero .overlay-bg,
  .dgcs-hero .hero .dgcs-hero__overlay {
    background: linear-gradient(
      105deg,
      rgba(0, 0, 0, 0.72) 0%,
      rgba(0, 0, 0, 0.45) 45%,
      rgba(0, 0, 0, 0.18) 100%
    ) !important;
  }
}

.hero-full .hero .content,
.hero-full .hero .dgcs-hero__content,
.dgcs-hero .hero .content,
.dgcs-hero .hero .dgcs-hero__content {
  position: relative !important;
  align-self: var(--hero-content-align);
  justify-self: center;
  left: auto !important;
  top: auto !important;
  right: auto !important;
  bottom: auto !important;
  width: 100% !important;
  max-width: var(--hero-content-max) !important;
  margin: 0 !important;
  padding: var(--hero-content-pad-y) var(--hero-content-pad-x);
  box-sizing: border-box;
  transform: none !important;
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
}

.dgcs-hero--align-start,
.hero-full.dgcs-hero--align-start {
  --hero-content-align: start;
}

.dgcs-hero--align-center,
.hero-full.dgcs-hero--align-center {
  --hero-content-align: center;
}

.dgcs-hero--align-end,
.hero-full.dgcs-hero--align-end {
  --hero-content-align: end;
}

.hero-full .hero .content .hero-title,
.hero-full .hero .content .dgcs-hero__title,
.dgcs-hero .hero .content .hero-title,
.dgcs-hero .hero .content .dgcs-hero__title {
  width: 100% !important;
  max-width: var(--hero-title-max) !important;
  margin: 0 !important;
  padding: 0 !important;
  color: #fff !important;
  font-weight: 700;
  text-align: start;
  letter-spacing: 0.02em !important;
  text-wrap: balance;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
  font-size: clamp(1.125rem, 2.2vw + 0.25rem, 2.25rem) !important;
  line-height: 1.28 !important;
}

@media (min-width: 992px) {
  .hero-full .hero .content .hero-title,
  .hero-full .hero .content .dgcs-hero__title,
  .dgcs-hero .hero .content .hero-title,
  .dgcs-hero .hero .content .dgcs-hero__title {
    font-size: clamp(1.625rem, 1.4vw + 0.65rem, 2.375rem) !important;
    line-height: 1.22 !important;
  }
}

.hero-full .hero .content .hero-title a,
.dgcs-hero .hero .content .hero-title a {
  color: inherit !important;
  text-decoration: none;
}

.hero-full .hero .content a:not(.hero-title),
.dgcs-hero .hero .content a:not(.hero-title) {
  margin-top: 1rem;
}
