/* ============================================= */
/* == BAGIAN 1: FONT & RESET DASAR == */
/* ============================================= */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', sans-serif;
    background-color: #FEFBF6; /* Krem */
    color: #3D3C42; /* Abu-abu gelap */
    line-height: 1.7;
    font-weight: 400;
}

.serenity-container {
    max-width: 900px;
    margin: 1em auto;
    padding: 0 20px;
}

/* ============================================= */
/* == BAGIAN 2: TYPOGRAPHY & ELEMEN UMUM == */
/* ============================================= */
h1, h2 {    
    font-family: 'Dancing Script', cursive;
    font-weight: 700;
}

h1 {
    color: #fff;
    font-size: 3rem;
    line-height: 1.2;
}

h2 {
    color: #7F5283; /* Pink-Ungu tema */
    font-size: 2.5em;
}

h3 {
    font-family: 'Cormorant Garamond', serif;
    color: #7F5283;
    font-size: 1.5em;
    font-weight: 700;
}

hr {
    border: none;
    border-top: 2px solid #EAD7D7;
    margin: 2em 0;
}

.text {
    max-width: 600px;
    margin: auto;
    padding: 1em;
}

.box {
    background-color: white;
    padding: 30px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
}

/* ============================================= */
/* == BAGIAN 3: KOMPONEN UTAMA (COVER, HEADER, DLL) == */
/* ============================================= */

/* --- Amplop / Cover --- */
#cover {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    height: 100vh;
    background-size: cover;
    background-position: center;
    z-index: 9999;
    display: flex;
	gap:15px;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 20px;
}
#cover p {
    font-size: 1.2em;
    font-weight: 500;
    text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.5);
    color: #fff;
}
#cover h1 {
    margin: 1rem 0;
}
#open-invitation {
    background-color: #7F5283;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 12px 35px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}
#open-invitation:hover {
    background-color: #A685A8;
}

.guest-name-display{
	font-family: 'Lato', sans-serif;
    font-weight: 500;
    font-size: 1.6em;
    color: #fff;
    padding: 5px 20px;
    background: rgba(0, 0, 0, .3);
    line-height: 1.5;
    margin-top: 10px;
    border-radius: 4px;
    letter-spacing: 1px;
}

/* --- Header Section --- */
.sb-header {
    min-height: 50vh;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: white;
    padding: 40px;
    text-shadow: 1px 1px 3px rgba(0,0,0,0.5);
}
.sb-header h1 {
    margin: .5em;
}
.sb-header p {
    font-size: 1.2rem;
}

/* --- Section Umum --- */
.sb-section {
    padding: 3rem 15px;
    text-align: center;
    margin: 1em auto;
}

/* --- Footer --- */
footer {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid #ddd;
}

/* ============================================= */
/* == BAGIAN 4: SECTION SPESIFIK (MEMPELAI, ACARA, DLL) == */
/* ============================================= */

/* --- Mempelai --- */
.sb-mempelai-grid {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 20px;
    margin-top: 40px;
}
.sb-mempelai-card img {
    width: 180px;
    height: 180px;
    border-radius: 50%;
    object-fit: cover;
    border: 4px solid #EAD7D7;
}
.sb-mempelai-grid .ampersand {
    font-family: 'Cormorant Garamond', serif;
    font-size: 4rem;
    color: #7F5283;
}

/* --- Acara & Countdown --- */
.sb-acara-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 30px;
    margin-top: 30px;
}
#countdown {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 30px;
}
.countdown-item {
    background-color: white;
    padding: 15px;
    width: 100px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    border-radius: 8px;
}
.countdown-number {
    font-size: 2.5rem;
    font-family: 'Cormorant Garamond', serif;
    color: #7F5283;
}

/* --- Love Story & Peta --- */
.sb-story-text {
    max-width: 700px;
    margin: 2rem auto 0;
    white-space: pre-wrap;
    line-height: 1.8;
}
.sb-map-container {
    width: 100%;
    height: 450px;
    margin-top: 2rem;
    border: 0;
    border-radius: 8px;
}

/* --- Galeri Grid --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
    width: 100%;
    max-width: 900px;
    margin: 2rem auto;
}
.gallery-item {
    display: block;
    overflow: hidden;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
    cursor: pointer;
    aspect-ratio: 1 / 1;
}
.gallery-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.3s ease;
}
.gallery-item:hover img {
    transform: scale(1.1);
}

/* --- RSVP Form & Ucapan --- */
.sb-rsvp-form {
    max-width: 600px;
    margin: 40px auto 0;
    text-align: left;
}
.sb-rsvp-form input, .sb-rsvp-form textarea, .sb-rsvp-form select {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #EAD7D7;
    background-color: white;
    border-radius: 5px;
}
.sb-rsvp-form button, .gift-button {
    background-color: #7F5283;
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 1rem;
    cursor: pointer;
    border-radius: 5px;
}
.sb-ucapan-list {
    max-width: 700px;
    margin: 4rem auto 0;
    text-align: left;
}
.sb-ucapan-item {
    background-color: white;
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    margin-bottom: 20px;
    border-radius: 8px;
}
.ucapan-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}
.ucapan-header .nama {
    font-weight: bold;
    color: #7F5283;
}
.ucapan-isi {
    font-style: italic;
    margin-bottom: 0.5rem;
}
.ucapan-header .status-kehadiran, .sb-ucapan-item .tanggal {
    font-size: 0.8rem;
    color: #999;
}
.status-kehadiran.status-hadir {
    color: #7f5283;
    font-weight: bold;
}

/* ============================================= */
/* == BAGIAN 5: MODAL & LIGHTBOX == */
/* ============================================= */

/* --- Base untuk Overlay (digunakan oleh Modal & Lightbox) --- */
.modal-overlay, .lightbox-overlay {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    padding: 15px;
}

/* --- Lightbox Galeri --- */
.lightbox-image {
    max-width: 90vw;
    max-height: 85vh;
    object-fit: contain;
    border-radius: 8px;
    animation: zoomIn 0.4s;
}
.lightbox-close, .lightbox-prev, .lightbox-next {
    position: absolute;
    color: white;
    font-size: 2.5em;
    cursor: pointer;
    user-select: none;
    transition: opacity 0.3s;
}
.lightbox-close { top: 20px; right: 30px; font-weight: bold; }
.lightbox-prev, .lightbox-next { top: 50%; transform: translateY(-50%); padding: 0 20px; }
.lightbox-prev { left: 10px; }
.lightbox-next { right: 10px; }
.lightbox-prev:hover, .lightbox-next:hover, .lightbox-close:hover { opacity: 0.7; }

/* --- Modal Hadiah --- */
.modal-content {
    background-color: #ffffff;
    color: #333;
    padding: 25px 30px;
    border-radius: 12px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.2);
    max-width: 500px;
    width: 100%;
    position: relative;
    text-align: left;
    max-height: 90vh;
    overflow-y: auto;
    animation: zoomIn 0.4s;
}
.modal-close {
    position: absolute;
    top: 10px; right: 15px;
    font-size: 2.5em;
    font-weight: 300;
    color: #888;
    cursor: pointer;
    line-height: 1;
}
.modal-content h3 { text-align: center; margin-top: 0; margin-bottom: 1rem; }
.modal-content p { margin-bottom: 1.5rem; line-height: 1.6; }
.rekening-info {
    background-color: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 1rem;
}
.rekening-info p { margin: 0; }
.copy-btn {
    background-color: #d1ecf1;
    color: #0c5460;
    border: none;
    padding: 4px 8px;
    font-size: 0.8em;
    border-radius: 4px;
    cursor: pointer;
    margin-left: 10px;
    font-weight: bold;
}
.qris-gallery {
    display: flex;
    justify-content: center;
    gap: 20px;
    margin-top: 1.5rem;
    flex-wrap: wrap;
}
.qris-item { text-align: center; }
.qris-item img { max-width: 150px; border: 1px solid #ddd; padding: 5px; border-radius: 8px; }
.qris-item span { display: block; margin-top: 8px; font-weight: bold; }
.small-text { font-size: 0.8em; text-align: center; color: #6c757d; margin-top: 1rem; }


/* ============================================= */
/* == BAGIAN 6: ELEMEN INTERAKTIF & ANIMASI == */
/* ============================================= */

/* --- Tombol Musik --- */
#music-button {
    position: fixed;
    bottom: 20px; right: 20px;
    width: 50px; height: 50px;
    background-color: rgba(43, 42, 76, 0.8);
    border-radius: 50%;
    cursor: pointer;
    z-index: 999;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: transform 0.3s ease;
}
#music-button:hover { transform: scale(1.1); }
#music-button::before {
    content: '';
    display: block;
    box-sizing: border-box;
}
#music-button.playing::before {
    width: 16px; height: 16px;
    border-left: 5px solid #fff;
    border-right: 5px solid #fff;
}
#music-button:not(.playing)::before {
    width: 0; height: 0;
    border-top: 10px solid transparent;
    border-bottom: 10px solid transparent;
    border-left: 16px solid #fff;
    margin-left: 5px;
}

/* --- Animasi Fade & Zoom --- */
.fade-in.hidden {
    opacity: 0;
    transform: translateY(30px);
}
@keyframes zoomIn {
    from { transform: scale(0.9); opacity: 0; }
    to { transform: scale(1); opacity: 1; }
}

/* ============================================= */
/* == BAGIAN 7: RESPONSIVE DESIGN == */
/* ============================================= */
@media (max-width: 768px) {
    h1 { font-size: 2.5rem; }
    h2 { font-size: 2rem; }
    .sb-mempelai-grid, .sb-acara-grid { grid-template-columns: 1fr; }
    .sb-mempelai-grid .ampersand { display: none; }
    .gallery-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }
}