/*
 * Hero (Two Buttons) block — components/blocks/hero_v2.php
 * Plain CSS (enqueued separately in includes/styles.php) so it works without a gulp build.
 * Mobile breakpoint: < 768px (theme "md").
 */

.block--hero_v2 {
  padding: 0 !important;
  margin: 0;
}

.hero-v2 {
  --hero-v2-bg: #163a4a;
  --hero-v2-light: #d6e1e5;
  position: relative;
  display: flex;
  align-items: center;
  min-height: clamp(560px, 49.6vw, 1000px);
  overflow: hidden;
  background: var(--hero-v2-bg);
  isolation: isolate;
}

.hero-v2__media,
.hero-v2__media img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.hero-v2__media {
  z-index: -1;
}

.hero-v2__media img {
  object-fit: cover;
  object-position: 75% center;
}

.hero-v2__content {
  position: relative;
  width: 100%;
  padding: 120px 15px 60px 13.9%;
  text-align: left;
  color: #fff;
}

.hero-v2__heading {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 700;
  font-size: clamp(44px, 5.2vw, 104px);
  line-height: 0.98;
  letter-spacing: 0;
  text-transform: uppercase;
  color: #fff;
  max-width: 7.2em;
  margin: 0 0 0.42em;
  text-shadow: none;
}

.hero-v2__subheading {
  font-family: "Playfair Display", Georgia, serif;
  font-weight: 400;
  font-size: clamp(20px, 2.2vw, 44px);
  line-height: 1.25;
  color: #fff;
  margin: 0 0 1.05em;
}

.hero-v2__subheading em,
.hero-v2__subheading i {
  font-style: italic;
}

.hero-v2__buttons {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(10px, 0.95vw, 18px);
}

/* also style custom-script buttons that use the theme's .btn class */
.hero-v2__btn,
.hero-v2__buttons > .btn,
.hero-v2__buttons > a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: clamp(150px, 15.7vw, 310px);
  height: clamp(46px, 3.9vw, 78px);
  padding: 0 1.6em;
  border: 2px solid transparent;
  border-radius: 0;
  font-family: "Poppins", "Lato", sans-serif;
  font-weight: 600;
  font-size: clamp(12px, 1.05vw, 20px);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  text-decoration: none;
  line-height: 1;
  transition: background-color 0.25s ease, color 0.25s ease, border-color 0.25s ease;
}

.hero-v2__btn--primary,
.hero-v2__buttons > :first-child {
  background: #fff;
  border-color: #fff;
  color: var(--hero-v2-bg);
}

.hero-v2__btn--secondary,
.hero-v2__buttons > :nth-child(2) {
  background: var(--hero-v2-light);
  border-color: var(--hero-v2-light);
  color: #111;
}

.hero-v2__btn:hover,
.hero-v2__btn:focus-visible,
.hero-v2__buttons > a:hover {
  background: var(--hero-v2-bg);
  border-color: #fff;
  color: #fff;
  text-decoration: none;
}

.hero-v2__decoration {
  display: none;
}

/* ---------- Mobile ---------- */
@media (max-width: 767px) {
  .hero-v2 {
    display: block;
    min-height: 0;
    padding-bottom: 14vw;
    text-align: center;
  }

  .hero-v2--has-decoration {
    /* solid color stops above the ribbon so it overlaps onto the white page */
    background: linear-gradient(to bottom, var(--hero-v2-bg) calc(100% - 12vw), transparent calc(100% - 12vw));
    padding-bottom: 37vw;
  }

  .hero-v2__media {
    position: relative;
    display: block;
    height: auto;
    aspect-ratio: 393 / 360;
  }

  .hero-v2__media img {
    object-position: center top;
  }

  .hero-v2__media::after {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 55%, var(--hero-v2-bg) 100%);
  }

  .hero-v2__content {
    margin-top: -22vw;
    padding: 0 16px;
    text-align: center;
  }

  .hero-v2__heading {
    font-size: clamp(34px, 10.6vw, 56px);
    line-height: 1;
    max-width: 7.5em;
    margin: 0 auto 0.4em;
  }

  .hero-v2__subheading {
    font-size: clamp(17px, 5vw, 24px);
    line-height: 1.3;
    margin-bottom: 1.6em;
  }

  .hero-v2__buttons {
    justify-content: center;
    flex-wrap: nowrap;
    gap: 8px;
  }

  .hero-v2__btn,
  .hero-v2__buttons > .btn,
  .hero-v2__buttons > a {
    flex: 0 1 auto;
    min-width: 0;
    height: 38px;
    padding: 0 1.6em;
    font-family: "Poppins", "Lato", sans-serif;
    font-weight: 500;
    font-size: clamp(10px, 2.9vw, 13px);
    letter-spacing: 0.12em;
  }

  .hero-v2__btn--secondary,
  .hero-v2__buttons > :nth-child(2) {
    background: transparent;
    border-color: #fff;
    color: #fff;
  }

  .hero-v2__decoration {
    display: block;
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: auto;
    pointer-events: none;
  }
}

/* ---------- Homepage logo (white version over the hero) ---------- */
.site-nav .site-logo--home {
  display: none;
}

.home .site-nav:not(.sticky) .site-logo--home {
  display: block;
}

.home .site-nav:not(.sticky) .site-logo--home + .site-logo {
  display: none;
}
