/* =========================
   STRUCTURE & LAYOUT
========================= */
.image-hero-block-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
}

/* The hero container now contains an <img> instead of a background-image */
.image-hero-block-wrapper .image-hero-block {
  position: relative;
  max-height: 80vh;
  width: 100%;
}

/* New: background image element fills the block */
.image-hero-background {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 0;
}

/* Content overlay card that sits on top of the image */
.image-hero-block-wrapper .image-hero-overlay {
  background-color: #534440;
  background-image: url('https://www.highchaparral.se/wp-content/uploads/2025/01/paper-texture-web.jpg');
  background-size: cover;      /* Ensures the image covers the entire background */
  background-position: center; /* Centers the image */
  background-repeat: no-repeat;/* Prevents the image from repeating */
  background-blend-mode: multiply;
  position: absolute;
  bottom: -100px;
  left: 0; right: 0;
  padding: 40px;               /* consolidated duplicate padding */
  max-width: 960px;
  margin: 0 auto;
  z-index: 56;
  box-shadow: 0px 1px 22px 0px #0808083b;
}

/* Content width & typography */
.image-hero-block-wrapper .image-hero-content {
  max-width: 800px;
  margin: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.image-hero-block-wrapper .image-hero-content h2 {
  color: #f7f2e7;
  font-size: 2rem;
  text-align: center;
}

.image-hero-block-wrapper .image-hero-content p {
  font-size: 1.1rem;
  margin-top: 1rem;
  color: #f7f2e7;
  text-align: center;
}

/* =========================
   WCAG 2.2 ADDITIONS
========================= */

/* Screen-reader-only text (used for “opens in a new tab”, etc.) */
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* Ensure keyboard focus is clearly visible */
.hero-button:focus-visible {
  outline: 3px solid currentColor;
  outline-offset: 3px;
  /* If you have sticky headers, this helps ensure focus isn't obscured when scrolled into view */
  scroll-margin: 1rem;
}

/* Minimum comfortable target size (≥44x44) */
.hero-button {
  min-height: 44px;
  min-width: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* Respect user preference for reduced motion */
@media (prefers-reduced-motion: reduce) {
  .image-hero-background,
  .hero-button {
    transition: none !important;
    animation: none !important;
  }
}

/* =========================
   OPTIONAL: RESPONSIVE TWEAKS
========================= */
@media (max-width: 768px) {
  .image-hero-block-wrapper .image-hero-content {
    align-items: flex-start;
  }
  .image-hero-block-wrapper .image-hero-content h2 {
    font-size: 1.9rem;
    text-align: left;
  }
  .image-hero-block-wrapper .image-hero-content p {
    font-size: 1.05rem;
    text-align: left;
  }
  .image-hero-block-wrapper .image-hero-overlay {
    position: relative;
    padding: 28px;
    max-width: 100%;
    bottom: 0;
  }
  .image-hero-background {
    position: relative;
  }
  .image-hero-block-wrapper .image-hero-block {
    display: flex;
    flex-direction: column;
    max-height: max-content;
  }
}
