/* --- FILE: walimat/assets/css/style.css --- */

:root {
    --primary-color: #cfb0ba;
    --secondary-color: #5a5a5a;
    --accent-color: #8f737d;
    --bg-color: #f9f9f9;
    --glass-bg: rgba(255, 255, 255, 0.9);
}

/* Hapus selector global * {} karena merusak Admin WordPress */

/* Scope Font hanya untuk elemen di dalam blok kita */
.wp-block-walimat-cover,
.wp-block-walimat-mempelai,
.wp-block-walimat-acara,
.wp-block-walimat-gift,
.wp-block-walimat-rsvp,
.wp-block-walimat-nav {
    font-family: 'Poppins', sans-serif;
    color: var(--secondary-color);
    line-height: 1.6;
    text-align: center;
}

/* Font Judul */
.wp-block-walimat-cover h1, .wp-block-walimat-cover h2, .wp-block-walimat-cover h3,
.wp-block-walimat-mempelai h2, .wp-block-walimat-mempelai h3,
.wp-block-walimat-acara h2,
.wp-block-walimat-gift h2,
.wp-block-walimat-rsvp h2 {
    font-family: 'Great Vibes', cursive;
    font-weight: 400;
}

/* =========================================
   1. BLOCK: COVER (SAMPUL)
   ========================================= */

#cover {
    /* Default untuk Frontend: Fixed Fullscreen */
    position: fixed;
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    color: white;
    transition: transform 0.5s ease-in-out;
}

/* --- PENTING: FIX UNTUK EDITOR WORDPRESS --- */
/* Jika #cover berada di dalam editor, jangan fixed, tapi relative.
   Agar user bisa mengeditnya dan tidak menutupi sidebar WP. */
.editor-styles-wrapper #cover,
.block-editor-block-list__block #cover {
    position: relative !important; /* Paksa jadi relative di editor */
    z-index: 1;
    height: 600px; /* Tinggi fix biar rapi di editor */
    margin-bottom: 20px;
}

#cover h1 { font-size: 3.5rem; margin: 10px 0; color: white; }
#cover .guest-name { 
    font-size: 1.5rem; 
    font-weight: bold; 
    margin-top: 10px; 
    background: rgba(255,255,255,0.2); 
    padding: 5px 20px; 
    border-radius: 20px; 
}

.btn-open {
    margin-top: 30px;
    padding: 12px 30px;
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50px;
    font-size: 1rem;
    cursor: pointer;
    display: inline-flex; /* Ganti flex jadi inline-flex aman */
    align-items: center;
    gap: 10px;
    animation: pulse 2s infinite;
}

@keyframes pulse { 0% { transform: scale(1); } 50% { transform: scale(1.05); } 100% { transform: scale(1); } }


/* =========================================
   2. BLOCK: MEMPELAI
   ========================================= */

.couple-section {
    padding: 60px 20px;
    background-color: white;
}

.couple-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 40px;
    margin-top: 30px;
}

.person {
    flex: 1;
    min-width: 200px;
}

.person img {
    border-radius: 50%;
    object-fit: cover;
    border: 5px solid var(--primary-color);
    margin-bottom: 15px;
}

.person h3 {
    font-size: 2rem;
    color: var(--accent-color);
    margin-bottom: 5px;
}


/* =========================================
   3. BLOCK: ACARA & HEADER
   ========================================= */

header#home {
    height: 100vh;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

/* Fix Header di Editor agar tidak terlalu tinggi */
.editor-styles-wrapper header#home {
    height: 500px;
    min-height: auto;
}

.event-info {
    padding: 60px 20px;
    background-color: var(--primary-color);
    color: white;
}

.countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.time-box {
    background: rgba(255,255,255,0.2);
    padding: 15px;
    border-radius: 10px;
    min-width: 80px;
}

.time-box span {
    display: block;
    font-size: 0.8rem;
    margin-top: 5px;
}


/* =========================================
   4. BLOCK: GIFT & RSVP
   ========================================= */

.gift-section {
    padding: 60px 20px;
    background-color: #f4f4f4;
}

.bank-container {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}

.bank-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    width: 300px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    display: flex;
    flex-direction: column;
    align-items: center;
}

.bank-logo { height: 40px; margin-bottom: 15px; object-fit: contain; }
.rek-number { 
    font-size: 1.2rem; font-weight: bold; background: #eee; 
    padding: 8px 15px; border-radius: 5px; margin: 15px 0; 
    letter-spacing: 1px; color: #333; 
}

.rsvp-section { padding: 60px 20px; background: white; }
.rsvp-section form { max-width: 400px; margin: 0 auto; text-align: left; }

/* Selector input di spesifikan agar tidak merusak input editor WP */
.rsvp-section input[type="text"], 
.rsvp-section select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #333;
}

/* =========================================
   5. MOBILE NAV
   ========================================= */
.mobile-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
}

/* Sembunyikan Nav di Editor agar tidak mengganggu */
.editor-styles-wrapper .mobile-nav {
    position: static;
    transform: none;
    margin-top: 20px;
    box-shadow: none;
    border: 1px solid #ddd;
}

.nav-item {
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nav-item i { font-size: 1.2rem; margin-bottom: 3px; }

/* Selector input di spesifikan agar tidak merusak input editor WP */
.rsvp-section input[type="text"], 
.rsvp-section select {
    width: 100%;
    padding: 10px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 5px;
    background: #fff;
    color: #333;
}

/* =========================================
   5. MOBILE NAV
   ========================================= */
.mobile-nav {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    border-radius: 50px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    display: flex;
    justify-content: space-around;
    padding: 10px 0;
    z-index: 1000;
}

/* Sembunyikan Nav di Editor agar tidak mengganggu */
.editor-styles-wrapper .mobile-nav {
    position: static;
    transform: none;
    margin-top: 20px;
    box-shadow: none;
    border: 1px solid #ddd;
}

.nav-item {
    text-decoration: none;
    color: var(--secondary-color);
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}
.nav-item i { font-size: 1.2rem; margin-bottom: 3px; }

/* =========================================
   6. COVER ULTIMATE (FIXED STRUCTURE)
   ========================================= */
/* ... CSS sebelumnya tetap sama ... */

/* Wrapper Utama */
.walimat-cover-wrapper {
    position: relative;
    width: 100%;
    /* Variables */
    --w-overlay-color: rgba(0,0,0,0.5);
    --w-title-size: 80px;
    --w-title-size-m: 45px;
    --w-sub-size: 18px;
    --w-sub-size-m: 14px;
    --w-padding: 100px;
    --w-padding-m: 50px;
    
    min-height: 100vh;
    min-height: 100dvh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background-color: #222;
    overflow: hidden; /* PENTING agar gambar tidak bocor keluar */
    padding-top: var(--w-padding);
    padding-bottom: var(--w-padding);
}

/* UPDATE: GAMBAR REAL (IMG TAG) */
.walimat-real-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover; /* Kunci agar gambar tidak gepeng */
    z-index: 0;
    margin: 0 !important; /* Reset margin bawaan tema */
    padding: 0 !important;
    max-width: none !important;
}

/* Layer Overlay Warna */
.walimat-bg-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    z-index: 1; /* Di atas gambar */
    background-color: var(--w-overlay-color);
    pointer-events: none;
}
/* Dekorasi Frame (Untuk Islami/Jawa) */
.walimat-inner-frame {
    position: absolute; z-index: 5; pointer-events: none;
    top: 0; left: 0; right: 0; bottom: 0;
}

/* Konten Utama */
.walimat-content {
    position: relative;
    z-index: 10;
    width: 100%;
    padding: 20px;
}

/* Typography */
.walimat-cover-title {
    margin: 10px 0;
    line-height: 1.2;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3);
    /* Menggunakan Variable untuk Ukuran */
    font-size: var(--w-title-size); 
}

.walimat-cover-subtitle {
    font-family: 'Poppins', sans-serif;
    color: #e0e0e0;
    letter-spacing: 3px;
    text-transform: uppercase;
    font-size: var(--w-sub-size);
}

/* --- TEMA / ADAT --- */
/* Jawa */
.theme-jawa { border: 20px solid #5c4033; box-shadow: inset 0 0 0 5px #d4af37; }
.theme-jawa .walimat-inner-frame::before {
    content: ""; position: absolute; top: 20px; left: 20px; right: 20px; bottom: 20px;
    border: 2px solid #d4af37; opacity: 0.7;
}

/* Islami */
.theme-islami .walimat-inner-frame::after {
    content: ""; position: absolute; top: 50px; left: 20px; right: 20px; bottom: 0;
    border: 2px solid rgba(255,255,255,0.5); border-bottom: none;
    border-radius: 200px 200px 0 0;
}

/* Minang */
.theme-minang { border-top: 10px solid #d4af37; border-bottom: 10px solid #d4af37; }
.theme-minang .walimat-cover-title {
    background: linear-gradient(to right, #bf953f, #fcf6ba, #b38728, #fbf5b7, #aa771c);
    -webkit-background-clip: text; -webkit-text-fill-color: transparent; text-shadow: none;
}

/* --- RESPONSIVE MOBILE --- */
@media (max-width: 768px) {
    .walimat-cover-wrapper {
        padding-top: var(--w-padding-m);
        padding-bottom: var(--w-padding-m);
    }
    .walimat-bg-image { background-attachment: scroll; }
    
    /* Ubah ukuran font otomatis pakai variable mobile */
    .walimat-cover-title { font-size: var(--w-title-size-m); }
    .walimat-cover-subtitle { font-size: var(--w-sub-size-m); }
    
    .theme-islami .walimat-inner-frame::after { top: 30px; left: 10px; right: 10px; border-radius: 100px 100px 0 0; }
}

/* EDITOR FIXES */
.editor-styles-wrapper .walimat-cover-wrapper {
    min-height: 500px !important;
    height: auto !important;
}
.editor-styles-wrapper .walimat-bg-image {
    position: absolute !important; 
    height: 100% !important; 
    background-attachment: scroll !important;
}

/* =========================================
   9. QR CODE DENGAN LOGO
   ========================================= */
#qrcode {
    position: relative; /* Agar logo bisa absolute di dalamnya */
    display: inline-block;
    padding: 10px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

#qrcode img {
    /* Ini gambar QR Code bawaan library */
    display: block;
}

/* Logo Overlay */
.qr-logo-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20%; /* Ukuran logo 20% dari QR */
    height: 20%;
    object-fit: contain;
    background-color: #fff; /* Latar putih belakang logo */
    padding: 2px;
    border-radius: 5px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}