/* Photo gallery and lightbox */

/* Gallery Section */
.gallery-grid {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 28px;
}

.gallery-card {
  flex: 0 1 calc((100% - 56px) / 3);
  background: #FFFFFF;
  border-radius: var(--radius-xl);
  overflow: hidden;
  border: 1px solid #E2E8F0;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.05);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.25s;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  position: relative;
}

.gallery-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 40px rgba(11, 79, 168, 0.16);
  border-color: var(--accent);
}

.gallery-img-wrapper {
  position: relative;
  aspect-ratio: 4 / 5;
  overflow: hidden;
  background: #0B4FA8;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-img {
  transform: scale(1.08);
}

.gallery-zoom-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(7, 51, 112, 0.1) 0%, rgba(7, 51, 112, 0.55) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
}

.gallery-card:hover .gallery-zoom-overlay {
  animation: lightboxFade 0.25s ease;
}

.gallery-zoom-btn {
  background: #FFFFFF;
  color: var(--primary-blue-dark);
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  transform: translateY(10px);
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.gallery-card:hover .gallery-zoom-btn {
  transform: translateY(0);
}

.gallery-caption {
  padding: 18px 22px;
  background: #FFFFFF;
  border-top: 1px solid #F1F5F9;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.gallery-caption-title {
  margin: 0;
  font-size: 1.05rem;
  font-weight: 800;
  color: #0F172A;
}

.gallery-caption-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.74rem;
  font-weight: 700;
  color: var(--primary-blue);
  background: #EFF6FF;
  border: 1px solid #BFDBFE;
  padding: 4px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

/* Lightbox Modal */
.lightbox-modal {
  position: fixed;
  inset: 0;
  background: rgba(11, 23, 44, 0.94);
  backdrop-filter: blur(10px);
  z-index: 3000;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.lightbox-modal.active {
  display: flex;
  animation: lightboxFade 0.25s ease;
}

.lightbox-inner {
  position: relative;
  max-width: 1000px;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.lightbox-image-box {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  max-width: 100%;
}

.lightbox-image {
  max-width: 100%;
  max-height: 75vh;
  object-fit: contain;
  border-radius: var(--radius-lg);
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.6);
  border: 2px solid rgba(255, 255, 255, 0.15);
  background: #000000;
}

.lightbox-bar {
  margin-top: 16px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #FFFFFF;
  padding: 0 8px;
  gap: 16px;
}

.lightbox-caption-text {
  font-size: 1.15rem;
  font-weight: 800;
  color: #FEF08A;
  margin: 0;
}

.lightbox-counter {
  font-size: 0.85rem;
  font-weight: 700;
  color: #CBD5E1;
  background: rgba(255, 255, 255, 0.12);
  padding: 4px 12px;
  border-radius: 999px;
  white-space: nowrap;
}

.lightbox-close-btn {
  position: absolute;
  top: -48px;
  right: 0;
  background: rgba(255, 255, 255, 0.15);
  border: 1px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.4rem;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.lightbox-close-btn:hover {
  background: #EAB308;
  color: #0F172A;
  transform: scale(1.08);
}

.lightbox-nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.75);
  border: 1.5px solid rgba(255, 255, 255, 0.3);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
  z-index: 10;
}

.lightbox-nav-btn:hover {
  background: #EAB308;
  color: #0F172A;
  border-color: #EAB308;
  transform: translateY(-50%) scale(1.08);
}

.lightbox-nav-prev {
  left: 16px;
}

.lightbox-nav-next {
  right: 16px;
}

@media (max-width: 960px) {
  .gallery-grid { gap: 20px; }
  .gallery-card { flex-basis: calc((100% - 20px) / 2); }
}

@media (max-width: 600px) {
  .gallery-card { flex-basis: 100%; }
}

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

/* Portrait photos in 4:5 cards: keep the people in frame */
.gallery-img { object-position: center 35%; }
