/* ========================================================= */
/* 1. RESET DAN PENGATURAN DASAR */
/* ========================================================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    transition: all 0.3s ease-in-out; 
}

/* Custom Fonts dari kode Anda */
.boldoa { font-family:'Boldoa'!important; }
.buffalo { font-family:'Buffalo'!important; }
.moontime { font-family:'Moontime'!important; }
.milktea { font-family:'Milktea'!important; }
.greatvibes { font-family:'GreatVibes'!important; }

body {
    /* MENCEGAH SCROLLING PADA HALAMAN COVER */
    overflow: hidden; 
    
    display: flex;
    /* PERBAIKAN PENTING: Mengubah arah flex menjadi COLUMN */
    flex-direction: column; 
    
    justify-content: flex-start; /* Konten dimulai dari atas */
    align-items: center; /* Menengahkan container di tengah layar */
    
    background-color: #fce8ee; 
    font-family: sans-serif; 
    color: #4c2c36; 

    /* Pengaturan Safe Area Insets iOS */
    padding-top: constant(safe-area-inset-top);
    padding-bottom: constant(safe-area-inset-bottom);
    padding-top: env(safe-area-inset-top);
    padding-bottom: env(safe-area-inset-bottom);
}

/* ========================================================= */
/* 2. LAYOUT HALAMAN COVER (OVERLAY & SLIDE ANIMATION) */
/* ========================================================= */
.page-overlay {
    position: fixed; 
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh; /* Dikembalikan ke 100vh untuk slide up yang benar */
    height: -webkit-fill-available; /* Tambahan untuk kompatibilitas mobile */
    z-index: 9999; 
    background-color: #fce8ee;
    display: flex;
    justify-content: center;
}

.slide-up-animation {
    transform: translateY(-100vh); 
    transition: transform 0.8s ease-in-out; 
}

/* ========================================================= */
/* 3. LAYOUT HALAMAN UTAMA (CONTENT & SCROLLABLE) */
/* ========================================================= */
.page-content {
    width: 100%;
}
.page-footer {
    width: 100%;
}

.hidden {
    display: none; 
}

/* ========================================================= */
/* 4. KONTAINER UTAMA (BATAS PORTRAIT UNTUK KEDUA HALAMAN) */
/* ========================================================= */
.invitation-container {
    width: 100%;
    max-width: 450px; 
    position: relative;
    padding: 0 10px; 
}

/* Style khusus Cover Page */
.cover-style {
    height: 100%; 
    display: flex;
    flex-direction: column;
    justify-content: flex-start; 
}

/* Style khusus Main Page (untuk konten detail) */
.main-style {
    min-height: 100vh; 
    background-color: #fef1f5; 
}

/* ========================================================= */
/* 5. GAYA KONTEN COVER (FINAL TATA LETAK VERTICAL) */
/* ========================================================= */
.main-content {
    text-align: center;
}

.cover-content {
    /* Padding bawah tetap ada untuk memberi ruang tombol */
    padding-bottom: calc(3vh + env(safe-area-inset-bottom)); 
    
    display: flex;
    flex-direction: column;
    
    /* PENTING: Memposisikan Konten Di Tengah (Vertikal) */
    justify-content: center; 
    height: 100%;
}

.title-section h1 {
    font-size: 5vh; 
    color: #ae485d;
}

.photo-section {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 2vh; /* Jarak antara Foto dan Nama */
}

.name-section {
    margin-bottom: 5vh; /* Jarak antara Nama dan Tombol */
}

.baby-name {
    font-size: 6vh; 
    color: #ae485d;
    line-height: 1.1;
    margin-bottom: 4vh; 
    letter-spacing: 1px;
    font-weight: 700;
    text-shadow: 3px 3px 5px rgba(0, 0, 0, 0.4); 
}

.to-text {
    font-size: 2.5vh; 
    margin-bottom: 0.5vh; 
}

.guest-name {
    font-size: 3vh; 
    margin-bottom: 0; 
}

.open-button {
    padding: 1.2vh 8vw; 
    background: linear-gradient(to right, #C6717E, #994054);
    color: white;
    text-decoration: none;
    font-size: 2vh; 
    font-weight: 600;
    border-radius: 30px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease-in-out;
}

.open-button:hover {
    background: #c9657b;
}

/* ========================================================= */
/* 6. GAYA KONTEN UTAMA (DETAIL PAGE) - Halaman 1 & 2 */
/* ========================================================= */
.main-style .main-content {
    padding-top: 20px;
    padding-bottom: 40px;
}

/* --- Gaya Halaman Acara (page-2) --- */
#page-2 .main-content {
    padding-top: 50px; /* Beri jarak di atas untuk konten acara */
}

.event-title, .rsvp-title {
    font-size: 4vh;
    color: #ae485d;
    margin-bottom: 20px;
    margin-top: 20px;
    font-weight: 700;
}

.event-card {
    background-color: #ffe0eb;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 30px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.event-type {
    font-size: 2.5vh;
    color: #994054;
    margin-bottom: 5px;
}

.event-time {
    font-size: 4vh;
    color: #ae485d;
    margin-bottom: 10px;
}

.event-date {
    color: #4c2c36;
    font-size: 16px;
}

.location-details {
    margin-bottom: 40px;
}

.location-address {
    font-size: 1.1em;
    color: #994054;
    margin: 10px 0 20px;
}

.map-button {
    display: inline-block;
    padding: 10px 30px;
}

/* --- Gaya RSVP/Ucapan --- */
.rsvp-box {
    background-color: #fff;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.05);
}

.rsvp-button {
    display: block;
    width: 100%;
    margin-top: 15px;
}

.message-area textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid #ffcccb;
    border-radius: 8px;
    margin-bottom: 10px;
    font-family: inherit;
    font-size: 14px;
    resize: vertical;
}

.send-message-button {
    display: block;
    width: 100%;
}


/* ========================================================= */
/* 7. MEDIA QUERY UNTUK DESKTOP/LAYAR LEBAR */
/* ========================================================= */
@media (min-width: 768px) {
    body { height: auto; padding: 0; align-items: center; } 

    .page-overlay { position: absolute; height: auto; min-height: 100vh; }

    .invitation-container { 
        min-height: auto; 
        margin: 50px auto; 
        border-radius: 15px;
        box-shadow: 0 0 20px rgba(0, 0, 0, 0.2); 
    }

    /* Cover di desktop */
    .cover-style { 
        padding: 40px 10px;
        border-radius: 15px;
        justify-content: flex-start;
    }
    .cover-content {
        padding-top: 0;
        padding-bottom: 0;
        height: auto;
        justify-content: center; /* Tetap center untuk desktop */
    }
    .title-section { margin-bottom: 30px; }
    .photo-section { margin-bottom: 40px; }
    .name-section { margin-bottom: 50px; } 

    /* Mengembalikan unit ke px/em di desktop */
    .title-section h1 { font-size: 2.5em; margin-bottom: 0; }
    .cover-style .babyphoto { width: 200px; max-width: none; }
    .baby-name { font-size: 2.5em; }
    .guest-name { font-size: 1.2em; }
    .open-button { padding: 12px 40px; font-size: 1.1em; }
    .button-section { padding-bottom: 0; margin-top: 40px;}

    /* Style tambahan untuk desktop */
    .event-time { font-size: 2em; }
    .location-address { font-size: 1em; }
}