/* =========================================================
   Elaine Casiano — Gallery Styles (Collections + Projects)
   Used by: /gallery.html and /project.html
   ========================================================= */

.gallery-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.gallery-header .titleWrap {
  max-width: 720px;
}

.gallery-header .filters {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
  color: #374151;
  font-size: 0.9rem;
  font-weight: 500;
  cursor: pointer;
  user-select: none;
}

.pill:hover {
  border-color: #c4b5fd;
}

.pill[aria-pressed="true"] {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.12);
}

.search {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 0.6rem;
  border-radius: 10px;
  border: 1px solid #e5e7eb;
  background: #ffffff;
}

.search input {
  border: 0;
  padding: 0;
  margin: 0;
  outline: none;
  font-size: 0.95rem;
  min-width: 220px;
}

.search input:focus {
  border: 0;
}

.section-divider {
  margin: 2.25rem 0 1.25rem;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.section-divider .hint {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Collection cards */
.collection-card img {
  height: 220px;
}

.tags {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
}

.tag {
  font-size: 0.75rem;
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
  border: 1px solid #e5e7eb;
  background: #f9fafb;
  color: #6b7280;
}

/* Project cards */
.project-card img {
  height: 220px;
}

.card-link {
  display: block;
  height: 100%;
  color: inherit;
}

.card-link:hover {
  text-decoration: none;
}

/* Project page layout */
.project-hero {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 1.5rem;
  margin: 1.25rem 0 1.75rem;
}

.project-hero .meta {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  color: #6b7280;
  font-size: 0.9rem;
}

.project-hero .meta strong {
  color: #374151;
  font-weight: 600;
}

.project-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 1rem;
}

.project-gallery figure {
  margin: 0;
  background: #ffffff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  overflow: hidden;
}

.project-gallery img {
  width: 100%;
  height: 220px;
  object-fit: cover;
  display: block;
}

.project-gallery figcaption {
  padding: 0.75rem 0.9rem;
  font-size: 0.9rem;
  color: #374151;
}

/* Lightbox (no inline styles; pure CSS toggle) */
.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.85);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  z-index: 50;
}

.lightbox[aria-hidden="false"] {
  display: flex;
}

.lightbox .panel {
  width: min(1100px, 100%);
  background: #0b1220;
  border: 1px solid rgba(255,255,255,0.15);
  border-radius: 12px;
  overflow: hidden;
}

.lightbox .topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-bottom: 1px solid rgba(255,255,255,0.12);
}

.lightbox .topbar .cap {
  color: rgba(255,255,255,0.92);
  font-size: 0.95rem;
  font-weight: 500;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.lightbox .topbar button {
  appearance: none;
  border: 1px solid rgba(255,255,255,0.25);
  background: rgba(255,255,255,0.06);
  color: rgba(255,255,255,0.92);
  padding: 0.45rem 0.7rem;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 600;
}

.lightbox .topbar button:hover {
  background: rgba(255,255,255,0.12);
}

.lightbox .stage {
  display: flex;
  align-items: center;
  justify-content: center;
  background: #050a14;
}

.lightbox .stage img {
  width: 100%;
  height: min(78vh, 760px);
  object-fit: contain;
  display: block;
}

/* Small helpers (CSP-safe alternative to inline styles) */
.row {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.mt-1 {
  margin-top: 1rem;
}
