/* Gallery Section */
.gallery-section {
  min-height: 100vh;
  padding: 10rem 0 4rem;
  background: var(--dark-bg);
}

.gallery-section .section-header {
  margin-bottom: 4rem;
}

/* Gallery Grid */
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  margin-bottom: 4rem;
}

.gallery-item {
  position: relative;
  aspect-ratio: 4/3;
  border-radius: 1rem;
  overflow: hidden;
  cursor: pointer;
  background: var(--card-bg);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: transform 0.3s, border-color 0.3s;
}

.gallery-item:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 107, 0, 0.3);
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.3s;
}

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

.gallery-overlay {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.7) 60%, transparent 100%);
  padding: 3rem 1.5rem 1.5rem;
  transform: translateY(0);
  transition: padding 0.3s;
}

.gallery-item:hover .gallery-overlay {
  padding-bottom: 2rem;
}

.gallery-overlay h3 {
  font-size: 1.1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
  color: var(--text-primary);
}

.gallery-overlay p {
  font-size: 0.9rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  line-height: 1.5;
}

.gallery-actions {
  display: flex;
  gap: 0.5rem;
}

.view-btn,
.download-btn {
  flex: 1;
  background: rgba(255, 107, 0, 0.2);
  color: var(--primary-orange);
  border: 1px solid var(--primary-orange);
  padding: 0.5rem 0.75rem;
  border-radius: 0.5rem;
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.3s, color 0.3s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  text-decoration: none;
}

.view-btn:hover,
.download-btn:hover {
  background: var(--primary-orange);
  color: white;
}

.download-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Lightbox */
.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: rgba(0, 0, 0, 0.95);
  z-index: 10000;
  display: none;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(10px);
  animation: fadeIn 0.3s ease-in-out;
}

.lightbox.active {
  display: flex;
}

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

.lightbox-content {
  max-width: 90vw;
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.5rem;
}

.lightbox-content img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 0.5rem;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-caption {
  color: white;
  font-size: 1.2rem;
  font-weight: 600;
  text-align: center;
  max-width: 600px;
}

.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  width: 50px;
  height: 50px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
  backdrop-filter: blur(10px);
}

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 107, 0, 0.3);
  transform: scale(1.1);
}

.lightbox-close {
  top: 2rem;
  right: 2rem;
}

.lightbox-prev {
  left: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-prev:hover {
  transform: translateY(-50%) scale(1.1);
}

.lightbox-next {
  right: 2rem;
  top: 50%;
  transform: translateY(-50%);
}

.lightbox-next:hover {
  transform: translateY(-50%) scale(1.1);
}

/* Responsive */
@media (max-width: 968px) {
  .gallery-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 768px) {
  .lightbox-close {
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 40px;
    height: 40px;
  }

  .lightbox-prev {
    left: 1rem;
  }

  .lightbox-next {
    right: 1rem;
  }

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

  .lightbox-caption {
    font-size: 1rem;
    padding: 0 1rem;
  }
}

@media (max-width: 768px) {
  .gallery-section {
    padding: 4rem 0 3rem;
  }
}

@media (max-width: 480px) {
  .gallery-section {
    padding: 4rem 0 3rem;
  }
}
