/**
 * Full Bleed
 *
 * Breakpoints:
 *
 * Mobile small:   320px–574px
 * Mobile large:   575px–766px
 * Tablet medium:  767px–991px
 * Tablet large:   992px–1199px
 * Desktop:        1200px+
 *
 * Styles:
 *
 * tall_v1
 * tall_v2
 * narrow
 */

/* ==========================================================
   Base component
   ========================================================== */

.full-bleed {
  --full-bleed-background: #003479;
  --full-bleed-alternate: #ffffff;
  --full-bleed-image-overlay: rgba(0, 31, 75, 0.42);

  position: relative;
  isolation: isolate;

  display: flex;
  align-items: center;

  width: 100%;
  min-width: 0;
  overflow: hidden;

  background-color: var(--full-bleed-background);
}

.full-bleed *,
.full-bleed *::before,
.full-bleed *::after {
  box-sizing: border-box;
}

/* ==========================================================
   Responsive background image
   ========================================================== */

.full-bleed__media {
  position: absolute;
  z-index: 0;
  inset: 0;

  width: 100%;
  height: 100%;
  overflow: hidden;
}

/**
 * Drupal and Media field wrappers.
 */
.full-bleed__media > .field,
.full-bleed__media .field__items,
.full-bleed__media .field__item,
.full-bleed__media .media,
.full-bleed__media picture {
  display: block;

  width: 100%;
  height: 100%;
  margin: 0;
}

.full-bleed__media img {
  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

/**
 * Overlay placed above the image and below the content panel.
 */
.full-bleed__media::after {
  position: absolute;
  inset: 0;

  content: "";

  background: var(--full-bleed-image-overlay);
  pointer-events: none;
}

/* ==========================================================
   Content panel
   ========================================================== */

.full-bleed__panel {
  position: relative;
  z-index: 2;

  display: flex;
  flex-direction: column;
  gap: 16px;

  min-width: 0;
  margin: 16px;
  padding: 20px;

  color: var(--full-bleed-alternate);
  background-color: var(--full-bleed-background);
}

.full-bleed__copy {
  min-width: 0;
  width: 100%;
}

.full-bleed__title {
  margin: 0;

  color: var(--full-bleed-alternate);

  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.15;

  overflow-wrap: anywhere;
}

.full-bleed__content {
  width: 100%;
  margin-top: 10px;

  color: var(--full-bleed-alternate);

  font-size: 0.875rem;
  line-height: 1.4;
}

/**
 * Remove Drupal field wrapper spacing.
 */
.full-bleed__content > .field,
.full-bleed__content .field__items,
.full-bleed__content .field__item {
  width: 100%;
  margin: 0;
}

/**
 * Explicitly apply the taxonomy alternative colour to formatted
 * text elements. The important declaration protects this component
 * against more specific Pivot typography selectors.
 */
.paragraph--type--full-bleed .full-bleed__content,
.paragraph--type--full-bleed .full-bleed__content p,
.paragraph--type--full-bleed .full-bleed__content li,
.paragraph--type--full-bleed .full-bleed__content h2,
.paragraph--type--full-bleed .full-bleed__content h3,
.paragraph--type--full-bleed .full-bleed__content h4,
.paragraph--type--full-bleed .full-bleed__content h5,
.paragraph--type--full-bleed .full-bleed__content h6,
.paragraph--type--full-bleed .full-bleed__content strong,
.paragraph--type--full-bleed .full-bleed__content em {
  color: var(--full-bleed-alternate) !important;
}

.full-bleed__content > :first-child,
.full-bleed__content .field__item > :first-child {
  margin-top: 0;
}

.full-bleed__content > :last-child,
.full-bleed__content .field__item > :last-child {
  margin-bottom: 0;
}

.full-bleed__content p {
  margin-block: 0 10px;
}

.full-bleed__content ul,
.full-bleed__content ol {
  margin-block: 10px;
  padding-left: 24px;
}

.paragraph--type--full-bleed .full-bleed__content a {
  color: var(--full-bleed-alternate) !important;

  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.15em;
}

/* ==========================================================
   CTA links
   ========================================================== */

.full-bleed__actions {
  display: flex;
  flex-direction: column;
  gap: 8px;

  width: 100%;
}

.full-bleed__link,
.full-bleed__link > .field,
.full-bleed__link .field__items,
.full-bleed__link .field__item {
  display: flex;

  width: 100%;
  margin: 0;
}

.full-bleed__link a {
  display: inline-flex;
  align-items: center;
  justify-content: center;

  width: 100%;
  min-height: 40px;
  padding: 8px 16px;

  border: 2px solid var(--full-bleed-alternate);
  border-radius: 4px;

  font-size: 0.875rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
  text-decoration: none;

  transition:
    color 150ms ease,
    background-color 150ms ease,
    border-color 150ms ease;
}

/**
 * Primary button.
 */
.full-bleed__link--primary a {
  color: var(--full-bleed-background);
  background-color: var(--full-bleed-alternate);
}

.full-bleed__link--primary a:hover {
  color: var(--full-bleed-alternate);
  background-color: transparent;

  text-decoration: underline;
  text-underline-offset: 0.15em;
}

/**
 * Secondary button.
 */
.full-bleed__link--secondary a {
  color: var(--full-bleed-alternate);
  background-color: transparent;
}

.full-bleed__link--secondary a:hover {
  color: var(--full-bleed-background);
  background-color: var(--full-bleed-alternate);

  text-decoration: underline;
  text-underline-offset: 0.15em;
}

.full-bleed__link a:focus-visible {
  outline: 3px solid var(--full-bleed-alternate);
  outline-offset: 3px;
}

/**
 * When both links are empty, the copy occupies the complete
 * panel width.
 */
.full-bleed--without-links .full-bleed__copy {
  width: 100%;
  max-width: none;
}

/**
 * Handle links without a heading or body.
 */
.full-bleed--without-copy .full-bleed__actions {
  width: 100%;
}

/**
 * Fallback when there is no image.
 */
.full-bleed--without-image {
  background-color: var(--full-bleed-background);
}

/* ==========================================================
   Mobile small: 320px–574px
   All three variants use the same mobile presentation.
   ========================================================== */

@media (max-width: 574.98px) {
  .full-bleed {
    min-height: 430px;
    align-items: stretch;
  }

  .full-bleed__panel {
    align-self: stretch;

    width: calc(100% - 32px);
    margin: 16px;
    padding: 20px;
  }

  .full-bleed__copy {
    flex: 1 1 auto;
  }

  .full-bleed__actions {
    margin-top: auto;
  }

  .full-bleed__title {
    max-width: 12ch;

    font-size: 1.5rem;
  }

  .full-bleed__content {
    font-size: 0.875rem;
  }
}

/* ==========================================================
   Mobile large: 575px–766px
   All three variants use the same mobile presentation.
   ========================================================== */

@media (min-width: 575px) and (max-width: 766.98px) {
  .full-bleed {
    min-height: 320px;
  }

  .full-bleed__panel {
    width: calc(100% - 32px);
    margin: 16px;
    padding: 24px;
  }

  .full-bleed__title {
    font-size: 1.5rem;
  }

  .full-bleed__content {
    font-size: 0.9375rem;
  }

  .full-bleed__actions {
    flex-direction: row;
    align-items: center;

    width: auto;
  }

  .full-bleed__link,
  .full-bleed__link > .field,
  .full-bleed__link .field__items,
  .full-bleed__link .field__item,
  .full-bleed__link a {
    width: auto;
  }

  .full-bleed__link a {
    min-width: 132px;
  }
}

/* ==========================================================
   Tablet medium: 767px–991px
   ========================================================== */

@media (min-width: 767px) and (max-width: 991.98px) {
  .full-bleed__panel {
    margin: 16px;
    padding: 24px;
  }

  .full-bleed__title {
    font-size: 1.625rem;
  }

  .full-bleed__content {
    font-size: 0.9375rem;
  }

  .full-bleed__link a {
    min-width: 132px;
  }

  /**
   * Tall V1:
   * tall card positioned on the left.
   */
  .full-bleed--tall-v1 {
    min-height: 360px;
    align-items: stretch;
  }

  .full-bleed--tall-v1 .full-bleed__panel {
    align-self: stretch;

    width: 48%;
    max-width: 390px;
  }

  .full-bleed--tall-v1 .full-bleed__copy {
    flex: 1 1 auto;
  }

  .full-bleed--tall-v1 .full-bleed__actions {
    align-items: flex-start;

    margin-top: auto;
  }

  .full-bleed--tall-v1 .full-bleed__link,
  .full-bleed--tall-v1 .full-bleed__link > .field,
  .full-bleed--tall-v1 .full-bleed__link .field__items,
  .full-bleed--tall-v1 .full-bleed__link .field__item,
  .full-bleed--tall-v1 .full-bleed__link a {
    width: auto;
  }

  /**
   * Tall V2 and Narrow:
   * full-width horizontal content panel.
   */
  .full-bleed--tall-v2,
  .full-bleed--narrow {
    min-height: 240px;
  }

  .full-bleed--tall-v2 .full-bleed__panel,
  .full-bleed--narrow .full-bleed__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 24px;

    width: calc(100% - 32px);
  }

  .full-bleed--tall-v2 .full-bleed__actions,
  .full-bleed--narrow .full-bleed__actions {
    align-items: flex-end;

    width: auto;
  }

  .full-bleed--tall-v2 .full-bleed__link,
  .full-bleed--tall-v2 .full-bleed__link > .field,
  .full-bleed--tall-v2 .full-bleed__link .field__items,
  .full-bleed--tall-v2 .full-bleed__link .field__item,
  .full-bleed--tall-v2 .full-bleed__link a,
  .full-bleed--narrow .full-bleed__link,
  .full-bleed--narrow .full-bleed__link > .field,
  .full-bleed--narrow .full-bleed__link .field__items,
  .full-bleed--narrow .full-bleed__link .field__item,
  .full-bleed--narrow .full-bleed__link a {
    width: auto;
  }

  .full-bleed--without-links .full-bleed__panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================
   Tablet large: 992px–1199px
   ========================================================== */

@media (min-width: 992px) and (max-width: 1199.98px) {
  .full-bleed__panel {
    margin: 20px;
    padding: 28px;
  }

  .full-bleed__title {
    font-size: 1.75rem;
  }

  .full-bleed__content {
    font-size: 1rem;
  }

  .full-bleed__link a {
    min-width: 140px;
  }

  /**
   * Tall V1.
   */
  .full-bleed--tall-v1 {
    min-height: 390px;
    align-items: stretch;
  }

  .full-bleed--tall-v1 .full-bleed__panel {
    align-self: stretch;

    width: 46%;
    max-width: 440px;
  }

  .full-bleed--tall-v1 .full-bleed__copy {
    flex: 1 1 auto;
  }

  .full-bleed--tall-v1 .full-bleed__actions {
    align-items: flex-start;

    width: auto;
    margin-top: auto;
  }

  .full-bleed--tall-v1 .full-bleed__link,
  .full-bleed--tall-v1 .full-bleed__link > .field,
  .full-bleed--tall-v1 .full-bleed__link .field__items,
  .full-bleed--tall-v1 .full-bleed__link .field__item,
  .full-bleed--tall-v1 .full-bleed__link a {
    width: auto;
  }

  /**
   * Tall V2.
   */
  .full-bleed--tall-v2 {
    min-height: 250px;
  }

  /**
   * Narrow.
   */
  .full-bleed--narrow {
    min-height: 210px;
  }

  .full-bleed--tall-v2 .full-bleed__panel,
  .full-bleed--narrow .full-bleed__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 32px;

    width: calc(100% - 40px);
  }

  .full-bleed--tall-v2 .full-bleed__actions,
  .full-bleed--narrow .full-bleed__actions {
    align-items: flex-end;

    width: auto;
  }

  .full-bleed--tall-v2 .full-bleed__link,
  .full-bleed--tall-v2 .full-bleed__link > .field,
  .full-bleed--tall-v2 .full-bleed__link .field__items,
  .full-bleed--tall-v2 .full-bleed__link .field__item,
  .full-bleed--tall-v2 .full-bleed__link a,
  .full-bleed--narrow .full-bleed__link,
  .full-bleed--narrow .full-bleed__link > .field,
  .full-bleed--narrow .full-bleed__link .field__items,
  .full-bleed--narrow .full-bleed__link .field__item,
  .full-bleed--narrow .full-bleed__link a {
    width: auto;
  }

  .full-bleed--without-links .full-bleed__panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================
   Desktop: 1200px+
   ========================================================== */

@media (min-width: 1200px) {
  .full-bleed__panel {
    margin: 0;
    padding: 32px;
  }

  .full-bleed__title {
    font-size: 2rem;
  }

  .full-bleed__content {
    font-size: 1rem;
  }

  .full-bleed__link a {
    min-width: 148px;
  }

  /**
   * Tall V1:
   * large left-hand card.
   */
  .full-bleed--tall-v1 {
    align-items: stretch;
  }

  .full-bleed--tall-v1 .full-bleed__panel {
    align-self: stretch;

    width: 46%;
    max-width: 520px;
  }

  .full-bleed--tall-v1 .full-bleed__copy {
    flex: 1 1 auto;
  }

  .full-bleed--tall-v1 .full-bleed__actions {
    flex-direction: row;
    align-items: center;

    width: auto;
    margin-top: auto;
  }

  .full-bleed--tall-v1 .full-bleed__link,
  .full-bleed--tall-v1 .full-bleed__link > .field,
  .full-bleed--tall-v1 .full-bleed__link .field__items,
  .full-bleed--tall-v1 .full-bleed__link .field__item,
  .full-bleed--tall-v1 .full-bleed__link a {
    width: auto;
  }

  /**
   * Tall V2:
   * horizontal content panel with stacked buttons on the right.
   */
  .full-bleed--tall-v2 {
    min-height: 250px;
  }

  /**
   * Narrow:
   * reduced section and panel height.
   */
  .full-bleed--narrow {
    min-height: 190px;
  }

  .full-bleed--tall-v2 .full-bleed__panel,
  .full-bleed--narrow .full-bleed__panel {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 40px;

    width: calc(100% - 48px);
  }

  .full-bleed--narrow .full-bleed__panel {
    padding-block: 24px;
  }

  .full-bleed--tall-v2 .full-bleed__actions,
  .full-bleed--narrow .full-bleed__actions {
    align-items: flex-end;

    width: auto;
  }

  .full-bleed--tall-v2 .full-bleed__link,
  .full-bleed--tall-v2 .full-bleed__link > .field,
  .full-bleed--tall-v2 .full-bleed__link .field__items,
  .full-bleed--tall-v2 .full-bleed__link .field__item,
  .full-bleed--tall-v2 .full-bleed__link a,
  .full-bleed--narrow .full-bleed__link,
  .full-bleed--narrow .full-bleed__link > .field,
  .full-bleed--narrow .full-bleed__link .field__items,
  .full-bleed--narrow .full-bleed__link .field__item,
  .full-bleed--narrow .full-bleed__link a {
    width: auto;
  }

  .full-bleed--without-links .full-bleed__panel {
    grid-template-columns: minmax(0, 1fr);
  }
}

/* ==========================================================
   Reduced motion
   ========================================================== */

@media (prefers-reduced-motion: reduce) {
  .full-bleed__link a {
    transition: none;
  }
}

.full-bleed__panel {
  opacity: 1;
  background-color: var(--full-bleed-background);
}

.full-bleed--translucent-background .full-bleed__panel {
  opacity: 1;
  background-color: color-mix(
    in srgb,
    var(--full-bleed-background) 75%,
    transparent
  );
}