
:root {
  --bg:#f7f7f9;
  --text:#222;
  --muted:#666;
  --primary:#2f6f4e;
  --secondary:#e9f2ed;
  --card:#ffffff;
  --border:#e6e6e9;
}
*{box-sizing:border-box}
body{
  margin:0;
  font-family:system-ui,-apple-system,Segoe UI,Roboto,Arial,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.55;
}
header{ background:var(--card); border-bottom:1px solid var(--border); }
.container{ max-width:1100px; margin:auto; padding:1rem; }
h1{ margin:.25rem 0 1rem 0; font-size:1.5rem; }
nav ul{ list-style:none; padding:0; margin:0; display:flex; gap:1rem; flex-wrap:wrap; }
nav a{ text-decoration:none; color:var(--primary); font-weight:650; }
nav a:hover{ text-decoration:underline; }
main{ padding:1.75rem 0; }
.card{
  background:var(--card);
  border:1px solid var(--border);
  border-radius:14px;
  padding:1.25rem 1.25rem;
  box-shadow:0 10px 25px rgba(0,0,0,.05);
  margin-bottom:1.25rem;
}
.card h2{ margin-top:0; }
.muted{ color:var(--muted); }

footer{ background:var(--card); border-top:1px solid var(--border); margin-top:3rem; }
small{ color:var(--muted); }

/* Gallery */
.gallery-toolbar{
  display:flex;
  gap:.75rem;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  margin:.75rem 0 1rem 0;
}
.search{ display:flex; gap:.5rem; align-items:center; flex:1 1 340px; }
.search input{
  width:100%;
  padding:.7rem .85rem;
  border:1px solid var(--border);
  border-radius:12px;
  background:#fff;
  font-size:1rem;
}
.pills{ display:flex; gap:.5rem; flex-wrap:wrap; margin-top:.25rem; }
.pill{
  border:1px solid var(--border);
  background:#fff;
  padding:.45rem .7rem;
  border-radius:999px;
  font-size:.9rem;
  cursor:pointer;
}
.pill[aria-pressed="true"]{ border-color:var(--primary); background:var(--secondary); }

.gallery-grid{
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(180px,1fr));
  gap:.9rem;
}
.gallery-item{
  position:relative;
  border-radius:14px;
  overflow:hidden;
  border:1px solid var(--border);
  background:#fff;
}
.gallery-item button{ all:unset; cursor:pointer; display:block; }
.gallery-item img{
  width:100%;
  height:180px;
  object-fit:cover;
  display:block;
  transform:scale(1.0);
  transition:transform .2s ease;
}
.gallery-item:hover img{ transform:scale(1.03); }
.caption{
  padding:.65rem .75rem;
  font-size:.92rem;
  color:var(--text);
  border-top:1px solid var(--border);
  background:#fff;
}
.badge{
  position:absolute;
  left:.6rem;
  top:.6rem;
  background:rgba(0,0,0,.6);
  color:#fff;
  padding:.25rem .5rem;
  border-radius:999px;
  font-size:.78rem;
}

/* Lightbox modal */
.modal{
  position:fixed;
  inset:0;
  background:rgba(10,10,12,.78);
  display:none;
  align-items:center;
  justify-content:center;
  padding:1rem;
  z-index:9999;
}
.modal[aria-hidden="false"]{ display:flex; }
.modal-card{
  width:min(1100px, 100%);
  background:#0f0f12;
  border:1px solid rgba(255,255,255,.12);
  border-radius:16px;
  overflow:hidden;
  box-shadow:0 20px 60px rgba(0,0,0,.45);
}
.modal-topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:.75rem;
  padding:.75rem .9rem;
  background:rgba(255,255,255,.05);
}
.modal-title{
  color:#fff;
  font-size:.95rem;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.iconbtn{
  background:transparent;
  border:1px solid rgba(255,255,255,.18);
  color:#fff;
  border-radius:12px;
  padding:.5rem .7rem;
  cursor:pointer;
}
.iconbtn:hover{ border-color:rgba(255,255,255,.35); }
.modal-body img{
  width:100%;
  max-height:75vh;
  object-fit:contain;
  background:#0f0f12;
  display:block;
}
.modal-nav{
  display:flex;
  justify-content:space-between;
  gap:.75rem;
  padding:.75rem .9rem;
  background:rgba(255,255,255,.05);
}
.modal-help{ color:rgba(255,255,255,.7); font-size:.85rem; }
