/* Site-wide layout fixes layered on top of the exported Divi styles. */

/* "Give the team a call today" CTA: the Contact button sat in the right-hand
   half of a two-column row. Stack it directly under the CTA text instead. */
.et_block_row:has(> .et_pb_column_empty:first-child + .et_pb_column a.et_pb_button[href="/contact/"]) > .et_pb_column_empty {
  display: none !important;
}
.et_block_row:has(> .et_pb_column_empty:first-child + .et_pb_column a.et_pb_button[href="/contact/"]) > .et_pb_column {
  width: 100% !important;
  margin-right: 0 !important;
}
.et_block_row:has(> .et_pb_column_empty:first-child + .et_pb_column a.et_pb_button[href="/contact/"]) .et_pb_button_module_wrapper {
  margin-right: 0 !important;
  text-align: left;
}

/* Home page "MDE Projects offer" cards (Hiring / Management / Events):
   make it obvious they are clickable. */
.et_pb_blurb.et_clickable {
  cursor: pointer;
  padding: 28px 20px 32px;
  border-radius: 6px;
  background: #fff;
  box-shadow: 0 6px 18px -8px rgb(0 0 0 / .18);
  transition: transform .25s ease, box-shadow .25s ease;
}
.et_pb_blurb.et_clickable:hover,
.et_pb_blurb.et_clickable:focus-within {
  transform: translateY(-4px);
  box-shadow: 0 14px 28px -10px rgb(0 0 0 / .28);
}
.et_pb_blurb.et_clickable .et_pb_main_blurb_image:has(.et-pb-icon:empty) {
  display: none;
}
.mde-card-link {
  display: inline-flex;
  align-items: center;
  gap: .5em;
  margin-top: 18px;
  padding: 10px 22px;
  background-color: #0078BF;
  color: #fff !important;
  font-family: 'Gotham', Helvetica, Arial, Lucida, sans-serif;
  font-size: 16px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
  text-transform: uppercase;
  letter-spacing: .02em;
  transition: background-color .25s ease;
}
.mde-card-link svg {
  width: 1em;
  height: 1em;
  transition: transform .25s ease;
}
.et_pb_blurb.et_clickable:hover .mde-card-link,
.mde-card-link:focus-visible {
  background-color: #00ABA8;
}
.et_pb_blurb.et_clickable:hover .mde-card-link svg {
  transform: translateX(4px);
}

/* Project galleries: always render thumbnails at the same portrait crop so
   originals with different aspect ratios (e.g. Vivid Sydney) line up. */
.et_pb_gallery_grid .et_pb_gallery_image.portrait img {
  width: 100%;
  aspect-ratio: 400 / 516;
  object-fit: cover;
}

/* Our Projects tiles: keep every cover image the same 16:9 size. */
.page-id-70 .et_pb_image .et_pb_image_wrap,
.page-id-70 .et_pb_image .et_pb_image_wrap img {
  display: block;
  width: 100%;
}
.page-id-70 .et_pb_image .et_pb_image_wrap img {
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

/* Our Projects: the first row only has two projects, so centre them rather
   than leaving an empty third slot. */
@media only screen and (min-width: 981px) {
  .page-id-70 .et_pb_row_3 {
    display: flex;
    justify-content: center;
    gap: 5.5%;
  }
  .page-id-70 .et_pb_row_3::before,
  .page-id-70 .et_pb_row_3::after,
  .page-id-70 .et_pb_row_3 > .et_pb_column_empty {
    display: none;
  }
  .page-id-70 .et_pb_row_3 > .et_pb_column {
    margin-right: 0 !important;
  }
}
