/* Reset Dasar */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --gold: #c5a059;
    --dark-pink: #b8298b;
}

body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    font-family: sans-serif;
    overflow: hidden; /* Mencegah scrollbar */
}

body, html {
    margin: 0;
    padding: 0;
    height: 100%;
    background-color: #fdf5f8;
    overflow: hidden; /* Mencegah scroll body utama */
}

/* Membatasi viewport agar terlihat seperti layar HP */
.mobile-viewport {
    width: 360px; /* Ukuran standar mobile */
    height: 640px;
    background-color: #f5f5f5;
    border: 8px solid #222;
    border-radius: 20px;
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.main-stage {
    position: relative;
    width: 100%;
    height: 100%;
}

/* --- LAYER 1 (KIRI KE KANAN) --- */
.layer-1 {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.6s ease-in-out;
    z-index: 2;
    background-image: url('file/bg.png');
    background-size: cover;
    background-position: center;
}

.banner-wrapper {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    /* Lebar wrapper disesuaikan untuk mode mobile */
    width: 300px;
}

.buka-undangan-text {
    font-family: var(--font-family);
    font-size: 16px;
    font-weight: bold;
    color: #fff;
    text-transform: uppercase;
    letter-spacing: 2px;
    white-space: nowrap;
}

.green-bar {
    width: 250px; /* Lebar bar */
    height: 50px; /* Ukuran diperkecil untuk mobile */
    background-color: var(--dark-pink);
    border: 2px solid var(--gold);
    border-radius: 50px;
    position: absolute;
    top: 5cm;
    left: 20px; /* Bar dimulai sedikit ke kanan dari lingkaran */
    z-index: 1;
    display: flex;
    justify-content: center;
    align-items: center;
}

.ornament-circle {
    width: 60px; /* Ukuran lingkaran diperkecil */
    height: 60px;
    background-color: black;
    background-size: cover;
    background-position: center;
    border: 3px solid var(--gold);
    border-radius: 50%;
    position: absolute;
    left: 0; /* Dimulai dari ujung kiri */
    top: 4.9cm; /* Digeser kebawah 3cm */
    z-index: 2;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 5px 10px rgba(0,0,0,0.3);
    /* Animasi dengan efek 'bounce' */
    transition: transform 1.2s cubic-bezier(0.68, -0.6, 0.32, 1.6);
}

.inner-pattern {
    width: 80%;
    height: 80%;
    border: 1px solid var(--gold);
    border-radius: 50%;
    background-image: radial-gradient(circle, transparent 20%, var(--gold) 21%, transparent 22%);
    background-size: 8px 8px; /* Ukuran pola mobile */
}

/* --- LAYER 2 (TAMPILAN TUJUAN) --- */
.layer-2 {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.5s ease;
    z-index: 1;
    overflow: hidden;
}

.frame-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('file/frame.png');
    background-size: 100% 100%;
    background-position: center;
    background-repeat: no-repeat;
    z-index: 10; /* Angka tinggi agar selalu di depan */
    
    /* PENTING: Agar user bisa klik/scroll menembus gambar frame */
    pointer-events: none; 
}

/* 2. AREA SCROLL DI BELAKANG FRAME */
.scrollable-content {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow-y: auto;
    z-index: 1; /* Di bawah frame */
    padding: 100px 40px; /* Padding besar agar teks muncul di area tengah frame */
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    align-items: center;
}

/* Wadah Teks */
.inner-content {
    max-width: 500px;
    width: 100%;
    text-align: center;
    font-family: 'Playfair Display', serif;
    color: #333;
    margin-top: 1cm;
}

/* --- Styling Teks (Sama seperti sebelumnya) --- */
.event-title {
    font-family: 'Cinzel', serif;
    color: #b8298b;
    font-size: 1.5rem;
    margin-top: 20px;
}

.info-box {
    margin: 30px 0;
    padding: 15px;
    border: 1px solid rgba(184, 41, 139, 0.3);
    text-align: left;
}

.event-table td {
    padding: 5px;
}

.qr-code {
    width: 70px;
    border: 1px solid #b8298b;
}

.salam {
    font-weight: bold;
    font-style: italic;
    font-size: 1.1rem;
    color: #b8298b;
}

.opening-text, .closing-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin: 20px 0;
}

.event-subtitle {
    font-size: 1.3rem;
    font-weight: bold;
    margin-top: 0;
    letter-spacing: 2px;
}

.location-footer {
    display: flex;
    align-items: center;
    margin-top: 25px;
    gap: 20px;
    justify-content: center; /* Menyesuaikan posisi di tengah */
}

.qr-code {
    width: 85px;
    height: 85px;
    border: 2px solid #b8298b;
    padding: 5px;
    background: white;
    transition: transform 0.3s ease;
}

.qr-code:hover {
    transform: scale(1.1); /* Efek membesar saat kursor di atasnya */
}

.map-action {
    text-align: left;
}

.btn-maps {
    display: inline-block;
    margin-top: 8px;
    padding: 8px 15px;
    background-color: #b8298b; /* Warna magenta pilihan Anda */
    color: white !important;
    text-decoration: none;
    font-size: 0.85rem;
    border-radius: 5px;
    font-weight: bold;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: background 0.3s ease;
}

.btn-maps:hover {
    background-color: #4a0e35; /* Warna lebih gelap saat di-hover */
}

.align-top {
    vertical-align: top !important;
}

/* Custom Scrollbar */
.scrollable-content::-webkit-scrollbar {
    width: 0px; /* Sembunyikan scrollbar agar terlihat seperti kertas melayang */
}

/* Scroll Reveal Animation */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Delays for staggered effect */
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }
.reveal-delay-5 { transition-delay: 0.5s; }
.reveal-delay-6 { transition-delay: 0.6s; }
.reveal-delay-7 { transition-delay: 0.7s; }

.salam {
    font-weight: bold;
    font-style: italic;
    font-size: 1.2rem;
    margin-bottom: 15px;
}

.opening-text {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 20px;
    padding: 0 10px;
}

.event-title {
    font-family: 'Cinzel', serif;
    color: #b8298b;
    font-size: 1.5rem;
    margin-bottom: 0;
}

.event-subtitle {
    font-size: 1.4rem;
    margin-top: 5px;
    letter-spacing: 2px;
}

/* Kotak Detail Acara */
.info-box {
    margin-top: 25px;
    padding: 20px;
    border: 1px solid #d4af37; /* Border emas tipis */
    background: rgba(255, 255, 255, 0.5);
    position: relative;
}

.event-table {
    width: 100%;
    text-align: left;
    border-collapse: collapse;
    font-size: 1rem;
}

.event-table td {
    padding: 5px 2px;
}

.event-table td:first-child {
    width: 80px;
}

/* Bagian QR dan Footer Maps */
.location-footer {
    display: flex;
    align-items: center;
    margin-top: 15px;
    gap: 15px;
}

.qr-code {
    border: 1px solid #ccc;
    padding: 3px;
    background: white;
}

.location-footer p {
    font-size: 0.85rem;
    color: #555;
}

/* --- STATE ANIMASI (DITAMBAHKAN VIA JS) --- */

/* Lingkaran Berjalan KE KANAN (Positif) */
.animate-circle .ornament-circle {
    /* Jarak perpindahan disesuaikan dengan lebar bar */
    transform: translateX(210px) rotate(360deg);
}

/* Layer 1 Menghilang */
.fade-out-layer1 {
    opacity: 0;
    pointer-events: none;
}

/* Layer 2 Muncul */
.show-layer2 {
    opacity: 1;
    transform: scale(1);
}

/* --- INVITATION CARD --- */
.invitation-card {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1;
}

.invitation-card .content {
    text-align: center;
    padding: 20px;
    color: var(--gold);
    margin-top: -1cm;
}

.invitation-card .guest-label {
    font-size: 12px;
    margin-bottom: 5px;
}

.invitation-card .guest-title {
    font-size: 14px;
    margin-top: 5px;
    font-style: italic;
}

.invitation-card .title {
    font-family: 'Cinzel', serif; /* Font Serif yang elegan */
    font-size: 2.5rem; /* Sesuaikan ukuran */
    font-weight: 700;
    letter-spacing: 7px; /* Jarak antar huruf agar terlihat formal */
    margin-bottom: 10px;
    text-transform: uppercase;
    
    /* WARNA DASAR TEKS (Emas Muda) */
    color: #f3e5ab; 

    /* EFEK TEKS TIMBUL (Multiple Text Shadow) */
    /* Logika: Bayangan terang di kiri atas, bayangan gelap di kanan bawah */
    text-shadow: 
        /* Layer 1: Highlight terang (membuat kesan sudut terkena cahaya) */
        -1px -1px 1px rgba(255, 255, 255, 0.7), 
        
        /* Layer 2: Bayangan tipis warna emas medium (ketebalan huruf) */
        1px 1px 1px #b8860b, 
        
        /* Layer 3: Bayangan 3D utama (lebih tebal, warna emas tua) */
        2px 2px 1px #8b6508, 
        3px 3px 1px #8b6508,
        
        /* Layer 4: Bayangan jatuh/lembut (memisahkan teks dari background) */
        4px 4px 5px rgba(0, 0, 0, 0.5),
        5px 10px 15px rgba(0, 0, 0, 0.3);
}

.invitation-card .divider {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 15px 0;
}

.invitation-card .diamond {
    width: 15px;
    height: 15px;
    background-color: var(--gold);
    transform: rotate(45deg);
}

.invitation-card .main-text {
    font-size: 18px;
    margin: 8px 0;
    font-weight: normal;
}

.invitation-card .highlight {
    font-size: 22px;
    font-weight: bold;
    color: var(--gold);
}

.invitation-card .group-name {
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 20px 0;
    gap: 10px;
}

.invitation-card .group-name .line {
    width: 60px;
    height: 2px;
    background-color: var(--gold);
}

.invitation-card .group-name h3 {
    font-size: 16px;
    margin: 0;
    letter-spacing: 3px;
}

.invitation-card .year-badge {
    margin-top: 20px;
}

.invitation-card .badge-border {
    display: inline-block;
    border: 2px solid var(--gold);
    padding: 8px 20px;
    border-radius: 5px;
}

.invitation-card .badge-border p {
    margin: 0;
    font-size: 14px;
}

/* Guest Section */
.guest-section {
    margin-top: 30px;
    padding: 20px;
    border-top: 1px solid rgba(243, 229, 171, 0.2);
}

.yth {
    font-size: 0.9rem;
    font-style: italic;
    margin-bottom: 5px;
    color: #b8298b;
    opacity: 0.8;
    margin: 0.5cm 0 0 0;
}

#nama-tamu {
    font-size: 1.6rem;
    font-family: 'Cinzel', serif;
    color: #000;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin: 0.5cm 0 0 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.5);
}
