/* ======================================================= */
/* PENGATURAN DASAR & FONT                                 */
/* ======================================================= */
:root {
    --main-green: #677662;
    --light-green: #D4D8C8;
    --dark-text: #333333;
    --cream-bg: #F0EFEA;
    --script-font: 'Great Vibes', cursive;
    --body-font: 'Poppins', sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--body-font);
    background-color: var(--cream-bg);
    color: var(--dark-text);
    text-align: center;
    overflow-x: hidden;
    /* Mencegah scroll saat cover terbuka */
    overflow-y: hidden;
}

/* ======================================================= */
/* BAGIAN 1: HALAMAN PEMBUKA / COVER                       */
/* ======================================================= */
.cover-section {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    /* background-color: var(--main-green); */
    background-image: url('../media/cover-bg.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    transition: opacity 1.5s ease, visibility 1.5s;
    opacity: 1;
    visibility: visible;
    position: relative;
}

.cover-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* Ini adalah warna --main-green Anda, tapi dengan 80% transparansi */
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1;
    /* Posisikan overlay di belakang teks */
}

.cover-section.hidden {
    opacity: 0;
    visibility: hidden;
}

.cover-content {
    animation: fadeIn 2s ease-in-out;
    position: relative;
    /* Tambahkan ini */
    z-index: 2;
    /* Tambahkan ini */
}

.cover-intro {
    font-size: 1rem;
}

.cover-names {
    font-family: var(--script-font);
    font-size: 3.5rem;
    margin: 10px 0;
    font-weight: normal;
}

.cover-guest {
    margin-top: 30px;
    font-size: 0.9rem;
}

.guest-name {
    font-size: 1.2rem;
    font-weight: bold;
    margin-bottom: 30px;
}

.btn-open {
    background-color: rgba(255, 255, 255, 0.9);
    color: var(--dark-text);
    border: none;
    padding: 12px 24px;
    border-radius: 30px;
    font-family: var(--body-font);
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: transform 0.3s ease;
    /* Tambahkan baris ini untuk menengahkan tombol */
    margin: 0 auto;
}

.btn-open svg {
    animation: wiggle 1.5s linear infinite;
    transform-origin: center;
}

.btn-open:hover {
    transform: scale(1.05);
}

/* =======================================
   STYLE CARD AYAT (Sesuai Gambar)
   ======================================= */

/* * 1. Styling Card Utama (Container)
*/
.ayat-card {
    /* Menggunakan font Merriweather yang diimpor di HTML */
    font-family: 'Merriweather', serif;

    width: 90%;
    max-width: 600px;
    /* Atur lebar card sesuai selera */
    margin: 20% auto;
    /* Membuat card di tengah (opsional) */

    /* Ini kunci agar sudut gambar ikut melengkung */
    border-radius: 12px;
    overflow: hidden;

    /* Bayangan lembut seperti di contoh */
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);

    /* Mencegah celah aneh antara gambar dan teks */
    line-height: 0;
}

/* * 2. Styling Gambar
*/
.card-image {
    width: 100%;
    height: auto;
    display: block;
    /* Menghilangkan spasi ekstra di bawah gambar */
}

/* * 3. Styling Kotak Teks (Quote Box)
*/
.card-quote-box {
    background-color: #B0B8A4;
    /* Warna abu-abu gelap pekat */
    padding: 30px 25px;
    /* Jarak di dalam kotak */
    line-height: 1.7;
    /* Jarak antar baris teks (PENTING!) */
}

/* * 4. Styling Teks Kutipan (Lorem Ipsum)
 * Ini bagian tipografi utama
*/
.quote-text {
    color: #5A6351;
    /* Warna abu-abu muda (tidak terlalu putih) */
    font-style: italic;
    /* Teks miring */
    font-size: 1rem;
    /* 16px */
    text-align: center;
    margin: 0;
    /* Menghilangkan margin default paragraf */
}

/* * 5. Styling Teks Sumber (Nama Surat)
*/
.quote-source {
    color: #efefef;
    /* Warna lebih terang/putih */
    font-weight: 700;
    /* Bold */
    font-style: normal;
    /* Tidak miring */
    font-size: 1rem;
    text-align: center;
    margin: 0;
    /* Menghilangkan margin default */
    margin-top: 20px;
    /* Jarak dari kutipan di atasnya */
}

/* ======================================================= */
/* KONTEN UTAMA & TOMBOL BANTUAN                           */
/* ======================================================= */
#main-content.hidden {
    display: none;
}

.music-control-btn {
    position: fixed;
    bottom: 20px;
    right: 20px;
    width: 45px;
    height: 45px;
    background-color: var(--main-green);
    color: white;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 100;
    animation: spin 8s linear infinite;
    /* Animasi putaran */
}

.music-control-btn.paused {
    animation-play-state: paused;
}

.music-control-btn svg.hidden {
    display: none;
}

.menu-icon,
.whatsapp-icon {
    /* Style sama seperti sebelumnya */
    position: fixed;
    z-index: 100;
}

.menu-icon {
    top: 20px;
    right: 20px;
    cursor: pointer;
}

.menu-icon .line {
    width: 25px;
    height: 3px;
    background-color: var(--dark-text);
    margin: 5px 0;
}

.whatsapp-icon {
    bottom: 20px;
    right: 20px;
    background-color: #25D366;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.whatsapp-icon svg {
    width: 28px;
    height: 28px;
}

/* ======================================================= */
/* BAGIAN 2: HERO SECTION                                  */
/* ======================================================= */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    padding-top: 15vh;
    color: white;
}

.hero-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    /* GANTI url('') DENGAN URL FOTO LATAR BELAKANG UTAMA ANDA */
    background: url('../media/bg-after-invitation-section.jpeg') no-repeat center center/cover;
    filter: brightness(0.25);
    z-index: -1;
}

.hero-content p {
    font-size: 1rem;
}

.hero-content h1 {
    font-family: var(--script-font);
    font-size: 3rem;
    font-weight: normal;
    line-height: 1.2;
}

.hero-content h2 {
    font-family: var(--script-font);
    font-size: 2rem;
    margin: 5px 0;
}

/* Animasi untuk teks di Hero Section */
.hero-content .animate-item {
    opacity: 0;
    transform: translateY(20px);
    animation: fadeInUp 1s ease-out forwards;
}

.hero-content .animate-item:nth-child(1) {
    animation-delay: 0.5s;
}

.hero-content .animate-item:nth-child(2) {
    animation-delay: 0.8s;
}

.hero-content .animate-item:nth-child(3) {
    animation-delay: 1.1s;
}

.hero-content .animate-item:nth-child(4) {
    animation-delay: 1.4s;
}

.hero-content .animate-item:nth-child(5) {
    animation-delay: 1.7s;
}

/* =======================================
   STYLE SECTION KONFIRMASI KEHADIRAN
   ======================================= */

.rsvp-section {
    background-color: #121212;
    /* Hitam pekat (atau #000) */
    color: #ffffff;
    padding: 60px 20px;
    text-align: center;
    font-family: Arial, sans-serif;
    /* Font dasar untuk form */
}

.rsvp-section .container {
    max-width: 800px;
    margin: 0 auto;
}

/*
 * Teks Judul (Sesuai permintaan Anda)
 * 1. Font Dancing Script (mirip gambar)
 * 2. Warna Hijau
*/
.rsvp-section .section-title {
    /* Diambil dari Google Font di HTML */
    font-family: 'Dancing Script', cursive;
    font-size: 4rem;
    /* Ukuran bisa disesuaikan */
    font-weight: 700;
    color: #4CAF50;
    /* <-- WARNA HIJAU */
    margin: 0 0 10px 0;
}

.rsvp-section .section-subtitle {
    font-size: 1rem;
    color: #ccc;
    /* Sedikit lebih redup */
    margin-bottom: 40px;
}

/*
 * STYLING FORM (Bagian Penting)
 * Menggunakan Flexbox untuk menyusun field
*/
.rsvp-form {
    display: flex;
    flex-wrap: wrap;
    /* Izinkan field 'turun' ke bawah jika tidak muat */
    gap: 20px;
    /* Jarak antar elemen form */

    /* * Trik Penting: 
   * Menjajarkan bagian bawah input dengan tombol "Kirim"
   * (karena tombol tidak punya label di atasnya)
  */
    align-items: flex-end;
}

.form-group {
    display: flex;
    flex-direction: column;
    /* Susun label di atas input */
    text-align: left;
    /* Label rata kiri */
}

/* * Pembagian Lebar Field
 * 'flex: 1;' artinya 'field' bisa membesar/mengecil
*/
#group-nama {
    flex: 2;
    /* Nama dibuat 2x lebih lebar */
    min-width: 200px;
    /* Lebar minimum */
}

#group-jumlah {
    flex: 1;
    min-width: 80px;
}

#group-konfirmasi {
    flex: 1;
    min-width: 150px;
}

/* Styling untuk semua input dan select */
.form-group label {
    margin-bottom: 8px;
    font-weight: bold;
}

.form-group input,
.form-group select {
    background-color: #ffffff;
    color: #333;
    border: none;
    border-radius: 8px;
    padding: 12px;
    font-size: 1rem;
    height: 48px;
    /* Samakan tinggi semua input */
    box-sizing: border-box;
    /* Padding tidak menambah ukuran */
}

/* Styling Tombol Kirim */
.submit-btn {
    background-color: #8f8f8f;
    /* Warna pink dari gambar */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    padding: 0 30px;
    /* Padding horizontal */
    height: 48px;
    /* Samakan tinggi dengan input */
    font-size: 1rem;
    font-weight: normal;
    cursor: pointer;
    transition: background-color 0.3s ease;
}

.submit-btn:hover {
    background-color: #000000;
    /* Warna pink sedikit lebih gelap */
}


/* * =======================================
 * RESPONSIVE UNTUK MOBILE
 * =======================================
 * (Layar di bawah 768px)
*/
@media (max-width: 768px) {
    .rsvp-section .section-title {
        font-size: 3rem;
        /* Kecilkan judul di mobile */
    }

    .rsvp-form {
        /* Ubah arah flex menjadi kolom (vertikal) */
        flex-direction: column;

        /* Buat semua field rata kiri, tidak lagi sejajar bawah */
        align-items: stretch;
    }

    /* * Di mobile, kita tidak perlu 'min-width' 
   * karena semua field akan 100% lebar layar
  */
    #group-nama,
    #group-jumlah,
    #group-konfirmasi {
        min-width: 100%;
    }
}

/* ======================================================= */
/* BAGIAN 8: LOVE GIFT / KADO PERNIKAHAN                 */
/* ======================================================= */
.gift-section {
    background-color: #1E2022;
    color: #EAEAEA;
    padding: 80px 20px;
    text-align: center;
}

.gift-section h2 {
    font-family: var(--script-font);
    font-size: 3rem;
    font-weight: normal;
    color: #FFFFFF;
}

.gift-intro {
    max-width: 400px;
    margin: 15px auto 30px;
    line-height: 1.6;
    font-size: 0.9rem;
}

.gift-card-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.gift-card {
    background-color: #2C2F33;
    border-radius: 12px;
    padding: 20px;
    text-align: left;
}

.gift-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    font-weight: 500;
    font-size: 1.1rem;
    margin-bottom: 15px;
}

.gift-card-header svg {
    color: #EAEAEA;
}

.gift-card-body {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.gift-card-body p {
    font-size: 0.95rem;
}

.info-btn {
    background-color: transparent;
    border: 1px solid #EAEAEA;
    color: #EAEAEA;
    border-radius: 20px;
    padding: 6px 14px;
    font-size: 0.85rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: background-color 0.3s;
}

.info-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Styling untuk Modal / Popup */
.gift-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    transition: opacity 0.3s, visibility 0.3s;
}

.gift-modal.hidden {
    opacity: 0;
    visibility: hidden;
}

.modal-overlay {
    position: absolute;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
}

.modal-content {
    background-color: #2C2F33;
    color: #EAEAEA;
    padding: 30px;
    border-radius: 12px;
    width: 90%;
    max-width: 350px;
    z-index: 1002;
    position: relative;
    text-align: center;
}

.modal-close-btn {
    position: absolute;
    top: 10px;
    right: 15px;
    background: none;
    border: none;
    color: #EAEAEA;
    font-size: 2rem;
    cursor: pointer;
}

.modal-content h3 {
    margin-bottom: 20px;
    font-size: 1.3rem;
}

#modal-body {
    margin-bottom: 25px;
    line-height: 1.7;
    white-space: pre-wrap;
    /* Agar baris baru (\n) berfungsi */
}

#modal-body img {
    /* Untuk menampilkan QR Code */
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin-top: 10px;
}

.btn-copy {
    background-color: var(--main-green);
    color: white;
    border: none;
    padding: 12px 25px;
    border-radius: 8px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.3s;
}

.btn-copy:hover {
    background-color: #5a6854;
}

/* ======================================================= */
/* BAGIAN LAINNYA (COUNTDOWN, COUPLE, DLL.)                */
/* ======================================================= */
.countdown-section {
    /* Warna latar belakang sage green seperti di gambar */
    background-color: #B0B8A4;
    /* Warna teks utama di section ini (untuk "We are waiting for...") */
    color: #5A6351;
    padding: 50px 20px;
    border-radius: 20px 20px 20px 20px;
    margin-top: -20px;
    position: relative;
    z-index: 2;
    margin-left: 1em;
    margin-right: 1em;
    box-shadow: 0 4px 8px 0 rgba(0, 0, 0, 0.2), 0 6px 20px 0 rgba(0, 0, 0, 0.19);
}

.countdown-section p {
    font-size: 1rem;
}

.countdown-section h2 {
    /* Menggunakan font serif untuk "The Adventure" */
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 3rem;
    font-weight: normal;
    /* Dibuat tidak tebal */
    margin: 10px 0 30px;
    /* Warna sama dengan teks di atasnya */
    color: #5A6351;
}

.countdown-timer {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 15px;
    /* Sedikit memperlebar jarak antar kotak */
    max-width: 450px;
    /* Menyesuaikan lebar agar pas */
    margin: 0 auto;
}

.time-box {
    /* Warna latar kotak yang lebih gelap */
    background-color: #5F7161;
    /* Warna teks untuk label (Days, Hours, etc) */
    color: #DDE1DD;
    padding: 15px 10px;
    border-radius: 10px;
    width: 85px;
    /* Sedikit menyesuaikan lebar kotak */
    display: flex;
    flex-direction: column;
    font-weight: 400;
    /* Teks label dibuat tidak tebal */
    line-height: 1.2;
    font-size: 0.9rem;
}

.time-box span {
    /* Warna angka menjadi putih bersih */
    color: #FFFFFF;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 5px;
}

.couple-section {
    padding: 60px 20px;
}

.couple-section h2 {
    font-family: var(--script-font);
    font-size: 3rem;
    margin-bottom: 30px;
}

.profile {
    margin-top: 40px;
}

.profile-image-container {
    width: 150px;
    height: 150px;
    border-radius: 50%;
    border: 5px solid #6699CC;
    margin: 0 auto;
    padding: 5px;
    /* background-color: white; */
}

.profile-image-container img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.profile h3 {
    font-family: var(--script-font);
    font-size: 2rem;
    margin-top: 15px;
}

.parent-info {
    font-size: 0.9rem;
    margin-top: 5px;
}

.event-section {
    padding: 60px 20px;
    background-color: white;
}

.event-section h2 {
    font-family: var(--script-font);
    font-size: 3rem;
    margin-bottom: 30px;
}

.event-card {
    background-color: var(--light-green);
    padding: 30px 20px;
    border-radius: 10px;
    margin-bottom: 20px;
    max-width: 400px;
    margin-left: auto;
    margin-right: auto;
}

.event-icon {
    width: 15%;
    margin-bottom: 15px;
}

.event-card h3 {
    font-size: 1.8rem;
    margin-bottom: 10px;
}

.event-card p {
    margin-bottom: 10px;
    line-height: 1.6;
}

.location {
    font-weight: 500;
}

.btn {
    display: inline-block;
    background-color: var(--main-green);
    color: white;
    padding: 10px 20px;
    border-radius: 20px;
    text-decoration: none;
    margin-top: 10px;
}

.gallery-section {
    padding: 60px 20px;
    background-color: var(--cream-bg);
}

.gallery-section h2 {
    font-family: var(--script-font);
    font-size: 3rem;
    margin-bottom: 30px;
}

.gallery-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    max-width: 500px;
    margin: 0 auto;
}

.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 8px;
}

footer.closing-section {
    padding: 80px 20px;
}

footer h2 {
    font-family: var(--script-font);
    font-size: 4rem;
}

footer>p {
    font-size: 1.2rem;
    margin-top: -10px;
}

/* ======================================================= */
/* KEYFRAMES & ANIMASI                                     */
/* ======================================================= */
@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.8s ease-out 0.8s, transform 0.8s ease-out 0.8s;
}

.slide-in-from-left {
    transform: translateX(-50px);
}

.slide-in-from-right {
    transform: translateX(50px);
}

.slide-in-from-bottom {
    transform: translateY(50px);
}

.animate-on-scroll.is-visible {
    opacity: 1;
    transform: translateY(0);
}

@keyframes wiggle {
    0% {
        transform: rotate(0);
    }

    10% {
        transform: rotate(-10deg);
    }

    20% {
        transform: rotate(10deg);
    }

    30% {
        transform: rotate(-10deg);
    }

    40% {
        transform: rotate(10deg);
    }

    50% {
        transform: rotate(0);
    }

    100% {
        transform: rotate(0);
    }
}