/* Gallery Layout - Responsive grid that works at all screen sizes */
.gallery-container {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    padding: 20px 0;
    justify-content: center;
    max-width: 1200px;
    margin: 0 auto;
  }
  
  .gallery-container a {
    width: 280px;
    position: relative;
    display: block;
    overflow: hidden;
    border: 1px solid var(--color-off-grey);
    border-radius: 8px;
    transition: transform 0.3s ease;
  }

.gallery-container a:hover {
    transform: translateY(-5px);
}

.gallery-container img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
    object-position: top;
}
.gallery-container img.middle{
    object-position: center;
}

/* Responsive gallery sizing */
@media (max-width: 768px) {
  .gallery-container a {
    width: calc(50% - 10px); /* 2 columns on mobile */
    min-width: 140px;
    position: relative;
    margin: 0 auto;
  }
  
  .gallery-container img {
    height: 180px;
  }
}

@media (max-width: 480px) {
  .gallery-container {
    gap: 15px;
  }
  
  .gallery-container a {
    width: 100%; /* 1 column on small mobile */
  }
  
  .gallery-container img {
    height: 200px;
  }
  .gallery-item{
    width: 45%;
  }
}

@media (min-width: 769px) and (max-width: 1100px) {
  .gallery-container a {
    width: calc(33.333% - 14px); /* 3 columns on tablet */
  }
  .gallery-container.screens a {
    width: 280px;
  }

}

/* Hover Overlay */
.hover-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.8));
    padding: 20px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-container a:hover .hover-overlay {
    opacity: 1;
}

.hover-overlay .title {
    color: white;
    font-size: 1.2em;
    font-weight: bold;
}

/* Video Item Specific Styles */
.play-icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60px;
    height: 60px;
    background: rgba(255,255,255,0.9);
    border-radius: 50%;
}

.play-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 54%;
    transform: translate(-50%, -50%);
    border-left: 20px solid #000;
    border-top: 12px solid transparent;
    border-bottom: 12px solid transparent;
}

/* GLightbox Custom Styles */
.gdesc-inner{
    background: var(--color-purple-light);
    border-top: 1px solid var(--color-purple);
}

@media (max-width:768px) {
    .gdesc-inner{
        background: none;
    }
}

.glightbox-container {
    backdrop-filter: blur(5px);
}

.gslide-description {
    background: linear-gradient(transparent, rgba(0,0,0,0.9));
}

.glightbox-container .gslide-title {
    margin-top: 1rem;
    margin-bottom: 0.5em;
}

.glightbox-container .gdesc-inner .gslide-desc {
    color: #444444;
	  font-family: var(--font-family);
    font-size: .9em;;
}

.glightbox-container .gdesc-inner .gslide-desc a {
    color: #8000C2;
    text-decoration: underline;
}

/* Navigation Arrows */
.gnext,
.gprev {
    background-color: rgba(255,255,255,0.1);
    backdrop-filter: blur(4px);
    border-radius: 50%;
    width: 50px;
    height: 50px;
    transition: background-color 0.3s ease;
}

.gnext:hover,
.gprev:hover {
    background-color: rgba(255,255,255,0.2);
}

.glightbox-mobile .glightbox-container .gslide-description{
  padding: 0 0 calc(1rem + env(safe-area-inset-bottom, 20px)) 0 !important;
}