/* Gallery Sub-Pages Shared CSS */
.gal-hero {
  background: linear-gradient(135deg, var(--color-secondary) 0%, #1a3a5c 100%);
  padding: 60px 0;
  color: #fff;
  text-align: center;
}
.gal-hero h1 { font-size: 38px; color: #fff; margin-bottom: 10px; }
.gal-hero p { font-size: 16px; color: rgba(255,255,255,0.8); max-width: 600px; margin: 0 auto 18px; }
.gal-bc { list-style: none; display: flex; justify-content: center; gap: 8px; font-size: 14px; }
.gal-bc li { color: rgba(255,255,255,0.7); }
.gal-bc li a { color: rgba(255,255,255,0.9); }
.gal-bc li:not(:last-child)::after { content: "›"; margin-left: 8px; }

/* Gallery Category Links Bar */
.gal-cat-bar { background: #fff; border-bottom: 2px solid var(--color-border); sticky: top; }
.gal-cat-bar .container { display: flex; gap: 0; overflow-x: auto; }
.gal-cat-bar a {
  padding: 14px 18px;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  white-space: nowrap;
  border-bottom: 3px solid transparent;
  text-decoration: none;
  transition: 0.2s;
  display: flex;
  align-items: center;
  gap: 6px;
}
.gal-cat-bar a:hover { color: var(--color-primary); }
.gal-cat-bar a.active { color: var(--color-primary); border-bottom-color: var(--color-primary); font-weight: 600; }

/* Gallery Grid */
.gal-section { padding: 60px 0 80px; background: #f7fcfc; }
.gallery-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.gallery-item {
  position: relative;
  border-radius: 12px;
  overflow: hidden;
  aspect-ratio: 4/3;
  box-shadow: 0 4px 20px rgba(0,0,0,0.10);
  cursor: pointer;
}
.gallery-item img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
  display: block;
}
.gallery-item:hover img { transform: scale(1.08); }
.gallery-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(8,39,68,0.8) 0%, transparent 60%);
  opacity: 0;
  transition: opacity 0.3s;
  display: flex;
  align-items: flex-end;
  padding: 18px;
}
.gallery-item:hover .gallery-overlay { opacity: 1; }
.gallery-overlay h4 { color: #fff; font-size: 15px; font-weight: 600; margin: 0; }
.gallery-overlay p { color: rgba(255,255,255,0.8); font-size: 12px; margin: 4px 0 0; }

/* Lightbox */
.lightbox {
  display: none; position: fixed; inset: 0;
  background: rgba(0,0,0,0.92);
  z-index: 9999;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.lightbox.open { display: flex; }
.lightbox img { max-width: 90vw; max-height: 85vh; border-radius: 8px; }
.lightbox-close {
  position: absolute; top: 20px; right: 24px;
  color: #fff; font-size: 36px; cursor: pointer;
  background: none; border: none;
  line-height: 1;
}
.lightbox-caption {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: #fff; font-size: 15px; background: rgba(0,0,0,0.5);
  padding: 8px 20px; border-radius: 50px;
}

/* Placeholder card for empty gallery */
.gallery-placeholder {
  grid-column: 1 / -1;
  text-align: center;
  padding: 60px 20px;
  color: #999;
}
.gallery-placeholder i { font-size: 60px; color: #cde; display: block; margin-bottom: 16px; }
.gallery-placeholder h3 { font-size: 20px; color: #aaa; margin-bottom: 8px; }
.gallery-placeholder p { font-size: 14px; }

@media (max-width: 900px) { .gallery-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 576px) { .gallery-grid { grid-template-columns: 1fr; } .gal-hero h1 { font-size: 26px; } }

/* Certificate Badge Label (top-left corner tag) */
.cert-badge-label {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--color-primary);
  color: #fff;
  font-size: 11.5px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
  display: flex;
  align-items: center;
  gap: 5px;
  letter-spacing: 0.4px;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  z-index: 2;
}

/* Override overlay layout for certs — show title at bottom */
.gallery-item .gallery-overlay {
  flex-direction: column;
  align-items: flex-start;
}

