/* =========================================================
   LUXURY WEDDING INVITATION - THAVRITH & SREYNOCH
   Theme: Champagne Gold & Botanical Emerald / Ivory Coquette
   ========================================================= */

:root {
    /* Color Palette */
    --moss: #2b3628;
    --moss-dark: #1d251b;
    --moss-light: #3d4c39;
    --sage: #6e8067;
    --pistachio: #e7eedd;
    --pistachio-light: #f3f7ed;

    --gold: #946b20;
    --gold-light: #bf923b;
    --gold-dark: #63430f;
    --gold-gradient: linear-gradient(135deg, #6e480e 0%, #996e20 35%, #875e16 65%, #54360a 100%);
    --gold-border: rgba(148, 107, 32, 0.45);

    --bg-ivory: #faf8f5;
    --card-bg: #ffffff;
    --card-border: rgba(197, 160, 89, 0.25);

    --text-main: #252b22;
    --text-muted: #5e6b57;
    --text-light: #7b8875;

    /* Typography */
    --font-kh: 'Kantumruy Pro', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-kh-title: 'Moul', cursive;
    --font-en: 'Playfair Display', Georgia, serif;
    --font-en-title: 'Cinzel', serif;
    --font-modern: 'Montserrat', sans-serif;

    /* Shadows & Transitions */
    --shadow-sm: 0 4px 12px rgba(43, 54, 40, 0.05);
    --shadow-md: 0 10px 30px rgba(43, 54, 40, 0.08);
    --shadow-lg: 0 20px 50px rgba(43, 54, 40, 0.12);
    --shadow-gold: 0 8px 25px rgba(197, 160, 89, 0.28);
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 22px;
}

/* --- RESET & GLOBAL --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    -webkit-tap-highlight-color: transparent;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-kh);
    background-color: var(--bg-ivory);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
    position: relative;
    padding-bottom: 75px; /* Space for mobile floating nav */
}

body.no-scroll {
    overflow: hidden;
    height: 100vh;
    height: 100dvh;
}

/* --- TYPOGRAPHY UTILITIES --- */
.font-moul {
    font-family: var(--font-kh-title);
    font-weight: 400;
}

.font-cinzel {
    font-family: var(--font-en-title);
}

.font-en {
    font-family: var(--font-en);
}

.font-kh {
    font-family: var(--font-kh);
}

.font-modern {
    font-family: var(--font-modern);
}

.text-center {
    text-align: center;
}

.gold-shimmer {
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 1px rgba(99, 67, 15, 0.2));
}

.text-gold {
    color: var(--gold-dark);
}

/* --- LAYOUT UTILITIES --- */
.container {
    width: 100%;
    max-width: 820px;
    margin: 0 auto;
    padding: 0 18px;
}

@media (min-width: 768px) {
    .container {
        padding: 0 24px;
    }
}

.section {
    padding: 45px 0;
    position: relative;
    z-index: 2;
}

@media (min-width: 768px) {
    .section {
        padding: 65px 0;
    }
}

/* Luxury Card Box */
.card-box {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-md);
    position: relative;
    padding: 30px 20px;
}

@media (min-width: 768px) {
    .card-box {
        padding: 45px 35px;
        border-radius: var(--radius-lg);
    }
}

/* --- SECTION HEADERS & ORNAMENTS --- */
.section-header {
    text-align: center;
    margin-bottom: 12px;
}

.section-badge {
    display: inline-block;
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--gold-dark);
    text-transform: uppercase;
    margin-bottom: 6px;
    font-weight: 700;
}

.section-heading {
    font-size: 24px;
    color: #bf923b;
    line-height: 1.5;
    margin-bottom: 4px;
}

@media (min-width: 768px) {
    .section-heading {
        font-size: 28px;
    }
}

.section-subtitle {
    font-size: 13px;
    letter-spacing: 3px;
    color: var(--sage);
    text-transform: uppercase;
}

.ornament {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 15px auto 30px;
    max-width: 260px;
}

.ornament-line {
    flex: 1;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--gold), transparent);
    opacity: 0.6;
}

.ornament-icon {
    color: var(--gold);
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(197, 160, 89, 0.3));
}

/* --- FLOATING PETALS ANIMATION (GPU ACCELERATED) --- */
.floating-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.floral-anim {
    position: absolute;
    top: -8%;
    color: var(--gold);
    opacity: 0.35;
    font-size: 18px;
    will-change: transform;
    animation: fallingFloral 18s linear infinite;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.04));
}

.floral-anim:nth-child(even) {
    color: var(--sage);
    font-size: 15px;
    opacity: 0.25;
}

.floral-anim:nth-child(3n) {
    color: #dfcaa2;
    font-size: 20px;
    opacity: 0.3;
}

.floral-anim:nth-child(1) { left: 8%; animation-duration: 22s; animation-delay: 0s; }
.floral-anim:nth-child(2) { left: 24%; animation-duration: 17s; animation-delay: 2s; }
.floral-anim:nth-child(3) { left: 42%; animation-duration: 25s; animation-delay: 5s; }
.floral-anim:nth-child(4) { left: 60%; animation-duration: 19s; animation-delay: 1s; }
.floral-anim:nth-child(5) { left: 78%; animation-duration: 24s; animation-delay: 4s; }
.floral-anim:nth-child(6) { left: 92%; animation-duration: 16s; animation-delay: 3s; }
.floral-anim:nth-child(7) { left: 16%; animation-duration: 21s; animation-delay: 7s; }
.floral-anim:nth-child(8) { left: 52%; animation-duration: 18s; animation-delay: 8s; }
.floral-anim:nth-child(9) { left: 70%; animation-duration: 23s; animation-delay: 6s; }
.floral-anim:nth-child(10) { left: 86%; animation-duration: 20s; animation-delay: 9s; }

@keyframes fallingFloral {
    0% {
        transform: translate3d(0, 0, 0) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.4;
    }
    50% {
        transform: translate3d(25px, 50vh, 0) rotate(180deg);
    }
    90% {
        opacity: 0.4;
    }
    100% {
        transform: translate3d(-15px, 110vh, 0) rotate(360deg);
        opacity: 0;
    }
}

/* --- WELCOME ENVELOPE / COVER --- */
.welcome-cover {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    background: radial-gradient(circle at center, #354232 0%, #1f271c 100%);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 16px;
    transition: transform 1.1s cubic-bezier(0.85, 0, 0.15, 1), opacity 0.8s ease;
}

.welcome-cover.opened {
    transform: translateY(-100%);
    opacity: 0;
    pointer-events: none;
}

.cover-card {
    background: #ffffff;
    width: 100%;
    max-width: 410px;
    border-radius: var(--radius-md);
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(197, 160, 89, 0.4);
    position: relative;
    padding: 12px;
    text-align: center;
    z-index: 2;
}

.cover-card-inner {
    border: 1px solid var(--gold);
    outline: 1px solid var(--gold);
    outline-offset: -5px;
    border-radius: 6px;
    padding: 35px 22px 30px;
    background: linear-gradient(to bottom, #ffffff, #faf9f6);
}

/* Ornate Corner Filigrees for Cover */
.corner-filigree {
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2px solid var(--gold);
    pointer-events: none;
    z-index: 3;
}
.corner-filigree.top-left { top: 18px; left: 18px; border-right: none; border-bottom: none; }
.corner-filigree.top-right { top: 18px; right: 18px; border-left: none; border-bottom: none; }
.corner-filigree.bottom-left { bottom: 18px; left: 18px; border-right: none; border-top: none; }
.corner-filigree.bottom-right { bottom: 18px; right: 18px; border-left: none; border-top: none; }

.cover-event-type {
    font-size: 19px;
    color: #bf923b;
    margin-bottom: 2px;
}

.cover-subtitle {
    font-size: 11px;
    letter-spacing: 4px;
    color: var(--gold-dark);
    margin-bottom: 18px;
    font-weight: 600;
}

.cover-logo-wrapper {
    margin: 12px auto 16px;
    max-width: 220px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.cover-logo-wrapper img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.08));
}

@media (max-width: 480px) {
    .cover-card-inner {
        padding: 26px 16px 22px;
    }

    .cover-logo-wrapper {
        max-width: 185px;
        margin: 8px auto 12px;
    }

    .guest-box {
        margin: 14px 0 16px;
        padding: 10px 8px;
    }

    .cover-subtitle {
        margin-bottom: 8px;
    }
}

.guest-box {
    margin: 20px 0 25px;
    padding: 16px 10px;
    border-top: 1px dashed var(--gold-border);
    border-bottom: 1px dashed var(--gold-border);
    background: rgba(247, 244, 238, 0.4);
    border-radius: 6px;
}

.guest-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.guest-label-en {
    font-weight: 300;
    letter-spacing: 0.5px;
}

.guest-name {
    font-size: 20px;
    color: #b88f42;
    line-height: 1.5;
    word-break: break-word;
}

.btn-open {
    background: linear-gradient(135deg, #b88f42 0%, #cfa85e 50%, #9e7529 100%);
    color: #ffffff;
    border: none;
    border-radius: 50px;
    padding: 12px 30px;
    cursor: pointer;
    box-shadow: var(--shadow-gold);
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.btn-open:hover, .btn-open:active {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 12px 30px rgba(197, 160, 89, 0.45);
}

.btn-open-icon {
    font-size: 18px;
    margin-bottom: 2px;
}

.btn-open-text {
    font-family: var(--font-kh);
    font-size: 16px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.btn-open-sub {
    font-size: 10px;
    letter-spacing: 3px;
    opacity: 0.9;
}

/* --- HERO SECTION --- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-image: url('files/picture/pic1.webp'), url('files/picture/pic1.jpg');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    overflow: hidden;
}

.hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, 
        rgba(26, 33, 24, 0.4) 0%, 
        rgba(26, 33, 24, 0.25) 40%, 
        rgba(26, 33, 24, 0.6) 80%,
        rgba(26, 33, 24, 0.85) 100%);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    color: #ffffff;
    padding: 40px 20px 90px;
    width: 100%;
}

.hero-badge {
    font-size: 12px;
    letter-spacing: 5px;
    color: #ffffff;
    margin-bottom: 18px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.hero-title {
    font-family: var(--font-en);
    font-size: 40px;
    font-weight: 500;
    line-height: 1.15;
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

@media (min-width: 768px) {
    .hero-title {
        flex-direction: row;
        justify-content: center;
        gap: 16px;
        font-size: 60px;
    }
}

.hero-title .name {
    letter-spacing: 1.5px;
    text-shadow: 0 4px 15px rgba(0, 0, 0, 0.5);
}

.hero-title .name.gold-shimmer {
    background: linear-gradient(135deg, #e5be6b 0%, #fff4db 45%, #d1a84f 75%, #b3852b 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 3px 12px rgba(0, 0, 0, 0.85));
}

.hero-title .ampersand {
    font-style: italic;
    color: #e5be6b;
    font-size: 0.75em;
    margin: 6px 0;
    text-shadow: 0 2px 10px rgba(0,0,0,0.7);
}

.hero-date {
    margin-top: 15px;
    padding-top: 18px;
    border-top: 1px solid rgba(255, 255, 255, 0.35);
    display: inline-block;
}

.khmer-date {
    font-size: 19px;
    margin-bottom: 4px;
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.english-date {
    font-size: 12px;
    letter-spacing: 4px;
    color: #ffffff;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.6);
}

.scroll-indicator {
    position: absolute;
    bottom: 25px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    z-index: 2;
    animation: gentleBounce 2.2s infinite;
}

@keyframes gentleBounce {
    0%, 20%, 50%, 80%, 100% { transform: translate(-50%, 0); }
    40% { transform: translate(-50%, -8px); }
    60% { transform: translate(-50%, -4px); }
}

/* --- INVITATION MESSAGE SECTION --- */
.message-card {
    max-width: 680px;
    margin: 0 auto;
    position: relative;
    padding: 35px 22px;
}

.quote-decor {
    color: var(--gold);
    font-size: 20px;
    opacity: 0.4;
}
.quote-decor.top { text-align: left; margin-bottom: 5px; }
.quote-decor.bottom { text-align: right; margin-top: 5px; }

.message-text {
    font-size: 15.5px;
    line-height: 2.1;
    color: var(--text-main);
    text-align: center;
}

@media (min-width: 768px) {
    .message-text {
        font-size: 17px;
        line-height: 2.3;
    }
}

/* --- PARENTS & COUPLE SECTION --- */
.family-card-wrapper {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

@media (min-width: 768px) {
    .family-card-wrapper {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        padding: 50px 35px;
    }
}

.family-block {
    flex: 1;
    text-align: center;
    padding: 10px;
}

.family-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 16px;
    border-radius: 20px;
    font-size: 14px;
    margin-bottom: 4px;
}

.groom-badge {
    background-color: var(--pistachio);
    color: var(--moss);
    border: 1px solid rgba(43, 54, 40, 0.15);
}

.bride-badge {
    background-color: #faece6;
    color: #8c4939;
    border: 1px solid rgba(140, 73, 57, 0.15);
}

.family-badge-en {
    font-size: 10px;
    letter-spacing: 2px;
    color: var(--sage);
    margin-bottom: 18px;
}

.parents-names .parent-name {
    font-size: 16.5px;
    color: var(--text-main);
    margin-bottom: 8px;
    font-weight: 400;
}

.child-connector {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin: 20px 0 16px;
}

.connector-line {
    height: 1px;
    width: 45px;
    background: var(--gold);
    opacity: 0.4;
}

.child-label {
    font-size: 13.5px;
    color: var(--gold-dark);
}

.couple-highlight .couple-name-kh {
    font-size: 25px;
    margin-bottom: 4px;
}

.couple-highlight .couple-name-en {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--sage);
    font-weight: 500;
}

.family-center-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 10px 0;
}

@media (min-width: 768px) {
    .family-center-divider {
        padding: 0 15px;
        flex-direction: column;
    }
}

.union-circle {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #ffffff;
    border: 1px solid var(--gold);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.union-heart {
    color: var(--gold);
    font-size: 18px;
}

/* --- EVENT DETAILS & COUNTDOWN --- */
.event-card {
    max-width: 650px;
    margin: 0 auto;
}

.countdown-concept {
    text-align: center;
    padding: 15px 5px;
}

.countdown-invitation {
    font-size: 14.5px;
    color: var(--moss);
    line-height: 1.6;
    margin-bottom: 8px;
}

.countdown-label {
    font-size: 12.5px;
    color: var(--text-muted);
    margin-bottom: 22px;
}

/* Days-Only Responsive Countdown */
.countdown-days-wrap {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px auto 26px;
}

.cd-days-card {
    background: linear-gradient(135deg, #ffffff 0%, #fdfcf9 50%, #f7f4ea 100%);
    border: 1.5px solid var(--gold);
    border-radius: var(--radius-md);
    padding: 24px 42px 20px;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 10px 30px rgba(197, 160, 89, 0.16), 0 2px 6px rgba(0, 0, 0, 0.04);
    min-width: 170px;
    position: relative;
}

.cd-days-card::after {
    content: '';
    position: absolute;
    inset: 5px;
    border: 1px dashed rgba(197, 160, 89, 0.35);
    border-radius: 10px;
    pointer-events: none;
}

.cd-days-number {
    font-size: 64px;
    font-weight: 700;
    color: var(--moss);
    line-height: 1;
    letter-spacing: -1px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
}

@media (min-width: 768px) {
    .cd-days-number {
        font-size: 78px;
    }
}

.cd-days-title {
    font-size: 20px;
    color: var(--gold-dark);
    margin-top: 6px;
}

.cd-days-subtitle {
    font-size: 10px;
    letter-spacing: 3px;
    color: var(--text-muted);
    margin-top: 2px;
}

.wedding-date-block {
    margin-bottom: 22px;
    background: rgba(247, 244, 238, 0.5);
    padding: 14px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(197, 160, 89, 0.2);
}

.wedding-date-kh {
    font-size: 15px;
    color: var(--moss);
    margin-bottom: 4px;
}

.wedding-lunar-date {
    font-size: 13px;
    color: var(--gold-dark);
    margin-bottom: 4px;
    line-height: 1.6;
}

.wedding-date-en {
    font-size: 12px;
    letter-spacing: 2px;
    color: var(--text-muted);
}

.btn-calendar {
    background: transparent;
    color: var(--moss);
    border: 1.5px solid var(--gold);
    border-radius: 30px;
    padding: 10px 24px;
    font-family: var(--font-kh);
    font-size: 13.5px;
    font-weight: 500;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-calendar:hover, .btn-calendar:active {
    background: var(--gold);
    color: #ffffff;
    box-shadow: var(--shadow-gold);
}

.card-divider-dashed {
    height: 1px;
    border-top: 1px dashed var(--gold-border);
    margin: 30px 0;
}

.venue-icon-circle {
    width: 50px;
    height: 50px;
    background: var(--pistachio);
    color: var(--moss);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 12px;
    font-size: 20px;
}

.venue-name {
    font-size: 20px;
    color: var(--moss);
    margin-bottom: 2px;
}

.venue-en {
    font-size: 12px;
    letter-spacing: 3px;
    color: var(--sage);
    margin-bottom: 14px;
    font-weight: 600;
}

.venue-address {
    font-size: 14.5px;
    color: var(--text-main);
    line-height: 1.7;
    margin-bottom: 22px;
}

.venue-address-en {
    font-size: 12px;
    color: var(--text-muted);
    letter-spacing: 1px;
    display: inline-block;
    margin-top: 4px;
}

.venue-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
}

@media (min-width: 480px) {
    .venue-action-buttons {
        flex-direction: row;
    }
}

.btn-location {
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 13.5px;
    font-family: var(--font-kh);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary-gold {
    background: linear-gradient(135deg, #b88f42 0%, #cfa85e 100%);
    color: #ffffff;
    border: none;
    box-shadow: var(--shadow-sm);
}

.btn-primary-gold:hover {
    box-shadow: var(--shadow-gold);
    transform: translateY(-2px);
}

.btn-secondary-glass {
    background: transparent;
    color: var(--moss);
    border: 1px solid rgba(43, 54, 40, 0.25);
}

.btn-secondary-glass:hover {
    background: var(--pistachio);
}

/* --- TIMELINE SECTION --- */
.timeline-container {
    position: relative;
    max-width: 580px;
    margin: 0 auto;
    padding: 10px 0;
}

.timeline-container::before {
    content: '';
    position: absolute;
    top: 15px;
    bottom: 15px;
    left: 98px;
    width: 2px;
    background: linear-gradient(to bottom, var(--gold), rgba(197, 160, 89, 0.2));
}

@media (min-width: 768px) {
    .timeline-container::before {
        left: 114px;
    }
}

.timeline-item {
    display: flex;
    align-items: center;
    position: relative;
    margin-bottom: 22px;
}

.timeline-item:last-child {
    margin-bottom: 0;
}

.time-col {
    width: 88px;
    text-align: right;
    padding-right: 12px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

@media (min-width: 768px) {
    .time-col {
        width: 102px;
        padding-right: 15px;
    }
}

.time-col .time {
    font-size: 12.5px;
    color: var(--moss);
    font-weight: 600;
    line-height: 1.3;
}

.time-col .time-en {
    font-size: 9.5px;
    color: var(--gold-dark);
    letter-spacing: 0.5px;
    font-weight: 500;
}

.timeline-node {
    position: relative;
    z-index: 2;
    margin-right: 14px;
}

.node-icon {
    width: 34px;
    height: 34px;
    background: #ffffff;
    border: 2px solid var(--gold);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gold);
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(197, 160, 89, 0.3);
}

.timeline-content {
    flex: 1;
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--card-border);
}

.timeline-content h4 {
    font-size: 14.5px;
    color: var(--moss);
    margin-bottom: 2px;
    line-height: 1.5;
}

.timeline-sub {
    font-size: 10px;
    letter-spacing: 1px;
    color: var(--text-light);
}

/* --- GALLERY SECTION (4 PHOTOS: PIC2, PIC4, PIC5, PIC3) --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 18px;
}

@media (min-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(4, 1fr);
        gap: 16px;
    }
}

.gallery-item {
    position: relative;
    border-radius: var(--radius-md);
    overflow: hidden;
    cursor: pointer;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--card-border);
    transition: transform 0.35s ease, box-shadow 0.35s ease;
    background-color: #f2efe9;
}

.gallery-item:hover, .gallery-item:active {
    transform: translateY(-3px) scale(1.01);
    box-shadow: var(--shadow-md);
}

@media (min-width: 768px) {
    .gallery-item {
        grid-column: span 1;
    }
}

.gallery-item-inner {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.gallery-img {
    width: 100%;
    height: 100%;
    aspect-ratio: 4/5;
    object-fit: cover;
    display: block;
    transition: transform 0.6s cubic-bezier(0.25, 1, 0.5, 1);
}

.gallery-item.item-horizontal .gallery-img {
    aspect-ratio: 4/3;
}

@media (min-width: 768px) {
    .gallery-img {
        aspect-ratio: 4/5;
    }
    .gallery-item.item-horizontal .gallery-img {
        aspect-ratio: 16/11;
    }
}

.gallery-item:hover .gallery-img {
    transform: scale(1.06);
}

.gallery-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(29, 37, 27, 0.45) 0%, transparent 60%);
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 12px;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.gallery-item:hover .gallery-overlay,
.gallery-item:active .gallery-overlay {
    opacity: 1;
}

.gallery-zoom-badge {
    background: rgba(255, 255, 255, 0.9);
    color: var(--moss);
    font-size: 11px;
    padding: 4px 12px;
    border-radius: 20px;
    font-family: var(--font-kh);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.gallery-hint {
    font-size: 13px;
    color: var(--text-muted);
}

/* --- GIFT SECTION (MOBILE-FRIENDLY ABA) --- */
.gift-card {
    max-width: 440px;
    margin: 0 auto;
    padding: 35px 22px;
}

.gift-message {
    font-size: 15px;
    line-height: 1.8;
    color: var(--text-main);
    margin-bottom: 6px;
}

.gift-sub {
    font-size: 11px;
    letter-spacing: 2px;
    color: var(--sage);
    margin-bottom: 24px;
    font-weight: 600;
}

.qr-container {
    margin-bottom: 22px;
}

.qr-frame {
    display: inline-block;
    padding: 12px;
    background: #ffffff;
    border-radius: var(--radius-md);
    border: 1px solid var(--gold);
    box-shadow: var(--shadow-md);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.qr-frame:hover, .qr-frame:active {
    transform: scale(1.02);
    box-shadow: var(--shadow-gold);
}

.qr-image {
    width: 200px;
    height: 200px;
    border-radius: 8px;
    display: block;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .qr-image {
        width: 220px;
        height: 220px;
    }
}

.qr-tap-hint {
    display: block;
    margin-top: 10px;
    font-size: 12px;
    color: #005f73;
    font-family: var(--font-kh);
    font-weight: 600;
}

.gift-action-buttons {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

@media (min-width: 480px) {
    .gift-action-buttons {
        flex-direction: row;
        justify-content: center;
    }
}

.btn-gift-action {
    padding: 12px 20px;
    border-radius: 30px;
    font-size: 13.5px;
    font-family: var(--font-kh);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.btn-aba-direct {
    background: #005f73;
    color: #ffffff;
    box-shadow: 0 4px 15px rgba(0, 95, 115, 0.3);
}

.btn-aba-direct:hover {
    background: #0a9396;
    transform: translateY(-2px);
}

.btn-download-qr {
    background: transparent;
    color: var(--moss);
    border: 1px solid rgba(43, 54, 40, 0.25);
}

.btn-download-qr:hover {
    background: var(--pistachio);
}

/* --- FOOTER --- */
.footer {
    background: radial-gradient(circle at top, #323e2f 0%, #1c2419 100%);
    color: #ffffff;
    padding: 70px 0 50px;
    border-top: 3px solid var(--gold);
    position: relative;
    z-index: 2;
}

.footer-crest {
    color: var(--gold);
    font-size: 32px;
    margin-bottom: 16px;
}

.footer-heading {
    color: var(--gold-light);
    font-size: 24px;
    margin-bottom: 4px;
}

.thank-you-text {
    color: #e2ebd8;
    max-width: 580px;
    margin: 0 auto 30px;
    font-size: 14.5px;
    line-height: 2;
}

.footer-names {
    font-size: 18px;
    letter-spacing: 5px;
    color: #ffffff;
    border-top: 1px solid rgba(197, 160, 89, 0.35);
    padding-top: 24px;
    display: inline-block;
}

.footer-ampersand {
    color: var(--gold);
    font-style: italic;
}

.copyright-sub {
    font-size: 10px;
    letter-spacing: 3px;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 15px;
}

/* --- FLOATING MUSIC TOGGLE BUTTON --- */
.music-toggle-btn {
    position: fixed;
    top: 22px;
    right: 22px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(43, 54, 40, 0.88);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1.5px solid var(--gold);
    color: #e5cb93;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 19px;
    cursor: pointer;
    z-index: 998;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
    opacity: 0;
    transform: scale(0.7);
    pointer-events: none;
    transition: opacity 0.4s ease, transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), background-color 0.25s ease, box-shadow 0.25s ease, color 0.25s ease;
}

.music-toggle-btn.visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}

.music-toggle-btn:hover {
    background: var(--moss-dark);
    color: #ffffff;
    border-color: var(--gold-light);
    transform: scale(1.08);
    box-shadow: 0 6px 22px rgba(0, 0, 0, 0.35);
}

.music-toggle-btn:active {
    transform: scale(0.94);
}

.music-toggle-btn .music-icon-disc {
    display: none;
}

.music-toggle-btn .music-icon-mute {
    display: block;
    font-size: 16px;
    color: rgba(229, 203, 147, 0.7);
}

.music-toggle-btn.playing {
    animation: musicPulseRing 2.4s infinite;
    color: #f7e7c4;
}

.music-toggle-btn.playing .music-icon-disc {
    display: block;
    animation: spinDisc 3.5s linear infinite;
}

.music-toggle-btn.playing .music-icon-mute {
    display: none;
}

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

@keyframes musicPulseRing {
    0% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0.6), 0 4px 18px rgba(0, 0, 0, 0.28);
    }
    70% {
        box-shadow: 0 0 0 11px rgba(197, 160, 89, 0), 0 4px 18px rgba(0, 0, 0, 0.28);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(197, 160, 89, 0), 0 4px 18px rgba(0, 0, 0, 0.28);
    }
}

@media (max-width: 600px) {
    .music-toggle-btn {
        top: 16px;
        right: 16px;
        width: 40px;
        height: 40px;
        font-size: 17px;
    }
    .music-toggle-btn .music-icon-mute {
        font-size: 14px;
    }
}

/* --- FLOATING MOBILE NAVIGATION BAR --- */
.floating-nav-bar {
    position: fixed;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1px solid var(--gold-border);
    border-radius: 40px;
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 4px;
    box-shadow: 0 10px 35px rgba(0, 0, 0, 0.15);
    z-index: 999;
    max-width: calc(100vw - 16px);
    width: max-content;
    white-space: nowrap;
    transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1);
}

.floating-nav-bar.visible {
    transform: translateX(-50%) translateY(0);
}

.nav-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    color: var(--text-muted);
    padding: 5px 8px;
    border-radius: 20px;
    font-size: 10px;
    gap: 2px;
    flex-shrink: 0;
    white-space: nowrap;
    transition: all 0.25s ease;
}

.nav-pill i {
    font-size: 14px;
}

.nav-pill span {
    font-family: var(--font-kh);
    font-weight: 500;
    white-space: nowrap;
    display: inline-block;
    line-height: 1.2;
}

.nav-pill:active, .nav-pill:hover {
    color: var(--moss);
    background: rgba(197, 160, 89, 0.15);
}

.nav-pill-highlight {
    color: var(--gold-dark);
    font-weight: 600;
}

@media (max-width: 480px) {
    .floating-nav-bar {
        bottom: 12px;
        padding: 5px 6px;
        gap: 2px;
        border-radius: 35px;
    }

    .nav-pill {
        padding: 4px 5px;
        font-size: 9.5px;
        gap: 2px;
    }

    .nav-pill i {
        font-size: 13px;
    }

    .nav-pill span {
        font-size: 9px;
        white-space: nowrap;
    }
}

@media (max-width: 360px) {
    .floating-nav-bar {
        padding: 4px 4px;
        gap: 1px;
    }

    .nav-pill {
        padding: 3px 4px;
        font-size: 8.5px;
    }

    .nav-pill i {
        font-size: 12px;
    }

    .nav-pill span {
        font-size: 8.5px;
    }
}

/* --- FULLSCREEN TOUCH LIGHTBOX --- */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 999999;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 20, 14, 0.94);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.close-modal {
    position: absolute;
    top: 18px;
    right: 22px;
    color: #ffffff;
    font-size: 36px;
    line-height: 1;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: color 0.25s ease;
}

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

.lightbox-counter {
    position: absolute;
    top: 24px;
    left: 24px;
    color: var(--gold-light);
    font-size: 13px;
    letter-spacing: 3px;
    z-index: 10;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 12px;
    border-radius: 20px;
    border: 1px solid rgba(197, 160, 89, 0.3);
}

.modal-image-wrapper {
    position: relative;
    max-width: 92vw;
    max-height: 82vh;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 5;
    user-select: none;
    touch-action: pan-y pinch-zoom;
}

.modal-content {
    max-width: 100%;
    max-height: 82vh;
    object-fit: contain;
    border-radius: 8px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(197, 160, 89, 0.3);
    transition: opacity 0.25s ease, transform 0.25s ease;
}

.lightbox-nav-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(197, 160, 89, 0.4);
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.25s ease;
}

.lightbox-nav-btn:hover {
    background: var(--gold);
    color: #ffffff;
}

.prev-btn { left: 14px; }
.next-btn { right: 14px; }

@media (max-width: 600px) {
    .lightbox-nav-btn {
        width: 38px;
        height: 38px;
        font-size: 13px;
    }
    .prev-btn { left: 8px; }
    .next-btn { right: 8px; }
}

.lightbox-footer {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255, 255, 255, 0.65);
    font-size: 12px;
    z-index: 10;
}

.lightbox-spinner {
    position: absolute;
    color: var(--gold);
    font-size: 32px;
    display: none;
}

.lightbox-spinner.show {
    display: block;
}

/* --- TOAST NOTIFICATION --- */
.toast {
    position: fixed;
    top: 25px;
    left: 50%;
    transform: translateX(-50%) translateY(-100px);
    background: #1e281b;
    color: #ffffff;
    padding: 10px 22px;
    border-radius: 30px;
    font-family: var(--font-kh);
    font-size: 13.5px;
    border: 1px solid var(--gold);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    z-index: 9999999;
    opacity: 0;
    transition: transform 0.35s ease, opacity 0.35s ease;
    pointer-events: none;
}

.toast.show {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* --- SCROLL REVEAL ANIMATIONS --- */
.reveal {
    opacity: 0;
    transform: translateY(35px);
    transition: opacity 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1);
    will-change: opacity, transform;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}
