/* Prevent Astra flex layout from breaking this template */
@media (min-width: 922px) {
  body.template-onepage .site-content .ast-container {
    display: block !important;
  }
}

/* ===== FULL-BLEED HOMEPAGE HERO WRAPPER ===== */
.homepage-hero {
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  padding: 0;
}

/* ===== EACH REPEATER ROW LOOKS LIKE ONEPAGE HERO ===== */
/* SPLIT GRID (50/50) */
.homepage-hero__grid {
  display: grid;
  grid-template-columns: 1fr 1fr; /* 50/50 */
  min-height: 78vh;
}

/* LEFT COLUMN */
.homepage-hero__content {
  padding: 3rem 4rem;
  border-right: 1px solid #1c1f2a;
  background: #fff;
  display: flex;
  flex-direction: column;
}

.homepage-hero__top { flex: 0 0 auto; }

.homepage-hero__middle {
  flex: 1 1 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 1rem;
}

.homepage-hero__bottom { flex: 0 0 auto; }

.homepage-hero__meta {
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.homepage-hero__headline {
  margin: 0;
  font-size: clamp(1.6rem, 2.2vw, 2.2rem);
  line-height: 1.2;
}

.homepage-hero__text {
  margin: 0;
  max-width: 42ch;
  opacity: 0.85;
}

/* WYSIWYG spacing normalization */
.homepage-hero__text > *:first-child { margin-top: 0; }
.homepage-hero__text > *:last-child { margin-bottom: 0; }

/* CTA button (kept simple; feel free to style like your theme buttons) */
.homepage-hero__cta { margin-top: 0.25rem; }

.homepage-hero__button {
  display: inline-block;
  font-size: 0.8rem;
  opacity: 0.9;
  text-decoration: none;
}

/* RIGHT IMAGE */
.homepage-hero__media {
  position: relative;
  overflow: hidden;
}

.homepage-hero__image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* ===== IMAGE LEFT VARIANT ===== */
.homepage-hero__row--left .homepage-hero__grid {
  grid-template-columns: 2.4fr 1.1fr; /* swap widths */
}

.homepage-hero__row--left .homepage-hero__content {
  order: 2;
  border-right: none;
  border-left: 1px solid #1c1f2a;
}

.homepage-hero__row--left .homepage-hero__media {
  order: 1;
}

/* =========================
   Responsive grid tweaks
   ========================= */

/* Tablet + down: stack content over image */
@media (max-width: 921px) {
  .homepage-hero__grid {
    grid-template-columns: 1fr;
    min-height: auto; /* let content define height */
  }

  .homepage-hero__content {
    padding: 2rem 1.5rem;
    border-right: none;
    border-left: none;
    border-bottom: 1px solid #1c1f2a; /* separator when stacked */
  }

  /* If you prefer image first on mobile, swap these two orders */
  .homepage-hero__content { order: 1; }
  .homepage-hero__media { order: 2; }

  .homepage-hero__media {
    min-height: 40vh; /* ensures image isn’t too short */
  }
}

/* =========================
   Section Title Block
   ========================= */

.white-space {
  padding: clamp(3rem, 8vw, 6rem) 1.5rem;
  text-align: center;
  background: #fff;
}

.white-space h2 {
  margin: 0;
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-weight: 500;
  position: relative;
}

/* Optional subtle divider */
.white-space h2::after {
  content: "";
  display: block;
  width: 3rem;
  height: 1px;
  background: #1c1f2a;
  margin: 1.25rem auto 0;
  opacity: 0.4;
}



/* Phone: tighter spacing + slightly shorter image */
@media (max-width: 480px) {
  .white-space {
    padding: 20px;
  }

  .homepage-hero__content {
    padding: 1.5rem 1.25rem;
  }

  .homepage-hero__media {
    min-height: 32vh;
  }

  .homepage-hero__headline {
    font-size: clamp(1.4rem, 6vw, 1.9rem);
  }

  .homepage-hero__text {
    max-width: 60ch; /* allow a bit more width on small screens */
  }
}

/* Ensure the "image left" variant doesn't re-introduce side borders when stacked */
@media (max-width: 921px) {
  .homepage-hero__row--left .homepage-hero__grid {
    grid-template-columns: 1fr;
  }

  .homepage-hero__row--left .homepage-hero__content {
    border-left: none;
    border-bottom: 1px solid #1c1f2a;
  }
}

/* ==============================
   FIX VIDEO ALIGNMENT (CENTER)
============================== */

/* Make video hero full-bleed like image hero */
.homepage-cover--video {
  position: relative;
  width: 100vw;
  margin-left: calc(-50vw + 50%);
  overflow: hidden;
}

/* Ensure positioning context is correct */
.homepage-cover--video .homepage-cover__stage {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 78vh; /* match your hero height */
}

/* Center the actual <video> properly */
.homepage-cover--video .homepage-cover__video {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 100%;
  height: 100%;
  transform: translate(-50%, -50%);
  object-fit: cover;
}

/* Embedded videos (YouTube/Vimeo) */
.homepage-cover--video .homepage-cover__embed,
.homepage-cover--video .homepage-cover__embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}
