/* =====================
   GALLERY PAGE ONLY
   ===================== */

.gallery-hero-card{
  padding: 18px;
}

.gallery-subtext{
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 15px;
  max-width: 78ch;
}

/* Toolbar */
.gallery-toolbar{
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.gallery-filters{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.filter-btn{
  padding: 8px 12px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
}

.filter-btn.active{
  background: rgba(11,46,89,.08);
  border-color: rgba(11,46,89,.18);
}

.gallery-search input{
  width: 280px;
  max-width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid var(--border);
  outline: none;
}

.gallery-search input:focus{
  border-color: rgba(11,46,89,.25);
  box-shadow: 0 0 0 4px rgba(11,46,89,.06);
}

/* Grid */
.gallery-grid{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.gallery-item{
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 10px 24px rgba(16,24,40,.06);
  display: grid;
}

.thumb{
  height: 190px;
  background: #fff;
}

.thumb img{
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.meta{
  padding: 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.label{
  color: var(--navy);
  font-weight: 800;
  font-size: 13px;
}

.view-btn{
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--navy);
  font-weight: 700;
  font-size: 12.5px;
  cursor: pointer;
}

.view-btn:hover{
  border-color: rgba(11,46,89,.25);
}

/* Empty state */
.gallery-empty{
  display: none;
  margin-top: 14px;
  padding: 16px;
  border: 1px dashed var(--border);
  border-radius: 18px;
  color: var(--muted);
  background: #fff;
}

/* Lightbox */
.lightbox{
  position: fixed;
  inset: 0;
  display: none;
  z-index: 9999;
}

.lightbox.show{
  display: block;
}

.lightbox-backdrop{
  position: absolute;
  inset: 0;
  background: rgba(16,24,40,.55);
}

.lightbox-dialog{
  position: relative;
  margin: 6vh auto 0;
  width: min(900px, 92vw);
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(16,24,40,.22);
}

.lightbox-dialog img{
  width: 100%;
  height: min(70vh, 560px);
  object-fit: contain;
  background: #0b2e5910;
  display: block;
}

.lightbox-caption{
  padding: 12px 14px;
  color: var(--muted);
  font-size: 14px;
  border-top: 1px solid var(--border);
}

.lightbox-close{
  position: absolute;
  top: 10px;
  right: 10px;
  width: 36px;
  height: 36px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: #fff;
  cursor: pointer;
  font-weight: 900;
  color: var(--navy);
}

/* Responsive */
@media (max-width: 980px){
  .gallery-grid{ grid-template-columns: repeat(2, 1fr); }
  .thumb{ height: 170px; }
}

@media (max-width: 520px){
  .gallery-grid{ grid-template-columns: 1fr; }
  .thumb{ height: 200px; }
  .gallery-search input{ width: 100%; }
}
