/* --- GLOBAL & SMOOTH SCROLL --- */
html { scroll-behavior: smooth; }

/* --- MOBILE NAV TRANSITION --- */
#mobileNav.show-menu {
    transform: translateX(0);
}

.mobile-link {
    transition: color 0.3s ease;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Animasi Putar Musik */
.animate-spin-slow {
    animation: spin 3s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* --- SCROLL REVEAL ANIMATION --- */
/* Keadaan awal (sembunyi) */
.reveal {
    opacity: 0;
    transform: translateY(30px); /* Muncul dari bawah ke atas */
    transition: all 0.8s ease-out;
}

/* Keadaan setelah muncul (aktif) */
.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Variasi: Muncul dari kiri (opsional buat elemen tertentu) */
.reveal-left {
    opacity: 0;
    transform: translateX(-50px);
    transition: all 0.8s ease-out;
}
.reveal-left.active {
    opacity: 1;
    transform: translateX(0);
}

/* Variasi: Muncul dari kanan */
.reveal-right {
    opacity: 0;
    transform: translateX(50px);
    transition: all 0.8s ease-out;
}
.reveal-right.active {
    opacity: 1;
    transform: translateX(0);
}

/* --- GALLERY STAGGERED REVEAL --- */
.stagger-img {
    opacity: 0;
    transform: scale(0.9) translateY(20px); /* Mulai dari agak kecil dan di bawah */
    transition: all 0.6s cubic-bezier(0.165, 0.84, 0.44, 1); /* Efek pegas halus */
}

/* Saat sudah masuk area layar (aktif) */
.stagger-img.active {
    opacity: 1;
    transform: scale(1) translateY(0);
}

/* Pause animasi saat musik berhenti */
.music-paused {
    animation-play-state: paused !important;
}

/* Style tambahan untuk slider volume agar rapi */
#volumeSlider {
    cursor: pointer;
    height: 4px;
    border-radius: 2px;
}

/* =========================================
   CSS: WELCOME PAGE (INDEX)
========================================= */
/* --- WELCOME PAGE STYLES --- */
body { font-family: 'Playfair Display', serif; }
.font-parisienne { font-family: 'Parisienne', cursive; }

/* Latar Belakang Responsif */
.bg-wrapper-custom {
    background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.4) 50%, rgba(0, 0, 0, 0.7) 100%), 
                url('../../Media/Mobile.png') center top / 100% auto no-repeat;
}

@media (min-width: 768px) {
    .bg-wrapper-custom {
        background: linear-gradient(to bottom, rgba(0, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.7) 60%, rgba(10, 14, 23, 0.95) 100%), 
                    url('../../Media/Background\ Welcome.png') center/cover no-repeat;
    }
}

/* Efek Teks Emas & Shadow */
.text-emas-custom {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7);
    -webkit-background-clip: text;
    background-clip: text; /* Untuk kompatibilitas */
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.shadow-teks-custom {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}

/* Tombol Buka Undangan */
.btn-buka-custom {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.btn-buka-custom:hover { 
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* =========================================
   CSS SECTION 1: QUOTE
========================================= */
#quote-section {
    background-image: url('../../Media/Background-Quote-mobile.png');
    background-position: center top;
    background-size: 100% auto;
    background-repeat: no-repeat;
    height: 222vw; 
    min-height: 100vh;
}
@media (min-width: 768px) {
    #quote-section {
        background-image: url('../../Media/Background Quote.png'); 
        background-position: center;
        background-size: cover; 
        height: 100vh; 
    }
}

/* FIX BUG TEKS TERPOTONG (SOLUSI ANGKA 3) */
.text-gold-gradient {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding: 0.2em 0.4em;
    margin: -0.2em -0.4em;
    -webkit-box-decoration-break: clone;
    box-decoration-break: clone;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.2); 
    will-change: transform;
}

/* =========================================
   CSS SECTION 2: THE COUPLE
========================================= */
.bg-couple-custom {
    background: #061121 url('../../Media/The\ Couple.png') center/cover no-repeat;
}
@media (min-width: 768px) {
    .bg-couple-custom {
        background: #061121 url('../../Media/Background\ The\ Couple.png') center/cover no-repeat;
    }
}

.text-emas-custom {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
    padding: 0 0.15em;
}
.title-shadow { text-shadow: 2px 2px 4px rgba(0,0,0,0.4); }

.anim-sway-left {
    transform-origin: bottom center;
    animation: swayLeft 4s ease-in-out infinite alternate;
}
@keyframes swayLeft {
    0% { transform: scaleX(-1) rotate(-5deg); }
    100% { transform: scaleX(-1) rotate(5deg); }
}

.anim-sway-right {
    transform-origin: bottom center;
    animation: swayRight 4s ease-in-out infinite alternate;
}
@keyframes swayRight {
    0% { transform: rotate(-5deg); }
    100% { transform: rotate(5deg); }
}

/* =========================================
   CSS SECTION 3: WAKTU
========================================= */
#waktu-section {
    background-image: url('../../Media/Background Polos.png');
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
}
.date-frame-bg {
    background-image: url('../../Media/Border Waktu.png');
    background-position: center;
    background-size: contain;
    background-repeat: no-repeat;
}
.time-shadow {
    text-shadow: 0 0 10px rgba(255, 181, 148, 0.6), 0 0 20px rgba(255, 181, 148, 0.3);
}

/* FIX ARAH ELEMEN (MIRRORING ELEMEN WAKTU) */
.animate-sway-left {
    transform-origin: bottom center;
    animation: sway-left-fixed 4s ease-in-out infinite alternate;
}
@keyframes sway-left-fixed {
    0% { transform: scaleX(-1) rotate(0deg); }
    100% { transform: scaleX(-1) rotate(-5deg); }
}

.animate-sway-right {
    transform-origin: bottom center;
    animation: sway-right-fixed 4s ease-in-out infinite alternate;
}
@keyframes sway-right-fixed {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(5deg); }
}
.animate-breathe {
    animation: breathe-flower 4s ease-in-out infinite alternate;
}
@keyframes breathe-flower {
    0% { transform: scale(1); }
    100% { transform: scale(1.06); }
}

/* =========================================
   CSS SECTION 4: LOKASI
========================================= */
.mobile-element-size { width: 220px; }
.bg-lokasi-custom {
    background: #061121 url('../../Media/Background Polos.png') center/cover no-repeat;
    background-attachment: fixed;
}
.shadow-teks-custom { text-shadow: 2px 2px 4px rgba(0,0,0,0.5); }

.card-glass {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 0 20px rgba(212, 175, 55, 0.15);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.card-glass:hover {
    transform: translateY(-5px);
    box-shadow: 0 0 30px rgba(212, 175, 55, 0.3);
}
.divider-line {
    width: 2px; height: 40px;
    background: linear-gradient(to bottom, transparent, #d4af37, transparent); margin: 0 15px;
}
.btn-maps {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3); backdrop-filter: blur(5px); transition: all 0.3s ease;
}
.btn-maps:hover { background: rgba(212, 175, 55, 0.2); border-color: #d4af37; box-shadow: 0 0 15px rgba(212, 175, 55, 0.4); }
.leaf-anim {
    transform-origin: bottom right; animation: swayLeaf 4s ease-in-out infinite alternate;
}
@keyframes swayLeaf { 0% { transform: rotate(-3deg); } 100% { transform: rotate(3deg); } }

/* =========================================
   CSS SECTION 5: LOVE STORY
========================================= */
.font-script { font-family: 'Great Vibes', cursive; }

.bg-cerita-custom {
    background: #061121 url('../../Media/Background Cerita Mobile.png') center top no-repeat;
    background-size: 100% 100%;
}

@media (min-width: 768px) {
    .bg-cerita-custom {
        background: #061121 url('../../Media/Background Cerita.png') center top no-repeat;
        background-size: 100% 100%;
    }
}

.shadow-teks-halus {
    text-shadow: 2px 2px 5px rgba(0,0,0,0.6);
}

.torn-bottom-only {
    clip-path: polygon(
        0% 0%, 100% 0%, 100% 75%, 
        97% 76%, 94% 75.5%, 91% 77%, 88% 76.5%, 85% 78%, 82% 77.5%, 79% 79%, 76% 78.5%, 73% 80%, 
        70% 79.5%, 67% 81%, 64% 80.5%, 61% 82%, 58% 81.5%, 55% 83%, 52% 82.5%, 49% 84%, 46% 83.5%, 
        43% 85%, 40% 84.5%, 37% 86%, 34% 85.5%, 31% 87%, 28% 86.5%, 25% 88%, 22% 87.5%, 19% 89%, 
        16% 88.5%, 13% 90%, 10% 89.5%, 7% 91%, 4% 90.5%, 0% 92%
    );
    border: 2px solid #d4af37;
    background-color: #f4f2ed;
}

.timeline-icon {
    transition: all 0.3s ease;
}

.timeline-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 0 0 10px rgba(212, 175, 55, 0.2);
    animation: pulseGold 1.5s infinite;
}

@keyframes pulseGold {
    0% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0.7); }
    70% { box-shadow: 0 0 0 15px rgba(212, 175, 55, 0); }
    100% { box-shadow: 0 0 0 0 rgba(212, 175, 55, 0); }
}

.anim-float {
    animation: floating 6s ease-in-out infinite;
}

@keyframes floating {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-15px); }
    100% { transform: translateY(0px); }
}

.anim-washi-sway {
    transform-origin: top center;
    animation: washiSway 4s ease-in-out infinite alternate;
}

@keyframes washiSway {
    0% { transform: rotate(-1.5deg); }
    100% { transform: rotate(1.5deg); }
}

.frame-shadow-refined {
    filter: drop-shadow(0 5px 15px rgba(0,0,0,0.2));
}

/* =========================================
   CSS SECTION 6: GALLERY
========================================= */
.bg-galeri-custom {
    background: #061121 url('../../Media/Background Galeri.png') center/cover fixed no-repeat;
}

.glass-panel {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(0, 0, 0, 0.6) 100%);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    transition: all 0.3s ease;
}

.glass-panel:hover {
    border-color: rgba(212, 175, 55, 0.8);
    box-shadow: 0 4px 20px rgba(212, 175, 55, 0.2);
}

/* ACCORDION GRID LOGIC */
.accordion-content-wrapper {
    display: grid;
    grid-template-rows: 0fr;
    transition: grid-template-rows 500ms ease-in-out;
}

.accordion-content-wrapper.open {
    grid-template-rows: 1fr;
}

.accordion-inner { 
    overflow: hidden; 
}

/* GALLERY IMAGES ANIMATION */
.stagger-img {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.accordion-content-wrapper.open .stagger-img {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.gallery-img { 
    transition: transform 0.4s ease; 
}

.gallery-img:hover {
    transform: scale(1.05);
    z-index: 10;
}

/* ORNAMENT ANIMATION */
.anim-float-bottom {
    animation: floatBottom 4s ease-in-out infinite alternate;
}

@keyframes floatBottom {
    0% { transform: translateY(0px) scaleX(var(--flip, 1)); }
    100% { transform: translateY(-10px) scaleX(var(--flip, 1)); }
}

.flip-x { 
    --flip: -1; 
}

/* =========================================
   CSS SECTION 7: RSVP
========================================= */
.bg-rsvp-custom {
    background: #061121 url('../../Media/RSVP Mobile.png') center bottom no-repeat;
    background-size: 100% 100%;
    min-height: 100svh; 
    width: 100vw;
}

@media (min-width: 768px) {
    .bg-rsvp-custom {
        background: #061121 url('../../Media/Background The Couple.png') center/cover no-repeat;
        background-size: 100% 100%;
    }
}

.glass-card {
    background: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.input-field {
    background-color: #d1d1d1;
    color: #1a1a1a;
    transition: all 0.3s ease;
}

.input-field:focus {
    outline: none;
    box-shadow: 0 0 0 2px rgba(212, 175, 55, 0.8);
    background-color: #e6e6e6;
}

.btn-submit {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
}

.btn-submit:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

.fade-transition {
    transition: opacity 0.5s ease-in-out;
}

/* =========================================
   CSS SECTION 8: WEDDING GIFT
========================================= */
.bg-gift-custom {
    background: #061121 url('../../Media/Background Polos.png') center/cover fixed no-repeat;
}

.card-atm-manual {
    background-color: #0c0e14;
    aspect-ratio: 1.586 / 1;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
    position: relative;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: #ffffff;
}

.card-atm-manual::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(135deg, rgba(255,255,255,0.05) 0%, rgba(191,149,63,0.1) 50%, rgba(255,255,255,0.02) 100%);
    z-index: 5;
}

.card-atm-manual::after {
    content: '';
    position: absolute;
    top: -50%; left: -150%; width: 200%; height: 200%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.3), rgba(191,149,63,0.2), transparent);
    transform: rotate(-30deg);
    z-index: 10;
    transition: left 0.6s ease-in-out;
}

.card-atm-manual:hover {
    transform: scale(1.03) translateY(-5px);
    box-shadow: 0 10px 30px rgba(212, 175, 55, 0.3);
    z-index: 20;
}

.card-atm-manual:hover::after {
    left: 100%;
}

.atm-detail-emas {
    color: #d4af37;
    text-shadow: 1px 1px 2px rgba(0,0,0,0.5);
}

.atm-nomor-rekening {
    font-family: 'Courier New', Courier, monospace;
    letter-spacing: 2px;
    font-size: 1.3rem;
    color: #d4af37;
    text-shadow: 0 0 5px rgba(212, 175, 55, 0.5);
}

@media (min-width: 768px) {
    .atm-nomor-rekening { font-size: 1.6rem; }
}

.mastercard-logo {
    display: flex;
    position: absolute;
    bottom: 20px; right: 20px;
    gap: 2px;
    z-index: 15;
}

.mastercard-circle {
    width: 25px; height: 25px;
    border-radius: 50%;
    opacity: 0.9;
}

@media (min-width: 768px) {
    .mastercard-circle { width: 30px; height: 30px; }
}

.anim-sway {
    transform-origin: bottom center;
    animation: swayAnim 4s ease-in-out infinite alternate;
}

@keyframes swayAnim {
    0% { transform: rotate(-3deg); }
    100% { transform: rotate(3deg); }
}

.toast-glass {
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

/* =========================================
   CSS SECTION 9: UCAPAN & DOA
========================================= */
.bg-ucapan-custom {
    background: #061121 url('../../Media/Ucapan Doa Mobile.png') center top no-repeat;
    background-size: 100% 100%;
}

@media (min-width: 768px) {
    .bg-ucapan-custom {
        background: #061121 url('../../Media/Background Ucapan.png') center top no-repeat;
        background-size: 100% 100%;
    }
}

.glass-panel-dark {
    background: rgba(0, 0, 0, 0.6); 
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border: 1px solid rgba(212, 175, 55, 0.5);
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.7);
    transition: all 0.3s ease;
}

.btn-submit-custom {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1) 0%, rgba(0, 0, 0, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.3);
    backdrop-filter: blur(5px);
    transition: all 0.3s ease;
    color: #d4af37;
}

.btn-submit-custom:hover {
    background: rgba(212, 175, 55, 0.2);
    border-color: #d4af37;
    box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* CUSTOM SCROLLBAR FOR COMMENT LIST */
.custom-scrollbar::-webkit-scrollbar { width: 6px; }
.custom-scrollbar::-webkit-scrollbar-track { background: rgba(0, 0, 0, 0.2); border-radius: 10px; }
.custom-scrollbar::-webkit-scrollbar-thumb { background: rgba(212, 175, 55, 0.6); border-radius: 10px; }

.comment-box {
    background: linear-gradient(to bottom, #3a3a3a, #2a2a2a);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.5);
    animation: fadeInComment 0.5s ease-out;
}

@keyframes fadeInComment {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
/* ANIMASI FLOATING BUBBLES UCAPAN & DOA */
.ucapan-container {
    /* Efek gradient agar teks memudar perlahan di bagian atas dan bawah */
    -webkit-mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    mask-image: linear-gradient(to bottom, transparent, black 10%, black 90%, transparent);
    overflow: hidden;
    position: relative;
}

.ucapan-track {
    /* Kecepatan animasi (ganti 30s jadi lebih kecil kalau mau lebih cepat) */
    animation: scrollUpBubbles 30s linear infinite;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Fitur UX: Animasi berhenti saat tamu menaruh kursor / menyentuh layar */
.ucapan-container:hover .ucapan-track,
.ucapan-container:active .ucapan-track {
    animation-play-state: paused;
}

@keyframes scrollUpBubbles {
    0% { transform: translateY(50%); }
    100% { transform: translateY(-100%); }
}