/* =========================================================
   BASE STYLES & VARIABLES (Variabel akan di-override JS)
   ========================================================= */
:root {
    --color-bg: #FAFAF7;
    --color-primary: #6E7E6B;
    --color-secondary: #C7AE71;
    --color-text-main: #333333;
    --color-text-muted: #666666;
    --color-text-light: #ffffff;
    --font-serif: 'Playfair Display', serif;
    --font-sans: 'Quicksand', sans-serif;
    --font-script: 'Great Vibes', cursive; /* Romantis & Klasik */
    --font-tangerine: 'Tangerine', cursive;
    --font-lora: 'Lora', serif;
    
    --radius-sm: 8px;
    --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;
}

@media (max-width: 768px) {
    .font-tangerine {
        font-size: 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-primary);
    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-primary);
    border: 1px solid var(--color-primary);
    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-primary);
    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(255, 255, 255, 0.65);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    padding: 50px 30px;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.5);
    max-width: 90%;
    width: 400px;
    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-image: linear-gradient(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 1)), url('https://images.unsplash.com/photo-1511285560929-80b456fea0bc?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
}

/* =========================================================
   COUPLE
   ========================================================= */
.couple-section {
    background-image: linear-gradient(rgba(250, 250, 247, 0.92), rgba(250, 250, 247, 0.92)), url('https://images.unsplash.com/photo-1511285560929-80b456fea0bc?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
    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: 4px;
    overflow: hidden;
    box-shadow: 0 15px 35px rgba(0,0,0,0.2);
    border: 4px solid #fff;
    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: 20px;
    align-items: center;
}
.couple-detail-divider {
    display: flex;
    justify-content: center;
    align-items: center;
}
.couple-name {
    font-size: 2.5rem !important;
    line-height: 1.2;
    min-height: 3rem; /* 1 baris (2.5rem * 1.2 * 1) = tinggi tetap */
    display: -webkit-box;
    -webkit-line-clamp: 1; /* Diubah menjadi 1 baris sesuai permintaan */
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    margin-bottom: 0.5rem;
    
    display: flex;
    align-items: center;
    justify-content: center;
}
@supports (-webkit-line-clamp: 1) {
    .couple-name {
        display: -webkit-box; 
    }
}
.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 */
    }
}

/* =========================================================
   EVENT & COUNTDOWN
   ========================================================= */
.countdown-wrapper { display: flex; justify-content: center; gap: 15px; flex-wrap: wrap; }
.countdown-box {
    background-color: var(--color-primary);
    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: 10px; left: 10px; right: 10px; bottom: 10px;
    border: 1px solid rgba(0, 0, 0, 0.1); border-radius: var(--radius-sm); 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: var(--radius-sm);
    box-shadow: 0 4px 10px rgba(0,0,0,0.1);
}
.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(0, 0, 0, 0.1);
    border-radius: var(--radius-sm);
    background: rgba(255, 255, 255, 0.8);
    font-family: var(--font-sans);
    font-size: 1rem; color: var(--color-text-main);
    transition: border-color 0.3s;
}
.form-control:focus { outline: none; border-color: var(--color-primary); 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;
}
