.gallery-title {
  font-size: 2vw;
  color: #1f1c23;
  font-weight: 100;
  margin: 0;
  padding-left: 2%;
  padding-bottom: 2%;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(400px, 1fr));
  align-items: stretch;
}

.cover-gallery {
  display: grid;
  grid-template-columns: 1fr 1fr;
  text-align: center;
}

.cover-image {
  width: 62%;
  align-items: center;
  margin: auto;
  padding: 2%;
  padding-top: 0;
}

.tall-photo {
  grid-row: span 2;
  display: flex;
  align-items: center;
}

.gallery-wrapper {
  padding: 1%;
}

.photo-box {
  padding: 5%;
  display: grid;
  align-items: center;
  justify-items: center;
}

.photo-box img {
  width: 100%;
  cursor: pointer;
}

/* 1. Make sure the container allows absolute positioning inside it */
.photo-box.video-item {
  position: relative;
}

/* 2. Create the glass-like translucent outer circle */
.photo-box.video-item::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(1);
  width: 65px;
  height: 65px;
  background: rgba(255, 255, 255, 0.25); /* Translucent white glass */
  backdrop-filter: blur(4px); /* Modern frosted glass effect */
  border: 2px solid #4e4e4e;
  border-radius: 50%;
  z-index: 2;
  transition: all 0.3s ease-in-out;

  /* CRITICAL: This ensures clicking the play button passes right through to the image */
  pointer-events: none;
}

/* 3. Draw the white play triangle using clever border geometry */
.photo-box.video-item::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 51%; /* 53% instead of 50% optically centers a triangle's weight */
  transform: translate(-50%, -50%) scale(1);
  border-style: solid;
  border-width: 12px 0 12px 20px; /* Dictates the triangle size */
  border-color: transparent transparent transparent #4e4e4e; /* Triangle points right */
  z-index: 3;
  transition: all 0.3s ease-in-out;
  pointer-events: none;
}

/* 4. Smooth hover animations */
.photo-box.video-item:hover::after {
  background: rgba(255, 255, 255, 0.4);
  border-color: #4e4e4e;
  transform: translate(-50%, -50%) scale(1.1); /* Slight pop out */
}

.photo-box.video-item:hover::before {
  transform: translate(-50%, -50%) scale(1.1);
}

.smaller-width {
  width: 50% !important;
}

.hundred-width {
  width: 100% !important;
}

photo-box.functional:empty {
  display: none;
}

/* only one empty box needed */
.photo-box.functional:empty:last-child {
  display: none;
}

/* Mobile */
@media only screen and (min-device-width: 320px) and (max-device-width: 568px) {
  .gallery-title {
    font-size: 6vw;
  }
  .margin-bottom {
    margin-bottom: 10%;
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
  }
  .cover-gallery {
    grid-template-columns: 1fr;
  }
  .photo-box img {
    width: 85%;
  }
  .smaller-width {
    width: 60% !important;
  }
  .photo-box.functional:empty {
    display: none;
  }
  .photo-box.sculpture:empty {
    display: none;
  }
  .cover-image {
    width: 85%;
  }
}

/* Mobile */
@media only screen and (min-device-width: 568px) and (max-device-width: 1200px) {
  .photo-box.functional:empty:last-child {
    display: none;
  }
  .photo-box.sculpture:empty:last-child {
    display: none;
  }
}

/* Desktop */
/* 2 columns */
@media only screen and (max-width: 1230px) {
  .gallery-title {
    padding-bottom: 0;
  }

  .photo-box.sculpture:empty {
    display: none;
  }

  /*one empty box needed*/
  /*.photo-box.functional:empty {
        display: initial;
    }*/

  /*one empty box needed*/
  /*.photo-box.functional:empty:last-child {
        display: none;
    }*/

  /* no empty boxes needed */
  .photo-box.functional:empty {
    display: none;
  }
}

/* one column */
@media only screen and (max-width: 817px) {
  .gallery-title {
    padding: 4%;
  }

  .cover-gallery {
    grid-template-columns: 1fr;
  }

  .cover-gallery-border {
    border-bottom: 1px solid #e2e1dc;
  }

  .photo-box.functional:empty {
    display: none;
  }
  .photo-box.sculpture:empty {
    display: none;
  }
}

.full-page-grid {
  display: grid;
}
