/* =========================================================
   Global
   ========================================================= */
:root { --nav-h: 56px; }

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }

/* Base */
body {
  font-family: Arial, Helvetica, sans-serif;
  background: #f9f9f9;          /* site backdrop */
  color: #111;
  text-align: center;
  padding-top: var(--nav-h);     /* clear the sticky nav */
}

/* Album pages use solid white */
body.album { background: #fff; }

/* Headings & text spacing */
h1 { margin: 40px 0 6px; }
p  { margin: 20px 0; }

/* =========================================================
   Sticky navigation with dropdowns (hover/focus)
   ========================================================= */
nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  background: #333; color: #fff;
  min-height: var(--nav-h);
  display: flex; align-items: center; justify-content: center;
  border-bottom: 1px solid #222;
}
nav ul { list-style: none; margin: 0; padding: 0; display: flex; }
nav > ul > li { position: relative; }
nav a {
  display: block; color: #fff;
  padding: 0 16px; line-height: var(--nav-h); font-size: 16px;
}
nav a:hover, nav a:focus-visible { background: #444; outline: none; }
nav a.active { text-decoration: underline; }

/* Dropdown */
nav li ul {
  display: none;
  position: absolute; left: 0; top: var(--nav-h);
  background: #333;
  min-width: 200px;
  border-radius: 0 0 6px 6px;
  box-shadow: 0 6px 16px rgba(0,0,0,.3);
  flex-direction: column; padding: 6px 0; z-index: 1100;
}
nav li:hover > ul,
nav li:focus-within > ul { display: flex; }

nav li ul a { padding: 10px 14px; line-height: 1.5; font-size: 14px; }
nav li ul a:hover, nav li ul a:focus-visible { background: #444; }

/* Prevent jump when clicking "#" */
nav li > a[href="#"] { cursor: default; }

/* =========================================================
   Home page: split layout (left image, right content)
   index.html: <body class="home">
               <main class="home-split">
                 <aside class="home-hero" style="--hero-img: url('/images/bg.jpg')"></aside>
                 <section class="home-content"> ... </section>
               </main>
   ========================================================= */
body.home { background: #fff; }      /* solid white around the layout */

.home-split {
  display: grid;
  grid-template-columns: minmax(320px, 42vw) 1fr;  /* ~40% left, rest right */
  min-height: calc(100vh - var(--nav-h));
}

/* Left vertical photo */
.home-hero {
  background-image: var(--hero-img); /* set per-page inline */
  background-size: cover;            /* fill without stretching */
  background-position: center;
  background-repeat: no-repeat;
  border-right: 1px solid #e8e8e8;   /* crisp separation, no gradient */
}

/* Right content area */
.home-content {
  background: #fff;
  display: flex; align-items: center; justify-content: center;
  padding: 24px; text-align: center;
}
.home-content-inner { width: 100%; max-width: 900px; padding: 0 16px; }

/* Stack on narrow screens */
@media (max-width: 900px) {
  .home-split { grid-template-columns: 1fr; }
  .home-hero  { height: 55vh; border-right: 0; }
}

/* Home album link boxes */
.album-links {
  margin: 40px auto; max-width: 900px; padding: 0 16px;
}
.album-links a {
  display: inline-block;
  background: #fff; border: 1px solid #ccc; border-radius: 10px;
  padding: 20px; margin: 12px; color: #333;
}
.album-links a:hover { background: #eee; }

/* =========================================================
   Album pages: header
   ========================================================= */
.album-header {
  max-width: 1100px; margin: 40px auto 10px; padding: 0 16px; text-align: left;
}
.album-header h1 { margin-bottom: 6px; }
.album-header p  { color: #666; }

/* =========================================================
   Gallery container (shared)
   ========================================================= */
.gallery {
  max-width: 1100px;
  margin: 20px auto 60px;
  padding: 0 16px;
}

/* =========================================================
   Masonry layout (smaller thumbnails, natural aspect ratios)
   Apply with: <main class="gallery masonry" style="--masonry-col: 260px; --masonry-gap: 18px;">
   You can omit the style attribute; defaults below will be used.
   ========================================================= */
.gallery.masonry {
  --masonry-col: 260px;   /* default column width; try 220–300px */
  --masonry-gap: 18px;    /* default gap */

  column-width: var(--masonry-col);
  column-gap:   var(--masonry-gap);
}

.gallery.masonry .photo {
  break-inside: avoid;
  display: inline-block;
  width: 100%;
  margin: 0 0 var(--masonry-gap);
  text-align: left;

  /* Remove “tile” chrome */
  background: none; border: 0; padding: 0; box-shadow: none;
}

.gallery.masonry .photo img {
  width: 100%; height: auto;
  border-radius: 6px;
  cursor: zoom-in; /* lightbox hint */
}

/* Hide captions entirely (we're not using them) */
.caption { display: none !important; }

/* =========================================================
   Lightbox (works with /js/lightbox.js)
   ========================================================= */
body.no-scroll { overflow: hidden; }

.lightbox-overlay {
  position: fixed; inset: 0; z-index: 2000; /* above nav */
  background: rgba(0,0,0,0.9);
  display: none; align-items: center; justify-content: center;
  padding: 20px;
}
.lightbox-overlay.open { display: flex; }

.lightbox-inner { max-width: min(96vw, 1400px); max-height: 92vh; }

.lightbox-img {
  max-width: 96vw; max-height: 86vh;
  display: block; margin: 0 auto;
  border-radius: 8px; box-shadow: 0 8px 24px rgba(0,0,0,.4);
}

.lightbox-caption {
  color: #eee; text-align: center; margin-top: 10px; font-size: 14px;
}
.lightbox-caption:empty { display: none; } /* hide if no text */

/* Controls (no transitions) */
.lightbox-close,
.lightbox-prev,
.lightbox-next {
  position: absolute;
  background: rgba(255,255,255,.12);
  border: 1px solid rgba(255,255,255,.25);
  border-radius: 999px;
  width: 44px; height: 44px;
  cursor: pointer; display: grid; place-items: center;
  font-size: 22px; color: #fff;
}

.lightbox-close { top: 14px; right: 14px; }
.lightbox-prev  { left: 14px;  top: 50%; transform: translateY(-50%); }
.lightbox-next  { right: 14px; top: 50%; transform: translateY(-50%); }

.lightbox-close:hover,
.lightbox-prev:hover,
.lightbox-next:hover { background: rgba(255,255,255,.2); }
