@import "./styles";

.wp-block-amnesty-core-hero {
  position: relative;
  display: flex;
  margin: auto;
  justify-content: center;
  padding-block: 80px;
  padding-inline: 40px;
  width: 100%;
  max-width: $flexy-container;
  min-height: 540px;
  background-size: cover;
  background-position: center center;

  @include mq(small) {
    padding-block-start: 111px;
    height: auto;
  }
}

.hero-contentWrapper {
  display: flex;
  flex-direction: column;
  align-items: start;
}

.hero-contentWrapper > * {
  margin-block-end: var(--wp--preset--spacing--half);
}

.hero-content {
  display: table;
  padding: 10px 16px;
  max-width: 460px;
  font-size: var(--wp--preset--font-size--heading-6);

  @include mq(xx-small) {
    padding: 10px 20px;
    max-width: 840px;
  }
}

.hero-title span {
  margin: 0;
  padding: 0 16px;
  font-size: var(--wp--preset--font-size--heading-1);
  line-height: 1.3 !important;
  background-color: rgba(0, 0, 0, 0.45);
  color: #fff;
  max-width: 840px;
  text-transform: uppercase;
  box-decoration-break: clone;

  @include mq(xx-small) {
    padding: 0 20px;
  }
}

.hero-cta {
  display: inline-block;
  padding: 16px;
  background-color: color-mix(in srgb, var(--wp--preset--color--black) 45%, transparent);

  @include mq(xx-small) {
    padding: 20px;
  }
}

.hero-innerBlocks {
  display: flex;
  justify-content: end;
  width: 100%;

  & > * {
    width: 100%;
  }
}

.hero-videoContainer,
.hero-video {
  display: none;

  @include mq(small) {
    display: block;
  }
}

.hero-videoContainer {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  overflow: hidden;
}

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

.wp-block-amnesty-core-hero .image-metadata.is-image {
  display: flex;
}

.wp-block-amnesty-core-hero .image-metadata.is-video {
  display: none;
}

.wp-block-amnesty-core-hero.has-video .image-metadata.is-image {
  display: flex;

  @include mq(small) {
    display: none;
  }
}

.wp-block-amnesty-core-hero.has-video .image-metadata.is-video {
  display: none;

  @include mq(small) {
    display: flex;
  }
}

.wp-block-amnesty-core-hero:has(+ main) {
  margin-bottom: var(--wp--preset--spacing--single);
}
