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

/* Supporting logo: top-right on desktop */
.hero-block__supporting-logo{
  position: absolute;
  top: 22px;
  right: 22px;
  z-index: 3;                 /* above media, same layer as content */
  display: flex;
  align-items: center;
  justify-content: center;
  pointer-events: none;       /* avoid blocking clicks */
}

.hero-block__supporting-logo img{
  max-width: 220px;           /* tweak to taste */
  width: auto;
  height: auto;
  max-height: 70px;           /* keep it tidy */
  display: block;
}

/* Mobile: make it part of the flow so it won't overlap the box */
@media (max-width: 768px){
  .hero-block__supporting-logo{
    position: static;         /* drop into normal layout */
    margin: 12px auto 10px;   /* center it above the card */
    pointer-events: none;
  }

  .hero-block__supporting-logo img{
    max-width: 170px;
    max-height: 56px;
  }

  /* ensure it sits nicely with the card */
  .hero-block__inner{
    display: flex;
    flex-direction: column;
  }

  .hero-block__overlay{
    flex: 1;
  }
}

/* Base (desktop/tablet) */
.hero-block {
  position: relative;
  width: 100%;
  min-height: 520px;
  height: 70vh;
  max-height: 760px;
  overflow: hidden;
}

/* Background media */
.hero-block__media {
  position: absolute;
  inset: 0;
  z-index: 0;
}

/* Desktop: bulletproof background-video centering */
@media (min-width: 769px) {
  .hero-block__media {
    overflow: hidden;
  }

  .hero-block__media video.hero-block__video {
    position: absolute;
    top: 50%;
    left: 50%;
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;
    transform: translate(-50%, -50%);
  }
}

.hero-block__media::after {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.08); /* subtle calming layer */
  pointer-events: none;
}


/* Desktop media behaviour (fills hero) */
.hero-block__video,
.hero-block__image {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  object-position: center;
}

/* Inner container keeps the card from drifting on large screens */
.hero-block__inner {
  position: relative;
  z-index: 2;
  height: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 24px;
}

/* Overlay layout */
.hero-block__overlay {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Card */
.hero-block__content {
  max-width: 620px;
  padding: 32px 36px;
  border-radius: 16px;
  background: rgba(0,0,0,0.38);
  border: 1px solid rgba(255,255,255,0.12);
  color: #fff;
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* Title */
.hero-block__title {
  margin: 0 0 10px 0;
  line-height: 1.05;
  letter-spacing: 0.02em;
  color: #fff !important;
}

/* Subtitle */
.hero-block__subtitle {
  margin: 0 0 35px 0;
  line-height: 1.35;
  opacity: 0.95;
  color: #fff;
}

/* Button */
.hero-block__button {
  display: inline-block;
  text-decoration: none;
  background: #1c8172;
  color: #fff;
  margin-top: 6px;
  padding: 14px 18px;
  border-radius: 12px;
  font-size: 18px;
  font-family: 'Gotham Narrow', Arial, sans-serif !important;
}

.hero-block__button:hover {
  opacity: 0.92;
}

a.hero-block__button:hover,
a.hero-block__button:focus {
  color: #deaa9b !important;
}

/* Large screens */
@media (min-width: 1400px) {
  .hero-block__content {
    max-width: 700px;
    padding: 40px 44px;
  }

  .hero-block__title {
    font-size: clamp(42px, 3vw, 56px);
  }

  .hero-block__subtitle {
    font-size: 20px;
    line-height: 1.4;
  }
}

/* =========================================================
   MOBILE (grid overlap + sane video framing)
   ========================================================= */
/* =========================================================
   MOBILE (bulletproof background video + overlay)
   ========================================================= */
@media (max-width: 768px) {

  /* Keep the overlap approach, but use a simple stacking context */
  .hero-block {
    position: relative;
    min-height: 60vh;
    height: 60vh;          /* fixed-ish height avoids weird reflows */
    max-height: 640px;
    overflow: hidden;
  }

  /* Media layer fills the hero */
  .hero-block__media {
    position: absolute;
    inset: 0;
    z-index: 0;
    background: #111;      /* fallback behind video */
    overflow: hidden;
  }

  /* ✅ BULLETPROOF BACKGROUND VIDEO TECHNIQUE */
  .hero-block__media video.hero-block__video,
  .hero-block__media img.hero-block__image {
    position: absolute;
    top: 50%;
    left: 50%;

    /* This is the magic: never stretch, just cover */
    min-width: 100%;
    min-height: 100%;
    width: auto;
    height: auto;

    transform: translate(-50%, -50%);
    display: block;
  }

  /* Content layer */
  .hero-block__inner {
    position: relative;
    z-index: 2;
    height: 100%;
    max-width: 100%;
    padding: 0 14px;
  }

  /* ✅ If you want the box NOT stuck at the bottom, center it */
  .hero-block__overlay {
    height: 100%;
    display: flex;
    align-items: center;        /* was flex-end */
    justify-content: center;
    padding: 16px 0;
  }

  .hero-block__content {
    width: 100%;
    max-width: 100%;
    padding: 22px 18px;
    border-radius: 14px;
  }

  .hero-block__title {
    font-size: clamp(26px, 8vw, 36px);
    line-height: 1.1;
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  .hero-block__subtitle {
    font-size: 16px;
    line-height: 1.4;
    margin-bottom: 16px;
  }

  .hero-block__button {
    width: 100%;
    text-align: center;
    font-size: 16px;
    padding: 12px 14px;
    border-radius: 12px;
  }
}


/* =========================================================
   FULL-WIDTH + SECTION FIXES
   ========================================================= */

.wp-block-group.full-width > .wp-block-group__inner-container {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  width: 100% !important;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

.section-module:has(.hero-block.alignfull) {
  padding-top: 0 !important;
}
