/* Modern Gallery ----------------------------------------------------------- */
.modern-gallery {
  padding: 110px 0 120px;
  background: #f7f7f5;
}

.modern-gallery__intro {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 30px;
  margin-bottom: 46px;
}

.modern-gallery__eyebrow {
  margin: 0 0 8px;
  color: var(--oxpins-primary, #f7be3d);
  font-size: 13px;
  font-weight: 800;
  letter-spacing: .13em;
  text-transform: uppercase;
}

.modern-gallery__intro h2 {
  color: #1d1d1b;
  font-size: clamp(38px, 5vw, 62px);
  font-weight: 800;
  letter-spacing: -.055em;
  line-height: .98;
  margin: 0;
}

.modern-gallery__count {
  border-bottom: 1px solid rgba(29, 29, 27, .22);
  color: #70706c;
  font-size: 14px;
  font-weight: 700;
  margin: 0;
  padding: 0 0 11px;
  white-space: nowrap;
}

.modern-gallery__count span { color: #1d1d1b; }

.modern-gallery__grid {
  display: grid;
  grid-auto-flow: dense;
  grid-auto-rows: 185px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
}

.modern-gallery__item {
  appearance: none;
  background: #ddd;
  border: 0;
  cursor: zoom-in;
  min-width: 0;
  overflow: hidden;
  padding: 0;
  position: relative;
}

.modern-gallery__item--wide { grid-column: span 2; }
.modern-gallery__item:nth-child(2),
.modern-gallery__item:nth-child(8),
.modern-gallery__item:nth-child(16) { grid-row: span 2; }

.modern-gallery__item img {
  display: block;
  height: 100%;
  object-fit: cover;
  transition: transform .65s cubic-bezier(.2,.7,.2,1);
  width: 100%;
}

.modern-gallery__shade {
  background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.55));
  inset: 0;
  opacity: 0;
  position: absolute;
  transition: opacity .35s ease;
}

.modern-gallery__meta {
  align-items: center;
  bottom: 14px;
  color: #fff;
  display: flex;
  font-size: 12px;
  font-weight: 800;
  justify-content: space-between;
  left: 16px;
  letter-spacing: .1em;
  opacity: 0;
  position: absolute;
  right: 16px;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}

.modern-gallery__meta i {
  align-items: center;
  backdrop-filter: blur(8px);
  background: rgba(255,255,255,.17);
  border: 1px solid rgba(255,255,255,.5);
  border-radius: 50%;
  display: inline-flex;
  height: 33px;
  justify-content: center;
  width: 33px;
}

.modern-gallery__item:hover img, .modern-gallery__item:focus-visible img { transform: scale(1.07); }
.modern-gallery__item:hover .modern-gallery__shade, .modern-gallery__item:focus-visible .modern-gallery__shade { opacity: 1; }
.modern-gallery__item:hover .modern-gallery__meta, .modern-gallery__item:focus-visible .modern-gallery__meta { opacity: 1; transform: translateY(0); }
.modern-gallery__item:focus-visible { outline: 3px solid var(--oxpins-primary, #f7be3d); outline-offset: 3px; z-index: 1; }

.gallery-lightbox {
  align-items: center;
  display: flex;
  inset: 0;
  justify-content: center;
  opacity: 0;
  padding: 24px;
  pointer-events: none;
  position: fixed;
  transition: opacity .25s ease;
  z-index: 9999;
}

.gallery-lightbox.is-open { opacity: 1; pointer-events: auto; }
.gallery-lightbox__backdrop { background: rgba(10, 10, 10, .89); backdrop-filter: blur(12px); inset: 0; position: absolute; }
.gallery-lightbox__panel { height: min(88vh, 900px); max-width: 1180px; position: relative; width: 100%; }
.gallery-lightbox__figure { align-items: center; display: flex; height: calc(100% - 95px); justify-content: center; margin: 0; }
.gallery-lightbox__figure img { box-shadow: 0 22px 70px rgba(0,0,0,.45); display: block; max-height: 100%; max-width: 100%; object-fit: contain; }

.gallery-lightbox button { align-items: center; border: 0; cursor: pointer; display: flex; justify-content: center; }
.gallery-lightbox__close { background: rgba(255,255,255,.13); border-radius: 50% !important; color: #fff; height: 44px; position: absolute; right: 0; top: -3px; width: 44px; z-index: 2; }
.gallery-lightbox__nav { background: transparent; color: #fff; font-size: 20px; height: 100%; padding: 0; position: absolute; top: 0; width: 15%; z-index: 1; }
.gallery-lightbox__nav--previous { left: -10%; justify-content: flex-start; }
.gallery-lightbox__nav--next { justify-content: flex-end; right: -10%; }
.gallery-lightbox__footer { align-items: center; bottom: 0; display: flex; gap: 18px; left: 0; position: absolute; right: 0; }
.gallery-lightbox__footer p { color: rgba(255,255,255,.77); font-size: 12px; font-weight: 800; letter-spacing: .12em; margin: 0; min-width: 48px; }
.gallery-lightbox__thumbs { display: flex; gap: 7px; overflow-x: auto; padding: 6px 0; scrollbar-width: thin; }
.gallery-lightbox__thumbs button { background: none; flex: 0 0 48px; height: 48px; opacity: .45; overflow: hidden; padding: 0; transition: opacity .2s, transform .2s; }
.gallery-lightbox__thumbs button.is-active { opacity: 1; outline: 2px solid var(--oxpins-primary, #f7be3d); outline-offset: 2px; transform: translateY(-2px); }
.gallery-lightbox__thumbs img { height: 100%; object-fit: cover; width: 100%; }
.gallery-lightbox button:focus-visible { outline: 3px solid var(--oxpins-primary, #f7be3d); outline-offset: 3px; }
body.gallery-lightbox-open { overflow: hidden; }

/* Homepage gallery preview ------------------------------------------------ */
.home-gallery { background: #1d1d1b; padding: 105px 0 112px; }
.home-gallery__header { align-items: end; display: flex; justify-content: space-between; gap: 25px; margin-bottom: 40px; }
.home-gallery__eyebrow { color: var(--oxpins-primary, #f7be3d); font-size: 13px; font-weight: 800; letter-spacing: .13em; margin: 0 0 8px; text-transform: uppercase; }
.home-gallery__header h2 { color: #fff; font-size: clamp(38px, 5vw, 58px); font-weight: 800; letter-spacing: -.05em; line-height: 1; margin: 0; }
.home-gallery__link { align-items: center; border-bottom: 1px solid rgba(255,255,255,.35); color: #fff; display: inline-flex; font-size: 14px; font-weight: 800; gap: 15px; padding-bottom: 11px; transition: color .2s, border-color .2s; }
.home-gallery__link:hover { border-color: var(--oxpins-primary, #f7be3d); color: var(--oxpins-primary, #f7be3d); }
.home-gallery__grid { display: grid; gap: 14px; grid-template-columns: 1.2fr .8fr 1.1fr 1fr; grid-template-rows: 205px 205px; }
.home-gallery__item { background: #333; border: 0; cursor: zoom-in; min-width: 0; overflow: hidden; padding: 0; position: relative; }
.home-gallery__item--1 { grid-row: span 2; } .home-gallery__item--4 { grid-column: span 2; }
.home-gallery__item img { display: block; height: 100%; object-fit: cover; transition: transform .65s cubic-bezier(.2,.7,.2,1); width: 100%; }
.home-gallery__shade { background: linear-gradient(180deg, transparent 45%, rgba(0,0,0,.65)); inset: 0; opacity: 0; position: absolute; transition: opacity .3s ease; }
.home-gallery__meta { align-items: center; bottom: 14px; color: #fff; display: flex; font-size: 12px; font-weight: 800; justify-content: space-between; left: 16px; letter-spacing: .1em; opacity: 0; position: absolute; right: 16px; transform: translateY(8px); transition: opacity .3s ease, transform .3s ease; }
.home-gallery__meta i { align-items: center; background: rgba(255,255,255,.17); border: 1px solid rgba(255,255,255,.5); border-radius: 50%; display: flex; height: 33px; justify-content: center; width: 33px; }
.home-gallery__item:hover img, .home-gallery__item:focus-visible img { transform: scale(1.07); }
.home-gallery__item:hover .home-gallery__shade, .home-gallery__item:focus-visible .home-gallery__shade { opacity: 1; }
.home-gallery__item:hover .home-gallery__meta, .home-gallery__item:focus-visible .home-gallery__meta { opacity: 1; transform: translateY(0); }
.home-gallery__item:focus-visible { outline: 3px solid var(--oxpins-primary, #f7be3d); outline-offset: 3px; z-index: 1; }

@media (max-width: 991px) {
  .modern-gallery { padding: 80px 0; }
  .modern-gallery__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 190px; }
  .gallery-lightbox__nav--previous { left: 0; } .gallery-lightbox__nav--next { right: 0; }
  .home-gallery { padding: 75px 0 80px; }
  .home-gallery__grid { grid-template-columns: repeat(2, 1fr); grid-template-rows: repeat(3, 205px); }
  .home-gallery__item--4 { grid-column: span 1; }
}

@media (max-width: 575px) {
  .modern-gallery__intro { align-items: flex-start; flex-direction: column; margin-bottom: 30px; }
  .modern-gallery__grid { gap: 8px; grid-auto-rows: 145px; }
  .modern-gallery__item:nth-child(2), .modern-gallery__item:nth-child(8), .modern-gallery__item:nth-child(16) { grid-row: span 1; }
  .gallery-lightbox { padding: 14px; } .gallery-lightbox__panel { height: min(85vh, 720px); }
  .gallery-lightbox__figure { height: calc(100% - 73px); } .gallery-lightbox__close { right: 3px; top: -4px; }
  .gallery-lightbox__nav { font-size: 15px; width: 19%; } .gallery-lightbox__footer { gap: 10px; }
  .gallery-lightbox__thumbs button { flex-basis: 39px; height: 39px; }
  .home-gallery__header { align-items: flex-start; flex-direction: column; margin-bottom: 30px; }
  .home-gallery__grid { gap: 8px; grid-template-rows: repeat(3, 150px); }
}
