/* ================= GALLERY ================= */
.gallery-sections {
  display: grid;
  gap: 2rem;
}

.gallery-section-card {
  background: #fff;
  border-radius: 24px;
  padding: 1.25rem;
  box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

.gallery-section-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 0.75rem;
  border-bottom: 1px solid #e9ecef;
}

.gallery-section-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #2c3e50;
  margin: 0;
}

.gallery-section-desc {
  color: #6c757d;
  margin: 0.25rem 0 0;
  font-size: 0.95rem;
}

.gallery-section-count {
  background: linear-gradient(135deg, #0d6efd, #20c997);
  color: #fff;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-size: 0.85rem;
  white-space: nowrap;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1rem;
}

.gallery-item {
  display: flex;
  flex-direction: column;
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  box-shadow: 0 10px 24px rgba(9, 30, 66, 0.08);
  transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 14px 30px rgba(9, 30, 66, 0.14);
}

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

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

.gallery-caption {
  flex-shrink: 0;
  background: linear-gradient(180deg, #f8f9fa 0%, #ffffff 100%);
  padding: 0.85rem 1rem;
  font-size: 0.95rem;
  color: #333;
  text-align: center;
  font-weight: 600;
}

.image-lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.92);
  align-items: center;
  justify-content: center;
  padding: 0.75rem;
  box-sizing: border-box;
}

.image-lightbox.active {
  display: flex;
}


.lightbox-inner {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 96%;
  max-height: 80vh;
  overflow: hidden;
}

.lightbox-content {
  max-width: 85%;
  max-height: 75vh;
  width: auto;
  height: auto;
  object-fit: contain;
  border-radius: 12px;
  animation: zoomIn 0.25s ease;
  display: block;
}

.lightbox-caption {
  position: absolute;
  right: 18px;
  bottom: 18px;
  display: inline-block;
  color: #fff;
  background: rgba(0, 0, 0, 0.75);
  padding: 0.6rem 0.9rem;
  border-radius: 8px;
  max-width: min(86%, 640px);
  text-align: right;
  font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
}

.lightbox-close {
  position: absolute;
  top: 20px;
  right: 40px;
  color: #fff;
  font-size: 40px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.3s;
}

.lightbox-close:hover {
  color: #bbb;
}

@keyframes zoomIn {
  from {
    transform: scale(0.8);
    opacity: 0;
  }
  to {
    transform: scale(1);
    opacity: 1;
  }
}

@media (max-width: 768px) {
  .gallery-section-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .gallery-item img {
    height: 220px;
  }
}
