/** Needed in public side due to conditinal loading **/
.elementor-editor-active #wpadminbar {
  display: none !important;
}

.customisations-projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.customisations-project-card {
  position: relative;
  display: block;
  width: 100%;
  min-height: 360px;
  overflow: hidden;
  text-decoration: none;
}

/* Fullwidth image (absolute cover) */
.customisations-project-card__media {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  transform: scale(1);
  transition: transform 250ms ease;
}

.customisations-project-card:hover .customisations-project-card__media {
  transform: scale(1.03);
}

/* Text overlay bottom-left */
.customisations-project-card__overlay {
  position: absolute;
  left: 18px;
  bottom: 18px;
  z-index: 2;
  color: #fff;
  max-width: calc(100% - 36px);
}

.customisations-project-card__title {
  display: block;
  font-weight: 700;
  line-height: 1.1;
  font-size: 22px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
}

.customisations-project-card__client {
  display: block;
  margin-top: 6px;
  opacity: 0.9;
  font-size: 14px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
}

/* Alternating rows: 1/3–2/3 then 2/3–1/3 */
.customisations-projects-grid > .customisations-project-card:nth-child(4n + 1) { grid-column: span 1; }
.customisations-projects-grid > .customisations-project-card:nth-child(4n + 2) { grid-column: span 2; }
.customisations-projects-grid > .customisations-project-card:nth-child(4n + 3) { grid-column: span 2; }
.customisations-projects-grid > .customisations-project-card:nth-child(4n + 4) { grid-column: span 1; }

/* Mobile fullwidth */
@media (max-width: 767px) {
  .customisations-projects-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .customisations-projects-grid > .customisations-project-card {
    grid-column: auto;
    min-height: 260px;
  }
}

.customisations-project-gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

/* alternating: 1/3–2/3 then 2/3–1/3 */
.customisations-project-gallery-grid > .customisations-project-gallery-card:nth-child(4n + 1) { grid-column: span 1; }
.customisations-project-gallery-grid > .customisations-project-gallery-card:nth-child(4n + 2) { grid-column: span 2; }
.customisations-project-gallery-grid > .customisations-project-gallery-card:nth-child(4n + 3) { grid-column: span 2; }
.customisations-project-gallery-grid > .customisations-project-gallery-card:nth-child(4n + 4) { grid-column: span 1; }

.customisations-project-gallery-card {
  position: relative;
  margin: 0;
  overflow: hidden;
}

/* Make tiles consistent and “cover-like” */
.customisations-project-gallery-link {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  height: 100%;
}

.customisations-project-gallery-img {
  display: block;
  width: 100%;
  height: 100% !important;
  object-fit: cover;
  transform: scale(1);
  transition: transform 250ms ease;
}

.customisations-project-gallery-card:hover .customisations-project-gallery-img {
  transform: scale(1.03);
}

/* Optional caption overlay */
.customisations-project-gallery-caption {
  position: absolute;
  left: 18px;
  bottom: 18px;
  color: #fff;
  font-weight: 600;
  font-size: 14px;
  max-width: calc(100% - 36px);
  text-shadow: 0 2px 18px rgba(0,0,0,0.55);
}

.hide-controls-unless-playing video::-webkit-media-controls {
    opacity: 0;
    pointer-events: none;
}

.hide-controls-unless-playing video.playing::-webkit-media-controls {
    opacity: 1;
    pointer-events: auto;
}

/* mobile fullwidth */
@media (max-width: 767px) {
  .customisations-project-gallery-grid {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  .customisations-project-gallery-grid > .customisations-project-gallery-card {
    grid-column: auto;
  }
}