/* RESET & DASAR */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { background: #1a1a1a; font-family: 'Montserrat', sans-serif; }
.no-scroll { overflow: hidden; } /* Kunci scroll saat pembuka aktif */

.mobile-container { 
    max-width: 450px; 
    margin: 0 auto; 
    background: #fff; 
    min-height: 100vh; 
    position: relative; 
    overflow-x: hidden; 
}

.hidden { display: none; }
.white { color: #ffffff !important; }
.mt-10 { margin-top: 10px; }
.container-padding { padding: 0 35px; width: 100%; text-align: center; }

/* TYPOGRAPHY */
.baby-name-42 { font-family: 'Meow Script', cursive; font-size: 42px; text-align: center; border-bottom: 5px; margin: 10px 0; }
.font-20-bold { font-size: 20px; font-weight: 800; text-align: center; }
.font-16-bold { font-size: 16px; font-weight: 700; text-align: center; }
.font-14-reg { font-size: 14px; font-weight: 400; line-height: 1.5; }

/* HALAMAN 1: PEMBUKA */
.page-pembuka {
    position: fixed;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    max-width: 450px;
    height: 100%;
    z-index: 1000;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('img/dpn.webp') center/cover;
    
    /* Ubah dari center ke flex-end untuk mendorong konten ke bawah */
    display: flex;
    flex-direction: column;
    justify-content: flex-end; 
    align-items: center;
    
    /* Memberi jarak dari bawah layar agar tidak mentok */
    padding-bottom: 7vh; 
    text-align: center;
}

.pembuka-content {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin: 10px 0;
    /* Menghilangkan gap agar kita bisa atur margin manual yang lebih presisi */
    gap: 0; 
}

.img-arab-pembuka { 
    width: 180px; 
    height: auto; 
    margin-bottom: 20px; 
}

/* Memastikan box tamu dan teks di dalamnya benar-benar center */
.guest-box {
    width: 100%;
    margin: 15px 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    margin-bottom: 2px;
    margin-top: 5px;
}

.guest-box p {
    display: block;
    width: 100%;
    margin-bottom: 2px;
}

.guest-name-text {
    display: block;
    width: 100%;
}

.white { 
    color: #ffffff !important; 
    text-align: center;
}

.btn-buka {
    background: #fff;
    color: #000;
    border: none;
    padding: 12px 40px;
    border-radius: 30px;
    font-weight: 700;
    margin-top: 10px;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
}

/* HALAMAN 2: HOME */
.page-home {
    height: 100vh;
    width: 100%;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('img/atas.webp') center/cover;
    display: flex;
    flex-direction: column;
    /* Membuat konten condong ke bawah sesuai halaman pembuka */
    justify-content: flex-end; 
    align-items: center;
    padding-bottom: 7vh; 
    text-align: center;
}

.content-home {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.img-arab-home { 
    width: 150px; 
    margin-bottom: 10px; 
}

/* TATA LETAK TANGGAL VERTIKAL */
.center-date {
    display: flex;
    flex-direction: column; /* Mei, 2, dan 2026 berderet ke bawah */
    align-items: center;
    justify-content: center;
    line-height: 1.1; /* Mengatur jarak antar baris teks agar rapat */
}

.date-num {
    font-size: 28px !important; /* Memperbesar angka tanggal agar menonjol */
    font-weight: 800;
}

.date-section {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    border-top: 1px solid #fff;
    border-bottom: 1px solid #fff;
    padding: 10px 0;
    margin: 15px 0;
    width: 90%; /* Memberi batas lebar garis agar tidak terlalu panjang ke samping */
}

.divider { 
    width: 1px; 
    height: 60px; /* Menyesuaikan tinggi garis pemisah karena teks tengah bertambah baris */
    background: #fff; 
}

.address-text {
    padding: 0 10px;
}

/* --- HALAMAN 3 & 4 --- */
.page-white { padding: 15px 0; }
.single-screen { height: 100vh; overflow: hidden; display: flex; flex-direction: column; justify-content: center; }

.event-list { margin: 15px 0; }
.event-item { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 8px; text-align: left; }
.gallery-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.gallery-grid img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 4px; }

/* --- .baby-intro-box { 
    background: linear-gradient(rgba(0,0,0,0.4), rgba(0,0,0,0.4)), url('img/bwh.webp') center/cover; 
    padding: 40px 20px; text-align: center; 
} --- */

/* Update Font Judul di Halaman 3 (Event & Gallery) */
.title-42 { 
    font-family: 'Meow Script', cursive; 
    font-size: 42px; 
    text-align: center;
    margin-bottom: 15px;
    color: #000000 !important; /* Diubah menjadi Hitam */
}

/* Pastikan section ini kembali ke warna latar putih agar font hitam kontras */
.page-white { 
    padding: 15px 0; 
    background: #ffffff; 
    min-height: 100vh;
}

/* Pastikan teks detail acara (tanggal, waktu, lokasi) juga berwarna hitam */
.event-item {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-bottom: 12px;
    text-align: left;
    color: #000000; /* Warna hitam untuk teks detail */
}

/* Reset warna putih yang tadi mungkin sempat menempel */
.event-item span {
    color: #000000;
}

/* Memberi jarak lebih antara Maps dan Gallery */
.mt-40 { margin-top: 40px !important; }

/* CSS Lightbox Slider */
.lightbox-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.95);
}

.lightbox-container {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100%;
    width: 100%;
}

.lightbox-content {
    max-width: 85%;
    max-height: 80vh;
    border-radius: 8px;
    object-fit: contain;
}

/* Tombol Panah Kiri & Kanan */
.prev, .next {
    cursor: pointer;
    position: absolute;
    top: 50%;
    width: auto;
    padding: 16px;
    margin-top: -30px;
    color: white;
    font-weight: bold;
    font-size: 30px;
    transition: 0.3s ease;
    user-select: none;
    text-decoration: none;
}

.prev { left: 5px; }
.next { right: 5px; }

.prev:hover, .next:hover { color: #bbb; }

.close-lightbox {
    position: absolute;
    top: 30px;
    right: 30px;
    color: white;
    font-size: 35px;
    cursor: pointer;
    z-index: 2001;
}

.baby-profile-header {
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('img/bwh.webp') center/cover;
    padding: 40px 0;
    text-align: center;
}

.name-meaning {
    font-size: 13px;
    line-height: 1.6;
    padding: 0 20px;
    font-style: italic;
}

/* Grid Data Kelahiran */
.birth-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-top: 20px;
    padding: 0 30px;
}

.birth-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
}

.birth-item img { width: 18px; }

/* Styling Gift Section */
.gift-container { text-align: center; padding-top: 30px; }

.bank-flex {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.bank-card {
    border: 1.5px solid #000;
    border-radius: 10px;
    padding: 10px;
    cursor: pointer;
    min-width: 140px;
    transition: transform 0.2s;
}

.bank-card:active { transform: scale(0.95); }

.bank-acc {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-weight: bold;
    font-size: 14px;
}

.bank-acc img { width: 15px; }

.bank-owner { font-size: 12px; margin-top: 5px; }

.gift-icon-big { width: 40px; margin-bottom: 10px; }

/* --- HALAMAN 5 & MODAL --- */
.form-wrapper {
    max-width: 450px;
    margin: 0 auto;
}

.form-group {
    display: flex;
    margin-bottom: 15px;
    align-items: flex-start; /* Label tetap di atas saat textarea membesar */
}

.form-label {
    width: 80px; /* Lebar tetap agar kotak input sejajar vertikal */
    font-weight: bold;
    padding-top: 10px;
    text-align: left;
}

.form-content {
    flex: 1;
}

.input-field {
    width: 100%;
    border: 2px solid #000;
    border-radius: 12px;
    padding: 10px 15px;
    font-family: inherit;
    box-sizing: border-box; /* Memastikan padding tidak merusak lebar */
}

.text-area {
    height: 100px;
    resize: none;
}

.button-group-rsvp {
    display: flex;
    gap: 10px; /* Jarak antar tombol */
    margin-top: 10px;
    width: 100%;
}

.btn-rsvp {
    flex: 1; /* Ukuran menyesuaikan layar secara otomatis */
    padding: 12px;
    border-radius: 15px;
    font-weight: bold;
    cursor: pointer;
    text-transform: uppercase;
    font-size: 14px;
    transition: 0.3s;
}

/* Tombol Hadir: Hitam Tulisan Putih */
.btn-hadir {
    background-color: #000;
    color: #fff;
    border: 2px solid #000;
}

/* Tombol Tidak Hadir: Putih Border Hitam Tulisan Hitam */
.btn-tidak {
    background-color: #fff;
    color: #000;
    border: 2px solid #000;
}

.btn-rsvp:active {
    transform: scale(0.98);
}

/* Efek saat tombol ditekan/loading */
.btn-rsvp:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    filter: grayscale(0.5);
}

/* Styling Daftar Komentar di bawah form */
.comment-list-wrapper {
    margin-top: 30px;
    text-align: left;
    max-width: 450px;
    margin-left: auto;
    margin-right: auto;
}

/* Memaksa teks berhenti di baris ke-5 dan memberi titik-titik otomatis (...) */
/* .comment-text-clamped {
/*    display: -webkit-box;
/*    -webkit-line-clamp: 5;
/*    -webkit-box-orient: vertical;
/*    overflow: hidden;
/*    line-height: 1.5em; /* Mengatur tinggi baris agar konsisten */
/*    max-height: 7.5em;  /* 1.5em x 5 baris */
/* } */

/* Hilangkan more jika teksnya pendek (opsional, tapi lebih rapi) */
.comment-item {
    position: relative;
    text-align: left;
}

.comment-header {
    font-weight: bold;
    font-size: 16px;
    color: #000;
}

.comment-status {
    font-weight: normal;
    font-size: 14px;
    color: #666; /* Warna abu untuk (Hadir/Tidak Hadir) */
}

.comment-text {
    font-size: 15px;
    line-height: 1.5;
    margin-top: 5px;
    color: #333;
}

.btn-lihat-semua-custom {
    background: #000;
    color: #fff;
    width: 100%; /* Menyesuaikan container */
    max-width: 450px;
    border: none;
    padding: 12px;
    border-radius: 12px;
    font-weight: bold;
    display: block;
    margin: 20px auto; /* Tengah secara horizontal */
    cursor: pointer;
    text-transform: uppercase;
}

.more-link {
    color: #000;
    font-weight: bold;
    cursor: pointer;
    font-size: 13px;
}

/* CSS Modal Pagination */
.pagination-controls {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 20px;
}

.page-btn {
    border: 1px solid #000;
    padding: 5px 10px;
    cursor: pointer;
}

.page-btn.active {
    background: #000;
    color: #fff;
}

/* Memberi jarak di bawah tombol paling akhir */
#ucapan {
    padding-bottom: 30px !important; /* Jarak dari batas bawah halaman */
}

/* Pastikan section ucapan bisa memanjang terus ke bawah */
.page-white-clean {
    height: auto !important;
    min-height: 100vh;
    overflow: visible !important;
}

/* Styling tambahan untuk link more agar jelas bisa diklik */
.more-link:hover {
    text-decoration: underline;
}

.line-limit-5 {
    display: -webkit-box;
    -webkit-line-clamp: 5;
    -webkit-box-orient: vertical;  
    overflow: hidden;
    position: relative;
}

.btn-more {
    color: #666;
    font-weight: bold;
    cursor: pointer;
    display: inline-block;
    margin-top: 5px;
    z-index: 10;
    position: relative;
}

/* Styling tambahan untuk modal agar ada tombol tutupnya */
.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #ddd;
    padding-bottom: 10px;
    margin-bottom: 15px;
}

.close-button {
    cursor: pointer;
    font-size: 24px;
    font-weight: bold;
    color: #333;
}

/* Musik */
.music-control-flat {
    position: fixed;
    bottom: 25px;
    right: 25px;
    width: 50px;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.7); /* Hitam Flat Transparan */
    backdrop-filter: blur(5px); /* Efek blur di belakang icon */
    color: #ffffff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 9999;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    transition: all 0.3s ease;
}

.music-control-flat:active {
    transform: scale(0.9);
}

/* Animasi berputar pelan jika kamu suka, jika tidak hapus bagian ini */
.music-active {
    animation: rotateSlow 5s linear infinite;
}

@keyframes rotateSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Gaya dasar elemen sebelum muncul */
/* Update CSS ini di style.css */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
    /* Pastikan tidak menghalangi klik saat belum muncul */
    pointer-events: none; 
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
    /* Kembalikan fungsi klik saat sudah muncul */
    pointer-events: auto; 
}

.bank-card {
    cursor: pointer;
    position: relative;
    z-index: 10; /* Pastikan kartu berada di lapisan atas */
}

/* Pastikan animate-pembuka tetap ada */
.animate-pembuka {
    animation: fadeInUp 1.5s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}