/* =========================================
   VARIABEL & BASE SETUP
   ========================================= */
:root {
    --bg-maroon-dark: #31080D;
    --maroon-prime: #6D1420;
    --maroon-light: #9B2232;
    --gold-prime: #DEB554;
    --gold-light: #F9ECCC;
    --charcoal: #2A2A2A;
    --cream: #FDFBF7; 
    --white: #FFFFFF;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Montserrat', sans-serif;
    background-color: var(--cream);
    color: var(--charcoal);
    overflow: hidden; 
    -webkit-user-select: none; -moz-user-select: none; -ms-user-select: none; user-select: none;
}

img {
    -webkit-user-drag: none; -khtml-user-drag: none; -moz-user-drag: none; -o-user-drag: none; user-drag: none;
    -webkit-touch-callout: none; pointer-events: auto;
}

/* =========================================
   SVG & TYPOGRAPHY
   ========================================= */
.gorga-header {
    width: 100px; height: auto; margin-bottom: 20px; fill: var(--gold-prime);
    filter: drop-shadow(0px 4px 6px rgba(0,0,0,0.4));
}
.gorga-divider { width: 70px; height: auto; margin: 10px auto 25px auto; fill: var(--maroon-prime); }

.sub-title-top {
    font-family: 'Cinzel', serif; font-size: 0.85rem; letter-spacing: 6px;
    color: var(--gold-light); margin-bottom: 5px; text-transform: uppercase;
}
.main-wedding-title {
    font-family: 'Great Vibes', cursive; font-size: 4.5rem; color: var(--gold-prime);
    text-shadow: 2px 3px 8px rgba(0, 0, 0, 0.5); margin: 5px 0;
}
.ampersand { font-family: 'Cinzel Decorative', serif; font-size: 2.2rem; display: block; margin: -15px 0; color: var(--white); }

.section-title {
    font-family: 'Cinzel', serif; color: var(--maroon-prime); font-size: 1.8rem; margin-bottom: 15px; letter-spacing: 1px; font-weight: 700;
}
.subtitle-text { font-size: 0.9rem; color: #777; margin-bottom: 25px; text-transform: uppercase; letter-spacing: 1.5px; }
.verse-text { font-style: italic; color: #555; line-height: 1.8; font-size: 0.95rem; margin: 20px 0; }
.desc-text { line-height: 1.8; font-size: 0.95rem; color: #444; }

/* =========================================
   COVER PAGE
   ========================================= */
#cover-page {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: linear-gradient(135deg, var(--bg-maroon-dark) 0%, var(--maroon-prime) 50%, var(--maroon-light) 100%);
    display: flex; flex-direction: column; justify-content: center; align-items: center; text-align: center;
    z-index: 9999; transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1), opacity 1s ease; padding: 20px;
}
.cover-exit { transform: translateY(-100%) scale(0.95); opacity: 0; }
.cover-border {
    position: absolute; top: 15px; bottom: 15px; left: 15px; right: 15px;
    border: 1px solid rgba(222, 181, 84, 0.3); border-radius: 12px; pointer-events: none;
}
.cover-container { 
    position: relative; 
    max-width: 500px; width: 100%; animation: fadeInScale 1.5s ease-out; z-index: 2;
}

.guest-card {
    background: rgba(255, 255, 255, 0.1); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(255, 255, 255, 0.2); border-radius: 20px; padding: 25px; margin: 35px auto;
    width: 90%; box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}
.guest-card p { font-size: 0.8rem; color: rgba(255,255,255,0.8); letter-spacing: 2px; text-transform: uppercase; margin-bottom: 8px; }
.guest-name { font-family: 'Cinzel', serif; font-size: 1.5rem; color: var(--gold-light); font-weight: 600; letter-spacing: 1px; padding-top: 5px; display: inline-block; }

.wedding-date { font-family: 'Cinzel', serif; color: var(--white); font-size: 1.1rem; letter-spacing: 6px; margin-top: 5px; margin-bottom: 20px; font-weight: 500; }

.btn-open-invitation {
    position: relative;
    z-index: 999;
    pointer-events: auto;
    background: var(--gold-prime); color: var(--bg-maroon-dark); font-family: 'Montserrat', sans-serif; 
    font-weight: 600; font-size: 0.85rem; text-transform: uppercase;
    letter-spacing: 2px; padding: 16px 35px; border: none; border-radius: 50px; cursor: pointer;
    box-shadow: 0 8px 25px rgba(222, 181, 84, 0.4); transition: all 0.3s ease;
}
.btn-open-invitation:hover { transform: translateY(-3px); box-shadow: 0 12px 30px rgba(222, 181, 84, 0.6); }

/* Partikel */
.particles { position: absolute; top: 0; left: 0; width: 100%; height: 100%; overflow: hidden; z-index: 1; pointer-events: none; }
.particle { position: absolute; width: 3px; height: 3px; background: var(--gold-prime); border-radius: 50%; box-shadow: 0 0 12px 2px var(--gold-prime); animation: floatUp infinite linear; }
.particle:nth-child(1) { left: 20%; animation-duration: 9s; animation-delay: 0s; }
.particle:nth-child(2) { left: 40%; animation-duration: 13s; animation-delay: 2s; }
.particle:nth-child(3) { left: 60%; animation-duration: 10s; animation-delay: 4s; }
.particle:nth-child(4) { left: 80%; animation-duration: 15s; animation-delay: 1s; }
.particle:nth-child(5) { left: 90%; animation-duration: 11s; animation-delay: 3s; }

/* =========================================
   MAIN LAYOUT & SCROLLABLE CONTENT
   ========================================= */
#main-content {
    display: none; opacity: 0; transition: opacity 1s ease-in; 
    background-color: transparent; padding-bottom: 120px !important;
}
.section {
    max-width: 550px; margin: 40px auto; background: var(--white); padding: 45px 30px;
    border-radius: 24px; box-shadow: 0 15px 40px rgba(0,0,0,0.06); text-align: center;
    position: relative; overflow: hidden;
}
.section::before {
    content: ''; position: absolute; top: 0; left: 0; width: 100%; height: 6px;
    background: linear-gradient(90deg, var(--gold-prime), var(--maroon-prime));
}

/* Modifikasi SCROLLABLE: Display ditimpa menjadi block dan diberi margin scroll */
.tab-content { 
    display: block !important; 
    opacity: 1 !important; 
    scroll-margin-top: 40px; 
    margin-bottom: 40px;
}

/* --- Profil Mempelai --- */
.profile-wrapper { margin: 30px 0; }
.img-frame { width: 170px; height: 170px; margin: 0 auto 20px auto; border-radius: 50%; padding: 6px; background: linear-gradient(135deg, var(--gold-prime), var(--maroon-prime)); }
.profile-img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; background-color: var(--cream); cursor: pointer; transition: transform 0.4s ease; }
.profile-img:hover { transform: scale(1.05); }
.profile-img.flipped { transform: scaleX(-1); }
.profile-img.flipped:hover { transform: scaleX(-1) scale(1.05); }

.couple-name { font-family: 'Great Vibes', cursive; font-size: 3rem; color: var(--maroon-prime); margin-bottom: 5px; }
.couple-name.large { font-size: 3.5rem; }
.couple-full-name { font-family: 'Cinzel', serif; font-weight: 600; font-size: 1rem; color: var(--charcoal); margin-bottom: 8px; }
.parent-info { font-size: 0.85rem; color: #666; line-height: 1.6; }
.dengan { font-family: 'Great Vibes', cursive; font-size: 2.5rem; color: var(--gold-prime); margin: 15px 0; }

/* --- Jadwal Acara --- */
.event-card { background: var(--cream); padding: 25px 20px; margin-bottom: 20px; text-align: center; border-radius: 16px; border: 1px solid rgba(0,0,0,0.05); transition: transform 0.3s ease, box-shadow 0.3s; }
.event-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.08); }
.event-icon { font-size: 2rem; margin-bottom: 10px; }
.event-title { font-family: 'Cinzel', serif; color: var(--maroon-prime); font-size: 1.2rem; margin-bottom: 10px; font-weight: 700; }
.event-detail { font-size: 0.9rem; color: #555; line-height: 1.8; margin-bottom: 20px;}

/* --- Hadiah Digital --- */
.gift-card { background: #FAFAFA; border: 1px solid #EEE; border-radius: 16px; padding: 30px 20px; margin-bottom: 25px; text-align: center; transition: all 0.3s; }
.gift-card:hover { box-shadow: 0 10px 30px rgba(0,0,0,0.06); }
.bank-logo { height: 30px; margin-bottom: 15px; }
.qris-frame { background: white; padding: 15px; border-radius: 16px; border: 2px dashed var(--gold-prime); max-width: 220px; margin: 0 auto 15px auto; }
.qris-frame img { width: 100%; border-radius: 8px; }
.account-name { font-size: 0.85rem; color: #777; text-transform: uppercase; letter-spacing: 1px; }
.account-number { font-size: 1.4rem; font-family: 'Montserrat', sans-serif; font-weight: 700; color: var(--maroon-prime); margin: 8px 0 20px 0; letter-spacing: 2px; }
.qris-desc { font-size: 0.8rem; color: #777; line-height: 1.6; margin-bottom: 20px;}

/* --- Tombol Aksi --- */
.btn-copy, .btn-action { display: inline-block; background-color: var(--maroon-prime); color: var(--white); text-decoration: none; padding: 12px 25px; border-radius: 50px; font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 1px; cursor: pointer; border: none; transition: all 0.3s ease; }
.btn-copy:hover, .btn-action:hover { background-color: var(--gold-prime); transform: translateY(-2px); box-shadow: 0 5px 15px rgba(222, 181, 84, 0.4);}
.btn-action.outline { background-color: transparent; border: 1.5px solid var(--maroon-prime); color: var(--maroon-prime); }
.btn-action.outline:hover { background-color: var(--maroon-prime); color: var(--white); }

/* =========================================
   GALERI GSAP GRID
   ========================================= */
.app { width: 100%; position: relative; }
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: 15px; padding: 10px 0; }
.item { cursor: pointer; border-radius: 12px; overflow: hidden; box-shadow: 0 5px 15px rgba(0,0,0,0.1); transition: transform 0.3s ease; }
.item:hover { transform: translateY(-5px); box-shadow: 0 8px 20px rgba(0,0,0,0.15); }
.item img { width: 100%; height: 100%; object-fit: cover; display: block; aspect-ratio: 1 / 1; }

.detail {
    position: fixed; 
    /* Baris top, left, dan transform DIHAPUS agar GSAP memegang kendali penuh di mobile */
    width: 90vw; max-width: 450px; max-height: 85vh; cursor: pointer; display: flex; flex-direction: column;
    visibility: hidden; border-radius: 20px; background: transparent; 
    z-index: 100000; justify-content: center; align-items: center;
}

.detail > img { 
    position: relative; z-index: 1; width: 100%; 
    max-height: 85vh; 
    object-fit: contain; 
    border-radius: 20px; 
    display: block; /* Mencegah munculnya jeda spasi putih di bagian bawah gambar */
}

.detail .content { display: none !important; }

/* CSS Tombol Close Galeri Global (SAMA PERSIS DENGAN PROFIL) */
.close-gallery {
    position: fixed;
    top: 20px;
    right: 30px;
    color: #FFFFFF;
    font-size: 40px;
    font-weight: bold;
    cursor: pointer;
    z-index: 1000000;
    transition: color 0.3s ease;
    visibility: hidden; /* Diumpetin secara default oleh JS */
    opacity: 0;
}
.close-gallery:hover {
    color: var(--gold-prime);
}

/* =========================================
   MODAL PROFIL ZOOM (FIX LAPISAN)
   ========================================= */
.modal {
    display: none; position: fixed; z-index: 999999; left: 0; top: 0; width: 100%; height: 100vh;
    background-color: rgba(0, 0, 0, 0.85); backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px);
    justify-content: center; align-items: center; overflow: hidden;
}
.modal-content { max-width: 90%; max-height: 80vh; border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.5); animation: zoomIn 0.3s ease; object-fit: contain; }
.close-modal { position: absolute; top: 20px; right: 30px; color: #FFFFFF; font-size: 40px; font-weight: bold; cursor: pointer; z-index: 1000000; transition: color 0.3s ease; }
.close-modal:hover { color: var(--gold-prime); }

/* =========================================
   FLOATING BOTTOM NAVIGATION
   ========================================= */
.bottom-nav {
    position: fixed; bottom: -100px; left: 50%; transform: translateX(-50%); width: 92%; max-width: 450px; 
    background: rgba(255, 255, 255, 0.95); backdrop-filter: blur(15px); -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(0,0,0,0.05); border-radius: 40px; display: flex; justify-content: space-between; 
    align-items: center; padding: 10px 15px; z-index: 99999; box-shadow: 0 10px 35px rgba(0,0,0,0.1);
    transition: bottom 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.bottom-nav.show { bottom: 25px; }
.nav-item {
    display: flex; flex-direction: column; align-items: center; background: none; border: none;
    color: #999; font-family: 'Montserrat', sans-serif; font-size: 0.6rem; font-weight: 600;
    text-transform: uppercase; cursor: pointer; width: 16%; transition: all 0.3s ease;
}
.nav-item svg { width: 22px; height: 22px; fill: #999; margin-bottom: 4px; transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1); }
.nav-item.active { color: var(--maroon-prime); }
.nav-item.active svg { fill: var(--maroon-prime); transform: translateY(-3px) scale(1.15); }

/* =========================================
   MUSIC CONTROL 
   ========================================= */
.music-control {
    position: fixed; top: 20px; right: 20px; width: 45px; height: 45px; background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(5px); -webkit-backdrop-filter: blur(5px); color: var(--maroon-prime); border: 1px solid rgba(0,0,0,0.1); 
    border-radius: 50%; display: none; justify-content: center; align-items: center; font-size: 18px; cursor: pointer; 
    z-index: 10000; box-shadow: 0 5px 15px rgba(0,0,0,0.1); animation: spinMusic 4s linear infinite; transition: all 0.3s ease;
}
.music-control:hover { transform: scale(1.1); background: var(--white); }
.music-control.paused { animation: none; background: rgba(0,0,0,0.5); color: #FFF; border-color: transparent;}

/* =========================================
   FESTIVE LOOK & ANIMATIONS
   ========================================= */
.shiny-text {
    background: linear-gradient(135deg, var(--gold-prime) 0%, #FFFDF7 50%, var(--gold-prime) 100%);
    background-size: 200% auto; -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    animation: textShine 4s linear infinite; text-shadow: 0px 2px 10px rgba(222, 181, 84, 0.4);
}
.shiny-amp { color: rgba(255, 255, 255, 0.95); text-shadow: 0px 0px 15px rgba(222, 181, 84, 0.7); }
.glow-icon { filter: drop-shadow(0px 0px 10px rgba(222, 181, 84, 0.8)); }
.shine { position: relative; overflow: hidden; }
.shine::after { content: ''; position: absolute; top: -50%; left: -60%; width: 20%; height: 200%; background: rgba(255, 255, 255, 0.5); transform: rotate(30deg); animation: iconShine 3s infinite; }

.ambient-background { position: fixed; top: 0; left: 0; width: 100%; height: 100vh; background-color: #0d0103; z-index: -1; overflow: hidden; }
.glow-light { position: absolute; border-radius: 50%; background: radial-gradient(circle, rgba(109, 20, 32, 0.2) 0%, rgba(0,0,0,0) 70%); filter: blur(40px); animation: ambientFloat infinite; }
.glow-light:nth-child(1) { width: 400px; height: 400px; top: -100px; left: -100px; animation-duration: 20s; }
.glow-light:nth-child(2) { width: 350px; height: 350px; bottom: 10%; right: 10%; animation-duration: 25s; animation-delay: -5s; }
.glow-light:nth-child(3) { width: 200px; height: 200px; top: 40%; left: 50%; animation-duration: 15s; animation-delay: -2s; }

.festive-section { border: 2px solid rgba(222, 181, 84, 0.1); box-shadow: 0 10px 40px rgba(222, 181, 84, 0.05); background: linear-gradient(135deg, rgba(255, 255, 255, 0.98), rgba(253, 251, 247, 1)); }
.festive-title { font-family: 'Cinzel Decorative', serif; text-shadow: 0px 2px 4px rgba(0,0,0,0.1); }

.delay-1 { animation-delay: 0.2s !important; }
.delay-2 { animation-delay: 0.4s !important; }
.fade-in-up { animation: fadeInUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; opacity: 0; transform: translateY(30px); }

.btn-pulse-glow { animation: pulseGlow 2s infinite; }
.img-pulse-glow { position: relative; }
.img-pulse-glow::after { content: ''; position: absolute; top: -5px; bottom: -5px; left: -5px; right: -5px; border-radius: 50%; border: 2px solid rgba(222, 181, 84, 0.5); animation: imagePulse 2s infinite ease-out; opacity: 0; z-index: -1; }
.btn-hover-shine { position: relative; overflow: hidden; }
.btn-hover-shine::after { content: ''; position: absolute; top: -50%; left: -100%; width: 50%; height: 200%; background: rgba(255, 255, 255, 0.4); transform: rotate(30deg); transition: all 0.5s ease; }
.btn-hover-shine:hover::after { left: 150%; }
.card-hover-elevate:hover { transform: translateY(-8px); box-shadow: 0 15px 35px rgba(222, 181, 84, 0.1); }

.mb-20 { margin-bottom: 20px; } .mb-30 { margin-bottom: 30px; }
.maroon-bold { color: var(--maroon-prime); font-weight: 600; }
.footer-wrapper { border-top: 1px solid #EEE; padding-top: 30px; margin-top: 10px; }

@keyframes fadeInScale { 0% { opacity: 0; transform: scale(0.9); } 100% { opacity: 1; transform: scale(1); } }
@keyframes floatUp { 0% { transform: translateY(100vh) scale(0); opacity: 0; } 30% { opacity: 0.6; } 70% { opacity: 0.6; } 100% { transform: translateY(-10vh) scale(1.5); opacity: 0; } }
@keyframes spinMusic { 100% { transform: rotate(360deg); } }
@keyframes zoomIn { from {transform: scale(0.8); opacity: 0;} to {transform: scale(1); opacity: 1;} }
@keyframes ambientFloat { 0%, 100% { transform: translate(0, 0); } 50% { transform: translate(50px, -30px); } }
@keyframes textShine { from { background-position: 0% center; } to { background-position: 200% center; } }
@keyframes pulseGlow { 0% { box-shadow: 0 0 15px rgba(222, 181, 84, 0.4); } 50% { box-shadow: 0 0 25px rgba(222, 181, 84, 0.8), 0 0 40px rgba(222, 181, 84, 0.4); } 100% { box-shadow: 0 0 15px rgba(222, 181, 84, 0.4); } }
@keyframes imagePulse { 0% { transform: scale(1); opacity: 0.8; } 100% { transform: scale(1.15); opacity: 0; } }
@keyframes fadeInUp { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
@keyframes iconShine { 0% { left: -150%; opacity: 0; } 15% { opacity: 1; } 30% { left: 150%; opacity: 0; } 100% { opacity: 0; } }

/* =========================================
   RESPONSIVE
   ========================================= */
@media screen and (max-width: 600px), screen and (max-height: 750px) {
    #cover-page { height: 100%; min-height: 100vh; min-height: 100dvh; }
    .main-wedding-title { font-size: 3.5rem; }
    .ampersand { font-size: 2rem; margin: -10px 0; }
    .guest-card { margin: 25px auto; padding: 20px; width: 92%; }
    .guest-name { font-size: 1.3rem; }
    .section { margin: 20px 15px; padding: 35px 20px; border-radius: 20px; }
    .section-title { font-size: 1.5rem; }
    .img-frame { width: 140px; height: 140px; }
    .couple-name { font-size: 2.5rem; }
    .couple-name.large { font-size: 2.8rem; }
    .bottom-nav { width: 90%; padding: 8px 10px; }
    .nav-item { font-size: 0.55rem; }
    .nav-item svg { width: 20px; height: 20px; }
}