/* =========================================================
   GIN TATTOOS
   GALLERY
   ========================================================= */

.gallery {

  --gallery-red: #d9000a;
  --gallery-black: #111111;
  --gallery-grey: #707070;
  --gallery-border: #e4e4e4;

  position: relative;

  width: 100%;

  padding: 125px 0 140px;

  background: #ffffff;

  overflow: hidden;

}


/* =========================================================
   BACKGROUND DETAIL
   ========================================================= */

.gallery::before {

  content: "";

  position: absolute;

  width: 500px;
  height: 500px;

  left: -300px;
  top: 20%;

  border-radius: 50%;

  background:
    rgba(217, 0, 10, 0.035);

  filter: blur(100px);

  pointer-events: none;

}


/* =========================================================
   CONTAINER
   ========================================================= */

.gallery-container {

  position: relative;

  z-index: 2;

  width: min(
    1280px,
    calc(100% - 80px)
  );

  margin: 0 auto;

}


/* =========================================================
   HEADING
   ========================================================= */

.gallery-heading {

  display: flex;

  justify-content: space-between;

  align-items: flex-end;

  gap: 60px;

  margin-bottom: 60px;

}


.gallery-heading-left {

  min-width: 0;

}


.gallery-label {

  display: block;

  margin-bottom: 15px;

  color: var(--gallery-red);

  font-size: 0.78rem;

  font-family: "Roboto", sans-serif;

  font-weight: 800;

  letter-spacing: 0.22em;

}


.gallery-title {

  margin: 0;

  color: var(--gallery-black);

  font-family: "Roboto", sans-serif;

  font-size: clamp(
    4rem,
    7vw,
    7rem
  );

  font-weight: 900;

  line-height: 0.88;

  letter-spacing: -0.055em;

}


.gallery-title span {

  display: block;

  color: var(--gallery-red);

}


.gallery-heading-right {

  width: min(
    390px,
    100%
  );

  padding-bottom: 5px;

}


.gallery-heading-right p {

  margin: 0;

  color: var(--gallery-grey);

  font-family: "Roboto", sans-serif;

  font-size: 0.95rem;

  font-weight: 400;

  line-height: 1.75;

}


/* =========================================================
   FILTERS
   ========================================================= */

.gallery-filters {

  display: flex;

  align-items: center;

  gap: 8px;

  margin-bottom: 30px;

  padding-bottom: 18px;

  border-bottom:
    1px solid
    var(--gallery-border);

  overflow-x: auto;

  scrollbar-width: none;

}


.gallery-filters::-webkit-scrollbar {

  display: none;

}


.gallery-filter {

  position: relative;

  flex-shrink: 0;

  padding: 12px 18px;

  border: 1px solid transparent;

  border-radius: 999px;

  background: transparent;

  color: #777777;

  font-family: "Roboto", sans-serif;

  font-size: 0.75rem;

  font-weight: 800;

  letter-spacing: 0.08em;

  cursor: pointer;

  transition:
    color 0.3s ease,
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;

}


.gallery-filter:hover {

  color: var(--gallery-red);

  border-color:
    rgba(217, 0, 10, 0.2);

}


.gallery-filter.active {

  color: #ffffff;

  background:
    var(--gallery-black);

  border-color:
    var(--gallery-black);

}


.gallery-filter.active:hover {

  color: #ffffff;

  background:
    var(--gallery-red);

  border-color:
    var(--gallery-red);

  transform:
    translateY(-2px);

}


/* =========================================================
   GALLERY GRID
   ========================================================= */

.gallery-grid {

  display: grid;

  grid-template-columns:
    repeat(4, minmax(0, 1fr));

  grid-auto-rows: 270px;

  gap: 14px;

}


/* =========================================================
   GALLERY ITEM
   ========================================================= */

.gallery-item {

  position: relative;

  display: block;

  width: 100%;
  height: 100%;

  min-width: 0;

  padding: 0;

  border: 0;

  border-radius: 20px;

  overflow: hidden;

  background: #eeeeee;

  cursor: pointer;

  text-align: left;

  isolation: isolate;

}


.gallery-item-large {

  grid-column:
    span 2;

  grid-row:
    span 2;

}


.gallery-item-tall {

  grid-row:
    span 2;

}


/* =========================================================
   IMAGE
   ========================================================= */

.gallery-item img {

  display: block;

  width: 100%;
  height: 100%;

  object-fit: cover;

  transition:
    transform 0.8s
    cubic-bezier(.16, 1, .3, 1),
    filter 0.5s ease;

}


.gallery-item:hover img {

  transform:
    scale(1.07);

  filter:
    brightness(0.72);

}


/* =========================================================
   IMAGE OVERLAY
   ========================================================= */

.gallery-overlay {

  position: absolute;

  inset: 0;

  z-index: 2;

  display: flex;

  flex-direction: column;

  justify-content: flex-end;

  align-items: flex-start;

  padding: 24px;

  background:
    linear-gradient(
      to top,
      rgba(0, 0, 0, 0.78),
      rgba(0, 0, 0, 0.05) 65%,
      transparent
    );

  opacity: 0;

  transition:
    opacity 0.45s ease;

}


.gallery-item:hover .gallery-overlay {

  opacity: 1;

}


.gallery-overlay-category {

  margin-bottom: 7px;

  color: #ff4b51;

  font-family: "Roboto", sans-serif;

  font-size: 0.65rem;

  font-weight: 800;

  letter-spacing: 0.16em;

}


.gallery-overlay-title {

  color: #ffffff;

  font-family: "Roboto", sans-serif;

  font-size: 0.9rem;

  font-weight: 800;

  letter-spacing: 0.05em;

}


.gallery-overlay-arrow {

  position: absolute;

  right: 22px;
  bottom: 20px;

  width: 42px;
  height: 42px;

  display: flex;

  align-items: center;
  justify-content: center;

  border-radius: 50%;

  color: #ffffff;

  background:
    var(--gallery-red);

  font-size: 1rem;

  transition:
    transform 0.4s ease;

}


.gallery-item:hover
.gallery-overlay-arrow {

  transform:
    rotate(45deg);

}


/* =========================================================
   FILTER ANIMATION
   ========================================================= */

.gallery-item.is-hidden {

  display: none;

}


.gallery-item.is-visible {

  animation:
    galleryReveal
    0.55s
    cubic-bezier(.16, 1, .3, 1)
    both;

}


@keyframes galleryReveal {

  from {

    opacity: 0;

    transform:
      translateY(15px)
      scale(0.98);

  }

  to {

    opacity: 1;

    transform:
      translateY(0)
      scale(1);

  }

}


/* =========================================================
   GALLERY FOOTER
   ========================================================= */

.gallery-footer {

  display: flex;

  justify-content: space-between;

  align-items: center;

  gap: 20px;

  margin-top: 22px;

  padding-top: 18px;

  border-top:
    1px solid
    var(--gallery-border);

  color: #999999;

  font-family: "Roboto", sans-serif;

  font-size: 0.65rem;

  font-weight: 700;

  letter-spacing: 0.14em;

}


/* =========================================================
   FULLSCREEN MODAL
   ========================================================= */

.gallery-modal {

  position: fixed;

  inset: 0;

  z-index: 9999;

  display: flex;

  align-items: center;

  justify-content: center;

  padding: 30px;

  visibility: hidden;

  opacity: 0;

  pointer-events: none;

  transition:
    opacity 0.35s ease,
    visibility 0.35s ease;

}


.gallery-modal.active {

  visibility: visible;

  opacity: 1;

  pointer-events: auto;

}


/* =========================================================
   MODAL BACKDROP
   ========================================================= */

.gallery-modal-backdrop {

  position: absolute;

  inset: 0;

  background:
    rgba(0, 0, 0, 0.94);

  backdrop-filter:
    blur(12px);

  -webkit-backdrop-filter:
    blur(12px);

}


/* =========================================================
   MODAL CONTENT
   ========================================================= */

.gallery-modal-content {

  position: relative;

  z-index: 2;

  width: min(
    1200px,
    100%
  );

  height: min(
    90vh,
    900px
  );

  display: flex;

  align-items: center;

  justify-content: center;

}


/* =========================================================
   MODAL IMAGE
   ========================================================= */

.gallery-modal-image-wrap {

  width: 100%;
  height: 100%;

  display: flex;

  align-items: center;
  justify-content: center;

}


.gallery-modal-image-wrap img {

  display: block;

  max-width: 88%;

  max-height: 82vh;

  width: auto;
  height: auto;

  object-fit: contain;

  border-radius: 12px;

  box-shadow:
    0 30px 100px
    rgba(0, 0, 0, 0.5);

}


/* =========================================================
   MODAL CLOSE
   ========================================================= */

.gallery-modal-close {

  position: absolute;

  top: 0;
  right: 0;

  z-index: 5;

  width: 48px;
  height: 48px;

  display: flex;

  align-items: center;
  justify-content: center;

  border: 1px solid
    rgba(255, 255, 255, 0.2);

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.08);

  color: #ffffff;

  font-family: "Roboto", sans-serif;

  font-size: 1.8rem;

  font-weight: 300;

  line-height: 1;

  cursor: pointer;

  transition:
    background 0.3s ease,
    transform 0.3s ease,
    border-color 0.3s ease;

}


.gallery-modal-close:hover {

  background:
    var(--gallery-red);

  border-color:
    var(--gallery-red);

  transform:
    rotate(90deg);

}


/* =========================================================
   MODAL ARROWS
   ========================================================= */

.gallery-modal-prev,
.gallery-modal-next {

  position: absolute;

  top: 50%;

  z-index: 5;

  width: 52px;
  height: 52px;

  display: flex;

  align-items: center;
  justify-content: center;

  border: 1px solid
    rgba(255, 255, 255, 0.18);

  border-radius: 50%;

  background:
    rgba(255, 255, 255, 0.08);

  color: #ffffff;

  font-size: 1.2rem;

  cursor: pointer;

  transform:
    translateY(-50%);

  transition:
    background 0.3s ease,
    border-color 0.3s ease,
    transform 0.3s ease;

}


.gallery-modal-prev {

  left: 10px;

}


.gallery-modal-next {

  right: 10px;

}


.gallery-modal-prev:hover,
.gallery-modal-next:hover {

  background:
    var(--gallery-red);

  border-color:
    var(--gallery-red);

}


.gallery-modal-prev:hover {

  transform:
    translate(-3px, -50%);

}


.gallery-modal-next:hover {

  transform:
    translate(3px, -50%);

}


/* =========================================================
   MODAL INFO
   ========================================================= */

.gallery-modal-info {

  position: absolute;

  left: 0;
  bottom: 0;

  display: flex;

  align-items: center;

  gap: 16px;

  color: #ffffff;

  font-family: "Roboto", sans-serif;

}


.gallery-modal-info > span:first-child {

  color:
    #ff4b51;

  font-size: 0.65rem;

  font-weight: 800;

  letter-spacing: 0.16em;

}


.gallery-modal-info strong {

  font-size: 0.85rem;

  font-weight: 700;

}


.gallery-modal-counter {

  color: #888888;

  font-size: 0.7rem;

  font-weight: 700;

  letter-spacing: 0.1em;

}


/* =========================================================
   TABLET
   ========================================================= */

@media (max-width: 1000px) {

  .gallery-container {

    width:
      calc(100% - 60px);

  }


  .gallery-grid {

    grid-template-columns:
      repeat(2, minmax(0, 1fr));

    grid-auto-rows:
      280px;

  }

}


/* =========================================================
   MOBILE
   ========================================================= */

@media (max-width: 700px) {

  .gallery {

    padding:
      90px 0
      100px;

  }


  .gallery-container {

    width:
      calc(100% - 32px);

  }


  .gallery-heading {

    flex-direction: column;

    align-items: flex-start;

    gap: 25px;

    margin-bottom: 45px;

  }


  .gallery-title {

    font-size:
      clamp(
        3.4rem,
        15vw,
        5rem
      );

  }


  .gallery-heading-right {

    max-width:
      500px;

  }


  .gallery-heading-right p {

    font-size:
      0.82rem;

  }


  .gallery-grid {

    grid-template-columns:
      1fr;

    grid-auto-rows:
      280px;

    gap: 10px;

  }


  .gallery-item-large,
  .gallery-item-tall {

    grid-column:
      span 1;

    grid-row:
      span 1;

  }


  .gallery-item-large {

    height:
      380px;

  }


  .gallery-item-tall {

    height:
      360px;

  }


  .gallery-overlay {

    opacity: 1;

    padding: 18px;

  }


  .gallery-overlay-arrow {

    width: 38px;
    height: 38px;

    right: 17px;
    bottom: 17px;

  }


  .gallery-footer {

    align-items:
      flex-start;

    flex-direction:
      column;

    gap: 8px;

  }


  .gallery-modal {

    padding:
      20px;

  }


  .gallery-modal-content {

    height:
      85vh;

  }


  .gallery-modal-image-wrap img {

    max-width:
      100%;

    max-height:
      72vh;

    border-radius:
      8px;

  }


  .gallery-modal-close {

    top:
      -5px;

    right:
      0;

    width:
      44px;

    height:
      44px;

  }


  .gallery-modal-prev,
  .gallery-modal-next {

    width:
      42px;

    height:
      42px;

  }


  .gallery-modal-prev {

    left:
      -5px;

  }


  .gallery-modal-next {

    right:
      -5px;

  }


  .gallery-modal-info {

    left:
      0;

    bottom:
      -5px;

    gap:
      10px;

  }

}


/* =========================================================
   VERY SMALL MOBILE
   ========================================================= */

@media (max-width: 380px) {

  .gallery-container {

    width:
      calc(100% - 24px);

  }


  .gallery-title {

    font-size:
      3.2rem;

  }


  .gallery-grid {

    grid-auto-rows:
      250px;

  }


  .gallery-item-large {

    height:
      330px;

  }

}


/* =========================================================
   REDUCED MOTION
   ========================================================= */

@media (prefers-reduced-motion: reduce) {

  .gallery *,
  .gallery *::before,
  .gallery *::after {

    animation-duration:
      0.01ms !important;

    animation-iteration-count:
      1 !important;

    transition-duration:
      0.01ms !important;

  }

}