/* ==========================================================================
   CSS Design System for Chinese Scroll Interactive Invitation (Horizontal Scroll)
   ========================================================================== */

:root {
    --primary-red: #9e1b1b;
    --dark-red: #660505;
    --gold: #d4af37;
    --gold-light: #fff3a8;
    --gold-dark: #b89025;
    --parchment: #f9f5eb;
    --text-dark: #2a2a2a;
    --wood-dark: #2c1605;
    --wood-light: #e29c52;
}

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

body {
    font-family: 'Noto Serif SC', 'Playfair Display', Georgia, serif;
    overflow-x: hidden;
    background-color: var(--dark-red);
    color: var(--text-dark);
}

/* Background container with generated crimson cloud background */
.scroll-page-bg {
    position: relative;
    width: 100vw;
    height: 100vh;
    min-height: 650px;
    background-image: linear-gradient(rgba(102, 5, 5, 0.4), rgba(51, 2, 2, 0.6)), url('images/chinese_red_bg.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
}

/* Floating ambient clouds for traditional atmosphere */
.decorative-cloud {
    position: absolute;
    width: 300px;
    height: 150px;
    background: radial-gradient(ellipse at center, rgba(255,243,168,0.08) 0%, rgba(212,175,55,0.02) 50%, rgba(0,0,0,0) 70%);
    pointer-events: none;
    z-index: 1;
    filter: blur(10px);
}

.cloud-left {
    top: 10%;
    left: -50px;
    animation: floatLeft 25s ease-in-out infinite alternate;
}

.cloud-right {
    bottom: 15%;
    right: -50px;
    animation: floatRight 30s ease-in-out infinite alternate;
}

@keyframes floatLeft {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(60px, 30px) scale(1.2); }
}

@keyframes floatRight {
    0% { transform: translate(0, 0) scale(1.1); }
    100% { transform: translate(-80px, -40px) scale(0.9); }
}

/* Scroll Outer Container */
.scroll-container {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 100%;
    padding: 10px 20px 30px 20px; /* Reduced top padding */
    gap: 15px; /* Reduced gap between navbar and scroll */
}

/* Scroll Wrapper - flex column to hold top/bottom rollers and expanding paper */
.scroll-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 94vw; /* Expanded to 94% of viewport width */
    max-width: 1800px; /* Generous cap on large desktop displays */
    filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.6));
    user-select: none;
}

/* ==========================================================================
   Rollers (Top & Bottom)
   ========================================================================== */
.scroll-roller {
    position: relative;
    width: 100%;
    height: 54px; /* Widened thickness */
    display: flex;
    flex-direction: row;
    align-items: center;
    z-index: 12;
    flex-shrink: 0;
    transition: transform 1.6s cubic-bezier(0.25, 1, 0.5, 1);
}

/* ==========================================================================
   Advanced Metallic Spool Ends (Detailed 3D Gold Caps)
   ========================================================================== */
.roller-cap {
    position: relative;
    width: 60px;
    height: 62px;
    display: flex;
    align-items: center;
    z-index: 2;
    flex-shrink: 0;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

.cap-left {
    flex-direction: row;
}

.cap-right {
    flex-direction: row-reverse;
}

/* Metallic gold gradient applied to all spool turnings */
.metallic-gold {
    background: linear-gradient(to bottom, 
        #5e481c 0%, 
        #9c7b33 18%, 
        #d1b064 40%, 
        #fff5d6 50%, 
        #d1b064 60%, 
        #9c7b33 82%, 
        #5e481c 100%
    );
    box-shadow: 
        inset 0 1px 1px rgba(255, 255, 255, 0.35), 
        inset 0 -1px 1px rgba(0, 0, 0, 0.4);
}

/* Outer Dome Tip */
.cap-tip {
    width: 8px;
    height: 24px;
    flex-shrink: 0;
    z-index: 5;
}
.cap-left .cap-tip {
    border-radius: 6px 0 0 6px;
    box-shadow: inset 1px 0 1px rgba(255, 255, 255, 0.35);
}
.cap-right .cap-tip {
    border-radius: 0 6px 6px 0;
    box-shadow: inset -1px 0 1px rgba(255, 255, 255, 0.35);
}

/* Large flared disc */
.cap-disc-large {
    width: 14px;
    height: 60px;
    border-radius: 6px;
    flex-shrink: 0;
    z-index: 4;
}

/* Narrow neck */
.cap-neck {
    width: 10px;
    height: 26px;
    flex-shrink: 0;
    z-index: 3;
}

/* Small flared disc */
.cap-disc-small {
    width: 10px;
    height: 46px;
    border-radius: 4px;
    flex-shrink: 0;
    z-index: 2;
}

/* Ring turnings wrapped around the wood bar */
.cap-rings {
    display: flex;
    flex-shrink: 0;
    z-index: 1;
}
.cap-left .cap-rings {
    flex-direction: row;
    margin-left: 1px;
}
.cap-right .cap-rings {
    flex-direction: row-reverse;
    margin-right: 1px;
}

.ring {
    width: 4px;
    height: 38px;
    margin: 0 1px;
    border-radius: 2px;
    flex-shrink: 0;
}

/* Cylinder bar (Wood Gradient running horizontally, lighting top-to-bottom) */
.roller-bar {
    flex-grow: 1;
    height: 46px; /* Widen cylinder to match thickness */
    background: linear-gradient(to bottom, 
        #1c0c02 0%, 
        #3d2008 12%, 
        #6d3f18 30%, 
        #a6672c 45%, 
        #d19554 50%, 
        #a6672c 55%, 
        #6d3f18 70%, 
        #3d2008 88%, 
        #1c0c02 100%
    );
    box-shadow: inset 0 5px 10px rgba(0,0,0,0.5), inset 0 -5px 10px rgba(0,0,0,0.5);
    border-top: 1px solid rgba(255,255,255,0.05);
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Add subtle offsets in open state to create realistic depth */
.scroll-wrapper.open .roller-top {
    transform: rotateX(15deg);
}

.scroll-wrapper.open .roller-bottom {
    transform: rotateX(-15deg);
}

/* ==========================================================================
   Scroll Body (Parchment Paper - opens vertically)
   ========================================================================== */
.scroll-body-outer {
    width: calc(100% - 40px); /* Extends closer to spools to look longer horizontally */
    height: 0px;    /* Closed state */
    overflow: hidden;
    z-index: 10;
    transition: height 1.6s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: inset 0 0 25px rgba(0, 0, 0, 0.4);
    background-color: var(--parchment);
}

.scroll-body-inner {
    width: 100%;
    height: 520px; /* Open height */
    position: relative;
    background-image: 
        linear-gradient(rgba(249, 245, 235, 0.85), rgba(249, 245, 235, 0.85)), 
        url('../images/scroll_watermark.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 
        inset 0 10px 15px rgba(0, 0, 0, 0.15), 
        inset 0 -10px 15px rgba(0, 0, 0, 0.15);
}

/* Double Border Frames (Matching the reference image) */
.scroll-border-outer {
    width: calc(100% - 24px);
    height: calc(100% - 24px);
    border: 2px solid #7a5822;
    padding: 6px;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

.scroll-border-inner {
    width: 100%;
    height: 100%;
    border: 1px solid #7a5822;
    position: relative;
    box-sizing: border-box;
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Vector Corner Flourishes */
.corner-flourish {
    position: absolute;
    width: 50px;
    height: 50px;
    pointer-events: none;
    z-index: 5;
    opacity: 0.85;
}

.flourish-top-left {
    top: -2px;
    left: -2px;
}

.flourish-top-right {
    top: -2px;
    right: -2px;
    transform: rotate(90deg);
}

.flourish-bottom-right {
    bottom: -2px;
    right: -2px;
    transform: rotate(180deg);
}

.flourish-bottom-left {
    bottom: -2px;
    left: -2px;
    transform: rotate(270deg);
}

/* ==========================================================================
   Open State Class
   ========================================================================== */
.scroll-wrapper.open .scroll-body-outer {
    height: 520px; /* Expands to show content vertically */
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .scroll-wrapper {
        width: 94vw;
    }
    .scroll-roller {
        height: 40px;
    }
    .roller-cap {
        width: 45px;
        height: 46px;
    }
    .cap-disc-large {
        width: 10px;
        height: 44px;
    }
    .cap-disc-small {
        width: 7px;
        height: 34px;
    }
    .cap-neck {
        width: 7px;
        height: 20px;
    }
    .cap-tip {
        width: 6px;
        height: 18px;
    }
    .ring {
        width: 3px;
        height: 28px;
    }
    .roller-bar {
        height: 32px;
    }
    .scroll-body-outer {
        width: calc(100% - 30px);
    }
    .scroll-body-inner {
        height: 480px;
    }
    .scroll-wrapper.open .scroll-body-outer {
        height: 480px;
    }
}

/* ==========================================================================
   Scroll Content Layout & Decoration
   ========================================================================== */
.scroll-content {
    position: relative;
    width: 100%;
    height: 100%;
    padding: 35px 45px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start; /* Stacks sections sequentially for continuous scrolling */
    opacity: 0;
    transform: scale(0.95);
    transition: opacity 1s ease 0.6s, transform 1s ease 0.6s;
    overflow-y: auto;
}

/* Scroll content scrollbar removal for aesthetics */
.scroll-content::-webkit-scrollbar {
    display: none;
}

.scroll-wrapper.open .scroll-content {
    opacity: 1;
    transform: scale(1);
}

/* Golden Corner Brackets */
.corner-border {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--gold);
    pointer-events: none;
}

.border-top-left { top: 15px; left: 15px; border-right: none; border-bottom: none; }
.border-top-right { top: 15px; right: 15px; border-left: none; border-bottom: none; }
.border-bottom-left { bottom: 15px; left: 15px; border-right: none; border-top: none; }
.border-bottom-right { bottom: 15px; right: 15px; border-left: none; border-top: none; }

/* Close Button (top right inside scroll) */
.scroll-close-btn {
    position: absolute;
    top: 15px;
    right: 25px;
    width: 38px;
    height: 38px;
    background: var(--parchment);
    border: 1.5px solid #7a5822;
    border-radius: 50%;
    color: #7a5822;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 15;
    font-size: 24px;
    line-height: 1;
    padding-bottom: 3px; /* Center the times symbol vertically */
    opacity: 0.85;
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s, transform 0.3s, background 0.3s, color 0.3s, box-shadow 0.3s;
}

.scroll-close-btn:hover {
    background: #7a5822;
    color: var(--parchment);
    opacity: 1;
    transform: rotate(90deg) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* Typography styles */
.chinese-title {
    font-family: 'Cinzel Decorative', 'Playfair Display', Georgia, serif;
    font-size: 2.3rem; /* Adjusted for English Save the Date words */
    color: var(--primary-red);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    margin-bottom: 2px;
    letter-spacing: 3px;
    line-height: 1.2;
    text-transform: uppercase;
}

.sub-title {
    font-family: 'Cinzel Decorative', Georgia, serif;
    font-size: 0.8rem;
    color: var(--gold-dark);
    letter-spacing: 5px;
    margin-bottom: 10px;
    font-weight: bold;
}

/* Divider line with double happiness character */
.decorative-divider {
    display: flex;
    align-items: center;
    width: 60%;
    margin-bottom: 15px;
}

.divider-line {
    flex-grow: 1;
    height: 1px;
    background: linear-gradient(to right, rgba(212, 175, 55, 0), rgba(212, 175, 55, 0.8), rgba(212, 175, 55, 0));
}

.divider-emblem {
    color: var(--primary-red);
    font-size: 1.4rem;
    padding: 0 15px;
    font-weight: bold;
}

/* Text Content Area */
.invitation-text {
    width: 100%;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: space-around;
    flex-grow: 1;
}

.salutation {
    font-size: 1.1rem;
    font-weight: 900;
    color: var(--primary-red);
    margin-bottom: 8px;
    letter-spacing: 2px;
}

.intro {
    font-size: 0.95rem;
    color: #444;
    line-height: 1.8;
    margin-bottom: 15px;
    padding: 0 10px;
    font-weight: 300;
}

/* Couple Names Display (Silhouette Capsules & Middle Text) */
.couple-names-container {
    margin: 20px auto;
    width: 100%;
    max-width: 800px; /* Keep elements grouped nicely on large screens */
}

.capsule-container {
    position: relative;
    width: 150px;
    height: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-shrink: 0;
}

.capsule-frame {
    width: 140px;
    height: 210px;
    border: 1px solid rgba(122, 88, 34, 0.45);
    border-radius: 70px;
    background-color: #ffffff;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: center;
    align-items: center;
    overflow: hidden;
    z-index: 2;
}

.capsule-frame img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.silhouette-img {
    width: 85%;
    height: 85%;
    object-fit: contain;
    mix-blend-mode: multiply;
}

/* Floral Twigs overlapping the capsules */
.floral-twig {
    position: absolute;
    width: 80px;
    height: 120px;
    pointer-events: none;
    z-index: 3; /* Overlaps the capsule border */
}

/* Specific twig positions to match the design */
.twig-bottom-left {
    bottom: -8px;
    left: -12px;
    transform: rotate(-10deg);
}

.twig-top-right {
    top: -8px;
    right: -12px;
    transform: rotate(170deg) scaleX(-1);
}

.twig-top-left {
    top: -8px;
    left: -12px;
    transform: rotate(10deg) scaleX(-1);
}

.twig-bottom-right {
    bottom: -8px;
    right: -12px;
    transform: rotate(-170deg);
}

.couple-names-center {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-width: 160px;
}

.wedding-of {
    font-family: 'Playfair Display', 'Noto Serif SC', serif;
    font-size: 0.72rem;
    letter-spacing: 3px;
    color: #888;
    text-transform: uppercase;
    margin-bottom: 4px;
    font-weight: 600;
}

.groom-name,
.bride-name {
    font-family: 'Great Vibes', 'Playfair Display', Georgia, serif;
    font-size: 2.1rem;
    color: var(--primary-red);
    line-height: 1.1;
    margin: 1px 0;
    white-space: nowrap;
}

.ampersand {
    font-family: 'Great Vibes', 'Playfair Display', Georgia, serif;
    font-size: 2.6rem;
    color: var(--gold-dark);
    line-height: 0.8;
    margin: 2px 0;
}

.date-container {
    width: 100%;
    max-width: 150px;
    margin-top: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.date-line {
    width: 100%;
    height: 1px;
    background-color: rgba(122, 88, 34, 0.4);
}

.date-text {
    font-family: 'Playfair Display', 'Noto Serif SC', serif;
    font-size: 0.78rem;
    letter-spacing: 3px;
    color: var(--text-dark);
    font-weight: bold;
    padding: 3px 0;
    text-transform: uppercase;
    white-space: nowrap;
}

/* Event Details list */
.event-details {
    background-color: rgba(212, 175, 55, 0.06);
    border: 1px dashed rgba(212, 175, 55, 0.4);
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 15px;
    display: inline-block;
    align-self: center;
    max-width: 90%;
}

.event-details-title {
    font-family: 'Playfair Display', 'Noto Serif SC', serif;
    font-size: 1.1rem;
    font-weight: bold;
    color: var(--gold-dark);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.detail-item {
    font-size: 0.9rem;
    color: #333;
    line-height: 1.6;
    margin: 4px 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.detail-icon {
    font-size: 1rem;
}

.footer-msg {
    font-size: 1.05rem;
    font-weight: 900;
    color: var(--primary-red);
    letter-spacing: 4px;
    margin-top: 5px;
}

/* Mulan Ceremony Dress Code */
.mulan-dresscode-box {
    margin: 12px auto;
    padding: 10px 14px;
    background: rgba(212, 175, 55, 0.08);
    border: 1px dashed rgba(212, 175, 55, 0.5);
    border-radius: 8px;
    text-align: center;
    width: 100%;
}

.mulan-dresscode-title {
    font-family: 'Playfair Display', 'Noto Serif SC', serif;
    font-size: 0.75rem;
    color: var(--gold-dark);
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: bold;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}

.mulan-dresscode-title .mulan-emblem {
    color: var(--primary-red);
    font-size: 0.75rem;
}

.mulan-dresscode-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 8px;
}

@media (max-width: 480px) {
    .mulan-dresscode-grid {
        grid-template-columns: 1fr;
        gap: 6px;
    }
}

.mulan-dresscode-col {
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 6px;
    padding: 6px 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(102, 5, 5, 0.04);
}

.mulan-dresscode-label {
    font-family: 'Playfair Display', serif;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary-red);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 2px;
}

.mulan-dresscode-val {
    font-size: 0.78rem;
    color: var(--text-dark);
    line-height: 1.3;
}

.btn-mulan-map {
    display: inline-block;
    background: transparent;
    border: 1px solid var(--gold-dark);
    border-radius: 20px;
    padding: 4px 16px;
    font-size: 0.8rem;
    color: var(--gold-dark);
    text-decoration: none;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
    letter-spacing: 1px;
    transition: all 0.25s ease;
}

.btn-mulan-map:hover {
    background: var(--gold-dark);
    color: #fff;
    text-decoration: none;
}

/* Responsive sizes for text */
@media (max-width: 768px) {
    .chinese-title { font-size: 2.3rem; }
    .intro { font-size: 0.85rem; line-height: 1.6; }
    .event-details { padding: 8px 10px; }
    .detail-item { font-size: 0.8rem; }
    .salutation { font-size: 0.95rem; }
    .scroll-content { padding: 25px 20px; }

    /* Mobile responsive overrides for couple name capsules */
    .couple-names-container {
        gap: 15px;
        margin: 12px 0;
    }
    
    .capsule-container {
        width: 110px;
        height: 160px;
    }
    
    .capsule-frame {
        width: 100px;
        height: 150px;
        border-radius: 50px;
    }
    
    .silhouette-img {
        width: 85%;
        height: 85%;
    }
    
    .floral-twig {
        width: 60px;
        height: 90px;
    }
    
    .twig-bottom-left {
        bottom: -6px;
        left: -8px;
    }
    
    .twig-top-right {
        top: -6px;
        right: -8px;
    }
    
    .twig-top-left {
        top: -6px;
        left: -8px;
    }
    
    .twig-bottom-right {
        bottom: -6px;
        right: -8px;
    }
    
    .couple-names-center {
        min-width: 120px;
    }
    
    .wedding-of {
        font-size: 0.6rem;
        letter-spacing: 2px;
    }
    
    .groom-name,
    .bride-name {
        font-size: 1.6rem;
    }
    
    .ampersand {
        font-size: 2.0rem;
    }
    
    .date-container {
        max-width: 120px;
        margin-top: 6px;
    }
    
    .date-text {
        font-size: 0.68rem;
        letter-spacing: 2px;
    }
}

/* ==========================================================================
   Ribbon (Closed State Wrapper & Interactive Trigger - Vertical band)
   ========================================================================== */
.scroll-ribbon {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    width: 140px;
    height: 140px;
    z-index: 20;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    transition: opacity 0.8s cubic-bezier(0.4, 0, 0.2, 1), 
                transform 0.8s cubic-bezier(0.4, 0, 0.2, 1),
                visibility 0.8s;
}

/* Vertical ribbon band wrapping the horizontal rollers */
.ribbon-band {
    position: absolute;
    width: 56px;
    height: 122px; /* Height increased to wrap around the thicker rollers */
    background: linear-gradient(90deg, #b81414 0%, var(--primary-red) 50%, #7d0d0d 100%);
    border-left: 2px solid var(--gold);
    border-right: 2px solid var(--gold);
    box-shadow: 4px 0 10px rgba(0, 0, 0, 0.4);
    z-index: 1;
}

/* Center Ribbon Seal */
.ribbon-seal {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    animation: sealBreathe 2s infinite ease-in-out;
    transition: transform 0.3s;
}

.scroll-ribbon:hover .ribbon-seal {
    transform: scale(1.1);
}

/* Circular Seal */
.seal-circle {
    width: 86px;
    height: 86px;
    background: radial-gradient(circle, #b81414 0%, #7d0d0d 100%);
    border: 3px double var(--gold);
    border-radius: 50%;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5), inset 0 0 10px rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Seal Calligraphy Character */
.seal-character {
    font-family: 'Zhi Mang Xing', cursive, 'Noto Serif SC', serif;
    color: var(--gold-light);
    font-size: 2.5rem;
    font-weight: bold;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.5);
}

/* Open Prompt underneath the seal */
.seal-prompt {
    margin-top: 8px;
    background-color: var(--gold);
    color: #000;
    font-size: 0.65rem;
    font-weight: 900;
    letter-spacing: 2px;
    padding: 2px 10px;
    border-radius: 12px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
    text-shadow: none;
    font-family: 'Cinzel Decorative', sans-serif;
}

/* Seal breathing animation to invite clicking */
@keyframes sealBreathe {
    0% {
        transform: scale(1);
        filter: drop-shadow(0 4px 6px rgba(212, 175, 55, 0.3));
    }
    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 6px 15px rgba(212, 175, 55, 0.7));
    }
    100% {
        transform: scale(1);
        filter: drop-shadow(0 4px 6px rgba(212, 175, 55, 0.3));
    }
}

/* Open scroll modifications to ribbon: fade & shrink */
.scroll-wrapper.open .scroll-ribbon {
    opacity: 0;
    visibility: hidden;
    transform: translate(-50%, -50%) scale(0.8);
    pointer-events: none;
}

/* ==========================================================================
   Music Controller (Bottom-Left)
   ========================================================================== */
.audio-control-container {
    position: absolute;
    bottom: 65px; /* Raised to avoid overlapping with copyright footer */
    left: 25px;
    z-index: 100;
}

.audio-toggle-btn {
    width: 46px;
    height: 46px;
    background: radial-gradient(circle, #b81414 0%, #7d0d0d 100%);
    border: 2px solid var(--gold);
    border-radius: 50%;
    color: var(--gold-light);
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.4);
    outline: none;
    transition: transform 0.3s, background 0.3s, box-shadow 0.3s;
}

.audio-toggle-btn:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 15px rgba(212, 175, 55, 0.4);
}

.sound-icon {
    width: 20px;
    height: 20px;
    pointer-events: none;
}

/* Animate icon spinning when playing */
.audio-toggle-btn.playing .sound-icon {
    animation: spinIcon 8s linear infinite;
}

@keyframes spinIcon {
    100% { transform: rotate(360deg); }
}

/* Helper utility class to hide elements */
.d-none {
    display: none !important;
}

/* Scroll to Top Button (inside scroll-border-inner) */
.scroll-to-top-btn {
    position: absolute;
    bottom: 25px;
    right: 25px;
    width: 38px;
    height: 38px;
    background: var(--parchment);
    border: 1.5px solid #7a5822;
    border-radius: 50%;
    color: #7a5822;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 25;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15);
    transition: opacity 0.3s, transform 0.3s, background 0.3s, color 0.3s;
}

.scroll-to-top-btn svg {
    width: 20px;
    height: 20px;
}

.scroll-to-top-btn.visible {
    opacity: 0.85;
    pointer-events: auto;
    transform: translateY(0);
}

.scroll-to-top-btn:hover {
    background: #7a5822;
    color: var(--parchment);
    opacity: 1;
    transform: translateY(-2px) scale(1.05);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.25);
}

/* ==========================================================================
   Navigation Bar (Top of Scroll)
   ========================================================================== */
.wedding-navbar {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 10px;
    background: rgba(102, 5, 5, 0.75);
    padding: 8px 20px;
    border-radius: 30px;
    border: 1px solid var(--gold);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(10px);
    z-index: 30;
    transition: all 0.3s ease;
    max-width: 100%;
}

.nav-btn {
    background: none;
    border: none;
    color: var(--gold-light);
    font-family: 'Cinzel Decorative', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 600;
    letter-spacing: 2px;
    padding: 6px 16px;
    cursor: pointer;
    border-radius: 20px;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.nav-btn:hover {
    color: #fff;
    text-shadow: 0 0 8px rgba(255, 255, 255, 0.6);
}

.nav-btn.active {
    background: var(--gold);
    color: #000;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.4);
    font-weight: bold;
}

/* ==========================================================================
   Section Transition System inside Scroll Paper (One Page Scroll Stack)
   ========================================================================== */
.scroll-section {
    display: flex;
    width: 100%;
    min-height: 100%; /* Spans the exact height of the scroll viewport */
    flex-direction: column;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
    padding-bottom: 30px; /* Space at bottom of each section block */
    flex-shrink: 0;
}

/* ==========================================================================
   RSVP Form Custom Styles
   ========================================================================== */
.rsvp-form {
    width: 100%;
    max-width: 400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.rsvp-form .form-control, 
.rsvp-form .form-select {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(122, 88, 34, 0.3);
    color: var(--text-dark);
    font-size: 0.9rem;
    border-radius: 4px;
    padding: 8px 12px;
    transition: all 0.3s;
}

.rsvp-form .form-control:focus, 
.rsvp-form .form-select:focus {
    background: #fff;
    border-color: var(--gold-dark);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
    outline: none;
}

.gold-btn {
    background: linear-gradient(135deg, var(--gold-light) 0%, var(--gold) 50%, var(--gold-dark) 100%);
    border: 1px solid #7a5822;
    color: #332200;
    font-weight: 700;
    letter-spacing: 2px;
    border-radius: 4px;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(0,0,0,0.15);
    transition: all 0.3s;
}

.gold-btn:hover {
    background: linear-gradient(135deg, #fff 0%, var(--gold-light) 50%, var(--gold) 100%);
    box-shadow: 0 4px 10px rgba(212, 175, 55, 0.3);
    transform: translateY(-1px);
}

/* ==========================================================================
   Photo Gallery Grid
   ========================================================================== */
.gallery-container {
    width: 60%;
    margin: 10px auto 0;
    flex-grow: 1;
}

.gallery-item {
    position: relative;
    width: 100%;
    aspect-ratio: 4 / 3;
    background-color: #dddddd;
    border: 1px solid #c8bba3;
    border-radius: 6px;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: inset 0 0 10px rgba(0, 0, 0, 0.1);
}

.gallery-item:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
    border-color: var(--gold);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.image-placeholder {
    color: #555;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: 'Cinzel Decorative', sans-serif;
    letter-spacing: 1px;
}

/* ==========================================================================
   Wishes Guestbook
   ========================================================================== */
.wishes-list {
    width: 100%; /* Fills the Bootstrap col container (col-12 or col-lg-8) */
    height: 180px;
    overflow-y: auto;
    padding-right: 8px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 5px;
    text-align: left;
    flex-grow: 1;
}

.wishes-list::-webkit-scrollbar {
    width: 4px;
}

.wishes-list::-webkit-scrollbar-thumb {
    background-color: var(--gold-dark);
    border-radius: 2px;
}

.wish-item {
    background: rgba(212, 175, 55, 0.05);
    border-left: 3px solid var(--gold);
    padding: 8px 12px;
    border-radius: 0 6px 6px 0;
}

.wish-text {
    font-style: italic;
    font-size: 0.85rem;
    color: #444;
    margin-bottom: 4px;
    line-height: 1.4;
}

.wish-author {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--primary-red);
}

.wish-form {
    width: 100%;
    border-top: 1px dashed rgba(122,88,34,0.3);
    padding-top: 10px;
    margin-top: auto;
}

.wish-form .form-control {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(122, 88, 34, 0.3);
    font-size: 0.85rem;
}

.wish-form .form-control:focus {
    background: #fff;
    border-color: var(--gold-dark);
    box-shadow: none;
}

/* ==========================================================================
   Gallery Fullscreen Modal
   ========================================================================== */
.gallery-modal {
    display: none;
    position: fixed;
    z-index: 200;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.94);
    justify-content: center;
    align-items: center;
    flex-direction: column;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-modal.show {
    display: flex;
    opacity: 1;
}

/* Inner row: [prev btn] [image] [next btn] */
.gallery-modal-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 18px;
    width: 100%;
    padding: 0 20px;
    box-sizing: border-box;
}

.gallery-modal-content {
    max-width: 80vw;
    max-height: 88vh;
    width: auto;
    height: auto;
    border: 3px solid var(--gold);
    box-shadow: 0 10px 40px rgba(0,0,0,0.9);
    border-radius: 6px;
    background-color: #222;
    transition: opacity 0.18s ease;
    object-fit: contain;
    display: block;
}

.gallery-modal-close {
    position: absolute;
    top: 24px;
    right: 36px;
    color: #f1f1f1;
    font-size: 48px;
    font-weight: bold;
    line-height: 1;
    transition: color 0.25s, transform 0.25s;
    cursor: pointer;
    z-index: 10;
    user-select: none;
}

.gallery-modal-close:hover {
    color: var(--gold);
    transform: rotate(90deg);
}

/* Left / Right navigation buttons */
.gallery-nav-btn {
    background: rgba(212, 175, 55, 0.12);
    border: 2px solid var(--gold);
    color: var(--gold);
    border-radius: 50%;
    width: 52px;
    height: 52px;
    font-size: 2.2rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.25s, color 0.25s, transform 0.2s, box-shadow 0.2s;
    flex-shrink: 0;
    user-select: none;
    box-shadow: 0 2px 10px rgba(0,0,0,0.4);
}

.gallery-nav-btn:hover {
    background: var(--gold);
    color: #1a0a00;
    transform: scale(1.12);
    box-shadow: 0 4px 18px rgba(212, 175, 55, 0.5);
}

.gallery-nav-btn:active {
    transform: scale(0.96);
}

/* ==========================================================================
   Wishes Button Wrapper
   ========================================================================== */
.wishes-btn-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    padding-bottom: 10px;
}

/* ==========================================================================
   Wishes Modal (full-page overlay, outside the scroll)
   ========================================================================== */
.wishes-modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(10, 4, 2, 0.80);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    justify-content: center;
    align-items: center;
    animation: wishModalFadeIn 0.3s ease;
}

.wishes-modal.active {
    display: flex;
}

@keyframes wishModalFadeIn {
    from { opacity: 0; }
    to   { opacity: 1; }
}

.wishes-modal-box {
    position: relative;
    background: linear-gradient(160deg, #fdf6e3 0%, #faf0d7 60%, #f5e6c0 100%);
    border: 2px solid var(--gold-mid, #c8a84b);
    border-radius: 12px;
    padding: 40px 44px 36px;
    max-width: 480px;
    width: 90%;
    box-shadow: 0 8px 48px rgba(180, 120, 20, 0.35), 0 2px 12px rgba(0,0,0,0.25);
    animation: wishBoxSlideUp 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes wishBoxSlideUp {
    from { transform: translateY(40px) scale(0.95); opacity: 0; }
    to   { transform: translateY(0) scale(1);       opacity: 1; }
}

.wishes-modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.7rem;
    color: var(--gold-mid, #c8a84b);
    cursor: pointer;
    line-height: 1;
    transition: color 0.2s, transform 0.2s;
}
.wishes-modal-close:hover {
    color: var(--primary-red, #8b0000);
    transform: rotate(90deg);
}

.wishes-modal-title {
    font-family: 'Cinzel', 'Cormorant Garamond', serif;
    font-size: 1.4rem;
    color: var(--primary-red, #8b0000);
    text-align: center;
    margin-bottom: 4px;
    letter-spacing: 2px;
}

.wishes-modal-subtitle {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.95rem;
    color: #7a5c2e;
    text-align: center;
    margin-bottom: 24px;
    font-style: italic;
}

.wish-modal-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wish-modal-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.wish-modal-field label {
    font-family: 'Cormorant Garamond', serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: #6b4c1e;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.wish-modal-input {
    background: rgba(255, 248, 225, 0.85);
    border: 1.5px solid var(--gold-mid, #c8a84b);
    border-radius: 6px;
    padding: 10px 14px;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1rem;
    color: #3c2a0e;
    outline: none;
    transition: border-color 0.25s, box-shadow 0.25s;
    resize: none;
}

.wish-modal-input:focus {
    border-color: var(--primary-red, #8b0000);
    box-shadow: 0 0 0 3px rgba(139, 0, 0, 0.12);
}

.wish-modal-textarea {
    min-height: 100px;
}

.wish-modal-submit {
    width: 100%;
    margin-top: 4px;
    font-size: 1rem;
    letter-spacing: 2px;
}


.wish-modal-status {
    margin-top: 16px;
    text-align: center;
    font-family: 'Cormorant Garamond', serif;
    font-size: 1.1rem;
    color: var(--primary-red, #8b0000);
    font-style: italic;
}

/* ==========================================================================
   Map Modal
   ========================================================================== */
.show-map-link {
    display: inline-block;
    margin-left: 8px;
    font-size: 0.85rem;
    color: var(--gold-dark);
    text-decoration: underline;
    font-weight: 600;
    cursor: pointer;
    font-family: 'Playfair Display', serif;
}

.show-map-link:hover {
    color: var(--primary-red);
}

.map-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
}

.map-modal.active {
    opacity: 1;
    visibility: visible;
}

.map-modal-box {
    position: relative;
    width: 90%;
    max-width: 800px;
    height: 60vh;
    background: #fff;
    border: 2px solid var(--gold-mid);
    border-radius: 8px;
    padding: 10px;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.5);
    transform: translateY(20px);
    transition: all 0.3s ease-out;
}

.map-modal.active .map-modal-box {
    transform: translateY(0);
}

.map-container {
    width: 100%;
    height: 100%;
    border-radius: 4px;
    overflow: hidden;
}

.map-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: #fff;
    font-size: 2.5rem;
    cursor: pointer;
    transition: color 0.2s;
}

.map-modal-close:hover {
    color: var(--gold);
}

/* ==========================================================================
   Responsive Navbar â€” Tablet, Phone, Tiny
   ========================================================================== */

/* Tablet (â‰¤ 768px) */
@media (max-width: 768px) {
    .wedding-navbar {
        gap: 6px;
        padding: 6px 14px;
        border-radius: 24px;
    }
    .nav-btn {
        font-size: 0.72rem;
        letter-spacing: 1.2px;
        padding: 5px 11px;
    }
    .gallery-container {
        width: 100%;
        padding: 0 10px;
    }
    .wishes-list {
        height: 140px;
    }
}

/* Phone (â‰¤ 480px) */
@media (max-width: 480px) {
    .wedding-navbar {
        gap: 4px;
        padding: 5px 10px;
        border-radius: 20px;
    }
    .nav-btn {
        font-size: 0.62rem;
        letter-spacing: 0.6px;
        padding: 5px 9px;
        border-radius: 16px;
    }
    .nav-btn.active {
        box-shadow: 0 1px 4px rgba(212, 175, 55, 0.35);
    }
}

/* Very small screens (â‰¤ 360px) */
@media (max-width: 360px) {
    .wedding-navbar {
        gap: 3px;
        padding: 4px 8px;
        border-radius: 16px;
    }
    .nav-btn {
        font-size: 0.55rem;
        letter-spacing: 0.3px;
        padding: 4px 7px;
    }
}

/* ==========================================================================
   Copyright Footer (Low Opacity White Section)
   ========================================================================== */
.site-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.15); /* White section with low opacity */
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding: 12px 20px;
    text-align: center;
    z-index: 90;
    box-shadow: 0 -3px 10px rgba(0, 0, 0, 0.15);
}

.site-footer p {
    margin: 0;
    color: rgba(255, 255, 255, 0.85);
    font-family: 'Playfair Display', 'Noto Serif SC', serif;
    font-size: 0.85rem;
    letter-spacing: 2px;
    font-weight: 400;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.4);
}

.site-footer .footer-divider {
    display: inline-block;
    width: 6px;
    height: 6px;
    background-color: var(--gold);
    border-radius: 50%;
    margin: 0 12px;
    vertical-align: middle;
    box-shadow: 0 0 4px var(--gold);
}

/* Mobile adjustments for the copyright footer */
@media (max-width: 480px) {
    .site-footer {
        padding: 8px 10px;
    }
    .site-footer p {
        font-size: 0.72rem;
        letter-spacing: 1px;
        line-height: 1.4;
    }
    .site-footer .footer-divider {
        width: 4px;
        height: 4px;
        margin: 0 8px;
    }
}
