/* style.css — Updated with R2 background URLs + Admin Preview Mode + Photo Pool */
:root {
    --emerald: #2D5A3D;
    --emerald-dark: #1e3d28;
    --emerald-light: #3d7a52;
    --gold: #D4AF37;
    --gold-light: #e8c94d;
    --ivory: #FFFEF0;
    --cream: #F5F0E8;
    --charcoal: #2C2C2C;
    --gray: #6B6B6B;
    --light-gray: #E8E8E8;
    --white: #FFFFFF;
    --font-heading: 'Playfair Display', Georgia, serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-script: 'Great Vibes', cursive;
    --transition: all 0.3s ease;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --ivory-rgb: 255, 254, 240;
    --emerald-rgb: 45, 90, 61;
    --emerald-dark-rgb: 30, 60, 40;
    --gold-rgb: 212, 175, 55;
    --charcoal-rgb: 44, 44, 44;
    --white-rgb: 255, 255, 255;
    --radius: 12px;
    --radius-sm: 8px;
}

*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-text-size-adjust: 100%; }
body { font-family: var(--font-body); color: var(--charcoal); background: var(--ivory); line-height: 1.6; overflow-x: hidden; -webkit-font-smoothing: antialiased; }
img { max-width: 100%; height: auto; display: block; }

/* ===== HIDE-UNTIL-HYDRATED SYSTEM ===== */
.hydrating [data-text-slot] {
    opacity: 0;
    transition: opacity 0.3s ease;
}

.hydrated [data-text-slot] {
    opacity: 1;
}

/* Ensure form inputs don't show placeholder text while hydrating */
.hydrating [data-text-slot][placeholder=""] {
    color: transparent;
}
a { text-decoration: none; color: inherit; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* Navigation */
.navbar { position: fixed; top: 0; left: 0; width: 100%; z-index: 1000; background: rgba(var(--ivory-rgb), 0.95); backdrop-filter: blur(10px); border-bottom: 1px solid rgba(var(--emerald-rgb), 0.1); transition: var(--transition); }
.nav-container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; display: flex; justify-content: space-between; align-items: center; height: 70px; }
.nav-logo { font-family: var(--font-script); font-size: 2rem; color: var(--emerald); letter-spacing: 1px; }
.nav-menu { display: flex; list-style: none; gap: 2rem; }
.nav-link { font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; color: var(--charcoal); letter-spacing: 0.5px; position: relative; padding: 0.5rem 0; transition: var(--transition); }
.nav-link::after { content: ''; position: absolute; bottom: 0; left: 0; width: 0; height: 2px; background: var(--gold); transition: var(--transition); }
.nav-link:hover::after, .nav-link.active::after { width: 100%; }
.nav-link:hover { color: var(--emerald); }
.nav-toggle { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 8px; min-width: 44px; min-height: 44px; touch-action: manipulation; }
.nav-toggle span { display: block; width: 25px; height: 2px; background: var(--emerald); transition: var(--transition); border-radius: 2px; }

/* Hero — Updated to R2 URL */
.hero { position: relative; height: 100vh; min-height: 700px; display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 50%, var(--emerald-light) 100%); overflow: hidden; }
.hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('https://pub-79db3a0b2fd447e19ad1194613a7b73e.r2.dev/display/home1-1200w.webp') center/cover no-repeat; opacity: 0.5; }
.hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(var(--emerald-rgb), 0.2) 0%, rgba(var(--emerald-rgb), 0.5) 100%); }
.hero-content { position: relative; z-index: 2; color: var(--white); padding: 0 1.5rem; animation: fadeInUp 1s ease-out; }
.hero-hashtag { font-family: var(--font-body); font-size: 0.9rem; letter-spacing: 3px; text-transform: uppercase; margin-bottom: 1.5rem; opacity: 0.9; }
.hero-title { font-family: var(--font-heading); font-size: clamp(3rem, 8vw, 6rem); font-weight: 400; line-height: 1.1; margin-bottom: 1rem; }
.hero-title span { font-family: var(--font-script); color: var(--gold); font-size: 1.2em; }
.hero-subtitle { font-family: var(--font-script); font-size: clamp(1.5rem, 4vw, 2.5rem); color: var(--gold-light); margin-bottom: 1rem; }
.hero-date { font-family: var(--font-body); font-size: 1rem; letter-spacing: 2px; margin-bottom: 2.5rem; opacity: 0.9; }
.hero-scroll { position: absolute; bottom: 2rem; left: 50%; transform: translateX(-50%); color: var(--white); font-size: 0.75rem; letter-spacing: 2px; text-transform: uppercase; opacity: 0.7; display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.scroll-line { width: 1px; height: 40px; background: linear-gradient(to bottom, var(--gold), transparent); animation: scrollBounce 2s infinite; }

/* Buttons */
.btn { display: inline-block; padding: 1rem 2.5rem; font-family: var(--font-body); font-size: 0.9rem; font-weight: 500; letter-spacing: 1px; text-transform: uppercase; border-radius: 50px; transition: var(--transition); cursor: pointer; border: 2px solid transparent; touch-action: manipulation; -webkit-tap-highlight-color: transparent; }
.btn-primary { background: var(--gold); color: var(--charcoal); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-light); border-color: var(--gold-light); transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.btn-outline { background: transparent; color: var(--emerald); border-color: var(--emerald); margin-right: 1rem; margin-bottom: 1rem; }
.btn-outline:hover { background: var(--emerald); color: var(--white); }

/* Sections */
.section { padding: 6rem 0; }
.section-header { text-align: center; margin-bottom: 4rem; }
.section-label { display: block; font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; letter-spacing: 3px; text-transform: uppercase; color: var(--gold); margin-bottom: 1rem; }
.section-title { font-family: var(--font-heading); font-size: clamp(2rem, 5vw, 3rem); font-weight: 400; color: var(--emerald); line-height: 1.2; }

/* Story Preview */
.story-preview { background: var(--white); }
.story-content { display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center; }
.story-text p { font-size: 1.1rem; color: var(--gray); margin-bottom: 1.5rem; line-height: 1.8; }
.story-image { position: relative; border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); }
.story-image img { width: 100%; height: 500px; object-fit: cover; transition: var(--transition); }
.story-image:hover img { transform: scale(1.05); }

/* Photo Mosaic */
.photo-mosaic { background: var(--cream); padding: 5rem 0; }
.mosaic-header { text-align: center; margin-bottom: 3rem; }
.mosaic-grid { display: grid; grid-template-columns: 1.2fr 0.8fr; grid-template-rows: 1fr 1fr; gap: 1.5rem; max-width: 1000px; margin: 0 auto; }
.mosaic-item { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow-lg); position: relative; }
.mosaic-item img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.mosaic-item:hover img { transform: scale(1.05); }
.mosaic-large { grid-row: span 2; height: 500px; }
.mosaic-tall { height: 240px; }
.mosaic-wide { height: 240px; }

/* Timeline */
.timeline-section { background: var(--cream); }
.timeline { display: flex; flex-direction: column; gap: 5rem; max-width: 800px; margin: 0 auto; padding-top: 2rem; }
.timeline-item { display: flex; gap: 2rem; align-items: flex-start; background: var(--white); padding: 2.5rem 5rem 2.5rem 2.5rem; border-radius: 16px; box-shadow: var(--shadow); transition: var(--transition); position: relative; overflow: visible; }
.timeline-item:hover { transform: translateY(-5px); box-shadow: var(--shadow-lg); }
.timeline-marker { flex-shrink: 0; width: 60px; height: 60px; background: var(--emerald); border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.timeline-number { font-family: var(--font-heading); font-size: 1.5rem; color: var(--gold); font-weight: 600; }
.timeline-content { flex: 1; }
.timeline-content h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--emerald); margin-bottom: 0.5rem; }
.timeline-tag { display: inline-block; font-size: 0.75rem; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--gold); background: rgba(212, 175, 55, 0.1); padding: 0.25rem 0.75rem; border-radius: 20px; margin-bottom: 0.75rem; }
.timeline-date { font-weight: 600; color: var(--charcoal); margin-bottom: 0.25rem; }
.timeline-time { color: var(--gray); font-size: 0.9rem; margin-bottom: 0.25rem; }
.timeline-venue { color: var(--gray); font-size: 0.95rem; margin-bottom: 0.5rem; }
.timeline-note { font-style: italic; color: var(--emerald); font-size: 0.9rem; }
.timeline-photo { position: absolute; top: 50%; right: -60px; width: 120px; height: 120px; border-radius: 50%; overflow: hidden; border: 5px solid var(--white); box-shadow: 0 8px 30px rgba(0,0,0,0.15); z-index: 10; transform: translateY(-50%); transition: var(--transition); }
.timeline-item:hover .timeline-photo { transform: translateY(-50%) scale(1.08); box-shadow: 0 12px 40px rgba(0,0,0,0.2); }
.timeline-photo img { width: 100%; height: 100%; object-fit: cover; }

/* Countdown */
.countdown-section { background: var(--emerald); padding: 5rem 0; }
.countdown-box { text-align: center; }
.countdown-label { font-family: var(--font-script); font-size: clamp(1.5rem, 4vw, 2.5rem); color: var(--gold); margin-bottom: 2rem; }
.countdown { display: flex; justify-content: center; align-items: center; gap: 1rem; flex-wrap: wrap; }
.countdown-item { display: flex; flex-direction: column; align-items: center; min-width: 80px; }
.countdown-number { font-family: var(--font-heading); font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 700; color: var(--white); line-height: 1; }
.countdown-unit { font-size: 0.8rem; letter-spacing: 2px; text-transform: uppercase; color: rgba(var(--white-rgb), 0.7); margin-top: 0.5rem; }
.countdown-separator { font-family: var(--font-heading); font-size: 2rem; color: var(--gold); align-self: flex-start; padding-top: 0.5rem; }

/* Gift */
.gift-section { background: var(--white); }
.gift-card { max-width: 600px; margin: 0 auto; text-align: center; padding: 3rem; background: var(--ivory); border-radius: 20px; border: 1px solid rgba(var(--emerald-rgb), 0.1); }
.gift-icon { font-size: 3rem; display: block; margin-bottom: 1.5rem; }
.gift-card h2 { font-family: var(--font-heading); font-size: 2rem; color: var(--emerald); margin-bottom: 1rem; }
.gift-card p { color: var(--gray); line-height: 1.8; margin-bottom: 1.5rem; }
.gift-thanks { font-style: italic; color: var(--emerald) !important; }

/* Wishes & Forms */
.wishes-section { background: linear-gradient(135deg, var(--cream) 0%, var(--ivory) 100%); }
.wishes-content { max-width: 640px; margin: 0 auto; text-align: center; }
.wishes-text h2 { font-family: var(--font-heading); font-size: 2.5rem; color: var(--emerald); margin-bottom: 1rem; }
.wishes-text p { color: var(--gray); font-size: 1.1rem; line-height: 1.8; margin-bottom: 2rem; }

.wedding-form { max-width: 600px; margin: 2rem auto 0; text-align: left; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.form-group { margin-bottom: 1rem; }
.wedding-form input, .wedding-form select, .wedding-form textarea {
    width: 100%; padding: 1rem 1.25rem; border: 1px solid var(--light-gray); border-radius: 12px;
    font-family: var(--font-body); font-size: 1rem; background: var(--white); color: var(--charcoal);
    transition: var(--transition); -webkit-appearance: none; appearance: none;
}
.wedding-form input:focus, .wedding-form select:focus, .wedding-form textarea:focus {
    outline: none; border-color: var(--emerald); box-shadow: 0 0 0 3px rgba(var(--emerald-rgb), 0.1);
}
.wedding-form textarea { resize: vertical; min-height: 120px; }
.form-status { text-align: center; margin-top: 1rem; font-size: 0.95rem; min-height: 1.5rem; font-weight: 500; }
.form-status.success { color: var(--emerald); }
.form-status.error { color: #c0392b; }

/* RSVP */
.rsvp-section { background: var(--white); padding-bottom: 6rem; }

/* Footer Navigation */
.footer-nav {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(var(--white-rgb), 0.1);
}
.footer-nav-links {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.25rem;
}
.footer-nav-links a {
    color: rgba(var(--white-rgb), 0.7);
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.5px;
    padding: 0.75rem 0.6rem;
    min-height: 44px;
    display: inline-flex;
    align-items: center;
    transition: var(--transition);
    border-radius: 6px;
}
.footer-nav-links a:hover {
    color: var(--gold);
    background: rgba(var(--white-rgb), 0.05);
}
.footer-nav-separator {
    color: rgba(var(--white-rgb), 0.25);
    font-size: 0.7rem;
    user-select: none;
    padding: 0 0.25rem;
}
@media (max-width: 480px) {
    .footer-nav-links a {
        font-size: 0.8rem;
        padding: 0.6rem 0.5rem;
    }
    .footer-nav-separator {
        display: none;
    }
}

/* Footer (with bottom nav) */
.footer { background: var(--charcoal); color: var(--white); padding: 4rem 0 2rem; text-align: center; }
.footer-names { font-family: var(--font-script); font-size: 3rem; color: var(--gold); margin-bottom: 0.5rem; }
.footer-names span { color: rgba(255,255,255,0.5); }
.footer-date { font-size: 1rem; letter-spacing: 2px; margin-bottom: 0.5rem; opacity: 0.8; }
.footer-hashtag { font-size: 0.9rem; letter-spacing: 3px; color: var(--gold); margin-bottom: 2rem; }
.footer-credit { font-size: 0.8rem; opacity: 0.5; padding-top: 2rem; border-top: 1px solid rgba(var(--white-rgb), 0.1); }

/* Quote Band — Updated to R2 URL */
.quote-band { position: relative; height: 50vh; min-height: 400px; display: flex; align-items: center; justify-content: center; text-align: center; background: url('https://pub-79db3a0b2fd447e19ad1194613a7b73e.r2.dev/display/home9-1200w.webp') center/cover no-repeat fixed; overflow: hidden; }
.quote-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(135deg, rgba(var(--emerald-rgb), 0.75) 0%, rgba(var(--emerald-dark-rgb), 0.85) 100%); }
.quote-content { position: relative; z-index: 2; color: var(--white); padding: 0 1.5rem; max-width: 700px; }
.quote-text { font-family: var(--font-script); font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.3; margin-bottom: 1.5rem; text-shadow: 0 2px 10px rgba(0,0,0,0.3); }
.quote-source { font-family: var(--font-body); font-size: 0.9rem; letter-spacing: 3px; text-transform: uppercase; opacity: 0.8; color: var(--gold); }

/* Nav Overlay */
.nav-overlay { position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.5); z-index: 999; opacity: 0; visibility: hidden; transition: var(--transition); }
.nav-overlay.active { opacity: 1; visibility: visible; }

/* Gift Modal */
.modal { position: fixed; top: 0; left: 0; width: 100%; height: 100%; z-index: 2000; display: flex; align-items: center; justify-content: center; opacity: 0; visibility: hidden; transition: var(--transition); }
.modal.active { opacity: 1; visibility: visible; }
.modal-backdrop { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); backdrop-filter: blur(5px); }
.modal-content { position: relative; background: var(--white); border-radius: 24px; max-width: 480px; width: 90%; max-height: 85vh; overflow-y: auto; box-shadow: var(--shadow-lg); transform: translateY(30px) scale(0.95); transition: transform 0.4s ease; z-index: 1; }
.modal.active .modal-content { transform: translateY(0) scale(1); }
.modal-close { position: absolute; top: 1rem; right: 1rem; width: 44px; height: 44px; border-radius: 50%; border: none; background: var(--cream); color: var(--charcoal); font-size: 1.5rem; cursor: pointer; display: flex; align-items: center; justify-content: center; transition: var(--transition); z-index: 2; touch-action: manipulation; }
.modal-close:hover { background: var(--emerald); color: var(--white); }
.modal-header { text-align: center; padding: 2.5rem 2rem 1.5rem; border-bottom: 1px solid var(--light-gray); }
.modal-icon { font-size: 3rem; display: block; margin-bottom: 1rem; }
.modal-header h3 { font-family: var(--font-heading); font-size: 1.5rem; color: var(--emerald); margin-bottom: 0.5rem; }
.modal-header p { color: var(--gray); font-size: 0.95rem; }
.modal-body { padding: 2rem; }
.bank-detail { display: flex; justify-content: space-between; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--light-gray); gap: 1rem; }
.bank-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; color: var(--gray); font-weight: 500; }
.bank-value { font-weight: 600; color: var(--charcoal); font-size: 0.95rem; text-align: right; }
.copy-text { font-family: 'Courier New', monospace; color: var(--emerald); font-size: 1.1rem; }
.copy-btn { padding: 0.4rem 1rem; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; border: 2px solid var(--emerald); background: transparent; color: var(--emerald); border-radius: 20px; cursor: pointer; transition: var(--transition); white-space: nowrap; touch-action: manipulation; min-height: 36px; }
.copy-btn:hover { background: var(--emerald); color: var(--white); }
.modal-note { text-align: center; margin-top: 1.5rem; padding: 1rem; background: var(--ivory); border-radius: 12px; font-size: 0.85rem; color: var(--gray); line-height: 1.6; }

/* Gallery Masonry (Auto-arrange) */
.gallery-hero { position: relative; height: 60vh; min-height: 400px; display: flex; align-items: center; justify-content: center; text-align: center; background: linear-gradient(135deg, var(--emerald-dark) 0%, var(--emerald) 100%); overflow: hidden; }
.gallery-hero::before { content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: url('https://pub-79db3a0b2fd447e19ad1194613a7b73e.r2.dev/display/gallery1-1200w.webp') center/cover no-repeat; opacity: 0.25; }
.gallery-hero-overlay { position: absolute; top: 0; left: 0; width: 100%; height: 100%; background: linear-gradient(to bottom, rgba(var(--emerald-rgb), 0.3) 0%, rgba(45,90,61,0.8) 100%); }
.gallery-hero-content { position: relative; z-index: 2; color: var(--white); padding: 0 1.5rem; }
.gallery-hero-content h1 { font-family: var(--font-heading); font-size: clamp(2.5rem, 6vw, 4rem); font-weight: 400; margin-bottom: 1rem; }
.gallery-hero-content p { font-size: 1.1rem; opacity: 0.9; max-width: 500px; margin: 0 auto 2rem; line-height: 1.7; }

.gallery-masonry { column-count: 3; column-gap: 1rem; padding: 4rem 0; }
.gallery-item { break-inside: avoid; margin-bottom: 1rem; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); transition: var(--transition); position: relative; }
.gallery-item img { width: 100%; display: block; }
.gallery-item:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }

.download-section { background: var(--cream); padding: 5rem 0; text-align: center; }
.download-card { max-width: 600px; margin: 0 auto; padding: 3rem; background: var(--white); border-radius: 20px; box-shadow: var(--shadow); border: 1px solid rgba(var(--emerald-rgb), 0.1); }
.download-icon { font-size: 3rem; margin-bottom: 1.5rem; }
.download-card h2 { font-family: var(--font-heading); font-size: 2rem; color: var(--emerald); margin-bottom: 1rem; }
.download-card p { color: var(--gray); line-height: 1.8; margin-bottom: 2rem; }
.download-note { font-size: 0.85rem; color: var(--gray); margin-top: 1.5rem; font-style: italic; }

/* Animations */
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes scrollBounce { 0%, 100% { transform: translateY(0); opacity: 1; } 50% { transform: translateY(10px); opacity: 0.5; } }

/* ===== ADMIN PREVIEW MODE ===== */
.admin-preview [data-slot-id] {
    position: relative;
    outline: 2px dashed #D4AF37;
    outline-offset: 4px;
    cursor: pointer;
}
.admin-preview [data-slot-id].preview-empty {
    background: #e8e8e8;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.admin-preview [data-slot-id].preview-empty img {
    opacity: 0.15;
}
.preview-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(45, 90, 61, 0.92);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}
.admin-preview [data-slot-id].highlight {
    outline: 3px solid #D4AF37 !important;
    outline-offset: 6px !important;
    box-shadow: 0 0 25px rgba(212, 175, 55, 0.5);
    z-index: 5;
}
.admin-preview .navbar,
.admin-preview .hero-scroll,
.admin-preview .footer {
    opacity: 0.6;
    pointer-events: none;
}
.admin-preview .hero-content,
.admin-preview .section {
    pointer-events: none;
}
.admin-preview [data-slot-id] {
    pointer-events: auto !important;
}

/* Timeline Primary Event */
.timeline-primary-badge {
    background: rgba(var(--gold-rgb), 0.15);
    color: var(--gold);
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
    margin-left: 0.5rem;
    border: 1px solid rgba(var(--gold-rgb), 0.3);
}

/* Story Carousel */
.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px;
    height: 450px;
    background: var(--cream);
}
.carousel-container img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    border-radius: 20px;
}
.carousel-container img.active {
    opacity: 1;
    position: relative;
}

/* Paragraph Photos */
.para-photo {
    margin: 1.5rem 0;
    text-align: center;
}
.para-photo img {
    width: 100%;
    max-height: 400px;
    object-fit: contain !important;
    border-radius: 16px;
    box-shadow: var(--shadow-lg);
    display: block;
    background: var(--cream);
}
.para-photo figcaption {
    font-size: 0.85rem;
    color: var(--gray);
    margin-top: 0.5rem;
    font-style: italic;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    opacity: 0;
    transition: opacity 1s ease-in-out;
    border-radius: 20px;
}
.carousel-slide.active {
    opacity: 1;
    position: relative;
}

/* ===== PHOTO POOL (Admin Panel) ===== */
.photo-pool { margin: 1.5rem 0; padding: 1rem; background: var(--cream); border-radius: 12px; border: 1px solid var(--light-gray); }
.photo-pool h5 { margin: 0 0 0.75rem; font-size: 0.95rem; color: var(--emerald); font-weight: 600; }
.pool-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(85px, 1fr)); gap: 0.5rem; margin-bottom: 0.75rem; }
.pool-thumb { position: relative; border-radius: 8px; overflow: hidden; aspect-ratio: 1; background: var(--white); border: 1px solid var(--light-gray); }
.pool-thumb img { width: 100%; height: 100%; object-fit: contain; display: block; }
.pool-thumb span { position: absolute; bottom: 0; left: 0; right: 0; background: rgba(0,0,0,0.65); color: #fff; font-size: 0.65rem; padding: 0.25rem 0.4rem; text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* Responsive */
@media (max-width: 768px) {
    .nav-toggle { display: flex; }
    .nav-menu { position: fixed; top: 0; left: -100%; width: 100%; height: 100vh; background: var(--ivory); flex-direction: column; align-items: center; justify-content: center; gap: 2.5rem; transition: var(--transition); padding-top: 70px; }
    .nav-menu.active { left: 0; }
    .nav-link { font-size: 1.3rem; padding: 0.75rem 0; }
    .hero { min-height: 600px; }
    .story-content { grid-template-columns: 1fr; gap: 2rem; }
    .story-image img { height: 350px; }
    .mosaic-grid { grid-template-columns: 1fr; grid-template-rows: auto; }
    .mosaic-large, .mosaic-tall, .mosaic-wide { grid-row: span 1; height: 300px; }
    .timeline { gap: 5rem; padding-top: 2rem; }
    .timeline-item { flex-direction: column; text-align: center; padding: 4rem 1.5rem 2rem; margin-top: 0; }
    .timeline-marker { margin: 0 auto 1rem; }
    .timeline-photo { width: 110px; height: 110px; top: -55px; right: 50%; transform: translateX(50%); border-width: 5px; box-shadow: 0 6px 25px rgba(0,0,0,0.15); }
    .timeline-item:hover .timeline-photo { transform: translateX(50%) scale(1.05); }
    .countdown { gap: 0.5rem; }
    .countdown-item { min-width: 60px; }
    .countdown-separator { display: none; }
    .quote-band { height: 40vh; min-height: 300px; background-attachment: scroll; }
    .section { padding: 4rem 0; }
    .btn-outline { margin-right: 0; display: block; text-align: center; }
    .gallery-masonry { column-count: 2; column-gap: 0.75rem; padding: 2rem 0; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
}

@media (max-width: 480px) {
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1.25rem; }
    .section-title { font-size: 1.75rem; }
    .gift-card, .rsvp-card, .download-card { padding: 1.5rem; }
    .modal-content { width: 95%; border-radius: 20px; }
    .modal-header { padding: 2rem 1.5rem 1rem; }
    .modal-body { padding: 1.5rem; }
    .bank-detail { flex-direction: column; align-items: flex-start; gap: 0.25rem; }
    .bank-value { text-align: left; }
    .gallery-masonry { column-count: 2; column-gap: 0.75rem; }
    .wedding-form { margin-top: 1.5rem; }
    .wishes-text h2 { font-size: 1.75rem; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* ===== HOMEPAGE MOMENTS CAROUSEL ===== */
.moments-section {
    background: var(--cream);
    padding: 5rem 0;
}
.moments-section .section-header {
    margin-bottom: 3rem;
}
.moments-carousel {
    position: relative;
    max-width: 900px;
    margin: 0 auto;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 16 / 10;
    background: var(--cream);
}
.moments-carousel img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transition: opacity var(--transition-duration, 2s) ease-in-out;
    border-radius: 20px;
}
.moments-carousel img.active {
    opacity: 1;
    position: relative;
}

/* ===== STORY: STATIC PHOTO FRAME ===== */
.chapter-photo-frame {
    border-radius: 20px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--cream);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 300px;
}
.chapter-photo-frame img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain !important;
    display: block;
    border-radius: 20px;
    transition: transform 0.6s ease;
}
.chapter-photo-frame:hover img {
    transform: scale(1.02);
}

/* Single story mode: photos inline with text */
.single-story .chapter-photo-frame {
    margin: 2rem 0;
    max-width: 700px;
    margin-left: auto;
    margin-right: auto;
}
.single-story .chapter-text-content {
    max-width: 700px;
    margin: 0 auto;
}
.single-story .chapter-text-content p {
    font-size: 1.1rem;
    line-height: 1.9;
    color: var(--gray);
    margin-bottom: 1.5rem;
}

/* Chaptered mode: photo in grid alongside text */
.chapter-grid .chapter-photo-frame {
    height: 100%;
    min-height: 400px;
}
.chapter-grid .chapter-photo-frame img {
    height: 100%;
    max-height: none;
    object-fit: contain !important;
}

/* Preview mode for story photos */
.admin-preview .chapter-photo-frame.preview-empty {
    background: #e8e8e8;
    position: relative;
}
.admin-preview .chapter-photo-frame.preview-empty .preview-label {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(45, 90, 61, 0.92);
    color: #fff;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    z-index: 10;
    pointer-events: none;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

/* Responsive */
@media (max-width: 768px) {
    .moments-carousel {
        aspect-ratio: 4 / 3;
        margin: 0 1rem;
    }
    .chapter-photo-frame {
        min-height: 250px;
    }
    .chapter-grid .chapter-photo-frame {
        min-height: 300px;
        order: -1;
    }
    .single-story .chapter-photo-frame {
        margin: 1.5rem 0;
    }
}

@media (max-width: 480px) {
    .moments-carousel {
        aspect-ratio: 1 / 1;
    }
    .chapter-photo-frame {
        min-height: 200px;
        border-radius: 12px;
    }
    .chapter-photo-frame img {
        border-radius: 12px;
    }
}

/* ===== ADMIN PREVIEW: TEXT SLOTS ===== */
.admin-preview [data-text-slot] {
    position: relative;
}

.admin-preview [data-text-slot]::before {
    content: attr(data-text-slot);
    position: absolute;
    top: -20px;
    left: 0;
    background: rgba(45, 90, 61, 0.85);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    letter-spacing: 0.5px;
}

.admin-preview [data-text-slot]:hover::before {
    opacity: 1;
}

/* Text slot highlight (hovered from admin panel) */
.admin-preview [data-text-slot].highlight {
    outline: 3px solid #D4AF37 !important;
    outline-offset: 4px !important;
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.4);
    z-index: 5;
    position: relative;
}

/* Draft state — unsaved changes */
.admin-preview [data-text-slot].draft {
    outline: 2px dashed #e8c94d !important;
    outline-offset: 3px !important;
    background: rgba(232, 201, 77, 0.08);
}

.admin-preview [data-text-slot].draft::after {
    content: 'DRAFT';
    position: absolute;
    top: -20px;
    right: 0;
    background: #e8c94d;
    color: #333;
    padding: 1px 6px;
    border-radius: 4px;
    font-size: 0.6rem;
    font-weight: 700;
    letter-spacing: 1px;
    z-index: 100;
    pointer-events: none;
}

/* Inline editing mode */
.admin-preview [data-text-slot][contenteditable="true"] {
    cursor: text;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    padding: 2px 4px;
    margin: -2px -4px;
}

.admin-preview [data-text-slot][contenteditable="true"]:focus {
    outline: 2px solid var(--gold);
    outline-offset: 2px;
    background: rgba(255, 255, 255, 0.1);
}

/* Hide slot labels on small elements to avoid clutter */
.admin-preview [data-text-slot].footer-names::before,
.admin-preview [data-text-slot].footer-date::before,
.admin-preview [data-text-slot].footer-hashtag::before,
.admin-preview [data-text-slot].footer-credit::before {
    display: none;
}

/* Story hero text slots */
.admin-preview .story-hero-title[data-text-slot]::before,
.admin-preview .story-hero-subtitle[data-text-slot]::before {
    top: -25px;
    left: 50%;
    transform: translateX(-50%);
}

/* Make sure text slots in hero are clickable in preview */
.admin-preview .hero-content [data-text-slot],
.admin-preview .story-hero-content [data-text-slot] {
    pointer-events: auto !important;
}

/* ===== LOGO STYLES (Task C) ===== */
.nav-logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-text {
    font-family: var(--font-script);
    font-size: 2rem;
    color: var(--emerald);
    letter-spacing: 1px;
    line-height: 1;
}

.logo-image {
    display: none;
    max-height: 50px;
    width: auto;
    object-fit: contain;
}

/* When image logo is active */
.nav-logo.image-mode .logo-text {
    display: none;
}

.nav-logo.image-mode .logo-image {
    display: block;
}

/* Admin preview: logo text slot label */
.admin-preview .nav-logo[data-text-slot]::before {
    content: attr(data-text-slot);
    position: absolute;
    top: -20px;
    left: 0;
    background: rgba(45, 90, 61, 0.85);
    color: #fff;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.65rem;
    font-weight: 600;
    font-family: 'Courier New', monospace;
    white-space: nowrap;
    z-index: 100;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.2s ease;
    letter-spacing: 0.5px;
}

.admin-preview .nav-logo[data-text-slot]:hover::before {
    opacity: 1;
}

.admin-preview .nav-logo {
    pointer-events: auto !important;
}

/* ===== DARK MODE ===== */
:root[data-theme="dark"] {
    --emerald: #4a8c6a;
    --emerald-dark: #1e3d28;
    --emerald-light: #5da87e;
    --emerald-rgb: 74, 140, 106;
    --emerald-dark-rgb: 30, 60, 40;
    --gold: #D4AF37;
    --gold-light: #e8c94d;
    --gold-rgb: 212, 175, 55;
    --ivory: #1a1a1a;
    --ivory-rgb: 26, 26, 26;
    --cream: #2a2a2a;
    --charcoal: #e0e0e0;
    --charcoal-rgb: 224, 224, 224;
    --gray: #b0b0b0;
    --light-gray: #444;
    --white: #2a2a2a;
    --white-rgb: 42, 42, 42;
    --shadow: 0 4px 20px rgba(0,0,0,0.25);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.35);
}

/* Dark mode specific overrides */
:root[data-theme="dark"] .navbar {
    border-bottom-color: rgba(var(--emerald-rgb), 0.2);
}

:root[data-theme="dark"] .wedding-form input,
:root[data-theme="dark"] .wedding-form select,
:root[data-theme="dark"] .wedding-form textarea {
    background: #333;
    color: var(--charcoal);
    border-color: #555;
}

:root[data-theme="dark"] .modal-content {
    background: #2a2a2a;
}

:root[data-theme="dark"] .modal-header,
:root[data-theme="dark"] .bank-detail {
    border-color: #444;
}

:root[data-theme="dark"] .copy-btn {
    border-color: var(--emerald);
    color: var(--emerald);
}

:root[data-theme="dark"] .gift-card,
:root[data-theme="dark"] .download-card {
    background: #2a2a2a;
    border-color: rgba(var(--emerald-rgb), 0.2);
}

:root[data-theme="dark"] .modal-note {
    background: #333;
}


/* Dark mode scrollbar */
:root[data-theme="dark"] ::-webkit-scrollbar {
    width: 8px;
}
:root[data-theme="dark"] ::-webkit-scrollbar-track {
    background: #1a1a1a;
}
:root[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: #444;
    border-radius: 4px;
}
:root[data-theme="dark"] {
    scrollbar-width: thin;
    scrollbar-color: #444 #1a1a1a;
}

/* ===== DEMO MODE STYLES (Priority 6) ===== */

/* Demo-populated text elements */
.demo {
  opacity: 0.85;
  transition: opacity 0.3s ease;
}

.demo:hover {
  opacity: 1;
}

/* Dashed gold underline on demo text */
[data-text-slot].demo {
  border-bottom: 2px dashed rgba(212, 175, 55, 0.4);
  padding-bottom: 2px;
}

/* DEMO corner label (only in admin preview) */
.admin-preview [data-text-slot].demo::after {
  content: 'DEMO';
  position: absolute;
  top: -18px;
  right: 0;
  background: rgba(212, 175, 55, 0.9);
  color: #333;
  padding: 1px 5px;
  border-radius: 4px;
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 1px;
  z-index: 100;
  pointer-events: none;
}

/* Demo images get a subtle gold border */
img.demo {
  border: 2px solid rgba(212, 175, 55, 0.3);
  border-radius: inherit;
}

/* Demo banner (shown in admin panel when demo mode active) */
.demo-banner {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  background: rgba(212, 175, 55, 0.1);
  border: 1px solid var(--gold);
  border-radius: var(--radius-sm);
  color: var(--primary);
  font-size: 0.9rem;
  font-weight: 500;
  margin-bottom: 1rem;
}

/* Demo toggle switch styling */
.demo-toggle {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.demo-toggle input[type="checkbox"] {
  width: 44px;
  height: 24px;
  appearance: none;
  background: var(--light-gray);
  border-radius: 12px;
  position: relative;
  cursor: pointer;
  transition: background 0.3s ease;
  outline: none;
}

.demo-toggle input[type="checkbox"]::after {
  content: '';
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: var(--white);
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.demo-toggle input[type="checkbox"]:checked {
  background: var(--primary);
}

.demo-toggle input[type="checkbox"]:checked::after {
  transform: translateX(20px);
}

/* Demo inventory grid */
.demo-inventory-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.demo-inventory-item {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  aspect-ratio: 1;
  background: var(--bg);
  border: 2px solid var(--border);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  font-size: 0.7rem;
  color: var(--text-muted);
  text-align: center;
  padding: 0.5rem;
}

.demo-inventory-item.missing {
  border-style: dashed;
  opacity: 0.6;
}

.demo-inventory-item.present {
  border-color: var(--primary);
}

.demo-inventory-item.present img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.demo-inventory-item .demo-slot-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(0,0,0,0.6);
  color: #fff;
  padding: 2px 4px;
  font-size: 0.6rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* ===== WHATSAPP FOOTER LINK ===== */
.footer-credit-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    padding-top: 2rem;
    border-top: 1px solid rgba(var(--white-rgb), 0.1);
}

.footer-credit-wrap .footer-credit {
    padding-top: 0;
    border-top: none;
    margin: 0;
}

.wa-footer-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    color: #25D366;
    transition: transform 0.2s ease, color 0.2s ease;
    flex-shrink: 0;
}

.wa-footer-link:hover {
    transform: scale(1.2);
    color: #128C7E;
}

.wa-footer-link .wa-icon {
    width: 100%;
    height: 100%;
    fill: currentColor;
    display: block;
}

/* Dark mode */
:root[data-theme="dark"] .wa-footer-link {
    color: #25D366;
}

:root[data-theme="dark"] .wa-footer-link:hover {
    color: #34B7F1;
}

@media (max-width: 480px) {
    .footer-credit-wrap {
        gap: 0.4rem;
    }
    .wa-footer-link {
        width: 18px;
        height: 18px;
    }
}
