/* ==========================================================
   UNDANGAN DIGITAL - INTIMATE DINNER BRI
   Style CSS Modern, Elegant, Mobile-First
   
   Struktur:
   1. CSS Variables & Base
   2. Opening Card / Cover
   3. Main Content & Sections
   4. Countdown Timer
   5. Location / Map
   6. RSVP Form
   7. Ucapan & Doa
   8. Share Section
   9. Footer
   10. Floating Music Button
   11. Animations & Keyframes
   12. Responsive / Media Queries
   ========================================================== */


/* ==========================================================
   1. CSS VARIABLES & BASE STYLES
   ========================================================== */
:root {
    /* Warna utama BRI */
    --primary: #1a5276;
    --primary-light: #2980b9;
    --primary-dark: #0d2f4a;
    --accent: #3498db;
    --accent-light: #5dade2;

    /* Warna gradien */
    --gradient-primary: linear-gradient(135deg, #1a5276 0%, #2980b9 50%, #5dade2 100%);
    --gradient-dark: linear-gradient(180deg, #0d2f4a 0%, #1a5276 100%);
    --gradient-glass: linear-gradient(135deg, rgba(255,255,255,0.15) 0%, rgba(255,255,255,0.05) 100%);

    /* Warna netral */
    --white: #ffffff;
    --off-white: #f8f9fa;
    --light-gray: #e9ecef;
    --text-dark: #1a1a2e;
    --text-muted: #6c757d;

    /* Warna gold aksen */
    --gold: #d4a844;
    --gold-light: #e8c876;

    /* Font */
    --font-primary: 'Poppins', sans-serif;
    --font-display: 'Playfair Display', serif;

    /* Shadow */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.08);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.12);
    --shadow-lg: 0 8px 40px rgba(0,0,0,0.18);
    --shadow-glow: 0 0 30px rgba(41,128,185,0.3);

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;
}

/* Reset & Base */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: var(--font-primary);
    background-color: var(--primary-dark);
    color: var(--text-dark);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Scrollbar custom */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--primary-dark);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

/* Section title reusable */
.section-title {
    font-family: var(--font-display);
    font-size: 1.6rem;
    font-weight: 600;
    color: var(--white);
    text-align: center;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
}
.section-title i {
    display: block;
    font-size: 1.8rem;
    margin-bottom: 0.5rem;
    color: var(--gold);
}


/* ==========================================================
   2. OPENING CARD / COVER
   Menggunakan gambar mockup langsung sebagai halaman depan
   Nama tamu di-overlay di posisi kotak putih pada gambar
   ========================================================== */
.opening-card {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    height: 100dvh;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #71C5E9; /* Warna biru muda sesuai bg gambar */
    transition: opacity 0.8s ease, transform 0.8s ease;
    overflow-y: auto;
}

.opening-card.hide {
    opacity: 0;
    transform: scale(1.05);
    pointer-events: none;
}

/* Container gambar + overlay nama */
.opening-image-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    margin: 0 auto;
    flex-shrink: 0;
}

/* Gambar hero undangan depan */
.opening-hero-img {
    width: 100%;
    height: auto;
    display: block;
}

/* Overlay nama tamu - diposisikan tepat di kotak putih gambar */
/* Kotak putih ada di sekitar 55% - 68% dari atas gambar */
.guest-name-overlay {
    position: absolute;
    top: 56%;
    left: 13%;
    right: 13%;
    height: 14%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    padding: 0.5rem;
}

.guest-name-text {
    font-family: var(--font-display);
    font-size: clamp(1rem, 4vw, 1.6rem);
    font-weight: 600;
    color: var(--primary);
    text-align: center;
    word-break: break-word;
    line-height: 1.3;
    letter-spacing: 0.5px;
    margin: 0;
}

/* Wrapper tombol buka undangan */
.opening-btn-wrapper {
    padding: 1.5rem 1rem;
    text-align: center;
    flex-shrink: 0;
}

/* Open Button */
.btn-open-invitation {
    display: inline-flex;
    align-items: center;
    gap: 0.6rem;
    background: var(--white);
    color: var(--primary);
    border: none;
    padding: 0.9rem 2.2rem;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    box-shadow: var(--shadow-lg), var(--shadow-glow);
    transition: all 0.3s ease;
    animation: pulse-glow 2s infinite;
}

.btn-open-invitation:hover {
    transform: translateY(-2px) scale(1.03);
    box-shadow: var(--shadow-lg), 0 0 50px rgba(41,128,185,0.5);
}

.btn-open-invitation:active {
    transform: scale(0.97);
}

.btn-open-invitation i {
    font-size: 1.2rem;
}


/* ==========================================================
   3. MAIN CONTENT & SECTION IMAGES
   ========================================================== */
.main-content {
    background: var(--gradient-dark);
    min-height: 100vh;
}

/* Section gambar undangan */
.section-image {
    width: 100%;
    padding: 0;
    background: var(--primary-dark);
}

.image-wrapper {
    max-width: 600px;
    margin: 0 auto;
    padding: 0;
}

.invitation-img {
    width: 100%;
    height: auto;
    display: block;
}


/* ==========================================================
   4. COUNTDOWN TIMER
   ========================================================== */
.section-countdown {
    background: var(--gradient-primary);
    padding: 3rem 1rem;
    text-align: center;
}

.countdown-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    flex-wrap: nowrap;
}

.countdown-item {
    background: rgba(255,255,255,0.12);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    padding: 1rem 0.8rem;
    min-width: 68px;
    text-align: center;
}

.countdown-number {
    display: block;
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.countdown-label {
    display: block;
    font-size: 0.7rem;
    color: rgba(255,255,255,0.75);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-top: 0.4rem;
    font-weight: 500;
}

.countdown-separator {
    font-size: 1.8rem;
    font-weight: 700;
    color: rgba(255,255,255,0.5);
    animation: blink 1s infinite;
}


/* ==========================================================
   5. LOCATION / MAP
   ========================================================== */
.section-location {
    background: var(--gradient-dark);
    padding: 3rem 1rem;
    text-align: center;
}

.location-info {
    margin-bottom: 1.5rem;
}

.location-name {
    font-family: var(--font-display);
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--gold-light);
    margin-bottom: 0.3rem;
}

.location-address {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
}

.map-wrapper {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    border: 2px solid rgba(255,255,255,0.1);
    margin-bottom: 1.5rem;
}

.map-wrapper iframe {
    display: block;
}

.btn-direction {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--accent);
    color: var(--white);
    text-decoration: none;
    padding: 0.75rem 1.8rem;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.btn-direction:hover {
    background: var(--accent-light);
    color: var(--white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}


/* ==========================================================
   6. RSVP FORM
   ========================================================== */
.section-rsvp {
    background: var(--gradient-primary);
    padding: 3rem 1rem;
}

.rsvp-note {
    text-align: center;
    font-size: 0.85rem;
    color: var(--gold-light);
    margin-bottom: 1.5rem;
    font-weight: 500;
}

.rsvp-form,
.wishes-form {
    max-width: 480px;
    margin: 0 auto;
}

.form-group {
    margin-bottom: 1.2rem;
}

.form-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: rgba(255,255,255,0.9);
    margin-bottom: 0.4rem;
}

.form-control,
.form-select {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    background: rgba(255,255,255,0.1);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    color: var(--white);
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

.form-control::placeholder {
    color: rgba(255,255,255,0.45);
}

.form-control:focus,
.form-select:focus {
    outline: none;
    border-color: var(--gold);
    box-shadow: 0 0 0 3px rgba(212,168,68,0.2);
    background: rgba(255,255,255,0.15);
}

.form-select option {
    background: var(--primary-dark);
    color: var(--white);
}

/* RSVP Radio Options */
.rsvp-options {
    display: flex;
    gap: 0.8rem;
}

.rsvp-option {
    flex: 1;
    cursor: pointer;
}

.rsvp-option input[type="radio"] {
    display: none;
}

.rsvp-option-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.8rem;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: rgba(255,255,255,0.8);
    transition: all 0.3s ease;
    text-align: center;
}

.rsvp-option input[type="radio"]:checked + .rsvp-option-box.hadir {
    background: rgba(39,174,96,0.3);
    border-color: #27ae60;
    color: #2ecc71;
}

.rsvp-option input[type="radio"]:checked + .rsvp-option-box.tidak {
    background: rgba(231,76,60,0.3);
    border-color: #e74c3c;
    color: #e74c3c;
}

/* Submit Buttons */
.btn-rsvp-submit,
.btn-wish-submit {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    width: 100%;
    padding: 0.85rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 0.5rem;
}

.btn-rsvp-submit {
    background: var(--gold);
    color: var(--primary-dark);
}

.btn-rsvp-submit:hover {
    background: var(--gold-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-wish-submit {
    background: var(--accent);
    color: var(--white);
}

.btn-wish-submit:hover {
    background: var(--accent-light);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* RSVP Success */
.rsvp-success {
    text-align: center;
    padding: 2rem;
    max-width: 400px;
    margin: 0 auto;
    animation: fadeInUp 0.5s ease;
}

.rsvp-success i {
    font-size: 3rem;
    color: #2ecc71;
    display: block;
    margin-bottom: 1rem;
}

.rsvp-success h3 {
    font-family: var(--font-display);
    font-size: 1.4rem;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.rsvp-success p {
    font-size: 0.9rem;
    color: rgba(255,255,255,0.75);
}


/* ==========================================================
   7. UCAPAN & DOA
   ========================================================== */
.section-wishes {
    background: var(--gradient-dark);
    padding: 3rem 1rem;
}

.wishes-list {
    max-width: 480px;
    margin: 1.5rem auto 0;
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-height: 400px;
    overflow-y: auto;
    padding-right: 4px;
}

.wish-card {
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: var(--radius-md);
    padding: 1rem 1.2rem;
    animation: fadeInUp 0.4s ease;
}

.wish-card-name {
    font-weight: 600;
    font-size: 0.85rem;
    color: var(--gold-light);
    margin-bottom: 0.3rem;
}

.wish-card-message {
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.5;
}

.wish-card-time {
    font-size: 0.7rem;
    color: rgba(255,255,255,0.4);
    margin-top: 0.4rem;
}


/* ==========================================================
   8. SHARE SECTION
   ========================================================== */
.section-share {
    background: var(--gradient-primary);
    padding: 3rem 1rem;
}

.share-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    max-width: 360px;
    margin: 0 auto;
}

.btn-share {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.85rem 1.5rem;
    border: none;
    border-radius: 50px;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-copy {
    background: var(--white);
    color: var(--primary);
}

.btn-copy:hover {
    background: var(--off-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-whatsapp {
    background: #25d366;
    color: var(--white);
}

.btn-whatsapp:hover {
    background: #20ba5a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}


/* ==========================================================
   9. FOOTER
   ========================================================== */
.site-footer {
    background: var(--primary-dark);
    padding: 2.5rem 1rem;
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.08);
}

.footer-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-bottom: 1.2rem;
}

.footer-logo {
    height: 35px; /* Sedikit diperbesar karena warna asli biasanya butuh lebih terlihat */
}

.footer-text {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
    line-height: 1.6;
    margin: 0;
}

.footer-divider {
    width: 60px;
    height: 2px;
    background: var(--accent);
    margin: 1rem auto;
    border-radius: 1px;
    opacity: 0.5;
}

.footer-copyright {
    font-size: 0.72rem;
    color: rgba(255,255,255,0.35);
}


/* ==========================================================
   10. FLOATING MUSIC BUTTON
   ========================================================== */
.btn-music {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    border: 2px solid rgba(255,255,255,0.3);
    font-size: 1.2rem;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
    animation: music-rotate 3s linear infinite;
}

.btn-music:hover {
    background: var(--accent);
    transform: scale(1.1);
}

.btn-music.paused {
    animation: none;
    opacity: 0.65;
}


/* ==========================================================
   11. ANIMATIONS & KEYFRAMES
   ========================================================== */
@keyframes pulse-glow {
    0%, 100% {
        box-shadow: var(--shadow-lg), 0 0 20px rgba(41,128,185,0.3);
    }
    50% {
        box-shadow: var(--shadow-lg), 0 0 40px rgba(41,128,185,0.6);
    }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes music-rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes floatUp {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-6px); }
}


/* ==========================================================
   12. RESPONSIVE / MEDIA QUERIES
   ========================================================== */

/* Small phones (< 360px) */
@media (max-width: 359px) {
    .guest-name-text {
        font-size: 0.85rem;
    }
    .countdown-item {
        min-width: 56px;
        padding: 0.7rem 0.5rem;
    }
    .countdown-number {
        font-size: 1.5rem;
    }
    .btn-open-invitation {
        font-size: 0.9rem;
        padding: 0.75rem 1.6rem;
    }
}

/* Standard phones (360px - 575px) */
@media (min-width: 360px) and (max-width: 575px) {
    .guest-name-text {
        font-size: clamp(1rem, 3.5vw, 1.3rem);
    }
}

/* Tablets (576px+) */
@media (min-width: 576px) {
    .opening-image-container {
        max-width: 500px;
    }
    .guest-name-text {
        font-size: 1.5rem;
    }
    .section-title {
        font-size: 1.8rem;
    }
    .countdown-item {
        min-width: 80px;
        padding: 1.2rem 1rem;
    }
    .countdown-number {
        font-size: 2.5rem;
    }
    .section-countdown,
    .section-location,
    .section-rsvp,
    .section-wishes,
    .section-share {
        padding: 4rem 2rem;
    }
}

/* Desktop (768px+) */
@media (min-width: 768px) {
    .opening-image-container {
        max-width: 520px;
    }
    .guest-name-text {
        font-size: 1.7rem;
    }
    .countdown-wrapper {
        gap: 1rem;
    }
    .countdown-item {
        min-width: 100px;
        padding: 1.5rem 1.2rem;
    }
    .countdown-number {
        font-size: 3rem;
    }
    .share-buttons {
        flex-direction: row;
        max-width: 480px;
    }
    .btn-share {
        flex: 1;
    }
}

/* Large Desktop (992px+) */
@media (min-width: 992px) {
    .opening-image-container {
        max-width: 540px;
    }
    .image-wrapper {
        max-width: 500px;
    }
    .map-wrapper iframe {
        height: 400px;
    }
}

