/* =========================================
   1. IMPORT FONT LOKAL
========================================= */
@font-face {
    font-family: 'Great Vibes';
    src: url('../fonts/GreatVibes-Regular.ttf') format('truetype');
    font-weight: normal; font-style: normal;
}

@font-face {
    font-family: 'Playfair Display';
    src: url('../fonts/PlayfairDisplay-Regular.ttf') format('truetype');
    font-weight: normal; font-style: normal;
}

/* =========================================
   2. BASE STYLING
========================================= */
* {
    margin: 0; padding: 0; box-sizing: border-box;
}

body {
    font-family: 'Playfair Display', serif; /* Font default formal */
    background-color: #1a1a1a; /* Warna gelap khas elegan */
    color: #e0d4b5; /* Warna emas/krem khas Bali */
    overflow: hidden; /* Mengunci scroll sebelum cover dibuka */
}

.cursive { font-family: 'Great Vibes', cursive; }
.serif { font-family: 'Playfair Display', serif; }
.text-gold { color: #d4af37; }
.text-center { text-align: center; }

/* =========================================
   3. COVER TIRAI (SLIDE UP)
========================================= */
#cover-page {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100vh;
    /* Ganti foto background ini dengan foto couple kamu */
    background: linear-gradient(rgba(0, 0, 0, 0.6), rgba(0, 0, 0, 0.8)), url('../images/cover-bg.jpg') center/cover no-repeat;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    z-index: 9999;
    transition: transform 1.2s cubic-bezier(0.77, 0, 0.175, 1);
}

#cover-page.open {
    transform: translateY(-100vh); /* Efek meluncur ke atas */
}

.cover-title {
    font-size: 3rem; /* Dikecilkan agar tidak nabrak di HP */
    line-height: 1.2;
    margin: 15px 0;
    color: #d4af37;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.8);
    padding: 0 10px;
    text-align: center;
}

.guest-box {
    margin: 30px 0; padding: 15px 30px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid #d4af37;
    border-radius: 10px;
    backdrop-filter: blur(5px);
}

.btn-open {
    padding: 12px 30px;
    background-color: #d4af37; color: #1a1a1a;
    border: none; border-radius: 30px;
    font-family: 'Playfair Display', serif; font-weight: bold; font-size: 1rem;
    cursor: pointer; transition: 0.3s;
    box-shadow: 0 4px 15px rgba(212, 175, 55, 0.3);
}

.btn-open:hover {
    background-color: #fce8a1; transform: scale(1.05);
}

/* Container Konten Utama */
#main-content {
    max-width: 500px; /* Ukuran mobile friendly seperti di HP */
    margin: 0 auto; background-color: #111;
    min-height: 100vh; display: none;
}

/* =========================================
   3.5. SECTION DOA (SETELAH COVER)
========================================= */
.quote-section {
    position: relative;
    width: 100%;
    height: 100vh; /* Memenuhi layar HP/Laptop */
    /* Pastikan kamu menyiapkan foto 'couple-doa.jpg' di folder images */
    background: url('../images/couple-doa.jpg') center/cover no-repeat;
    display: flex;
    align-items: flex-end; /* Menempatkan teks dan kabut di bagian bawah */
    justify-content: center;
}

.quote-overlay {
    width: 100%;
    padding: 80px 20px 40px 20px;
    /* Efek kabut hitam: transparan di atas, hitam pekat di bawah menyatu dengan background */
    background: linear-gradient(to top, #111111 10%, rgba(17, 17, 17, 0.7) 60%, transparent 100%);
    text-align: center;
}

.quote-text {
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 15px;
    font-style: italic;
    color: #fce8a1;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.8);
}

.quote-source {
    font-size: 1rem;
    font-weight: bold;
    color: #d4af37;
}

/* =========================================
   TOMBOL MUTE AUDIO MENGAMBANG
========================================= */
.btn-mute {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #d4af37;
    color: #111;
    border: none;
    border-radius: 50%;
    width: 45px;
    height: 45px;
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 9999;
    display: none; /* Disembunyikan dulu sampai cover dibuka */
    box-shadow: 0 4px 10px rgba(0,0,0,0.5);
    align-items: center;
    justify-content: center;
    transition: 0.3s;
}
.btn-mute:hover {
    transform: scale(1.1);
}

/* =========================================
   4. PROFIL MEMPELAI
========================================= */
.profil-container { display: flex; flex-direction: column; gap: 40px; align-items: center; padding: 50px 20px; }
.profil-card { text-align: center; width: 100%; }

.profil-img { 
    width: 220px; 
    height: 320px; 
    border-radius: 120px 120px 15px 15px; /* Ini kuncinya agar jadi bentuk kubah/arch */
    object-fit: cover; 
    border: 3px solid #d4af37; 
    margin-bottom: 15px; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.5);  
}

/* =========================================
   5. DETAIL ACARA (GLASSMORPHISM)
========================================= */
.event-container { display: flex; justify-content: center; padding: 20px; }
.event-card {
    width: 100%;
    max-width: 380px; /* Mengunci ukuran agar tidak melar seperti gambar 5 */
    /* Efek Glass: Foto sangat terlihat tapi ada lapisan gelap/blur tipis */
    background: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.7)), url('../images/bg-acara.jpg') center/cover;
    color: #fff; 
    padding: 40px 20px; 
    border-radius: 20px; 
    text-align: center; 
    border: 1px solid rgba(212, 175, 55, 0.4); /* Bingkai emas tipis */
    box-shadow: 0 8px 32px rgba(0,0,0,0.5);
    backdrop-filter: blur(3px); /* Efek kaca */
}
.btn-map { background: #1a1a1a; color: #d4af37; padding: 12px 25px; text-decoration: none; border-radius: 30px; display: inline-block; margin-top: 15px; font-weight: bold; font-family: 'Playfair Display', serif;}
.btn-map:hover { background: #d4af37; color: #1a1a1a; }
/* =========================================
   6. COUNTDOWN TIMER (BOX/CARD STYLE)
========================================= */
.countdown-wrapper {
    max-width: 400px; /* Ukuran pas untuk kartu di tengah */
    margin: 60px auto 40px auto; /* Memberi jarak atas dan bawah */
    background: #fdfaf6; /* Warna krem/putih tulang untuk box bawah */
    border-radius: 20px; /* Ujung kotak melengkung */
    overflow: hidden; /* Agar foto di atas terpotong rapi mengikuti lengkungan */
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
    text-align: center;
}

.countdown-img {
    width: 100%;
    height: 250px; /* Tinggi foto di atas box */
    object-fit: cover;
    display: block;
}

.countdown-card {
    padding: 30px 20px; /* Jarak teks di dalam box krem */
}

.countdown-container { 
    display: flex; 
    justify-content: center; 
    gap: 10px; 
    margin-top: 20px;
}

.time-box { 
    background: #cc7b59; /* Warna Coral bata yang estetik */
    color: #fff; 
    padding: 12px 10px; 
    border-radius: 8px; 
    min-width: 65px; 
    text-align: center; 
    font-size: 0.8rem;
    box-shadow: 0 4px 10px rgba(0,0,0,0.1); 
}

.time-box span { 
    font-size: 1.8rem; 
    font-family: 'Playfair Display', serif; 
    display: block; 
    margin-bottom: 2px;
}
/*================================================
   7. GALERI SUSUNAN BATA (MASONRY) & POP-UP
========================================= */
.gallery-container { padding: 40px 20px; text-align: center; }
/* Susunan bata otomatis: 2 kolom untuk HP */
.masonry { column-count: 2; column-gap: 10px; margin-top: 20px; } 
.masonry img { width: 100%; margin-bottom: 10px; border-radius: 10px; display: block; cursor: pointer; transition: 0.3s; }
.masonry img:hover { transform: scale(0.98); }

/* Layar Hitam untuk Pop-up Foto */
#lightbox { display: none; position: fixed; z-index: 10000; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.9); justify-content: center; align-items: center; }
#lightbox img { max-width: 90%; max-height: 90%; border-radius: 10px; border: 2px solid #d4af37; }
#lightbox .close { position: absolute; top: 20px; right: 30px; color: white; font-size: 40px; cursor: pointer; }

/* =========================================
   8. FORM RSVP & BUKU TAMU
========================================= */
.rsvp-container { padding: 40px 20px; background: rgba(255,255,255,0.05); border-top: 1px solid #333; }
.form-group { margin-bottom: 15px; }
.form-control { width: 100%; padding: 12px; border-radius: 5px; border: 1px solid #555; background: #222; color: #fff; font-family: inherit; }
.btn-submit { background: #d4af37; color: #111; padding: 12px; width: 100%; border: none; border-radius: 5px; font-weight: bold; cursor: pointer; font-family: inherit;}
.guestbook { background: #111; padding: 20px; border-radius: 10px; max-height: 300px; overflow-y: auto; margin-top: 30px; border: 1px solid #333; }
.guest-item { border-bottom: 1px solid #333; padding-bottom: 10px; margin-bottom: 10px; }

/* =========================================
   9. MEDIA QUERIES (MAGIC TRICK UNTUK LAPTOP)
========================================= */
@media (min-width: 768px) {
    #main-content { max-width: 800px; } /* Lebarkan wadah utama */
    .profil-container { flex-direction: row; justify-content: space-around; align-items: flex-start; } /* Jejer kiri-kanan */
    .event-container { flex-direction: row; } /* Kotak acara berdampingan */
    .event-card { flex: 1; }
    .masonry { column-count: 3; } /* Galeri jadi 3 kolom biar rapi di layar lebar */
}
/* =========================================
   10. ANIMASI SCROLL
========================================= */
/* Kondisi elemen saat belum terlihat di layar */
.anim-fade-up {
    opacity: 0;
    transform: translateY(70px); /* Bergeser ke bawah 70px */
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.anim-zoom-in {
    opacity: 0;
    transform: scale(0.8); /* Mengecil 80% */
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

/* Kondisi elemen saat masuk ke layar (Muncul) */
.anim-show {
    opacity: 1;
    transform: translateY(0) scale(1);
}