/* ============================================================
   MAIN.CSS — Jess & Ben Wedding Website
   ============================================================
   TABLE OF CONTENTS
   1.  Design Tokens (CSS Variables)
   2.  Global Reset & Base
   3.  Typography & Headers
   4.  Navigation
   5.  Countdown
   6.  Critical Info Banner
   7.  Landing Photo
   8.  Password Overlay (index.html)
   9.  Polaroid System (shared base + per-context overrides)
       9a. Base .polaroid
       9b. Wedding Party: Directory Cards
       9c. Photo Gallery: Scatter Grid
       9d. Wedding Party: Detail View
   10. Wedding Party Page
   11. Photo Gallery Page
   12. Our Story Page
   13. Travel / Hotel Page
   14. RSVP Page
   15. FAQ Page
   16. Registry Portal
   17. Animations & Keyframes
   18. Responsive / Media Queries
   ============================================================ */


/* ============================================================
   1. DESIGN TOKENS
   ============================================================ */
:root {
    --bg-color:      #f0f0f0;
    --card-bg:       #ffffff;
    --text-main:     rgb(39, 39, 39);
    --text-muted:    #64748b;
    --text-light:    #94a3b8;
    --brand-accent:  #0056b3;
    --pill-bg:       #e1efff;
    --pill-text:     #0056b3;
    --transition:    all 0.25s ease;
}


/* ============================================================
   2. GLOBAL RESET & BASE
   ============================================================ */
body {
    background-color: var(--bg-color);
    margin: 0;
    font-family: 'Segoe UI', sans-serif;
    color: var(--text-main);
    overflow-x: hidden;
}

/* Scrapbook paper texture — only on pages that use it */
body.wedding-party,
body.our-story,
body.gallery {
    background-image: url("https://www.transparenttextures.com/patterns/natural-paper.png");
    background-attachment: fixed;
}


/* ============================================================
   3. TYPOGRAPHY & HEADERS
   ============================================================ */
.header {
    font-family: "Croissant One", serif;
    font-weight: 200;
    font-size: 5em;
    text-align: center;
    color: var(--text-main);
    margin: 20px 0 0 0;
}

.date-location {
    font-family: "Croissant One", serif;
    font-weight: 100;
    font-size: 2em;
    text-align: center;
    color: var(--text-main);
    margin-bottom: 10px;
}

.page-title {
    font-family: "Croissant One", serif;
    font-size: 3rem;
    text-align: center;
    margin-bottom: 10px;
    color: var(--text-main);
}

/* Shared intro block (photos.html, our-story.html) */
.story-intro {
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
    padding: 20px 0 40px;
    border-bottom: 1px solid #f1f5f9;
}

.story-intro h1 {
    margin-bottom: 15px;
    color: var(--text-main);
}


/* ============================================================
   4. NAVIGATION
   ============================================================ */

/* --- Desktop horizontal navbar --- */
.nav-container {
    padding: 30px 0;
    z-index: 20;
    position: relative;
}

.navbar {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.nav-tab {
    color: var(--text-main);
    text-decoration: none;
    font-size: 1.15rem;
    font-weight: 600;
    padding: 10px 20px;
    transition: var(--transition);
    border-bottom: 2px solid transparent;
}

.nav-tab:hover {
    border-bottom: 2px solid #000;
    background: rgba(0, 0, 0, 0.02);
    border-radius: 8px;
}

/* --- Hamburger button (mobile only) --- */
.hamburger-btn {
    display: none; /* hidden on desktop */
    position: fixed;
    top: 16px;
    left: 16px;
    z-index: 1100;
    background: white;
    border: none;
    border-radius: 10px;
    width: 44px;
    height: 44px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.12);
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.hamburger-btn:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.18);
    transform: scale(1.05);
}

.hamburger-btn .material-icons {
    font-size: 24px;
    color: var(--text-main);
    transition: var(--transition);
}

/* --- Sidebar drawer --- */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(4px);
    -webkit-backdrop-filter: blur(4px);
    z-index: 1050;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay.open {
    display: block;
    opacity: 1;
}

.sidebar-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 280px;
    background: white;
    z-index: 1100;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 30px rgba(0, 0, 0, 0.12);
    overflow-y: auto;
}

.sidebar-drawer.open {
    transform: translateX(0);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #f1f5f9;
}

.sidebar-title {
    font-family: "Croissant One", serif;
    font-size: 1.3rem;
    color: var(--text-main);
    margin: 0;
}

.sidebar-close-btn {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    transition: var(--transition);
}

.sidebar-close-btn:hover {
    background: #f1f5f9;
    color: var(--text-main);
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    padding: 16px 0;
    flex: 1;
}

.sidebar-nav .nav-tab {
    font-size: 1.05rem;
    padding: 14px 24px;
    border-bottom: none;
    border-left: 3px solid transparent;
    border-radius: 0;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
}

.sidebar-nav .nav-tab:hover {
    border-bottom: none;
    border-left: 3px solid var(--brand-accent);
    background: var(--pill-bg);
    color: var(--brand-accent);
    border-radius: 0;
}


/* ============================================================
   5. COUNTDOWN
   ============================================================ */
.countdown-container {
    text-align: center;
    width: 100%;
    margin: 10px 0;
}

#countdown {
    display: flex;
    justify-content: center;
    align-items: baseline;
    gap: 15px;
    font-family: "Croissant One", serif;
    color: var(--text-main);
}

.time-box {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.time-box span {
    font-size: 2em;
    font-weight: 100;
}


/* ============================================================
   6. CRITICAL INFO BANNER
   ============================================================ */
#critical-info-banner {
    position: relative;
    z-index: 10;
    width: 90%;
    max-width: 1200px;
    margin: 20px auto;
    background: rgba(255, 255, 255, 0.65);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 20px;
    padding: 22px 10px;
    display: flex;
    justify-content: space-around;
    align-items: center;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08);
}

.info-section {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.line-1 {
    font-size: 0.72rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-main);
    margin-bottom: 5px;
}

.line-2-wrapper {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: center;
}

.info-pill {
    background: var(--pill-bg);
    color: var(--pill-text);
    padding: 10px 22px;
    border-radius: 100px;
    text-decoration: none !important;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: var(--transition);
}

.info-pill:hover    { transform: translateY(-2px); }
.info-pill.link-pill { cursor: pointer; }
.info-pill i.material-icons { font-size: 16px !important; }

.info-divider {
    width: 1px;
    height: 40px;
    background-color: #eee;
}


/* ============================================================
   7. LANDING PHOTO & PAGE WRAPPER
   ============================================================ */
.page-wrapper {
    position: relative;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    background-color: var(--bg-color);
}

/* Keep these above the absolute photo layer */
.header,
.date-location,
.countdown-container,
.nav-container {
    position: relative;
    z-index: 20;
}

.landing-photo {
    position: absolute;
    top: 350px;
    left: 5%;
    width: 90%;
    aspect-ratio: 1 / 1;
    background-image: url('./images/landing-page.jpg');
    background-size: cover;
    background-position: center 20%;
    opacity: 0.9;
    z-index: 1;
    -webkit-mask-image: radial-gradient(circle, black 20%, transparent 70%);
    mask-image: radial-gradient(circle, black 20%, transparent 70%);
    animation: fadeInUp 1.5s ease-out forwards;
}


/* ============================================================
   8. PASSWORD OVERLAY
   ============================================================ */
#password-overlay {
    position: fixed;
    inset: 0;
    background: var(--bg-color);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    transition: opacity 0.6s ease;
}

#password-overlay.fade-out {
    opacity: 0;
    pointer-events: none;
}

.password-box {
    background: white;
    padding: 50px 40px;
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    text-align: center;
    width: 90%;
    max-width: 420px;
}

.password-box h2 {
    font-family: "Croissant One", serif;
    font-size: 1.8rem;
    margin-bottom: 10px;
    color: var(--text-main);
}

.password-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 15px;
}

.password-wrapper input {
    width: 100%;
    padding: 14px 50px 14px 18px;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s;
    box-sizing: border-box;
}

.password-wrapper input:focus { border-color: var(--brand-accent); }

.toggle-icon {
    position: absolute;
    right: 14px;
    cursor: pointer;
    color: var(--text-light);
    user-select: none;
}

.btn-primary {
    background: var(--pill-text);
    color: white;
    border: none;
    padding: 14px 30px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: var(--transition);
}

.btn-primary:hover { transform: scale(1.02); }


/* ============================================================
   9. POLAROID SYSTEM
   ============================================================
   One canonical base, three contextual overrides.

   Pages using polaroids:
     - wedding-party.html  → .member-card .polaroid  (directory grid)
     - photos.html         → .gallery-item .polaroid (scatter gallery)
     - wedding-party.html  → .detail-photo           (hero detail view)

   our-story.html uses a framed photo look (border + shadow on <img>)
   rather than the polaroid component — see Section 12.
   ============================================================ */

/* --- 9a. BASE POLAROID --- */
.polaroid {
    background: white;
    padding: 12px 12px 40px 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    border: 1px solid #efefef;
    position: relative;
}

.polaroid img {
    width: 100%;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    display: block;
}

/* Washi tape strip — centered above each polaroid */
.polaroid::before {
    content: '';
    position: absolute;
    top: -18px;
    left: 50%;
    transform: translateX(-50%);
    width: 90px;
    height: 35px;
    background: rgba(255, 255, 255, 0.5);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    border-left: 1px dashed rgba(0, 0, 0, 0.08);
    border-right: 1px dashed rgba(0, 0, 0, 0.08);
    box-shadow: 2px 2px 5px rgba(0, 0, 0, 0.03);
    z-index: 10;
}

.polaroid-caption {
    margin-top: 12px;
    text-align: center;
    font-family: 'Georgia', serif;
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
}

/* --- 9b. WEDDING PARTY directory cards --- */
/* Slightly tighter — these are small thumbnail grid cards */
.member-card .polaroid {
    padding: 10px 10px 36px 10px;
}

/* --- 9c. PHOTO GALLERY scatter grid --- */
/* More bottom space to fit the two-line caption (title + date) */
.gallery-item .polaroid {
    padding: 14px 14px 52px 14px;
}

.gallery-item .polaroid-caption {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.caption-text {
    font-size: 1rem;
    font-weight: 700;
    color: #334155;
}

.caption-date {
    font-size: 0.75rem;
    font-weight: 400;
    color: var(--text-muted);
    font-style: italic;
}

/* --- 9d. WEDDING PARTY detail view --- */
/*
 * Structurally distinct from .polaroid (no caption, full-bleed image,
 * angled tape offset to the left) but shares the same visual DNA.
 * Lives in the detail panel, not the grid.
 */
.detail-photo {
    position: relative;
    padding: 15px 15px 60px 15px;
    background: white;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
    transform: rotate(-2deg);
    transition: transform 0.3s ease;
}

.detail-photo img {
    width: 100%;
    display: block;
    aspect-ratio: 1 / 1;
    object-fit: cover;
    border-radius: 2px;
}

/* Larger, angled tape for the hero detail photo */
.detail-photo::before {
    content: '';
    position: absolute;
    top: -25px;
    left: 15%;
    width: 130px;
    height: 45px;
    background: rgba(255, 255, 255, 0.45);
    backdrop-filter: blur(3px);
    -webkit-backdrop-filter: blur(3px);
    border-left: 1px dashed rgba(0, 0, 0, 0.1);
    border-right: 1px dashed rgba(0, 0, 0, 0.1);
    transform: rotate(-12deg);
    z-index: 10;
}


/* ============================================================
   10. WEDDING PARTY PAGE
   ============================================================ */
/* ============================================================
   10. WEDDING PARTY PAGE
   ============================================================ */

/* --- Directory: scattered polaroid grid (mirrors photo gallery) --- */
#party-directory {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 70px 40px;
    padding: 60px 5% 100px;
    max-width: 1400px;
    margin: 0 auto;
    justify-items: center;
}

.member-card {
    position: relative;
    width: 100%;
    max-width: 220px;
    cursor: pointer;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform: rotate(var(--rotation, 0deg));
    z-index: 1;
}

/* Staggered vertical offsets — same pattern as photo gallery */
.member-card:nth-child(even) { margin-top: 50px; }
.member-card:nth-child(3n)   { margin-top: -25px; }

.member-card:hover {
    transform: rotate(0deg) scale(1.08) translateY(-8px);
    z-index: 50;
}

.member-card:hover .polaroid {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.18);
}

/* --- Detail view: scrapbook card --- */
#party-detail-view {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px 5% 60px;
    background: transparent;
    overflow: hidden;
}

/*
 * The card itself — aged paper with a slight tilt, like it was
 * pulled out of a scrapbook and set on the table.
 */
.detail-card {
    position: relative;
    background-color: #fdf8f0;
    background-image:
        url("https://www.transparenttextures.com/patterns/natural-paper.png"),
        /* Subtle ruled lines for a journal/card feel */
        repeating-linear-gradient(
            transparent,
            transparent 31px,
            rgba(0, 0, 0, 0.04) 31px,
            rgba(0, 0, 0, 0.04) 32px
        );
    border-radius: 4px;
    padding: 50px 55px 60px;
    box-shadow:
        0 2px 4px rgba(0,0,0,0.08),
        0 10px 30px rgba(0,0,0,0.1),
        0 30px 60px rgba(0,0,0,0.08);
    transform: rotate(-0.8deg);
    /* Red margin line on the left, like a ruled card */
    border-left: 3px solid rgba(220, 80, 80, 0.25);
}

/* Corner fold — bottom-right dog-ear */
.detail-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 40px;
    height: 40px;
    background: linear-gradient(
        225deg,
        var(--bg-color) 50%,
        rgba(0, 0, 0, 0.08) 50%
    );
}

/* Pushpin / thumbtack at the top center */
.detail-card::before {
    content: '';
    position: absolute;
    top: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 18px;
    height: 18px;
    background: radial-gradient(circle at 40% 35%, #e8c97a, #c8a84b);
    border-radius: 50%;
    box-shadow: 0 2px 6px rgba(0,0,0,0.3), inset 0 1px 2px rgba(255,255,255,0.4);
    z-index: 10;
}

.detail-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 50px;
    align-items: center;
}

.detail-info {
    padding-left: 10px;
}

.detail-info #detail-name {
    font-family: "Croissant One", serif;
    font-size: 3.5rem;
    margin: 0;
    line-height: 1.1;
    color: #2d2416;
}

#detail-subtitle {
    display: block;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.85rem;
    color: var(--pill-text);
    margin-bottom: 10px;
}

.flavor-text {
    font-family: 'Georgia', serif;
    font-size: 1.15rem;
    line-height: 1.9;
    color: #5a4a3a;
    margin-top: 20px;
    font-style: italic;
    /* Simulate handwritten ink — slightly uneven baseline feel */
    text-shadow: 0.3px 0.3px 0 rgba(0,0,0,0.05);
}

.back-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    background: white;
    border-radius: 50px;
    cursor: pointer;
    font-weight: 700;
    margin-bottom: 30px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.08);
    transition: var(--transition);
}

.back-btn:hover {
    background: var(--brand-accent);
    color: white;
}

.scrapbook-nav-wrapper {
    display: flex;
    gap: 30px;
    margin-top: 40px;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-weight: 700;
    color: var(--text-main);
    transition: var(--transition);
}

.nav-item:hover {
    color: var(--brand-accent);
    transform: scale(1.05);
}


/* ============================================================
   11. PHOTO GALLERY PAGE
   ============================================================ */
.photo-page-wrapper {
    width: 100%;
}

#scrapbook-gallery {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 80px 60px;
    padding: 20px 5% 100px;
    max-width: 1800px;
    margin: 0 auto;
}

.gallery-item {
    transform: rotate(var(--rotation, 0deg));
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    position: relative;
    z-index: 1;
}

/* Staggered vertical offset for the scattered scrapbook feel */
.gallery-item:nth-child(even) { margin-top: 60px; }
.gallery-item:nth-child(3n)   { margin-top: -30px; }

.gallery-item:hover {
    transform: rotate(0deg) scale(1.1) translateY(-10px);
    z-index: 100;
}

.gallery-item:hover .polaroid {
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.2);
}

/* Photo detail view — mirrors wedding party detail layout */
#photo-detail-view {
    max-width: 1000px;
    margin: 40px auto;
    padding: 20px 5% 60px;
    background: transparent;
    overflow: hidden;
}

/* Reuses .detail-card and .detail-photo from wedding party.
   Photo-specific overrides below. */
#photo-detail-view .detail-photo {
    /* Photos are landscape-friendly — don't force square */
    padding: 15px 15px 50px 15px;
}

#photo-detail-view .detail-photo img {
    aspect-ratio: unset;
    max-height: 60vh;
    width: 100%;
    object-fit: contain;
}

#photo-detail-view .photo-caption-title {
    font-family: 'Croissant One', serif;
    font-size: 2.2rem;
    color: #2d2416;
    margin: 0 0 6px;
    line-height: 1.2;
}

#photo-detail-view .photo-caption-date {
    font-family: 'Georgia', serif;
    font-size: 0.95rem;
    font-style: italic;
    color: #8a7560;
}


/* ============================================================
   12. OUR STORY PAGE
   ============================================================ */
.story-container {
    position: relative;
    max-width: 1000px;
    margin: 40px auto 60px;
    padding: 0 5%;
    background: transparent;
}

/* Vertical dashed thread */
.story-container::before {
    content: '';
    position: absolute;
    top: 250px;
    bottom: 50px;
    left: 50%;
    width: 0;
    border-left: 2px dashed #cbd5e1;
    transform: translateX(-50%);
    z-index: 1;
}

.story-row {
    display: flex;
    align-items: center;
    gap: 80px;
    margin-bottom: 120px;
    position: relative;
    z-index: 2;
}

.story-row:nth-child(even) { flex-direction: row-reverse; }

/* Timeline node dot */
.story-row::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 50%;
    width: 12px;
    height: 12px;
    background: white;
    border: 3px solid var(--brand-accent);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    box-shadow: 0 0 0 6px white;
}

.story-image-wrap { flex: 1; position: relative; }

/*
 * Our Story uses a framed-photo look (thick white borders, slight tilt)
 * rather than the .polaroid component.
 */
.story-image-wrap img {
    width: 100%;
    border-radius: 4px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    border: 12px solid white;
    border-bottom: 40px solid white;
    transform: rotate(var(--story-rotation, -2deg));
}

.story-text-wrap { flex: 1; }

.story-date {
    display: block;
    font-weight: 800;
    color: var(--brand-accent);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    margin-bottom: 10px;
}

.story-text-wrap h2 {
    font-family: 'Croissant One', serif;
    font-size: 2.5rem;
    margin-bottom: 20px;
}

.story-content {
    font-size: 1.1rem;
    line-height: 1.8;
    color: var(--text-muted);
}


/* ============================================================
   13. TRAVEL / HOTEL PAGE
   ============================================================ */
#hotels-page-container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 60px 0;
}

#hotel-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 30px;
}

.hotel-card {
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: transform 0.3s ease;
}

.hotel-card:hover { transform: translateY(-10px); }

.hotel-image {
    width: 100%;
    height: 220px;
    object-fit: cover;
    display: block;
}

.hotel-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.hotel-name {
    font-size: 1.5rem;
    color: var(--pill-text);
    margin: 0 0 5px;
    font-weight: 700;
}

.hotel-price {
    font-weight: bold;
    color: #555;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.hotel-logistics {
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid #edf2f7;
}

.logistic-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 8px;
    color: #4a5568;
}

.logistic-label { font-weight: bold; color: #2d3748; }

.amenities-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin: 15px 0 20px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.amenity-item {
    display: flex;
    align-items: center;
    font-size: 0.85rem;
    color: #4a5568;
}

.status-yes { color: #2f855a; }
.status-no  { color: #a0aec0; text-decoration: line-through; opacity: 0.7; }

.hotel-description {
    font-size: 0.9rem;
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
}

.book-btn {
    display: block;
    text-align: center;
    background: var(--pill-text);
    color: white !important;
    padding: 14px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: bold;
    margin-top: auto;
    transition: filter 0.2s;
}

.book-btn:hover { filter: brightness(115%); }


/* ============================================================
   14. RSVP PAGE
   ============================================================ */
#rsvp-main-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 85vh;
    width: 100%;
    padding: 20px;
    box-sizing: border-box;
}

.rsvp-hero-layout {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 80vh;
    padding: 20px;
}

#rsvp-entry-container {
    width: 100%;
    max-width: 500px;
}

.rsvp-content-card {
    background: white;
    padding: 50px;
    border-radius: 25px;
    text-align: center;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
    width: 100%;
    box-sizing: border-box;
}

.rsvp-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.8rem;
    font-weight: 800;
    color: var(--brand-accent);
    margin-bottom: 10px;
}

.input-group-modern {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin: 30px 0;
}

#name-search-input {
    padding: 12px 16px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.3s;
    outline: none;
    width: 100%;
    box-sizing: border-box;
    color: var(--text-main);
}

#name-search-input:focus { border-color: var(--brand-accent); }

.btn-primary-large {
    background: var(--pill-text);
    color: white;
    padding: 18px;
    border: none;
    border-radius: 12px;
    font-size: 1rem;
    font-weight: 700;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    transition: var(--transition);
}

.btn-primary-large:hover { filter: brightness(115%); }

.rsvp-help-text {
    font-size: 0.85rem;
    color: var(--text-light);
}

#rsvp-form {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
}

.form-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    width: 100%;
    margin-top: 20px;
    box-sizing: border-box;
}

.form-main-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-bottom: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    color: #475569;
}

.form-group select,
.form-group input[type="email"],
.form-group textarea {
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    background-color: #f8fafc;
}

.food-section,
.transport-section,
.welcome-drinks-section {
    background: #f1f5f9;
    padding: 20px;
    border-radius: 12px;
    margin-top: 15px;
    border-left: 4px solid var(--brand-accent);
}

.guest-entry {
    position: relative;
    padding-top: 20px;
    border-top: 1px solid #f1f5f9;
    margin-top: 30px;
}

.guest-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 15px;
}

#add-guest-btn {
    background: transparent;
    border: 2px dashed #cbd5e1;
    color: #64748b;
    width: 100%;
    padding: 15px;
    border-radius: 10px;
    margin: 20px 0;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
}

#add-guest-btn:hover {
    background: #f8fafc;
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

#add-guest-btn:disabled {
    cursor: not-allowed;
    opacity: 0.5;
}

.submit-btn {
    background: #2dd4bf;
    color: white;
    width: 100%;
    padding: 20px;
    border: none;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 800;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(45, 212, 191, 0.3);
    transition: var(--transition);
}

.submit-btn:hover {
    transform: translateY(-2px);
    filter: brightness(105%);
}

.remove-guest-btn {
    background: transparent;
    color: var(--text-light);
    border: none;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 5px;
    transition: var(--transition);
}

.remove-guest-btn:hover {
    color: #ef4444;
    background: #fef2f2;
}

.remove-guest-btn i { font-size: 14px; }

/* Review step */
.review-email {
    font-size: 0.95rem;
    color: var(--text-muted);
    padding-bottom: 20px;
    margin-bottom: 5px;
    border-bottom: 1px solid #e2e8f0;
}

.review-email span { font-weight: 700; color: var(--text-main); }

.review-guest {
    padding: 15px 0;
    border-bottom: 1px solid #e2e8f0;
}

.review-guest:last-child { border-bottom: none; }

.review-guest-name {
    font-weight: 700;
    margin-bottom: 6px;
}

.review-detail {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-left: 12px;
    line-height: 1.8;
}

.review-detail span { font-weight: 600; color: var(--text-main); }

.review-actions {
    display: flex;
    gap: 15px;
    margin-top: 30px;
}

.btn-back {
    background: transparent;
    border: 2px solid #cbd5e1;
    color: #64748b;
    padding: 15px 20px;
    border-radius: 10px;
    font-size: 1rem;
    cursor: pointer;
    font-weight: 600;
    transition: var(--transition);
    flex: 1;
}

.btn-back:hover {
    border-color: var(--brand-accent);
    color: var(--brand-accent);
}

/* ============================================================
   15. FAQ PAGE
   ============================================================ */
.faq-search-wrapper {
    max-width: 600px;
    margin: 40px auto 0;
    padding: 0 20px;
}

.search-input-container {
    position: relative;
    display: flex;
    align-items: center;
}

.search-input-container i {
    position: absolute;
    left: 20px;
    color: var(--text-light);
    font-size: 20px;
}

#faq-search {
    width: 100%;
    padding: 15px 15px 15px 55px;
    border: 2px solid #e2e8f0;
    border-radius: 50px;
    font-size: 1rem;
    background: white;
    outline: none;
    transition: var(--transition);
    box-sizing: border-box;
}

#faq-search:focus {
    border-color: var(--brand-accent);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
}

.faq-categories {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.cat-btn {
    padding: 8px 22px;
    border-radius: 20px;
    border: 1px solid #e2e8f0;
    background: white;
    color: var(--text-muted);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: var(--transition);
}

.cat-btn.active {
    background: var(--brand-accent);
    color: white;
    border-color: var(--brand-accent);
}

.cat-btn:hover:not(.active) {
    background: #f8fafc;
    border-color: #cbd5e1;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
    padding: 40px 20px;
    max-width: 1200px;
    margin: 0 auto;
}

.faq-card {
    background: white;
    border: 1px solid #eee;
    border-radius: 15px;
    padding: 25px;
    cursor: pointer;
    transition: var(--transition);
    height: fit-content;
}

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

.faq-question {
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--text-main);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
}

.faq-question i {
    color: var(--brand-accent);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-card.active i { transform: rotate(180deg); }

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease, margin-top 0.3s ease;
    color: var(--text-muted);
    line-height: 1.7;
    font-size: 0.95rem;
}

.faq-card.active .faq-answer {
    max-height: 500px;
    margin-top: 15px;
}

.no-results {
    text-align: center;
    color: var(--text-muted);
    font-size: 1rem;
    grid-column: 1 / -1;
}


/* ============================================================
   16. REGISTRY PAGE
   ============================================================ */
.registry-page {
    max-width: 1000px;
    margin: 0 auto;
    padding: 80px 30px 60px;
}

.registry-header {
    text-align: center;
    margin-bottom: 50px;
}

.registry-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: 3px;
    font-size: 0.75rem;
    font-weight: 800;
    color: var(--brand-accent);
    margin-bottom: 10px;
}

.registry-header h1 {
    font-family: 'Croissant One', serif;
    font-size: 2.8rem;
    margin: 0 0 12px;
    color: var(--text-main);
}

.registry-header p {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.registry-cards {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.registry-card {
    background: white;
    border-radius: 25px;
    padding: 40px 35px;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.08);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 24px;
}

.registry-card-logo-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1;
    min-height: 80px;
}

.registry-logo {
    max-width: 220px;
    max-height: 90px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.registry-card-flavor {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 0;
    flex: 1;
}

.btn-registry {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: var(--pill-text);
    color: white;
    padding: 14px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 600;
    transition: var(--transition);
    width: 100%;
    justify-content: center;
    box-sizing: border-box;
}

.btn-registry:hover { filter: brightness(115%); }


/* ============================================================
   17. ANIMATIONS & KEYFRAMES
   ============================================================ */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to   { opacity: 0.9; transform: translateY(0); }
}

@keyframes portalPop {
    from { opacity: 0; transform: scale(0.9); }
    to   { opacity: 1; transform: scale(1); }
}

@keyframes pageFlip {
    0%   { opacity: 0; transform: perspective(1200px) rotateY(-10deg) translateX(-30px); }
    100% { opacity: 1; transform: perspective(1200px) rotateY(0deg)   translateX(0); }
}

.page-flip-animation {
    animation: pageFlip 0.7s cubic-bezier(0.23, 1, 0.32, 1) forwards;
}

/* --- Card slide animations for wedding party detail view --- */

/* Card exits to the left (going forward / next) */
@keyframes cardExitLeft {
    0%   { opacity: 1; transform: rotate(-0.8deg) translateX(0)     scale(1); }
    100% { opacity: 0; transform: rotate(-3deg)   translateX(-110%) scale(0.92); }
}

/* Card exits to the right (going backward / prev) */
@keyframes cardExitRight {
    0%   { opacity: 1; transform: rotate(-0.8deg) translateX(0)    scale(1); }
    100% { opacity: 0; transform: rotate(3deg)    translateX(110%) scale(0.92); }
}

/* New card enters from the right (going forward / next) */
@keyframes cardEnterRight {
    0%   { opacity: 0; transform: rotate(3deg)    translateX(110%) scale(0.92); }
    100% { opacity: 1; transform: rotate(-0.8deg) translateX(0)    scale(1); }
}

/* New card enters from the left (going backward / prev) */
@keyframes cardEnterLeft {
    0%   { opacity: 0; transform: rotate(-3deg)   translateX(-110%) scale(0.92); }
    100% { opacity: 1; transform: rotate(-0.8deg) translateX(0)     scale(1); }
}

.detail-card.exit-left  { animation: cardExitLeft  0.3s cubic-bezier(0.4, 0, 1, 1) forwards; }
.detail-card.exit-right { animation: cardExitRight 0.3s cubic-bezier(0.4, 0, 1, 1) forwards; }
.detail-card.enter-right { animation: cardEnterRight 0.35s cubic-bezier(0, 0, 0.2, 1) forwards; }
.detail-card.enter-left  { animation: cardEnterLeft  0.35s cubic-bezier(0, 0, 0.2, 1) forwards; }


/* ============================================================
   18. RESPONSIVE / MEDIA QUERIES
   ============================================================ */

/* --- Tablet (≤1024px) --- */
@media (max-width: 1024px) {
    #party-directory {
        grid-template-columns: repeat(3, 1fr);
        gap: 50px 30px;
        padding: 30px 5%;
    }

    /* Reset stagger on tablet to avoid excessive height */
    .member-card:nth-child(even),
    .member-card:nth-child(3n) { margin-top: 0; }

    .detail-layout {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .detail-card {
        padding: 40px 30px 50px;
        transform: rotate(0deg);
    }

    .detail-photo {
        transform: rotate(0deg);
        max-width: 400px;
        margin: 0 auto;
    }

    .detail-info #detail-name {
        font-size: 2.5rem;
        text-align: center;
    }

    .detail-info {
        padding-left: 0;
        text-align: center;
    }

    .scrapbook-nav-wrapper { justify-content: center; }

    .story-container { max-width: 800px; }
}

/* --- Mobile (≤768px) --- */
@media (max-width: 768px) {
    .registry-cards {
        grid-template-columns: 1fr;
    }

    .registry-header h1 { font-size: 2rem; }
    .registry-page { padding: 60px 20px 40px; }

    .header        { font-size: 3em; }
    .date-location { font-size: 1.5em; }

    /* Clamp the home page to a single screen — no scroll */
    .page-wrapper {
        height: 100vh;
        overflow: hidden;
    }

    /* Landing photo: centered, slightly smaller, shifted up */
    .landing-photo {
        left: 2.5%;
        width: 95%;
        top: 160px;
    }

    /* Show hamburger, hide horizontal navbar */
    .hamburger-btn  { display: flex; }
    .nav-container  { display: none; }

    /* Critical Info Banner: pin to bottom of viewport on homepage */
    body:not(.FAQ):not(.our-story):not(.gallery):not(.registry):not(.rsvp):not(.travel):not(.wedding-party) #critical-info-banner {
        position: fixed;
        bottom: 10px;
        left: 50%;
        transform: translateX(-50%);
        width: 95%;
        max-width: 95%;
        margin: 0;
        border-radius: 20px;
        border: 1px solid rgba(255,255,255,0.6);
        padding: 14px 16px;
        z-index: 900;
        background: rgba(255, 255, 255, 0.88);
        backdrop-filter: blur(20px);
        -webkit-backdrop-filter: blur(20px);
    }

    #critical-info-banner {
        flex-direction: column;
        gap: 10px;
        text-align: center;
        box-sizing: border-box;
    }

    .info-divider { display: none; }

    /* Shrink and wrap pill content so nothing bleeds off-screen */
    .info-pill {
        padding: 8px 12px;
        font-size: 0.75rem;
        white-space: normal;      /* allow text to wrap inside the pill */
        text-align: center;
        line-height: 1.4;
    }

    .info-pill i.material-icons {
        font-size: 14px !important;
        flex-shrink: 0;           /* keep icon from squishing */
    }

    .line-2-wrapper {
        gap: 6px;
        flex-direction: column;   /* stack address pill above parking pill */
        align-items: center;
        width: 100%;
    }

    .info-section {
        width: 100%;
        max-width: 100%;
    }

    .line-1 {
        font-size: 0.6rem;
        letter-spacing: 0.5px;
    }

    /* Story timeline: move line to left edge */
    .story-row,
    .story-row:nth-child(even) {
        flex-direction: column;
        gap: 30px;
        margin-bottom: 60px;
    }

    .story-container::before { left: 20px; }
    .story-row::after         { left: 20px; top: 20px; }
    .story-row                { padding-left: 50px; }

    /* RSVP */
    #rsvp-main-wrapper {
        padding: 15px;
        min-height: auto;
        margin-top: 20px;
    }

    #rsvp-entry-container,
    #rsvp-form { max-width: 100%; }

    .rsvp-content-card,
    .form-container {
        padding: 25px 20px;
        border-radius: 15px;
    }

    .form-main-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .btn-primary-large,
    .submit-btn,
    #add-guest-btn {
        width: 100%;
        font-size: 1.1rem;
    }

    .food-section,
    .transport-section,
    .welcome-drinks-section {
        padding: 15px;
        margin-top: 10px;
    }

    /* Gallery: disable stagger on small screens */
    #scrapbook-gallery {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 50px 30px;
        padding: 20px 4% 60px;
    }

    .gallery-item:nth-child(even),
    .gallery-item:nth-child(3n) { margin-top: 0; }
}

/* --- Small phones (≤480px) --- */
@media (max-width: 480px) {
    #party-directory {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px 20px;
        padding: 20px 4% 60px;
    }

    .nav-tab {
        padding: 8px 10px;
        font-size: 0.9rem;
    }

    #hotel-grid { grid-template-columns: 1fr; }
}