/* RHETBEAR.COM — EYE BALLS GALLERY */

.eyeballs-page {
  overflow-x: hidden;
}

.eyeballs-main {
  width: calc(100% - 36px);
  max-width: 2100px;
  margin: 0 auto;
  padding: 30px 0 64px;
}

.eyeballs-title {
  margin: 0 0 24px;
  font-size: 18px;
  font-weight: 300;
  line-height: 1.2;
  text-align: center;
  letter-spacing: .035em;
}

.eyeballs-gallery {
  --gallery-gap: 12px;
  --masonry-row: 8px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  grid-auto-rows: var(--masonry-row);
  gap: var(--gallery-gap);
  align-items: start;
}

.eyeballs-item {
  display: block;
  min-width: 0;
  padding: 0;
  margin: 0;
  border: 0;
  outline: 0;
  overflow: hidden;
  background: transparent;
  cursor: zoom-in;
  appearance: none;
  -webkit-appearance: none;
}

.eyeballs-item img {
  display: block;
  width: 100%;
  height: auto;
  max-width: none;
  border: 0;
  outline: 0;
  box-shadow: none;
  transform: scale(1);
  opacity: 1;
  transition: transform .26s ease;
  will-change: transform;
}

@media (hover: hover) and (pointer: fine) {
  .eyeballs-item:hover img {
    transform: scale(1.025);
  }
}

.eyeballs-loading,
.eyeballs-error {
  grid-column: 1 / -1;
  margin: 30px 0;
  text-align: center;
  color: var(--muted);
  font-size: 15px;
}

.eyeballs-lightbox {
  position: fixed;
  z-index: 40;
  inset: var(--eyeballs-header-height, 54px) 0 0;
  background: rgba(242, 242, 242, .94);
  display: none;
  overflow: hidden;
}

.eyeballs-lightbox.is-open {
  display: block;
}

.eyeballs-lightbox[hidden] {
  display: none;
}

.lightbox-stage {
  position: absolute;
  inset: 14px 58px 14px 58px;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  pointer-events: none;
}

.lightbox-stage img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border: 0;
  outline: 0;
  box-shadow: none;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: auto;
}

.lightbox-close,
.lightbox-arrow {
  position: absolute;
  z-index: 2;
  border: 0;
  outline: 0;
  padding: 0;
  color: #111;
  background: transparent;
  font-family: Arial, Helvetica, sans-serif;
  font-weight: 300;
  cursor: pointer;
  transition: opacity .18s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}

.lightbox-close:hover,
.lightbox-arrow:hover {
  opacity: .55;
}

.lightbox-close {
  top: 10px;
  right: 15px;
  width: 34px;
  height: 34px;
  font-size: 33px;
  line-height: 31px;
}

.lightbox-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 42px;
  height: 70px;
  font-size: 58px;
  line-height: 64px;
}

.lightbox-prev { left: 6px; }
.lightbox-next { right: 6px; }

body.lightbox-open {
  overflow: hidden;
}

@media (max-width: 1699px) {
  .eyeballs-gallery {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
}

@media (max-width: 1199px) {
  .eyeballs-gallery {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (max-width: 849px) {
  .eyeballs-main {
    width: calc(100% - 28px);
  }

  .eyeballs-gallery {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    --gallery-gap: 10px;
  }

  .lightbox-stage {
    inset: 10px 46px;
  }

  .lightbox-arrow {
    width: 38px;
    font-size: 50px;
  }
}

@media (max-width: 600px) {
  .eyeballs-main {
    width: calc(100% - 20px);
    padding-top: 24px;
  }

  .eyeballs-gallery {
    grid-template-columns: 1fr;
    --gallery-gap: 12px;
  }

  .lightbox-stage {
    inset: 8px 28px 8px 28px;
  }

  .lightbox-close {
    top: 5px;
    right: 7px;
    width: 30px;
    height: 30px;
    font-size: 30px;
    line-height: 28px;
  }

  .lightbox-arrow {
    width: 26px;
    height: 54px;
    font-size: 42px;
    line-height: 48px;
  }

  .lightbox-prev { left: 0; }
  .lightbox-next { right: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .eyeballs-item img,
  .lightbox-close,
  .lightbox-arrow {
    transition: none;
  }
}


/* Iceland lightbox caption */
.lightbox-photo-wrap {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  width: 100%;
  height: 100%;

  min-width: 0;
  min-height: 0;
}

.lightbox-photo-wrap #lightbox-image {
  display: block;

  width: auto;
  height: auto;

  max-width: 100%;
  max-height: calc(100% - 42px);

  object-fit: contain;

  min-width: 0;
  min-height: 0;
}

.lightbox-caption {
  flex: 0 0 auto;

  margin: 0;
  padding: 8px 0 0;

  color: #111;
  font-family: "Oswald", sans-serif;
  font-size: 16px;
  font-weight: 300;
  line-height: 1.15;
  letter-spacing: .02em;
  text-align: center;
}

@media (max-width: 600px) {
  .lightbox-photo-wrap #lightbox-image {
    max-height: calc(100% - 38px);
  }

  .lightbox-caption {
    padding-top: 7px;
    font-size: 15px;
  }
}


/* ============================================================
   EYE BALLS MOBILE LIGHTBOX
   Desktop remains the master-template layout.
   ============================================================ */

.mobile-lightbox-controls {
  display: none;
}

@media (max-width: 600px) {
  /* Desktop side arrows/caption disappear only on phones. */
  .desktop-lightbox-arrow,
  .desktop-lightbox-caption {
    display: none;
  }

  /* Let the photo use the phone's full available width. */
  .lightbox-stage {
    inset: 8px 0;
    padding: 0;
    overflow: hidden;
  }

  .lightbox-photo-wrap {
    width: 100%;
    height: auto;
    max-height: 100%;
    padding: 0;
    justify-content: center;
  }

  .lightbox-photo-wrap #lightbox-image {
    display: block;
    width: auto;
    height: auto;
    max-width: 100%;
    max-height: calc(100vh - var(--eyeballs-header-height, 0px) - 58px);
    object-fit: contain;
    flex: 0 1 auto;
  }

  /* One real row immediately beneath the photo. */
  .mobile-lightbox-controls {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) 48px;
    align-items: center;
    width: 100%;
    min-height: 42px;
    padding: 4px 0 0;
    flex: 0 0 auto;
    pointer-events: auto;
  }

  .mobile-lightbox-arrow {
    position: static;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 38px;
    margin: 0;
    padding: 0;
    border: 0;
    outline: 0;
    background: transparent;
    color: #111;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 40px;
    font-weight: 300;
    line-height: 1;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
  }

  .mobile-lightbox-prev {
    grid-column: 1;
    justify-self: start;
  }

  .mobile-lightbox-caption {
    grid-column: 2;
    min-width: 0;
    margin: 0;
    padding: 0 8px;
    color: #111;
    font-family: "Oswald", sans-serif;
    font-size: 15px;
    font-weight: 300;
    line-height: 1.15;
    letter-spacing: .02em;
    text-align: center;
    overflow-wrap: anywhere;
  }

  .mobile-lightbox-next {
    grid-column: 3;
    justify-self: end;
  }

  .lightbox-close {
    z-index: 4;
  }
}
