/*
 * Intro
 */
header.with-img {
  background-image: url(../images/hero6.jpeg);
}

.gallery-container {
  max-width: var(--max-width);
  margin: 3em auto;
  padding: 2em;
}

.gallery-header {
  text-align: center;
  margin-bottom: 3em;
}

.gallery-header h1 {
  font-size: 2.25rem;
  color: var(--mediumGold);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 0.5em;
}

.gallery-header p {
  font-size: 1.05rem;
  opacity: 0.9;
  max-width: 600px;
  margin: 0 auto;
}

.filter-buttons {
  display: flex;
  justify-content: center;
  gap: 1em;
  flex-wrap: wrap;
  margin-bottom: 3em;
}

.filter-btn {
  padding: 0.75em 1.75em;
  background-color: var(--black);
  border: 2px solid var(--black3);
  color: var(--white);
  font-size: 0.9rem;
  font-weight: 600;
  text-transform: uppercase;
  cursor: pointer;
  border-radius: 6px;
  transition: all 0.3s ease;
}

.filter-btn:hover {
  border-color: var(--mediumGold);
  color: var(--mediumGold);
  transform: translateY(-2px);
}

.filter-btn.active {
  background-color: var(--mediumGold);
  border-color: var(--mediumGold);
  color: var(--black2);
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2em;
  margin-bottom: 4em;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  cursor: pointer;
  background-color: var(--black);
  border: 2px solid var(--black3);
  transition: all 0.4s ease;
  aspect-ratio: 4/3;
}

.gallery-item:hover {
  border-color: var(--teal);
  transform: translateY(-5px);
  box-shadow: 0 8px 30px var(--tealOp4);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.gallery-item:hover img {
  transform: scale(1.05);
}

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, var(--blackOp9), transparent);
  padding: 1.5em;
  transform: translateY(100%);
  transition: transform 0.4s ease;
}

.gallery-item:hover .gallery-overlay {
  transform: translateY(0);
}

.gallery-overlay h3 {
  font-size: 1.1rem;
  margin-bottom: 0.25em;
  color: var(--teal);
}

.gallery-overlay p {
  font-size: 0.85rem;
  opacity: 0.85;
}

/* Lightbox Modal */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background-color: var(--blackOp9);
  backdrop-filter: blur(10px);
  z-index: 1000;
  padding: 2em;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox.active {
  display: flex;
}

.lightbox-content {
  position: relative;
  max-width: 90vw;
  max-height: 90vh;
  animation: scaleIn 0.3s ease;
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.95);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

.lightbox-content img {
  max-width: 100%;
  max-height: 85vh;
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 20px 60px var(--blackOp5);
}

.lightbox-close {
  position: absolute;
  top: -50px;
  right: 0;
  background-color: var(--blackOp5);
  border: 2px solid var(--black3);
  color: var(--white);
  font-size: 1.5rem;
  cursor: pointer;
  transition: all 0.3s ease;
  width: 45px;
  height: 45px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-close:hover {
  background-color: var(--black3);
  border-color: var(--black3);
}

.lightbox-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background-color: var(--blackOp7);
  border: 2px solid var(--mediumGold);
  color: var(--mediumGold);
  font-size: 1.5rem;
  width: 50px;
  height: 50px;
  cursor: pointer;
  border-radius: 50%;
  transition: all 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(5px);
}

.lightbox-nav:hover {
  background-color: var(--mediumGold);
  color: var(--black2);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 0 20px var(--mediumGoldOp4);
}

.lightbox-nav:active {
  transform: translateY(-50%) scale(0.95);
}

.lightbox-prev {
  left: 20px;
}

.lightbox-next {
  right: 20px;
}

.lightbox-info {
  position: absolute;
  bottom: -60px;
  left: 0;
  right: 0;
  text-align: center;
  backdrop-filter: blur(10px);
  padding: 1em;
}

.lightbox-info h3 {
  color: var(--teal);
  font-size: 1.2rem;
  margin-bottom: 0.25em;
  font-weight: 600;
}

.lightbox-info p {
  opacity: 0.9;
  font-size: 0.95rem;
}

/* Empty State */
.empty-state {
  text-align: center;
  padding: 4em 2em;
  opacity: 0.6;
}

.empty-state i {
  font-size: 3rem;
  color: var(--mediumGold);
  margin-bottom: 1em;
}

/*
 * Tablet
 */
@media screen and (max-width: 768px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1.5em;
  }

  .gallery-header h1 {
    font-size: 1.8rem;
  }

  .filter-buttons {
    gap: 0.75em;
  }

  .filter-btn {
    padding: 0.6em 1.25em;
    font-size: 0.85rem;
  }

  .lightbox-content {
    max-width: 85vw;
  }

  .lightbox-close {
    top: -3em;
    right: -0.5em;
    width: 40px;
    height: 40px;
    font-size: 1.25rem;
  }

  .lightbox-nav {
    width: 45px;
    height: 45px;
    font-size: 1.25rem;
  }

  .lightbox-prev {
    left: 10px;
  }

  .lightbox-next {
    right: 10px;
  }

  .lightbox-info {
    bottom: -55px;
    padding: 0.75em;
  }

  .lightbox-info h3 {
    font-size: 1rem;
  }

  .lightbox-info p {
    font-size: 0.85rem;
  }
}

/*
 * Mobile
 */
@media screen and (max-width: 600px) {
  .gallery-container {
    padding: 1em;
  }

  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.25em;
  }

  .gallery-header h1 {
    font-size: 1.5rem;
  }

  .gallery-header p {
    font-size: 0.95rem;
  }

  .lightbox {
    padding: 1em;
  }

  .lightbox-content {
    max-width: 100%;
    max-height: 80vh;
  }

  .lightbox-content img {
    max-height: 70vh;
  }

  .lightbox-close {
    top: 0.5em;
    right: 0.5em;
    width: 38px;
    height: 38px;
    font-size: 1.1rem;
    background-color: var(--blackOp7);
    border: 1px solid var(--black3);
  }

  .lightbox-nav {
    width: 42px;
    height: 42px;
    font-size: 1.1rem;
    bottom: 1.5em;
    top: auto;
    transform: none;
    background-color: var(--blackOp7);
  }

  .lightbox-nav:hover {
    transform: scale(1.05);
  }

  .lightbox-nav:active {
    transform: scale(0.95);
  }

  .lightbox-prev {
    left: 0.75em;
  }

  .lightbox-next {
    right: 0.75em;
  }

  .lightbox-info {
    display: none;
  }
}
