        body {
                margin: 0;
                background-color: #f8f4ef;
        }
        .container {
                display: flex;
                flex-direction: column;
                min-height: 100vh;
                width: 100%;
                overflow: hidden;
        }
        .left-section {
                flex: 1.2;
                background-image: url('images/intro-bg.jpg');
                background-size: cover;
                background-position: center;
                min-height: 50vh;
        }
        .right-section {
                flex: 1;
                padding: 60px 40px;
                display: flex;
                flex-direction: column;
                justify-content: center;
                background-color: #f8f4ef;
                text-align: center;
        }
        h1 {
                font-family: 'Cormorant Garamond';
                font-weight: 400;
                font-size: 3rem;
                color: rgb(101, 134, 181);
                line-height: 3.5rem; 
                letter-spacing: 5px;
                margin-bottom: 0rem;
                text-align: center;
        }
        h4 {
                font-family: 'Cormorant Garamond';
                font-weight: 400;
                font-size: 3rem;
                color: rgb(101, 134, 181);
                line-height: 2rem; 
                letter-spacing: 5px;
                margin-bottom: 40px;
                text-align: center;
        }
        .right-section h2 {
                font-family: 'Cormorant Garamond';
                font-weight: 400;
                font-size: 1.8rem;
                margin-top: 1.2rem;
                color: rgb(101, 134, 181);
                line-height: 1.2; 
                letter-spacing: 5px;
        margin-bottom: 2px;
        }
        .right-section p {
                font-family: 'Circular';
                font-weight: 400;
                font-size: 1.25rem;
                line-height: 1.4;
                color: #777777;
        margin-bottom: -.75rem;
        }
    #bottomofms {
                margin-bottom: 1rem;
        }

        #bottomofsection {
                margin-bottom: 2rem;
        }

        .buttons {
                display: grid;
                justify-items: center;
                grid-template-columns: repeat(2, 200px);
                flex-wrap: wrap;
                gap: 20px;
                justify-content: center;
        }
        .rsvp {
                display: grid;
                justify-items: center;
                flex-wrap: wrap;
                gap: 20px;
                justify-content: center;
                margin-top: 20px;
        }
        .rsvp .button {
                display: grid;
                justify-items: center;
                flex-wrap: wrap;
                gap: 20px;
                justify-content: center;
                background-color: rgb(107, 119, 137);
                color: rgb(255, 255, 255);
        }
        .button, .buttons .button, .buttons a.button {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        padding: 15px 30px;
        border: 0.1rem solid #aaa;
        border-radius: 30px;
        font-weight: 500;
        font-size: 1rem;
        cursor: pointer;
        background-color: #fdfcf9;
        color: #555555;
        transition: all 0.3s ease;
        text-align: center;
        width: 180px;
        line-height: 1.2;
        text-decoration: none;
        font-family: 'Circular', sans-serif;
        box-sizing: border-box;
        }
        .button:hover, .buttons a:hover {
                background-color: #f0ede9;
        }
        @media (min-width: 900px) {
                .container {
                        flex-direction: row;
                }
                .left-section {
                        min-height: 100vh;
                        flex: 1.2;
                }
                .right-section {
                        flex: 1; 
                        padding: 80px 60px;
                }
        }

        @media (max-width: 900px) {
                .right-section {
                        padding: 1rem 40px;
                }
        }

        @media (max-width: 603px) {
                .buttons {
                        grid-template-columns: repeat(2, 160px); /* Smaller button width */
                        gap: 15px; /* Tighter spacing */
                }
                
                .button, .buttons .button, .buttons a.button {
                        width: 160px;
                }
        }

    





    /* Back Button Styles */
    .back-button {
        position: fixed;
        top: 20px;
        left: 20px;
        z-index: 1000;
    }

    .back-link {
        display: inline-flex;
        align-items: center;
        padding: 10px 20px;
        border-radius: 30px;
        font-weight: 500;
        font-size: 0.9rem;
        color: #555555;
        background-color: #fdfcf9;
        border: 2px solid #aaa;
        text-decoration: none;
        transition: all 0.3s ease;
    }

    .back-link:hover {
        background-color: #f0ede9;
        color: #333;
        border-color: #888;
    }

/* ==========================
   Wedding Website Header
   ========================== */

:root {
  --cream: #fffaf4;
  --cream-solid: rgba(255,250,244,.96);
  --text: #2f2a26;
  --muted: #746d66;
  --line: rgba(47,42,38,.16);
  --blue: #97b8ff;
}

.site-header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  background: var(--cream-solid);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.name-bar {
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  color: var(--text);
  font-family: "Cormorant Garamond", Georgia, serif;
  font-size: clamp(1.7rem, 3vw, 2.45rem);
  font-weight: 500;
  letter-spacing: .055em;
  line-height: 1;
  text-align: center;
  white-space: nowrap;
}

/* Style the link inside name-bar to look like regular text (not a link) */
.name-bar a {
  color: var(--text) !important;
  text-decoration: none !important;
  font-family: inherit;
  font-size: inherit;
  font-weight: inherit;
  letter-spacing: inherit;
  line-height: inherit;
  border: none;
  background: none;
  cursor: pointer;
}

.name-bar a:hover,
.name-bar a:focus,
.name-bar a:active,
.name-bar a:visited {
  color: var(--text) !important;
  text-decoration: none !important;
  border: none;
  background: none;
  opacity: 1;
}

.top-nav {
  min-height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;

  gap: clamp(12px, 2.5vw, 30px);
  padding: 0 18px 12px;
  flex-wrap: wrap;
}

.top-nav a {
  color: var(--text);
  text-decoration: none;

  font-size: .78rem;
  font-weight: 600;
  letter-spacing: .20em;
  text-transform: uppercase;

  line-height: 1;
  padding: 8px 0;

  border-bottom: 1px solid transparent;
  transition: all .18s ease;
}

.top-nav a:hover,
.top-nav a:focus-visible {
  border-bottom-color: var(--text);
  opacity: .85;
}

.top-nav a.active {
  border-bottom-color: var(--text);
  font-weight: 700;
}

.top-nav .rsvp-link {
  padding: 10px 22px;
  border: 1px solid var(--text);
  border-radius: 999px;
  background: transparent;
}

.top-nav .rsvp-link:hover {
  background: var(--blue);
  border-color: var(--blue);
  color: white;
}

.top-nav .rsvp-link.active {
  background: var(--text);
  border-color: var(--text);
  color: white;
}

@media (max-width: 760px) {
  .name-bar {
    font-size: 1.65rem;
    height: 58px;
  }

  .top-nav {
    gap: 12px;
    padding: 0 10px 12px;
  }

  .top-nav a {
    font-size: .72rem;
  }
}

/* Accessibility: ensure focus styles are clear for keyboard users */
:focus { outline: none; }
:focus-visible { outline: 3px solid rgba(151,184,255,0.35); outline-offset: 3px; border-radius: 6px; }

/* Fix for RSVP page scale issue where 1rem = 10px instead of 16px */
[class^="rsvp-"], 
#stepSearch, 
#stepParty, 
#stepDone,
.rsvp-shell, 
.rsvp-card, 
.rsvp-title, 
.rsvp-copy, 
.rsvp-example, 
.rsvp-field, 
.rsvp-button, 
.choice-button, 
.rsvp-status, 
.party-name, 
.party-meta, 
.whole-party-panel, 
.whole-party-question, 
.guest-list, 
.guest-card, 
.guest-name {
  font-size: initial;
}


/* ====================================================================
   OUR STORY PAGE  —  intro text + responsive photo gallery
   ==================================================================== */

.ourstorycontainer {
  max-width: 800px;
  margin: 110px auto 30px;      /* room for the fixed header */
  padding: 20px 1.5rem 0;
  font-family: 'Cormorant Garamond', serif;
  color: #333;
  text-align: center;
}

.ourstorytext {
  font-size: 1.25rem;
  line-height: 1.55;
  margin: 0 auto 1rem;
  max-width: 60ch;
}

/* ---------- Gallery wrapper ---------- */
.gallery-section {
  max-width: 1200px;
  margin: 10px auto 70px;
  padding: 0 16px;
}

.gallery-heading {
  font-size: 2.2rem;
  line-height: 1.2;
  margin: 10px 0 28px;
}

/* ---------- Masonry layout via CSS columns ----------
   Columns gracefully mix portrait & landscape photos because each
   image keeps its natural aspect ratio and simply flows into the
   shortest column. Responsive column counts below. */
.photo-gallery {
  column-count: 4;
  column-gap: 16px;
}

.gallery-item {
  margin: 0 0 16px;
  break-inside: avoid;          /* keep an image from splitting across columns */
  -webkit-column-break-inside: avoid;
  page-break-inside: avoid;
  border-radius: 10px;
  overflow: hidden;
  background: #ece5db;
  box-shadow: 0 3px 12px rgba(47, 42, 38, 0.10);
  position: relative;
  transition: transform .25s ease, box-shadow .25s ease;
}

.gallery-item img {
  width: 100%;
  height: auto;
  display: block;
  border-radius: 10px;
}

/* Clickable (loaded) photos get a subtle hover lift */
.gallery-item.is-loaded {
  cursor: zoom-in;
}
.gallery-item.is-loaded:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 22px rgba(47, 42, 38, 0.18);
}

/* ---------- Placeholder slots (shown when a photo file is missing) ---------- */
.gallery-item.is-placeholder {
  aspect-ratio: 4 / 3;          /* default for landscape slots */
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #efe8de 0%, #e2d8ca 100%);
  border: 1px dashed rgba(101, 134, 181, 0.45);
  cursor: default;
}
.gallery-item.portrait.is-placeholder {
  aspect-ratio: 3 / 4;
}
.gallery-item.is-placeholder::before {
  content: "📷";
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -120%);
  font-size: 1.8rem;
  opacity: .55;
}
.gallery-item.is-placeholder::after {
  content: "Photo " attr(data-num);
  font-family: 'Cormorant Garamond', serif;
  font-size: 1.05rem;
  letter-spacing: .08em;
  color: rgb(101, 134, 181);
  transform: translateY(60%);
}

/* ---------- Responsive breakpoints ---------- */
@media (max-width: 1100px) {
  .photo-gallery { column-count: 3; }
}
@media (max-width: 760px) {
  .photo-gallery { column-count: 2; column-gap: 12px; }
  .gallery-item { margin-bottom: 12px; }
  .gallery-heading { font-size: 1.9rem; }
  .ourstorycontainer { margin-top: 130px; }
}
@media (max-width: 430px) {
  .photo-gallery { column-count: 1; }
  .gallery-section { padding: 0 14px; }
}

/* ====================================================================
   LIGHTBOX  (click a photo to view full size)
   ==================================================================== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(25, 22, 19, 0.92);
  padding: 24px;
}
.lightbox[hidden] { display: none; }

.lightbox-img {
  max-width: 92vw;
  max-height: 88vh;
  border-radius: 8px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
  object-fit: contain;
}

.lightbox-close,
.lightbox-nav {
  position: absolute;
  background: rgba(255, 250, 244, 0.12);
  color: #fff;
  border: none;
  cursor: pointer;
  border-radius: 999px;
  transition: background .2s ease;
  line-height: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-close:hover,
.lightbox-nav:hover { background: rgba(255, 250, 244, 0.28); }

.lightbox-close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  font-size: 2rem;
}
.lightbox-nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  font-size: 2.2rem;
}
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 600px) {
  .lightbox-nav { width: 42px; height: 42px; font-size: 1.8rem; }
  .lightbox-prev { left: 8px; }
  .lightbox-next { right: 8px; }
  .lightbox-close { top: 10px; right: 10px; }
}
