/* ═══════════════════════════════════════════════════════════
   Kanyashree College – Photo Gallery Styles
   Depends on: styles.css (CSS custom properties)
   ═══════════════════════════════════════════════════════════ */

/* ── Section wrapper ── */
.photo-gallery-area {
  margin-bottom: 42px;
}

.photo-gallery-area > strong {
  display: inline-block;
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  background: var(--forest);
  padding: 6px 18px 6px 14px;
  border-radius: 3px;
  margin-bottom: 18px;
  position: relative;
}

.photo-gallery-area > strong::before {
  content: '';
  display: inline-block;
  width: 4px;
  height: 14px;
  background: var(--gold);
  border-radius: 2px;
  margin-right: 10px;
  vertical-align: middle;
}

/* ── Masonry grid ── */
.masonry {
  column-count: 4;
  column-gap: 10px;
}

@media (max-width: 992px) { .masonry { column-count: 3; } }
@media (max-width: 640px) { .masonry { column-count: 2; } }
@media (max-width: 380px) { .masonry { column-count: 1; } }

.brick {
  break-inside: avoid;
  margin-bottom: 10px;
  border-radius: 6px;
  overflow: hidden;
  position: relative;
  cursor: pointer;
  background: var(--mist);
}

/* ── Thumbnail image ── */
.brick img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.35s ease, filter 0.35s ease;
  will-change: transform;
}

/* ── Hover overlay ── */
.brick::after {
  content: '\f065'; /* fa-expand */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 1.2rem;
  color: var(--white);
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(14, 61, 38, 0.0);
  transition: background 0.28s ease, opacity 0.28s ease;
  opacity: 0;
}

.brick:hover img {
  transform: scale(1.07);
  filter: brightness(0.75);
}

.brick:hover::after {
  background: rgba(14, 61, 38, 0.45);
  opacity: 1;
}

/* ═══════════════════════════════════
   LIGHTBOX OVERLAY
═══════════════════════════════════ */
#kc-lightbox {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(10, 30, 18, 0.94);
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  animation: lb-fade-in 0.22s ease;
}

#kc-lightbox.active {
  display: flex;
}

@keyframes lb-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Close button ── */
#kc-lb-close {
  position: absolute;
  top: 18px;
  right: 22px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1.5px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 1.5rem;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 10001;
}

#kc-lb-close:hover {
  background: var(--rose);
  transform: rotate(90deg);
}

/* ── Prev / Next buttons ── */
.kc-lb-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: rgba(255,255,255,0.10);
  border: 1.5px solid rgba(255,255,255,0.22);
  color: #fff;
  font-size: 1.2rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
  z-index: 10001;
  user-select: none;
}

#kc-lb-prev { left: 20px; }
#kc-lb-next { right: 20px; }

.kc-lb-nav:hover {
  background: var(--forest-lt);
  transform: translateY(-50%) scale(1.08);
}

/* ── Image wrapper ── */
#kc-lb-img-wrap {
  max-width: min(90vw, 1100px);
  max-height: 88vh;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

#kc-lb-img {
  max-width: 100%;
  max-height: 88vh;
  border-radius: 6px;
  box-shadow: 0 24px 64px rgba(0,0,0,0.60);
  display: block;
  animation: lb-img-in 0.25s ease;
  object-fit: contain;
}

@keyframes lb-img-in {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}

/* ── Counter badge ── */
#kc-lb-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Josefin Sans', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  color: rgba(255,255,255,0.55);
  background: rgba(14,61,38,0.55);
  padding: 4px 14px;
  border-radius: 20px;
  pointer-events: none;
  white-space: nowrap;
}

/* ── Mobile adjustments ── */
@media (max-width: 640px) {
  .kc-lb-nav { width: 38px; height: 38px; font-size: 1rem; }
  #kc-lb-prev { left: 8px; }
  #kc-lb-next { right: 8px; }
}
