/* =========================================================
   BASE STYLES & VARIABLES (Variabel akan di-override JS)
   ========================================================= */
:root {
    --color-bg: #FDFBF7;
    --color-primary: #D4AF37;
    --color-secondary: #6d5737;
    --color-text-main: #333333;
    --color-text-muted: #627264;
    --color-text-light: #ffffff;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Quicksand', sans-serif;
    --font-script: 'Great Vibes', cursive;
    --font-tangerine: 'Tangerine', cursive;
    --font-lora: 'Lora', serif;
    
    --radius-sm: 12px;
    --radius-md: 16px;
    --radius-lg: 24px;
}
  
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-sans);
    color: var(--color-text-main);
    background-color: var(--color-bg);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6, .font-serif, .title-primary, .title-secondary {
    font-family: var(--font-serif);
    font-weight: 600;
}

.font-script {
    font-family: var(--font-script) !important;
    font-weight: normal;
}

.font-tangerine {
    font-family: var(--font-tangerine) !important;
    font-weight: 900 !important; /* Dibuat se-tebal mungkin */
    font-size: 4rem !important; /* Ukuran ideal (4rem) sesuai permintaan */
    line-height: 1;
    margin-bottom: 20px;
}

.font-tangerine {
    font-family: var(--font-tangerine) !important;
    font-size: clamp(2.5rem, 10vw, 4rem) !important; /* Dinamis mengecil jika tempatnya sempit */
    /* Dihapus white-space: nowrap agar tidak merusak elemen lain yang panjang */
}

@media (max-width: 768px) {
    .font-tangerine {
        font-size: clamp(2rem, 12vw, 3.2rem) !important; /* Disesuaikan proposional untuk HP */
    }
}

.font-lora {
    font-family: var(--font-lora) !important;
    font-weight: 700;
}

.romantic-quote {
    font-style: italic;
    font-size: 1.15rem;
    line-height: 1.8;
    color: var(--color-text-main);
    opacity: 0.9;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; border: none; outline: none; font-family: var(--font-sans); }
.font-sans { font-family: var(--font-sans); }
.font-bold { font-weight: 700; }
.text-muted { color: var(--color-text-muted); }
.text-center { text-align: center; }
.w-100 { width: 100%; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 16px; }
.mb-4 { margin-bottom: 24px; }
.mb-5 { margin-bottom: 32px; }

.section-padding { padding: 80px 24px; }
.container { max-width: 600px; margin: 0 auto; }

.title-primary {
    color: var(--color-primary);
    line-height: 1.2;
}
.title-secondary {
    color: var(--color-secondary);
    font-size: 1.5rem;
    font-style: italic;
}

/* =========================================================
   UI COMPONENTS
   ========================================================= */
.btn-primary {
    background-color: var(--color-secondary); /* Menggunakan Dark Gold */
    color: var(--color-text-light);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-primary:hover {
    filter: brightness(0.9);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.btn-secondary {
    background-color: transparent;
    color: var(--color-secondary); /* Menggunakan Dark Gold */
    border: 1px solid var(--color-secondary);
    padding: 12px 24px;
    border-radius: 30px;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.btn-secondary:hover {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
}

.glass-panel {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: var(--radius-md);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.05);
}

/* =========================================================
   COVER & HERO
   ========================================================= */
.cover-wrapper {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 1000;
    /* Background akan diatur via JS agar dinamis dari config */
    background-size: cover;
    background-position: center;
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 1s cubic-bezier(0.77, 0, 0.175, 1);
    overflow: hidden; /* Mencegah ornamen membuat scroll */
}
.cover-wrapper.opened {
    transform: translateY(-100vh);
}
.cover-content {
    position: relative; /* Wajib agar z-index berfungsi */
    background: rgba(253, 251, 247, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 50px 30px;
    border-radius: 20px 20px 80px 20px; /* Melati asymmetric shape */
    box-shadow: 0 10px 40px rgba(27, 77, 62, 0.1);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-top: 4px solid var(--color-primary);
    max-width: 95%; /* Diperlebar agar nama muat */
    width: 450px;   /* Diperlebar agar nama panjang muat di dalam kotak */
    z-index: 9999; /* Pastikan selalu paling atas */
    pointer-events: auto; /* Pastikan bisa menerima klik */
}

/* --- ORNAMEN SUDUT COVER --- */
.ornament {
    position: absolute;
    z-index: 1001;
    pointer-events: none; /* Agar tidak bisa diklik */
    max-width: 250px;
    transition: opacity 0.5s ease;
}
.orn-tl { top: -10px; left: -10px; transform-origin: top left; animation: sway-tl 6s ease-in-out infinite alternate; }
.orn-tr { top: -10px; right: -10px; transform-origin: top right; animation: sway-tr 7s ease-in-out infinite alternate; }
.orn-bl { bottom: -10px; left: -10px; transform-origin: bottom left; animation: float-bl 5s ease-in-out infinite alternate; }
.orn-br { bottom: -10px; right: -10px; transform-origin: bottom right; animation: float-br 6s ease-in-out infinite alternate; }

/* Animasi Ornamen (Dibalik menggunakan scale) */
@keyframes sway-tl {
    0% { transform: scaleX(1) scaleY(1) rotate(0deg); }
    100% { transform: scaleX(1) scaleY(1) rotate(4deg); }
}
@keyframes sway-tr {
    0% { transform: scaleX(-1) scaleY(1) rotate(0deg); }
    100% { transform: scaleX(-1) scaleY(1) rotate(4deg); }
}
@keyframes float-bl {
    0% { transform: scaleX(1) scaleY(-1) translateY(0px) rotate(0deg); }
    100% { transform: scaleX(1) scaleY(-1) translateY(-15px) rotate(3deg); }
}
@keyframes float-br {
    0% { transform: scaleX(-1) scaleY(-1) translateY(0px) rotate(0deg); }
    100% { transform: scaleX(-1) scaleY(-1) translateY(-15px) rotate(-3deg); }
}

@media (max-width: 768px) {
    .ornament { max-width: 150px; }
}

.hero-section {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent; /* Sepenuhnya transparan */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* =========================================================
   COUPLE
   ========================================================= */
.couple-section {
    background-color: transparent; /* Sepenuhnya transparan */
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* --- 3-PHOTO SWIPER COLLAGE --- */
.couple-swiper {
    width: 100%;
    padding-top: 40px;
    padding-bottom: 40px;
}
.couple-swiper .swiper-slide {
    background-position: center;
    background-size: cover;
    width: 260px;
    height: 380px;
    border-radius: 150px 150px 0 0; /* Melati arch dome */
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(27, 77, 62, 0.2);
    border: 4px solid var(--color-bg);
    outline: 2px solid var(--color-secondary);
    outline-offset: -2px;
    transition: transform 0.6s ease;
    transform: scale(0.75); /* Inactive slides are strictly 75% size */
    opacity: 0.9;
}
.couple-swiper .swiper-slide-active {
    transform: scale(1); /* Center slide is strict 100% size */
    opacity: 1;
    z-index: 10;
}
.couple-swiper .swiper-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease, filter 0.6s ease;
}
.couple-swiper .swiper-slide:not(.swiper-slide-active) .swiper-img {
    filter: grayscale(100%) brightness(0.6); /* Full black & white and dimmed */
}
.couple-swiper .swiper-slide-active .swiper-img {
    filter: grayscale(0%) brightness(1); /* Full color */
}
.couple-swiper .swiper-slide-active:hover .swiper-img {
    transform: scale(1.05); /* Only center image zooms on hover */
}
@media (max-width: 768px) {
    .couple-swiper .swiper-slide {
        width: 180px;
        height: 280px;
    }
}

/* --- COUPLE DETAILS GRID --- */
.couple-details-wrapper {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 15px;
    align-items: center; 
}
.couple-detail-box {
    min-width: 0; /* Mencegah grid meledak jika konten terlalu panjang */
}
.couple-detail-divider {
    display: flex;
    justify-content: center;
    align-items: center;
}
.couple-name {
    font-size: clamp(1.8rem, 8vw, 2.5rem) !important; /* Ukuran mobile (1 kolom) */
    line-height: 1.2;
    min-height: 3rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
    
    display: flex;
    align-items: center;
    justify-content: center;
}
.btn-icon-only {
    width: 50px;
    height: 50px;
    padding: 0;
    display: inline-flex;
    justify-content: center;
    align-items: center;
    border-radius: 50%;
}
@media (max-width: 768px) {
    .couple-details-wrapper {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    .couple-detail-divider {
        display: none; /* Hide '&' on mobile */
    }
}
@media (min-width: 769px) {
    .couple-section .container {
        max-width: 900px; /* Lebarkan kontainer khusus untuk grid couple di Desktop */
    }
    .couple-name {
        /* Ukuran dekstop disesuaikan dengan kontainer 900px */
        font-size: clamp(1.2rem, 2.5vw, 2.5rem) !important;
    }
    /* Estetika Profesional: Mempelai kiri rata kanan, Mempelai kanan rata kiri */
    .couple-detail-box:first-child { text-align: right; }
    .couple-detail-box:last-child { text-align: left; }
    
    .couple-detail-box:first-child .couple-name { justify-content: flex-end; }
    .couple-detail-box:last-child .couple-name { justify-content: flex-start; }
}

/* =========================================================
   EVENT & COUNTDOWN
   ========================================================= */
.countdown-wrapper { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.countdown-box {
    background-color: var(--color-secondary);
    color: var(--color-text-light);
    width: 70px; height: 80px;
    border-radius: var(--radius-sm);
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.1);
}
.countdown-num { font-size: 1.5rem; font-weight: 600; font-family: var(--font-serif); }
.countdown-label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 1px; margin-top: 5px; }
.event-card { padding: 40px 20px; position: relative; overflow: hidden; }
.event-card h3 { margin-bottom: 2rem !important; }
.event-card .event-time { margin-bottom: 2.5rem !important; }
.event-card p { line-height: 1.8; margin-bottom: 1.5rem; }
.event-card::before {
    content: ''; position: absolute; top: 15px; left: 15px; right: 15px; bottom: 15px;
    border: 2px solid rgba(212, 175, 55, 0.4); border-radius: 100px 100px 10px 10px; pointer-events: none;
}
.event-actions { display: flex; flex-direction: column; gap: 15px; justify-content: center; margin-top: 20px; }
@media (min-width: 480px) { .event-actions { flex-direction: row; } }

/* =========================================================
   GALLERY (MASONRY GRID)
   ========================================================= */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr); /* Dekstop 6 kolom */
    grid-auto-rows: 200px;
    gap: 15px;
}
.gallery-item {
    width: 100%; height: 100%;
    overflow: hidden; border-radius: 20px;
    box-shadow: 0 6px 16px rgba(27, 77, 62, 0.15);
    border: 2px solid rgba(253, 251, 247, 0.8);
}
.gallery-item img {
    width: 100%; height: 100%;
    object-fit: cover; transition: transform 0.3s ease;
}
.gallery-item:hover img { transform: scale(1.05); }

/* Pola Khusus Masonry: Foto 1 & 7 membesar 2x2 */
/* Berdasarkan matematika Grid, 12 foto dengan 2 foto besar akan menghasilkan:
   - Dekstop (6 Kolom): Tepat 3 Baris Sempurna
   - Mobile (3 Kolom): Tepat 6 Baris Sempurna */
.gallery-item:nth-child(1),
.gallery-item:nth-child(7) {
    grid-column: span 2;
    grid-row: span 2;
}

@media (max-width: 768px) {
    .gallery-grid {
        grid-template-columns: repeat(3, 1fr); /* Mobile 3 kolom */
        grid-auto-rows: 120px;
        gap: 10px;
    }
}
@media (min-width: 992px) {
    /* Membuat galeri jauh lebih lebar di layar Dekstop */
    .gallery-section .container {
        max-width: 95%;
    }
}

/* =========================================================
   RSVP
   ========================================================= */
.rsvp-container { padding: 40px 20px; }
.form-control {
    width: 100%; padding: 12px 16px;
    border: 1px solid rgba(27, 77, 62, 0.2);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.85);
    font-family: var(--font-sans);
    font-size: 1rem; color: var(--color-text-main);
    transition: border-color 0.3s, box-shadow 0.3s;
}
.form-control:focus { outline: none; border-color: var(--color-secondary); box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1); background: #fff; }

/* =========================================================
   AUDIO PLAYER
   ========================================================= */
.audio-player { position: fixed; bottom: 24px; right: 24px; z-index: 999; }
.audio-btn {
    width: 50px; height: 50px; border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
    color: var(--color-primary);
    display: flex; align-items: center; justify-content: center;
    font-size: 20px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.5); transition: all 0.3s ease;
}
.audio-btn.playing { animation: spin 4s linear infinite; }
@keyframes spin { 100% { transform: rotate(360deg); } }

/* =========================================================
   GUESTBOOK (BUKU TAMU)
   ========================================================= */
.guestbook-list {
    max-height: 350px;
    overflow-y: auto;
    padding-right: 10px;
}

.guestbook-list::-webkit-scrollbar {
    width: 6px;
}
.guestbook-list::-webkit-scrollbar-track {
    background: rgba(0,0,0,0.05); 
    border-radius: 10px;
}
.guestbook-list::-webkit-scrollbar-thumb {
    background: var(--color-primary); 
    border-radius: 10px;
}

.comment-card {
    background: rgba(255, 255, 255, 0.7);
    border: 1px solid rgba(0,0,0,0.05);
    border-radius: var(--radius-sm);
    padding: 15px;
    margin-bottom: 12px;
}

.comment-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed rgba(0,0,0,0.1);
    padding-bottom: 8px;
    margin-bottom: 10px;
}

.comment-name {
    font-weight: 700;
    color: var(--color-primary);
    font-size: 0.95rem;
}

.comment-badge {
    font-size: 0.75rem;
    padding: 4px 10px;
    border-radius: 20px;
    font-weight: 600;
}
.badge-hadir { background: #e8f5e9; color: #2e7d32; }
.badge-tidak { background: #ffebee; color: #c62828; }
.badge-ragu { background: #fff3e0; color: #ef6c00; }

.comment-message {
    font-size: 0.95rem;
    line-height: 1.5;
    color: var(--color-text-main);
    white-space: pre-wrap;
}
