/* Import Google Fonts */
/* MEMPERBARUI: Menambahkan font premium */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@700&family=Great+Vibes&family=Inter:wght@300;400;500;600&family=Playfair+Display:ital,wght@0,700;1,700&display=swap');

/* Variabel Warna Utama */
:root {
    --emerald-primary: #0f766e;
    --emerald-dark: #115e59;
    --emerald-light: #0d9488;
    --gold-accent: #facc15;
    --gold-hover: #eab308;
    --text-light: #f8fafc;
    --text-dark: #1e293b;
    --bg-light: #fdfdfd; /* Sedikit lebih bersih dari #f9f9f9 */
    --glass-bg: rgba(15, 118, 110, 0.35);
}

/* Style Global */
body {
    font-family: 'Inter', sans-serif;
    color: var(--text-dark);
    background-color: #fff;
    overflow-x: hidden;
}
html { scroll-behavior: smooth; }
h1, h2, h3, h4, h5, h6 { font-family: 'Playfair Display', serif; }

.section-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--emerald-dark);
    position: relative;
    padding-bottom: 0.5rem;
}
.section-title::after {
    content: ''; display: block; width: 60px; height: 3px;
    background-color: var(--gold-accent);
    box-shadow: 0 0 10px var(--gold-accent);
    margin: 0.75rem auto 0; border-radius: 2px;
}
.section-subtitle { font-size: 1.1rem; color: #666; margin-top: 0.5rem; }

.section-title-light {
    font-size: 2.5rem; font-weight: 700; color: var(--text-light);
    position: relative; padding-bottom: 0.5rem;
}
.section-title-light::after {
    content: ''; display: block; width: 60px; height: 3px;
    background-color: var(--gold-accent);
    box-shadow: 0 0 10px var(--gold-accent);
    margin: 0.75rem auto 0; border-radius: 2px;
}

/* 0. Opening Overlay */
.opening-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100vh;
    background: linear-gradient(180deg, var(--emerald-dark) 0%, var(--emerald-primary) 100%);
    z-index: 1050; display: flex; justify-content: center; align-items: center;
    cursor: pointer; transition: opacity 1s ease-out, visibility 1s ease-out;
    overflow: hidden;
    /* MEMPERBARUI: Menambahkan perspective untuk 3D */
    perspective: 1000px;
}
.opening-overlay.hidden {
    opacity: 0;
    visibility: hidden;
}

/* ==============================================
  PERBAIKAN CSS BUNGA ANDA ADA DI SINI 
  ==============================================
*/
.opening-flower {
    position: absolute;
    left: 0; /* Posisikan di kiri */
    width: 100%; /* Lebar penuh */
    height: auto; /* Tinggi otomatis */
    
    /* MEMPERBARUI: Opacity 1, hapus animasi lama, tambahkan transisi */
    opacity: 1; 
    filter: blur(0); /* Hapus blur */
    
    /* Transisi untuk Parallax JS */
    transition: transform 0.1s ease-out;
}

/* Posisi Bunga 1 (3.png) di ATAS */
.opening-flower.flower-1 { 
    top: 0; /* Tepat di atas */
    z-index: 5; /* Di atas teks */
}

/* Posisi Bunga 2 (4.png) di BAWAH */
.opening-flower.flower-2 { 
    bottom: 0; /* Tepat di bawah */
    z-index: 5; /* Di atas teks */
}
/* ==============================================
  AKHIR DARI PERBAIKAN
  ==============================================
*/

/* MEMPERBARUI: Wrapper untuk 3D Tilt */
.opening-tilt-wrapper {
    position: relative;
    z-index: 10; /* Di atas bunga */
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    /* Aktifkan 3D */
    transform-style: preserve-3d;
}

/* MEMPERBARUI: Konten di dalam 3D Tilt */
.opening-content {
    position: relative; 
    z-index: 2;
    /* Aktifkan 3D */
    transform-style: preserve-3d;
    transition: transform 0.1s ease-out;
    /* Hapus animasi lama agar bisa dikontrol JS */
}
/* Hapus keyframe zoomSoft (atau biarkan jika dipakai di tempat lain) */
@keyframes zoomSoft {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

/* MEMPERBARUI: Style Teks Premium */
.opening-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 300;
    letter-spacing: 1px;
    transform: translateZ(20px); /* Efek 3D */
}
.opening-invite-text {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 300;
    transform: translateZ(20px); /* Efek 3D */
}

.nama-pasangan-overlay {
    /* MEMPERBARUI: Font Premium (Great Vibes) */
    font-family: 'Great Vibes', cursive;
    font-size: 5rem; /* Lebih besar */
    font-style: normal;
    color: var(--text-light); 
    text-shadow: 0 0 10px rgba(255,255,255,0.5), 0 0 20px rgba(255,255,0.3);
    margin: 0;
    transform: translateZ(50px); /* Menonjol paling depan */
}
.nama-tamu-overlay {
    /* MEMPERBARUI: Font Premium (Cormorant Garamond) */
    font-family: 'Cormorant Garamond', serif;
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--gold-accent); 
    text-shadow: 0 0 10px var(--gold-accent), 0 0 20px var(--gold-hover);
    margin-top: 0.5rem;
    transform: translateZ(40px); /* Efek 3D */
}

/* MEMPERBARUI: Tombol dengan Efek Glow */
.btn-buka-undangan-overlay {
    background: var(--gold-accent); 
    color: var(--text-dark);
    font-weight: 600; 
    padding: 0.85rem 2.5rem; 
    border-radius: 50px;
    text-transform: uppercase; 
    letter-spacing: 0.5px; 
    border: none;
    transition: all 0.3s ease;
    /* EFEK GLOW BARU */
    box-shadow: 0 0 15px var(--gold-accent), 0 0 25px var(--gold-accent);
    animation: pulseGlow 2.5s infinite ease-in-out;
    transform: translateZ(30px); /* Efek 3D */
}
.btn-buka-undangan-overlay:hover {
    box-shadow: 0 0 20px var(--gold-hover), 0 0 40px var(--gold-hover);
    transform: translateZ(35px) translateY(-2px); /* Efek 3D hover */
}

/* BARU: Animasi Glow untuk Tombol */
@keyframes pulseGlow {
    0%, 100% {
        box-shadow: 0 0 15px var(--gold-accent), 0 0 25px var(--gold-accent);
    }
    50% {
        box-shadow: 0 0 25px var(--gold-hover), 0 0 45px var(--gold-hover);
    }
}


/* 1. Hero Section */
.hero-section {
    min-height: 100vh;
    background: linear-gradient(rgba(17, 94, 89, 0.8), rgba(15, 118, 110, 0.8));
    padding: 2rem;
    position: relative;
    overflow: hidden;
    /* Aktifkan 3D space untuk parallax scroll */
    transform-style: preserve-3d;
}

/* BARU: Style untuk Bunga Border di Hero Section */
.hero-flower {
    position: absolute;
    left: 0;
    width: 100%;
    height: auto;
    z-index: 2; /* Di bawah layer mid (3) & content (4) */
    
    /* Animasi fade-in */
    opacity: 0;
    animation: zoomSoft 1.5s ease-out forwards;
    animation-delay: 0.8s; /* Muncul setelah section fade-in */
}

/* Posisi Bunga 5.png (Atas) */
.hero-flower.hero-flower-1 {
    top: 0;
}
/* Posisi Bunga 6.png (Bawah) */
.hero-flower.hero-flower-2 {
    bottom: 0;
}
/* AKHIR BAGIAN BARU */

.parallax-bg-layer {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background-size: cover;
    background-position: center center;
    /* Ganti dengan PNG Bunga */
    opacity: 0.3;
}
.parallax-bg-layer.layer-back { z-index: 1; opacity: 0.2; }
.parallax-bg-layer.layer-mid { z-index: 3; opacity: 0.4; }
.parallax-bg-layer.layer-front { z-index: 5; opacity: 0.5; }

.hero-content { position: relative; z-index: 4; }
.nama-pasangan-hero {
    /* MEMPERBARUI: Font konsisten */
    font-family: 'Great Vibes', cursive;
    font-size: 6rem; /* Lebih besar */
    font-style: normal;
    text-shadow: 0 0 20px rgba(255,255,255,0.7);
}
.divider-gold-hero {
    width: 100px; height: 2px;
    background-color: var(--gold-accent);
    box-shadow: 0 0 10px var(--gold-accent);
    border-radius: 2px;
}

/* 2. Couple Section */
.couple-section { background-color: var(--bg-light); position: relative; }
/* Container untuk 3D Tilt */
.tilt-element-container { perspective: 1000px; }
.couple-card {
    background-color: #fff; border-radius: 1rem;
    padding: 2.5rem 2rem;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.07);
    transition: transform 0.1s ease-out;
    border: 1px solid #eee;
    transform-style: preserve-3d;
}
.couple-card:hover {
    box-shadow: 0 20px 50px rgba(15, 118, 110, 0.15);
}
.couple-img {
    width: 200px; height: 200px; border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--emerald-primary);
    box-shadow: 0 0 25px rgba(15, 118, 110, 0.4);
    transform: translateZ(40px); /* Foto menonjol */
}
.couple-name {
    font-size: 2rem; color: var(--emerald-dark);
    margin-top: 1.5rem; transform: translateZ(30px);
}
.couple-parent {
    font-size: 0.9rem; color: #555;
    margin-top: 0.5rem; transform: translateZ(20px);
}
.social-icons { transform: translateZ(20px); }
.social-icons a {
    color: var(--emerald-primary); font-size: 1.2rem;
    margin: 0 0.5rem; transition: all 0.3s ease;
}
.social-icons a:hover { color: var(--gold-accent); }

/* 3. Countdown Section (Glassmorphism) */
.countdown-section {
    background: linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
            url('https://placehold.co/1920x1080/555/777?text=Decor+BG') no-repeat center center;
    background-size: cover; background-attachment: fixed;
    position: relative; overflow: hidden;
}
.glass-card {
    background: var(--glass-bg); border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.1);
    position: relative; z-index: 3;
}
.time-box {
    width: 80px; height: 80px;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px; display: flex; flex-direction: column;
    justify-content: center; align-items: center;
}
.time-value { font-size: 2.5rem; font-weight: 600; line-height: 1; }
.time-label { font-size: 0.8rem; text-transform: uppercase; letter-spacing: 1px; }

/* 4. Event Section */
.event-section { background-color: #fff; }
.event-card {
    background-color: var(--bg-light); border-radius: 1rem;
    padding: 2.5rem; border: 1px solid #eee;
    transition: transform 0.1s ease-out, box-shadow 0.3s ease-out;
    height: 100%;
    transform-style: preserve-3d;
}
.event-card:hover {
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}
.event-icon {
    font-size: 3rem; color: var(--emerald-primary);
    margin-bottom: 1.5rem; transform: translateZ(40px);
}
.event-title { font-size: 2rem; color: var(--emerald-dark); transform: translateZ(30px); }
.event-date, .event-time, .event-location {
    font-size: 1.1rem; color: #333; margin-bottom: 0.5rem; transform: translateZ(20px);
}
.btn-map {
    background-color: var(--emerald-primary); color: var(--text-light);
    border-radius: 50px; padding: 0.5rem 1.5rem;
    transition: all 0.3s ease; transform: translateZ(20px);
}
.btn-map:hover {
    background-color: var(--emerald-dark); color: var(--gold-accent);
    box-shadow: 0 0 15px var(--emerald-dark);
}

/* 5. Gallery Section */
.gallery-section { background-color: var(--bg-light); }
.carousel-item img { height: 60vh; object-fit: cover; border-radius: 1rem; }
.carousel-control-prev-icon, .carousel-control-next-icon {
    background-color: var(--gold-accent); border-radius: 50%;
    padding: 1.2rem; background-size: 50%;
}
.carousel-indicators [data-bs-target] {
    background-color: var(--gold-accent); width: 12px; height: 12px;
    border-radius: 50%; border: 0; margin: 0 5px;
}
.carousel-indicators .active { background-color: var(--emerald-primary); }

/* 6. RSVP Section */
.rsvp-section {
    background: url('https://placehold.co/1920x1080/f5f5f5/ccc?text=Pattern+BG') no-repeat center center;
    background-size: cover;
}
.rsvp-form {
    background: #fff; padding: 2.5rem; border-radius: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.form-label { font-weight: 500; color: var(--emerald-dark); }
.form-control, .form-select {
    border-radius: 0.5rem; padding: 0.75rem 1rem; border: 1px solid #ddd;
}
.form-control:focus, .form-select:focus {
    border-color: var(--emerald-primary);
    box-shadow: 0 0 0 0.25rem rgba(15, 118, 110, 0.25);
}
.btn-rsvp {
    background-color: var(--emerald-primary); color: var(--text-light);
    font-weight: 600; padding: 0.8rem 2rem; border-radius: 50px;
    text-transform: uppercase; letter-spacing: 0.5px; border: none;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(15, 118, 110, 0.3);
}
.btn-rsvp:hover {
    background: linear-gradient(45deg, var(--gold-hover), var(--gold-accent));
    color: var(--emerald-dark);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(250, 204, 21, 0.5);
}


/* ======================================== */
/* BARU: STYLE UNTUK UCAPAN & DOA           */
/* ======================================== */
.ucapan-list-container {
    background: #fff;
    border-radius: 1rem;
    padding: 1.5rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
}
.ucapan-list-inner {
    max-height: 400px;
    overflow-y: auto;
    /* Custom scrollbar */
    scrollbar-width: thin;
    scrollbar-color: var(--emerald-primary) #eee;
}
.ucapan-card {
    background: var(--bg-light);
    border-radius: 0.5rem;
    padding: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid var(--emerald-primary);
}
.ucapan-nama {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    font-size: 1.1rem;
    color: var(--emerald-dark);
    margin-bottom: 0.25rem;
}
.ucapan-pesan {
    font-size: 0.95rem;
    color: #333;
    white-space: pre-wrap; /* Agar baris baru/enter terlihat */
    word-wrap: break-word; /* Agar teks panjang tidak merusak layout */
}


/* 7. Footer */
.footer-section { background: linear-gradient(45deg, var(--emerald-light), var(--emerald-dark)); }
.nama-pasangan-footer {
    /* MEMPERBARUI: Font konsisten */
    font-family: 'Great Vibes', cursive;
    font-size: 3rem; 
    font-style: normal;
    text-shadow: 0 0 10px rgba(255,255,255,0.3);
}
.social-icons-footer a {
    color: var(--text-light); font-size: 1.3rem; margin: 0 0.75rem;
    transition: all 0.3s ease;
}
.social-icons-footer a:hover {
    color: var(--gold-accent); transform: translateY(-3px);
}

/* Floating Music Icon */
.music-icon {
    position: fixed; bottom: 20px; right: 20px; width: 50px; height: 50px;
    background-color: var(--emerald-primary); color: var(--text-light);
    border-radius: 50%; display: flex; justify-content: center; align-items: center;
    font-size: 1.2rem; cursor: pointer; z-index: 1000;
    box-shadow: 0 4px 15px rgba(15, 118, 110, 0.4);
    transition: all 0.3s ease; transform-style: preserve-3d;
}
.music-icon.playing {
    animation: rotate3D 4s linear infinite;
    box-shadow: 0 0 20px var(--gold-accent);
    background-color: var(--gold-accent); color: var(--emerald-dark);
}
@keyframes rotate3D {
    0% { transform: rotateY(0deg); }
    100% { transform: rotateY(360deg); }
}

/* BARU: Particle Container untuk Overlay */
#particle-container-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
    z-index: 1; /* Di belakang teks & bunga, di depan background */
    pointer-events: none;
}
.particle-overlay {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--gold-accent);
    border-radius: 50%;
    opacity: 0;
    animation: floatPetals 15s linear infinite;
}
.particle-overlay.p2 {
    width: 5px;
    height: 5px;
    background: rgba(255, 255, 255, 0.5);
}

/* BARU: Animasi Floating Petals */
@keyframes floatPetals {
    0% {
        transform: translateY(110vh) rotateZ(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.7;
    }
    90% {
        opacity: 0.7;
    }
    100% {
        transform: translateY(-10vh) rotateZ(360deg);
        opacity: 0;
    }
}


/* Particle Container (untuk section-section) */
#particle-container-main {
    position: absolute; top: 0; left: 0; width: 100%; height: 100%;
    overflow: hidden; z-index: 1; pointer-events: none;
}

/* Animasi Scroll Reveal */
.reveal {
    opacity: 0; transform: translateY(50px);
    transition: opacity 1s ease-out, transform 0.8s ease-out;
}
.reveal.active { opacity: 1; transform: translateY(0); }
.reveal.fade-in { transform: translateY(0); }
.reveal.zoom-in { transform: scale(0.9); }
.reveal.zoom-in.active { transform: scale(1); }
.reveal.slide-up { transform: translateY(100px); }
.reveal.slide-up.active { transform: translateY(0); }

/* Responsif */
@media (max-width: 768px) {
    .nama-pasangan-hero { font-size: 3rem; }
    .section-title, .section-title-light { font-size: 2rem; }
    .couple-img { width: 150px; height: 150px; }
    .couple-name { font-size: 1.5rem; }
    .time-box { width: 65px; height: 65px; }
    .time-value { font-size: 1.8rem; }
    .event-card, .rsvp-form { padding: 1.5rem; }
    .carousel-item img { height: 40vh; }
    .parallax-bg-layer { /* Matikan parallax scroll di HP */ display: none; }
    .tilt-element { /* Matikan tilt di HP */ transform: none !important; }

    /* MEMPERBARUI: Matikan 3D Tilt & Parallax di HP */
    .opening-tilt-wrapper {
        perspective: none;
    }
    .opening-content {
        transform: none !important;
        animation: zoomSoft 1s ease-out forwards; /* Kembalikan animasi fade-in standar */
    }
    .opening-flower {
        transform: none !important;
        transition: none;
        animation: zoomSoft 1.5s ease-out forwards; /* Kembalikan animasi fade-in standar */
        animation-delay: 0.5s;
    }
    .nama-pasangan-overlay {
        font-size: 3.5rem; /* Sesuaikan ukuran font di HP */
    }
    .nama-tamu-overlay {
        font-size: 1.8rem;
    }

    /* Penyesuaian Bunga di HP */
    .opening-flower {
        width: 150%; /* Perbesar sedikit agar menutupi di HP */
    }
    .opening-flower.flower-1 { 
        top: -5%; /* Sedikit ke atas */
        left: -25%; /* Geser ke kiri */
    }
    .opening-flower.flower-2 { 
        bottom: -5%; /* Sedikit ke bawah */
        left: -25%; /* Geser ke kiri */
    }

    /* BARU: Penyesuaian Bunga Hero di HP */
    .hero-flower {
        width: 150%; /* Perbesar sedikit agar menutupi di HP */
    }
    .hero-flower.hero-flower-1 { 
        top: -5%; /* Sedikit ke atas */
        left: -25%; /* Geser ke kiri */
    }
    .hero-flower.hero-flower-2 { 
        bottom: -5%; /* Sedikit ke bawah */
        left: -25%; /* Geser ke kiri */
    }
    
    .ucapan-list-container {
        padding: 1rem;
    }
}