/* ====== GALLERY SECTION ====== */
.gallery-section {
  padding: 80px 0;
  background: #f9f9f9;
  text-align: center;
  font-family: "Poppins", sans-serif;
}

/* ================= GALLERY HEADER ================= */

.gallery__header {
  text-align: center;
  max-width: 700px;
  margin: 0 auto 60px;
}

.gallery__badge {
  display: inline-block;
  background: #e6f0ff;
  color: #003366;
  padding: 6px 14px;
  border-radius: 30px;
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 18px;
}

.gallery__title {
  font-size: 34px;
  font-weight: 700;
  color: #0d1b2a;
  margin-bottom: 16px;
}

.gallery__subtitle {
  font-size: 16px;
  color: #5c677d;
  line-height: 1.6;
}

/* ====== TRUE MASONRY GALLERY GRID ====== */
.masonry-grid {
  column-count: 3;
  column-gap: 24px;
  padding: 0 20px;
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 20px;
  position: relative;
  overflow: hidden;
  border-radius: 15px;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
  transition: transform 0.3s ease;
  cursor: pointer;
  display: inline-block;
  width: 100%;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 15px;
  transition:
    transform 0.4s ease,
    filter 0.3s ease;
}

.masonry-item:hover img {
  transform: scale(1.05);
  filter: brightness(85%);
}

/* ====== SIMPLE CERTIFICATE CARDS ====== */
#certificates-grid {
  display: flex;
  justify-content: center;
  gap: 30px;
  flex-wrap: wrap;
  padding: 20px 0 60px 0;
}

.certificate-card {
  flex: 0 1 380px;
  position: relative;
  cursor: pointer;
  border-radius: 8px;
  background: transparent;
}

.certificate-card img {
  width: 100%;
  height: auto;
  max-height: 400px;
  object-fit: contain;
  display: block;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
  transition:
    transform 0.3s ease,
    box-shadow 0.3s ease;
}

.certificate-card:hover img {
  transform: translateY(-8px);
  box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

/* ====== Lightbox ====== */
.lightbox {
  display: none;
  position: fixed;
  z-index: 9999;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.85);
  align-items: center;
  justify-content: center;
}

.lightbox-img {
  max-width: 90%;
  max-height: 80vh;
  border-radius: 10px;
  box-shadow: 0 0 25px rgba(0, 0, 0, 0.3);
  animation: fadeIn 0.3s ease;
}

.close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: #fff;
  font-size: 2rem;
  cursor: pointer;
  transition: 0.3s;
}

.close:hover {
  color: #ff7a00;
  transform: scale(1.1);
}

@keyframes fadeIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* ====== Responsive Layout ====== */
@media (max-width: 1024px) {
.masonry-grid {
    column-count: 2;
  }
}

@media (max-width: 600px) {
.masonry-grid {
    column-count: 1;
  }
}
