/* =====================================================
   2009reunion.css — Conaway Reunion 2009
   Shared styles for index, video, c-photos, c-video
   ===================================================== */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background-color: #1a1814;
  background-image:
    radial-gradient(ellipse at 50% 0%, rgba(60,48,28,0.5) 0%, transparent 70%);
  color: #d8d0c4;
  font-family: Georgia, 'Times New Roman', serif;
  min-height: 100vh;
}

a {
  color: #c8a96e;
  text-decoration: none;
}
a:hover {
  color: #e8c98e;
  text-decoration: underline;
}

/* ── Wrapper ── */
#wrapper {
  max-width: 1000px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ── Site Header ── */
#site-header {
  text-align: center;
  padding: 32px 0 0;
}

#site-header h1 {
  font-size: clamp(1.25rem, 3.5vw, 1.85rem);
  font-weight: normal;
  letter-spacing: 0.06em;
  color: #f0e8d8;
  line-height: 1.3;
}

#site-header .subtitle {
  margin-top: 7px;
  font-size: 1rem;
  letter-spacing: 0.18em;
  color: #c4af8d;
  text-transform: uppercase;
}

/* ── Nav ── */
nav {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 7px;
  padding: 18px 0 22px;
  border-bottom: 1px solid #332e24;
  margin-bottom: 32px;
}

nav a,
nav span.active {
  display: inline-block;
  padding: 6px 15px;
  border: 1px solid #7e6b4d;
  border-radius: 2px;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  color: #ceb186;
  text-decoration: none;
  transition: background 0.18s, color 0.18s, border-color 0.18s;
}

nav a:hover {
  background: #2e2820;
  color: #eee;
  border-color: #aaa;
  text-decoration: none;
}

nav span.active {
  background: #362e1c;
  color: #f0d898;
  border-color: #8a7040;
  cursor: default;
}

/* ── Gallery Grid ── */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 5px;
  margin-bottom: 40px;
}

.gallery-item {
  cursor: pointer;
  overflow: hidden;
  aspect-ratio: 3 / 2;
  background: #111;
  position: relative;
}

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0.82;
  transition: transform 0.28s ease, opacity 0.28s ease;
}

.gallery-item:hover img {
  transform: scale(1.06);
  opacity: 1;
}

/* ── Lightbox ── */
#lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(10, 9, 7, 0.94);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

#lightbox.open {
  display: flex;
}

#lightbox img {
  max-width: min(92vw, 1200px);
  max-height: 88vh;
  object-fit: contain;
  box-shadow: 0 4px 60px rgba(0,0,0,0.9);
  border: 1px solid #3a3328;
}

#lb-close {
  position: absolute;
  top: 14px;
  right: 20px;
  background: none;
  border: none;
  color: #888;
  font-size: 2.2rem;
  line-height: 1;
  cursor: pointer;
  transition: color 0.15s;
  padding: 4px 8px;
}
#lb-close:hover { color: #fff; }

#lb-prev,
#lb-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0,0,0,0.45);
  border: 1px solid rgba(255,255,255,0.1);
  color: #ccc;
  font-size: 1.6rem;
  padding: 14px 16px;
  cursor: pointer;
  border-radius: 2px;
  transition: background 0.18s, color 0.18s;
  user-select: none;
  line-height: 1;
}
#lb-prev:hover,
#lb-next:hover {
  background: rgba(0,0,0,0.75);
  color: #fff;
}
#lb-prev { left: 14px; }
#lb-next { right: 14px; }

#lb-counter {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  color: #666;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  white-space: nowrap;
}

/* ── Video Pages ── */
/* .video-wrap {
  position: relative;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
  background: #000;
  max-width: 800px;
  margin: 0 auto 24px;
  border: 1px solid #2e2820;
} */

.video-wrap {
  position: relative;
  aspect-ratio: 16 / 9;
  width: 100%;
  max-width: 800px;
  margin: 0 auto 24px;
  background: #000;
  border: 1px solid #2e2820;
  /* remove height:0 and padding-bottom — no longer needed */
}

.video-wrap iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.video-caption {
  max-width: 640px;
  margin: 0 auto 48px;
  text-align: center;
  color: #cfa96c;
  font-size: 1rem;
  line-height: 1.75;
}

.video-caption p + p {
  margin-top: 6px;
}

.video-caption .names {
  margin-top: 18px;
  font-size: 0.82rem;
  color: #bea994;
  letter-spacing: 0.03em;
}

.video-caption .names p {
  margin-top: 4px;
}

/* ── Page Footer ── */
.page-footer {
  text-align: center;
  padding: 20px 0 32px;
  border-top: 1px solid #2a2620;
  color: #4a4438;
  font-family: Verdana, Geneva, sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.06em;
}

/* ── Responsive ── */
@media (max-width: 640px) {
  #site-header { padding-top: 22px; }

  nav a, nav span.active {
    padding: 5px 11px;
    font-size: 0.68rem;
  }

  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 4px;
  }

  #lb-prev, #lb-next {
    font-size: 1.2rem;
    padding: 10px 12px;
  }

  #lb-prev { left: 6px; }
  #lb-next { right: 6px; }
}

@media (max-width: 400px) {
  .gallery {
    grid-template-columns: repeat(3, 1fr);
  }
}
