/* Preserve the original contact design and parallax, with the photograph always covering its frame.
   The 60px overscan on each edge matches data-rellax-min-y / data-rellax-max-y in temp_contact.php. */
.temp_contact .temp_contact_bg picture {
  display: block;
  position: relative;
  top: -60px;
  height: calc(100% + 120px);
}

.temp_contact .temp_contact_bg img {
  display: block;
}

/* Excel No.1/2: improve white text contrast without recoloring the photograph or circle. */
.temp_contact .inner .temp_contact_btn a {
  text-shadow: 0 1px 3px rgb(0 0 0 / 75%);
}

.temp_contact .inner .temp_contact_btn a:hover,
.temp_contact .inner .temp_contact_btn a:active {
  text-shadow: none;
}

/* Preserve a true circle and the original font sizes on the narrowest phones. */
@media screen and (max-width: 375px) {
  .temp_contact .inner {
    padding-inline: clamp(4px, calc(50% - 160px), 20px);
  }

  .temp_contact .inner .temp_contact_btn a p {
    text-wrap: balance;
    margin-bottom: 16px;
  }
}

/* The two CMS banner groups on Partnership Agreement (56) and training NEWS (435). */
@media screen and (max-width: 1024px) {
  .page-id-56 .wp-block-group.is-layout-flex,
  .postid-435 .wp-block-group.is-layout-flex {
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    max-width: 620px;
    margin-inline: auto;
  }

  .page-id-56 .wp-block-group.is-layout-flex > .wp-block-image,
  .postid-435 .wp-block-group.is-layout-flex > .wp-block-image {
    flex: 0 1 auto;
    width: 100%;
    min-width: 0;
    margin: 0;
  }

  .page-id-56 .wp-block-group.is-layout-flex > .wp-block-image a,
  .postid-435 .wp-block-group.is-layout-flex > .wp-block-image a {
    display: block;
  }

  .page-id-56 .wp-block-group.is-layout-flex > .wp-block-image img,
  .postid-435 .wp-block-group.is-layout-flex > .wp-block-image img {
    display: block;
    width: 100%;
    height: auto;
  }
}
