.garavogue-project-gallery,
.garavogue-project-gallery *,
.garavogue-project-gallery-lightbox,
.garavogue-project-gallery-lightbox * {
  box-sizing: border-box;
}

.garavogue-project-gallery {
  width: 100%;
  container-type: inline-size;
}

.garavogue-project-gallery__grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  column-gap: 2%;
  row-gap: clamp(20px, 2vw, 40px);
  width: 100%;
}

.garavogue-project-gallery__card {
  position: relative;
  min-width: 0;
  height: 100%;
  margin: 0;
}

.garavogue-project-gallery__edit {
  position: absolute;
  z-index: 2;
  top: 8px;
  right: 8px;
  padding: 5px 10px;
  border: 1px solid #b5ccd6;
  background: #fff;
  color: #004055;
  font-size: 13px;
  font-weight: 700;
  line-height: 1.3;
  text-decoration: none;
}

.garavogue-project-gallery__edit:hover,
.garavogue-project-gallery__edit:focus-visible {
  background: #004055;
  color: #fff;
}

.garavogue-project-gallery__trigger {
  display: flex;
  width: 100%;
  height: 100%;
  flex-direction: column;
  margin: 0;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  color: #004055;
  cursor: zoom-in;
  font: inherit;
  letter-spacing: normal;
  text-align: left;
  text-transform: none;
  appearance: none;
}

.garavogue-project-gallery__trigger:focus-visible {
  outline: 3px solid #004055;
  outline-offset: 4px;
}

.garavogue-project-gallery__media {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 2 / 1;
  flex: 0 0 auto;
  overflow: hidden;
  background: #c7d8e0;
}

.garavogue-project-gallery__image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  transition: transform 0.35s ease;
}

.garavogue-project-gallery__title {
  display: flex;
  width: 100%;
  min-height: 7vw;
  flex: 1 0 auto;
  align-items: center;
  padding: 2.4vw 3vw;
  background: #ffffff;
  color: #004055;
  font-size: 2vw;
  font-weight: 800;
  line-height: 1.15;
}

@media (hover: hover) {
  .garavogue-project-gallery__trigger:hover .garavogue-project-gallery__image {
    transform: scale(1.025);
  }
}

.garavogue-project-gallery-lightbox[hidden] {
  display: none !important;
}

.garavogue-project-gallery-lightbox {
  position: fixed;
  z-index: 2147483000;
  inset: 0;
  display: grid;
  place-items: center;
  padding: clamp(18px, 4vw, 64px);
  background: rgba(0, 23, 31, 0.96);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s ease, visibility 0.22s ease;
}

.garavogue-project-gallery-lightbox.is-open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.garavogue-project-gallery-lightbox__stage {
  display: grid;
  width: 100%;
  height: 100%;
  place-items: center;
  cursor: zoom-out;
}

.garavogue-project-gallery-lightbox__image {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  opacity: 0;
  transform: scale(0.985);
  transition: opacity 0.22s ease, transform 0.22s ease;
  cursor: default;
  user-select: none;
}

.garavogue-project-gallery-lightbox.is-loaded .garavogue-project-gallery-lightbox__image {
  opacity: 1;
  transform: scale(1);
}

.garavogue-project-gallery-lightbox__close {
  position: fixed;
  z-index: 2;
  top: max(18px, env(safe-area-inset-top));
  right: max(18px, env(safe-area-inset-right));
  display: inline-grid;
  width: 48px;
  height: 48px;
  margin: 0;
  padding: 0;
  place-items: center;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 999px;
  background: rgba(0, 64, 85, 0.78);
  box-shadow: none;
  color: #ffffff;
  cursor: pointer;
  appearance: none;
  transition: background 0.18s ease, color 0.18s ease, transform 0.18s ease;
}

.garavogue-project-gallery-lightbox__close:hover,
.garavogue-project-gallery-lightbox__close:focus-visible {
  background: #ffffff;
  color: #004055;
  transform: scale(1.05);
  outline: 0;
}

.garavogue-project-gallery-lightbox__close:focus-visible {
  outline: 3px solid #ffffff;
  outline-offset: 4px;
}

.garavogue-project-gallery-lightbox__close svg {
  display: block;
  width: 22px;
  height: 22px;
  pointer-events: none;
}

.garavogue-project-gallery-lightbox__close path {
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

html.garavogue-project-gallery-lightbox-open,
html.garavogue-project-gallery-lightbox-open body {
  overflow: hidden !important;
  overscroll-behavior: none;
}

@media (max-width: 800px) {
  .garavogue-project-gallery__grid {
    grid-template-columns: minmax(0, 1fr);
    column-gap: 0;
    row-gap: 24px;
  }

  .garavogue-project-gallery__title {
    min-height: 80px;
    padding: 20px 22px;
    font-size: 24px;
  }

  .garavogue-project-gallery-lightbox {
    padding: 70px 14px 18px;
  }

  .garavogue-project-gallery-lightbox__close {
    top: max(12px, env(safe-area-inset-top));
    right: max(12px, env(safe-area-inset-right));
    width: 44px;
    height: 44px;
  }
}


@supports (width: 1cqw) {
  .garavogue-project-gallery__grid {
    gap: 2cqw;
  }
}

@media (prefers-reduced-motion: reduce) {
  .garavogue-project-gallery__image,
  .garavogue-project-gallery-lightbox,
  .garavogue-project-gallery-lightbox__image,
  .garavogue-project-gallery-lightbox__close {
    transition: none;
  }
}
