/* ===================================
   Custom Gallery Page Styles
   =================================== */

/* ==== Gallery Page Section ==== */
.gallery-page {
  padding: 100px 0;
  background-color: #edeeef;
}

/* ==== Gallery Filter ==== */
.gallery-filter {
  margin-bottom: 50px;
  text-align: center;
}

.filter-list {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  list-style: none;
  padding: 0;
  margin: 0;
}

.filter-btn {
  padding: 12px 28px;
  background: var(--white);
  color: var(--secondary-color);
  border: 2px solid rgba(157, 153, 139, 0.2);
  border-radius: 30px;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  text-transform: capitalize;
}

.filter-btn:hover {
  background: var(--base-color);
  color: var(--black);
  border-color: var(--base-color);
  transform: translateY(-2px);
}

.filter-btn.active {
  background: var(--secondary-color);
  color: var(--white);
  border-color: var(--secondary-color);
}

/* ==== Gallery Grid ==== */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 25px;
  margin-bottom: 50px;
}

.gallery-item {
  opacity: 1;
  transform: scale(1);
  transition: all 0.3s ease;
  display: block;
}

.gallery-item__inner {
  background: var(--white);
  border-radius: 15px;
  overflow: hidden;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
  transition: var(--transition);
  height: 100%;
  display: flex;
  flex-direction: column;
}

.gallery-item__inner:hover {
  transform: translateY(-5px);
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.gallery-item__thumb {
  position: relative;
  overflow: hidden;
  width: 100%;
  height: 280px;
  background: #f0f0f0;
}

.gallery-item__thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: var(--transition);
}

.gallery-item__inner:hover .gallery-item__thumb img {
  transform: scale(1.1);
}

.gallery-item__overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(9, 31, 27, 0.8);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: var(--transition);
}

.gallery-item__inner:hover .gallery-item__overlay {
  opacity: 1;
}

.gallery-item__overlay a {
  width: 60px;
  height: 60px;
  background: var(--base-color);
  color: var(--black);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  text-decoration: none;
  transform: scale(0.8);
  transition: var(--transition);
}

.gallery-item__inner:hover .gallery-item__overlay a {
  transform: scale(1);
}

.gallery-item__overlay a:hover {
  background: var(--white);
  transform: scale(1.1);
}

.gallery-item__content {
  padding: 20px;
  flex-grow: 1;
}

.gallery-item__content h5 {
  font-size: 18px;
  font-weight: 700;
  color: var(--secondary-color);
  margin-bottom: 8px;
}

.gallery-item__content p {
  font-size: 14px;
  color: #4f5b73;
  margin: 0;
}

/* ==== Load More Button ==== */
.gallery-load-more {
  margin-top: 40px;
}

.gallery-load-more button {
  padding: 16px 40px;
}

/* ==== Lightbox Overlay ==== */
.lightbox-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
  text-align: center;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: -40px;
  right: 0;
  color: var(--white);
  font-size: 40px;
  cursor: pointer;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: var(--transition);
}

.lightbox-close:hover {
  color: var(--base-color);
  transform: rotate(90deg);
}

.lightbox-title {
  color: var(--white);
  font-size: 18px;
  margin-top: 20px;
  font-weight: 600;
}

/* ==== Responsive ==== */
@media (max-width: 991px) {
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
  }
  
  .gallery-item__thumb {
    height: 240px;
  }
}

@media (max-width: 767px) {
  .gallery-page {
    padding: 60px 0;
  }
  
  .gallery-grid {
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 15px;
  }
  
  .gallery-item__thumb {
    height: 200px;
  }
  
  .filter-list {
    gap: 10px;
  }
  
  .filter-btn {
    padding: 10px 20px;
    font-size: 14px;
  }
  
  .gallery-item__content {
    padding: 15px;
  }
  
  .gallery-item__content h5 {
    font-size: 16px;
  }
  
  .lightbox-content {
    max-width: 95%;
  }
  
  .lightbox-close {
    top: -30px;
    font-size: 30px;
  }
}

@media (max-width: 575px) {
  .gallery-grid {
    grid-template-columns: 1fr;
  }
  
  .gallery-item__thumb {
    height: 250px;
  }
}
