/* ====== Page Shell ====== */
:root{
  --ink: #111;
  --muted: #444;
  --paper: #fff;
  --bg: #ffdd9a36;
  --accent: #b30000; /* MKSS red – for small accents only */
  --radius: 14px;
  --shadow: 0 16px 40px rgba(0,0,0,.18);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body{
  margin: 0;
  color: var(--ink);
  background: var(--bg);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  line-height: 1.55;
}

/* ====== Header / Container ====== */
.container{
  width: min(1200px, 92vw);
  margin: 0 auto;
  padding: clamp(16px, 3vw, 28px) 0 40px;
}

.page-header{
  text-align: center;
  margin: 6px 0 18px;
}
.page-header h1{
  margin: 0 0 -20px;
  font-size: clamp(26px, 8vw, 44px);
  letter-spacing: .2px;
  color: var(--accent);
}
.page-header p{
  margin: 50px auto;
  max-width: 820px;
  color: var(--muted);
  color: var(--accent);
}

/* ====== Gallery (Masonry via CSS Columns) ======
   - Keeps intrinsic image aspect ratios (no cropping)
   - Does not force uniform heights (so your image sizes are preserved)
*/
.gallery{
  column-width: 320px;          /* target column width */
  column-gap: clamp(10px, 1.8vw, 18px);
}
.item{
  break-inside: avoid;
  margin: 0 0 clamp(10px, 1.8vw, 18px);
  display: inline-block;
  width: 100%;
  border-radius: 14px; /* smoother premium curve */
  overflow: hidden;
  background: #ffffff; /* solid white behind PNGs */
  
  /* Enhanced premium shadow */
  box-shadow:
    0 10px 26px rgba(0,0,0,0.14),
    0 4px 12px rgba(0,0,0,0.10),
    inset 0 0 0 1px rgba(255,255,255,0.60);

  transition: transform .30s ease, box-shadow .30s ease;
}

.item:hover{
  transform: translateY(-6px);
  box-shadow:
    0 18px 52px rgba(0,0,0,0.22),
    0 8px 22px rgba(0,0,0,0.14),
    inset 0 0 0 1px rgba(255,255,255,0.75);
}

.item img{
  display: block;
  width: 100%;
  height: auto;             /* ✅ No cropping, preserves image ratios */
  cursor: zoom-in;
  /* subtle entrance */
  opacity: 0; transform: translateY(6px);
  transition: opacity .35s ease, transform .35s ease;
}
.item img[loading="lazy"]{ opacity: 1; transform: none; } /* once loaded */

/* ====== Footer Back Button ====== */
.page-footer{
  width: min(1200px, 92vw);
  margin: 26px auto 40px;
  text-align: center;
}


/* ====== Lightbox (Premium) ====== */
.lb{
  position: fixed; inset: 0; z-index: 9999;
  display: none; /* toggled by JS */
  align-items: center; justify-content: center;
  padding: clamp(12px, 3vw, 32px);
  background:
    radial-gradient(1200px 800px at 10% -10%, rgba(255,255,255,.05), transparent 60%),
    radial-gradient(900px 600px at 110% 110%, rgba(255,255,255,.04), transparent 60%),
    rgba(0,0,0,.78);
  backdrop-filter: blur(6px) saturate(110%);
}
.lb--open{ display: flex; }

/* Glass frame */
.lb__frame{
  position: relative;
  max-width: min(96vw, 1200px);
  max-height: 90vh;
  display: grid;
  gap: 10px;
  border-radius: 16px;
  padding: clamp(10px, 1.6vw, 16px);
  background: linear-gradient(180deg, rgba(255,255,255,.12), rgba(255,255,255,.08));
  border: 1px solid rgba(255,255,255,.22);
  box-shadow:
    0 24px 80px rgba(0,0,0,.55),
    inset 0 0 0 1px rgba(255,255,255,.18);
  transform: scale(.98) translateY(6px);
  opacity: 0;
  transition: opacity .25s ease, transform .25s ease;
}
.lb--open .lb__frame{ opacity: 1; transform: scale(1) translateY(0); }

/* Image fits without cropping */
.lb__img{
  width: 100%;
  height: auto;
  max-height: 76vh;
  object-fit: contain;
  border-radius: 12px;
  background: #111; /* shows behind transparent PNGs */
}

/* Caption + counter */
.lb__caption{
  justify-self: center;
  color: #f2f2f2;
  font-size: .95rem;
  line-height: 1.3;
  opacity: .9;
  text-align: center;
  max-width: 80ch;
}
.lb__counter{
  position: absolute;
  top: 10px; left: 14px;
  color: #fff;
  font-size: .9rem;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(0,0,0,.45);
  backdrop-filter: blur(2px);
}

/* Controls */
.lb__close, .lb__prev, .lb__next{
  position: absolute;
  border: 0; outline: none;
  width: 52px; height: 52px;
  border-radius: 999px;
  display: grid; place-items: center;
  color: #fff;
  background: rgba(255,255,255,.16);
  backdrop-filter: blur(4px);
  cursor: pointer;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
  box-shadow: 0 10px 24px rgba(0,0,0,.25);
}
.lb__close{
  top: 14px; right: 14px;
  width: 44px; height: 44px; background: rgba(0,0,0,.55);
}
.lb__prev{ left: clamp(8px, 3vw, 28px); top: 50%; transform: translateY(-50%); }
.lb__next{ right: clamp(8px, 3vw, 28px); top: 50%; transform: translateY(-50%); }

.lb__close:hover,
.lb__prev:hover,
.lb__next:hover{ transform: translateY(-1px); background: rgba(255,255,255,.24); }

/* Minimal icons (SVG inside) */
.lb__icon{ width: 18px; height: 18px; display: block; }

/* Mobile tweaks */
@media (max-width: 640px){
  .lb__frame{ padding: 10px; }
  .lb__img{ max-height: 70vh; }
  .lb__caption{ font-size: .9rem; padding-inline: 6px; }
  .lb__prev, .lb__next{ bottom: 16px; top: auto; transform: none; }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce){
  .lb__frame{ transition: none; }
  .lb__close, .lb__prev, .lb__next{ transition: none; }
}




