/******************************************************************

Stylesheet: Block Style
Block: Gallery

******************************************************************/
/******************************************************************

Stylesheet: Variables

Here is where we declare all our variables like colors, fonts,
base values, and defaults. We want to make sure this file ONLY
contains variables that way our files don't get all messy.
No one likes a mess.

******************************************************************/
/*********************
WRAPS
*********************/
/*********************
COLORS
*********************/
/*********************
FONT FAMILY
*********************/
/*********************
FONT SIZES
*********************/
/*********************
PADDINGS
*********************/
/*********************
TRANSITIONS
*********************/
.sp-block-gallery {
  --sp-gallery-radius: 0;
  --sp-gallery-gap: 16px;
  color: #1a1818;
}
.sp-block-gallery .sp-gallery {
  display: grid;
  gap: var(--sp-gallery-gap);
}
.sp-block-gallery .sp-gallery__placeholder {
  margin: 0;
  padding: 32px;
  text-align: center;
}
.sp-block-gallery .sp-gallery-grid {
  display: grid;
  gap: var(--sp-gallery-gap);
  grid-template-columns: 2fr 1fr;
  grid-template-rows: repeat(2, minmax(140px, 1fr));
}
@media (max-width: 900px) {
  .sp-block-gallery .sp-gallery-grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto;
    margin-left: calc(50% - 50vw);
    margin-right: calc(50% - 50vw);
    width: auto;
    max-width: 1000%;
  }
}
.sp-block-gallery .sp-gallery-tile {
  position: relative;
  border: 0;
  border-radius: 0;
  overflow: hidden;
  padding: 0;
  cursor: pointer;
  transition: all ease 0.18s;
  min-height: 180px;
}
@media (max-width: 900px) {
  .sp-block-gallery .sp-gallery-tile {
    min-height: initial;
  }
}
.sp-block-gallery .sp-gallery-tile:hover, .sp-block-gallery .sp-gallery-tile:focus-visible {
  filter: brightness(0.8);
}
.sp-block-gallery .sp-gallery-tile.is-main {
  grid-row: span 2;
  min-height: 340px;
}
@media (max-width: 900px) {
  .sp-block-gallery .sp-gallery-tile.is-main {
    grid-row: auto;
    grid-column: span 2;
    min-height: initial;
  }
}
.sp-block-gallery .sp-gallery-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.sp-block-gallery .sp-gallery-tile__caption {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 10px 12px;
  color: #fff;
  font-weight: 600;
  font-size: 0.95rem;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.68) 100%);
}
.sp-block-gallery .sp-gallery-tile__more {
  position: absolute;
  bottom: 32px;
  right: 32px;
  font-weight: 700;
  background-color: #fff;
  color: #1a1818;
  box-shadow: inset 0 0 0 2px #1a1818;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  line-height: 1;
  gap: 8px;
  padding: 0.8em 1.1em;
  border-radius: 44px;
  white-space: nowrap;
}
.sp-block-gallery .sp-gallery-modal {
  position: fixed;
  display: flex;
  align-items: stretch;
  justify-content: center;
  margin: 0;
  opacity: 0;
  pointer-events: none;
  transition: all 0.22s ease;
  z-index: 40;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  transform: scale(0.86);
}
.sp-block-gallery .sp-gallery-modal.is-open {
  opacity: 1;
  transform: scale(1);
  pointer-events: auto;
}
.admin-bar .sp-block-gallery .sp-gallery-modal {
  top: 32px;
}
@media (max-width: 782px) {
  .admin-bar .sp-block-gallery .sp-gallery-modal {
    top: 46px;
  }
}
.sp-block-gallery .sp-gallery-modal__surface {
  position: relative;
  margin: auto;
  width: 100%;
  height: 100vh;
  background: #fff;
  border-radius: 0;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto 1fr;
  z-index: 1;
}
.admin-bar .sp-block-gallery .sp-gallery-modal__surface {
  height: calc(100vh - 32px);
}
@media (max-width: 782px) {
  .admin-bar .sp-block-gallery .sp-gallery-modal__surface {
    height: calc(100vh - 46px);
  }
}
.sp-block-gallery .sp-gallery-modal__top {
  padding: 1em 32px;
  background: #fff;
  border-bottom: 1px solid #f3efec;
}
.sp-block-gallery .sp-gallery-close {
  display: inline-flex;
  align-items: center;
  font-size: var(--wp--preset--font-size--sp-small);
  gap: 0.7em;
  border: 0;
  background: none;
  padding: 0.5em 1.6em;
  border-radius: 999px;
  font-weight: 600;
  background: #ddc4ab;
  color: #1a1818;
  cursor: pointer;
  transition: background 0.18s ease, transform 0.18s ease;
}
.sp-block-gallery .sp-gallery-close:hover, .sp-block-gallery .sp-gallery-close:focus-visible {
  background: #c49a6c;
}
.sp-block-gallery .sp-gallery-close .sp-gallery-close__icon {
  font-size: 1.1rem;
  line-height: 1;
}
.sp-block-gallery .sp-gallery-modal__body {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 13em;
  gap: 32px;
  align-items: start;
  padding: 0 32px;
  max-height: calc(100vh - 105px);
  overflow: hidden;
}
@media (max-width: 900px) {
  .sp-block-gallery .sp-gallery-modal__body {
    grid-template-columns: 1fr;
  }
}
.sp-block-gallery .sp-gallery-main {
  position: relative;
  overflow: hidden;
  height: 100%;
  padding: 16px 0;
}
.sp-block-gallery .sp-gallery-main__track {
  display: flex;
  align-items: center;
  width: 100%;
  height: 100%;
  transition: transform 0.3s ease;
}
.sp-block-gallery .sp-gallery-main__slide {
  min-width: 100%;
  height: 100%;
  position: relative;
}
.sp-block-gallery .sp-gallery-main__slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}
.sp-block-gallery .sp-gallery-main__slide figcaption {
  position: absolute;
  left: 50%;
  transform: translateX(-50%) translateY(1em);
  bottom: 1em;
  padding: 0.8em 1em;
  font-size: 1em;
  background: rgba(255, 255, 255, 0.75);
  border-radius: 0.6em;
  text-align: center;
  max-width: calc(100% - 2em);
  width: max-content;
  font-weight: 500;
  opacity: 0;
  transition: all 0.4s ease;
  transition-delay: 0.2s;
}
@media (min-width: 900px) {
  .sp-block-gallery .sp-gallery-main__slide figcaption {
    bottom: 2em;
  }
}
@media (min-width: 1440px) {
  .sp-block-gallery .sp-gallery-main__slide figcaption {
    max-width: 1050px;
  }
}
.sp-block-gallery .sp-gallery-main__slide.is-active figcaption {
  opacity: 1;
  transform: translateX(-50%) translateY(0);
}
.sp-block-gallery .sp-gallery-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #284236;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  aspect-ratio: 1/1;
  cursor: pointer;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, background 0.18s ease, border-color 0.18s ease;
  z-index: 2;
}
.sp-block-gallery .sp-gallery-nav img {
  width: 24px;
  height: 24px;
  display: block;
  filter: invert(1);
}
.sp-block-gallery .sp-gallery-nav:hover, .sp-block-gallery .sp-gallery-nav:focus-visible {
  background: #162f24;
}
.sp-block-gallery .sp-gallery-nav.sp-gallery-nav--prev {
  left: 48px;
}
@media (max-width: 900px) {
  .sp-block-gallery .sp-gallery-nav.sp-gallery-nav--prev {
    left: 14px;
  }
}
.sp-block-gallery .sp-gallery-nav.sp-gallery-nav--next {
  right: calc(13em + 80px);
}
@media (max-width: 900px) {
  .sp-block-gallery .sp-gallery-nav.sp-gallery-nav--next {
    right: 14px;
  }
}
.sp-block-gallery .sp-gallery-thumbs {
  position: relative;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-self: stretch;
  overflow: hidden;
  padding: 16px 0;
}
@media (max-width: 900px) {
  .sp-block-gallery .sp-gallery-thumbs {
    display: none;
  }
}
.sp-block-gallery .sp-gallery-thumbs__list {
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
  scrollbar-width: none;
  scroll-snap-type: y mandatory;
}
.sp-block-gallery .sp-gallery-thumb {
  display: block;
  width: 100%;
  padding: 0;
  overflow: hidden;
  cursor: pointer;
  transition: all ease 0.18s;
  scroll-snap-align: end;
  position: relative;
  padding-bottom: 60%;
  border-radius: 1em;
  border: none;
  background: transparent;
  appearance: none;
}
.sp-block-gallery .sp-gallery-thumb img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: -1;
}
.sp-block-gallery .sp-gallery-thumb:hover, .sp-block-gallery .sp-gallery-thumb:focus-visible {
  box-shadow: inset 0 0 0 3px #284236;
}
.sp-block-gallery .sp-gallery-thumb.is-active {
  box-shadow: inset 0 0 0 3px #162f24;
}
