/* =========================
   Reset & Base
   ========================= */
html, body {
  height: 100%;
  margin: 0;
  padding: 0;
  font-family: Georgia, serif;
  text-align: center;
}

/* =========================
   Frame (border + background)
   ========================= */
.frame {
  min-height: 100vh;
  border: 90px solid transparent;
  border-image: url('assets/border.png') 180 stretch;

  background: url('assets/marble-light.png') repeat;
  background-size: 400px 400px;
  background-attachment: fixed;

  display: flex;
  flex-direction: column;
  color: #222;
}

/* =========================
   Page Wrapper (centered)
   ========================= */
.page {
  padding: 40px 20px;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;

  min-height: calc(100vh - 200px); /* viewport minus border */
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
}

/* =========================
   Navigation
   ========================= */
.navbar {
  position: sticky;
  top: 0;
  background: inherit;   /* <- now matches marble background */
  padding: 10px 0;
  z-index: 999;
}

.navbar ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: center;
  gap: 20px;
}

.navbar a {
  text-decoration: none;
  font-weight: bold;
  color: #333;
}

/* =========================
   RSVP Form Styling
   ========================= */
.rsvp-form {
  max-width: 500px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 15px;
  text-align: left;
  background: rgba(255, 255, 255, 0.85);
  padding: 20px;
  border-radius: 10px;
}

.rsvp-form label {
  font-weight: bold;
  margin-bottom: 5px;
}

.rsvp-form input,
.rsvp-form select,
.rsvp-form textarea {
  width: 100%;
  padding: 10px;
  border: 1px solid #aaa;
  border-radius: 6px;
  font-size: 1em;
}

.rsvp-form button {
  background: #333;
  color: white;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-size: 1.1em;
}

.rsvp-form button:hover {
  background: #555;
}

#rsvp-status {
  margin-top: 14px;
  font-weight: 700;
}

/* =========================================
   Wedding Party – two columns + photo cards
   ========================================= */

.party.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  width: min(1100px, 100%);
  margin-inline: auto;
}

.party-col h2 {
  margin: 0 0 16px 0;
  font-size: 1.35rem;
  letter-spacing: 0.02em;
}

.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 16px;
}

/* Individual person card */
.card {
  background: rgba(255, 255, 255, 0.65);    /* blends with marble */
  border: 1px solid rgba(0,0,0,0.06);
  border-radius: 14px;
  padding: 10px;
  box-shadow: 0 3px 10px rgba(0,0,0,0.05);
  transition: transform .15s ease, box-shadow .15s ease;
}

.card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 18px rgba(0,0,0,0.08);
}

/* Portraits: consistent aspect and crop */
.card img {
  width: 100%;
  height: auto;               /* keeps full resolution */
  aspect-ratio: auto;         /* lets the image decide ratio */
  object-fit: contain;        /* avoids cropping */
  border-radius: 10px;
  display: block;
  image-rendering: auto;      /* ensures high-quality scaling */
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Name + optional subtext (role) */
.card figcaption {
  margin-top: 8px;
  font-weight: 700;
  font-size: 0.95rem;
}

.card .sub {
  margin-top: 2px;
  font-size: 0.85rem;
  opacity: 0.7;
}

/* Mobile: stack columns */
@media (max-width: 900px) {
  .party.two-col {
    grid-template-columns: 1fr;
  }
}

/* =========================
   Lightbox (simple, elegant)
   ========================= */
.lightbox-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.85);
  display: none;               /* shown via .open */
  align-items: center;
  justify-content: center;
  z-index: 9999;
}

.lightbox-overlay.open {
  display: flex;
}

.lightbox-content {
  max-width: min(92vw, 1200px);
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.lightbox-img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: 12px;
  box-shadow: 0 10px 30px rgba(0,0,0,0.35);
}

.lightbox-caption {
  color: #eee;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-align: center;
}

/* Close button */
.lightbox-close {
  position: absolute;
  top: 16px;
  right: 20px;
  background: rgba(255,255,255,0.85);
  border: 1px solid #ccc;
  color: #000;
  padding: 6px 10px;
  border-radius: 8px;
  cursor: pointer;
  font-weight: 700;
}

/* Optional: subtle zoom on hover to suggest clickability */
.card img {
  transition: transform .2s ease, box-shadow .2s ease;
  cursor: zoom-in;
}

.card img:hover {
  transform: translateY(-2px) scale(1.02);
  box-shadow: 0 8px 16px rgba(0,0,0,0.1);
}
