/* General Styling & Variables - (Tidak Berubah) */
:root {
    --primary-color: #5A4E4E; /* Dark Brown/Taupe - Dominant */
    --secondary-color: #D4B8A2; /* Muted Gold/Light Brown - Accent */
    --background-light: #F8F5F1; /* Off-white, soft background */
    --text-dark: #333;
    --text-light: #666;
    --font-heading: 'Dancing Script', cursive;
    --font-names: 'Parisienne', cursive; /* For elegant names in hero */
    --font-body: 'Montserrat', sans-serif;
    --shadow-light: rgba(0, 0, 0, 0.08);
    --border-radius: 10px;
    --navbar-height: 70px; /* Tinggi bottom navbar */
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--text-dark);
    line-height: 1.7;
    background-color: var(--background-light);
    overflow-x: hidden;
    padding-bottom: var(--navbar-height);
}

/* Open Invite Button Wrapper - (Tidak Berubah) */
.open-invite-wrapper {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.7)), url('./img/Galery_4.jpg') no-repeat center center/cover;
    background-size: cover;
    background-position: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    z-index: 1000;
    transition: opacity 1s ease-out, visibility 1s ease-out;
}

.open-invite-wrapper .invite-for {
    font-size: 1.2em;
    margin-bottom: 5px;
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease-out 0.5s forwards;
}

.open-invite-wrapper .guest-name {
    font-family: var(--font-heading);
    font-size: 2.5em;
    margin-bottom: 30px;
    opacity: 0;
    animation: fadeInSlideUp 0.8s ease-out 0.7s forwards;
}

#openInviteBtn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 15px 35px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    opacity: 0;
    animation: fadeInScale 0.8s ease-out 1s forwards;
}

#openInviteBtn:hover {
    background-color: #d8a883;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.3);
}

.main-content {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.main-content.active {
    opacity: 1;
}

/* Header / Hero Section - (Tidak Berubah) */
.hero-section {
    position: relative;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    color: white;
    background: url('./img/Galery_1.webp') no-repeat center center/cover;
    overflow: hidden;
    padding: 20px;
}

.hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.4);
}

.hero-content {
    position: relative;
    z-index: 2;
    padding: 20px;
    max-width: 600px;
    width: 100%;
}

.hero-sub-heading {
    font-family: var(--font-body);
    font-size: 1.1em;
    font-weight: 400;
    margin-bottom: 15px;
    letter-spacing: 2px;
    text-transform: uppercase;
}

.hero-names {
    font-family: var(--font-names);
    font-size: 5.5em;
    margin-bottom: 40px;
    line-height: 1;
    text-shadow: 2px 2px 5px rgba(0,0,0,0.4);
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Countdown on Hero Section - (Tidak Berubah) */
.countdown-hero {
    display: flex;
    justify-content: center;
    gap: 15px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.countdown-item-hero {
    background-color: rgba(90, 78, 78, 0.7);
    padding: 15px 10px;
    border-radius: var(--border-radius);
    text-align: center;
    flex: 1;
    min-width: 80px;
    max-width: 100px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
}

.countdown-item-hero span {
    font-family: var(--font-body);
    font-size: 2.5em;
    font-weight: 700;
    display: block;
    color: white;
    margin-bottom: 5px;
}

.countdown-item-hero p {
    font-size: 0.8em;
    color: white;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin: 0;
}

/* "OUR WEDDING" title section - (Tidak Berubah) */
.section-title-our-wedding {
    text-align: center;
    padding: 40px 20px 20px;
    background-color: var(--background-light);
}

.section-title-our-wedding h2 {
    font-family: var(--font-heading);
    font-size: 3em;
    color: var(--primary-color);
    letter-spacing: 2px;
    text-transform: uppercase;
}

/* General Section Styling - (Tidak Berubah) */
.section {
    padding: 60px 20px;
    text-align: center;
    max-width: 900px;
    margin: 40px auto;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow-light);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out;
}

.section.fade-in.visible {
    transform: translateY(0);
    opacity: 1;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 3.2em;
    color: var(--primary-color);
    margin-bottom: 25px;
    position: relative;
    padding-bottom: 10px;
}

.section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 3px;
    background-color: var(--secondary-color);
    margin: 10px auto 0;
    border-radius: 2px;
}

.section-description {
    font-size: 1.1em;
    color: var(--text-light);
    max-width: 700px;
    margin: 0 auto 30px;
}

/* Couple Profile in About Us - (Modifikasi kecil untuk responsivitas) */
.couple-profile {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 30px;
    flex-wrap: wrap; /* Allows wrapping on smaller screens */
}

.groom-profile, .bride-profile {
    flex: 1;
    min-width: 250px;
    max-width: 350px; /* Max width to keep them nicely sized on desktop */
    padding: 20px;
    background-color: var(--background-light);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}

.couple-profile h3 {
    font-family: var(--font-heading);
    font-size: 1.8em;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.couple-profile p {
    font-size: 0.95em;
    color: var(--text-light);
}

.social-link {
    display: inline-block;
    margin-top: 15px;
    font-size: 1.5em;
    color: var(--secondary-color);
    transition: color 0.3s ease;
}

.social-link:hover {
    color: var(--primary-color);
}

/* Event Details Section (REVISI UTAMA UNTUK RESPONSIVITAS OPTIMAL) */
.event-details {
    display: flex;
    justify-content: center;
    gap: 20px; /* Jarak antar kartu */
    flex-wrap: wrap; /* <<< KUNCI: MENGIZINKAN WRAPPING (TURUN KE BAWAH DI MOBILE) */

    padding: 60px 20px;
    text-align: center;
    max-width: 900px;
    margin: 40px auto;
    background-color: white;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px var(--shadow-light);
    transform: translateY(20px);
    opacity: 0;
    transition: all 0.8s ease-out;
    /* Hapus properti overflow-x dan white-space dari sini karena sudah bisa wrap */
    padding-bottom: 20px; /* Kembalikan padding normal */
}

.event-details .event-card {
    background-color: var(--background-light);
    padding: 30px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex: 1 1 45%; /* flex-grow, flex-shrink, flex-basis. Akan mengambil 45% dan bisa menyusut/membesar */
    min-width: 300px; /* Default: akan mencoba sejajar di layar besar */
    max-width: 45%; /* Maksimum lebar untuk desktop */
    display: flex;
    flex-direction: column;
    align-items: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    white-space: normal; /* Mengizinkan teks di dalam kartu untuk wrap secara normal */
    margin-bottom: 0; /* Default: tidak ada margin bawah saat sejajar */
}

.event-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

.icon-event {
    font-size: 3em;
    color: var(--secondary-color);
    margin-bottom: 20px;
}

.event-card h3 {
    font-family: var(--font-heading);
    font-size: 2.2em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.event-card p {
    font-size: 1em;
    color: var(--text-light);
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.event-card p i {
    color: var(--secondary-color);
}

.btn-map {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: var(--primary-color);
    color: white;
    padding: 12px 25px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.3s ease;
}

.btn-map:hover {
    background-color: #4a4242;
    transform: translateY(-2px);
}

/* Gallery Section - (Tidak Berubah) */
.gallery {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-top: 40px;
}

.gallery-item {
    width: 100%;
    height: 280px;
    object-fit: cover;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 8px 20px rgba(0,0,0,0.15);
}

/* RSVP Section - (Tidak Berubah) */
.rsvp-form {
    background-color: var(--background-light);
    padding: 40px;
    border-radius: var(--border-radius);
    box-shadow: inset 0 0 15px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 40px auto 0;
}

.rsvp-form input[type="text"],
.rsvp-form input[type="number"],
.rsvp-form textarea {
    width: calc(100% - 20px);
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1.1em;
    font-family: var(--font-body);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.rsvp-form input[type="text"]:focus,
.rsvp-form input[type="number"]:focus,
.rsvp-form textarea:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(212, 184, 162, 0.5);
    outline: none;
}

.submit-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 15px 35px;
    font-size: 1.2em;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}

.submit-btn:hover {
    background-color: #d8a883;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.25);
}

.submit-btn i {
    margin-right: 8px;
}

.form-message {
    margin-top: 20px;
    font-weight: 600;
    color: green;
}

.form-note {
    font-size: 0.9em;
    color: var(--text-light);
    margin-top: 15px;
}

/* Gift Section - (Tidak Berubah) */
.gift-section {
    margin-top: 50px;
}

.bank-details {
    display: flex;
    justify-content: center;
    gap: 30px;
    margin-top: 30px;
    flex-wrap: wrap;
}

.bank-card {
    background-color: var(--background-light);
    padding: 25px;
    border-radius: var(--border-radius);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    flex: 1;
    min-width: 280px;
    max-width: 400px;
    text-align: left;
}

.bank-card h3 {
    font-family: var(--font-body);
    font-size: 1.4em;
    color: var(--primary-color);
    margin-bottom: 15px;
}

.bank-card p {
    font-size: 1.1em;
    color: var(--text-dark);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

.bank-card .account-number {
    font-weight: 600;
    margin-right: 10px;
    word-break: break-all;
}

.bank-card .copy-btn {
    background-color: var(--secondary-color);
    color: var(--primary-color);
    border: none;
    padding: 8px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 0.9em;
    transition: background-color 0.3s ease;
}

.bank-card .copy-btn:hover {
    background-color: #d8a883;
}
.bank-card .copy-btn i {
    margin-right: 5px;
}

/* Footer - (Tidak Berubah) */
.footer-section {
    text-align: center;
    padding: 40px 20px;
    background-color: var(--primary-color);
    color: white;
    font-size: 0.95em;
    margin-top: 50px;
}

.footer-section p {
    margin-bottom: 8px;
}

.footer-section i {
    color: red;
    margin: 0 5px;
}

/* --- Bottom Navbar - (Tidak Berubah) --- */
.bottom-navbar {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: #333;
    color: white;
    display: flex;
    justify-content: space-around;
    align-items: center;
    height: var(--navbar-height);
    box-shadow: 0 -2px 10px rgba(0,0,0,0.3);
    z-index: 998;
    transition: transform 0.3s ease-in-out;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-decoration: none;
    color: white;
    font-size: 0.8em;
    padding: 5px;
    flex: 1;
    transition: color 0.3s ease, background-color 0.3s ease;
    text-align: center;
}

.nav-item i {
    font-size: 1.5em;
    margin-bottom: 3px;
}

.nav-item.active {
    color: var(--secondary-color);
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.1);
    color: var(--secondary-color);
}

/* Music button specific styling - (Tidak Berubah) */
.music-btn {
    background: none;
    border: none;
    color: white;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    font-family: var(--font-body);
    font-size: 0.8em;
    padding: 5px;
    flex: 1;
    transition: color 0.3s ease;
}
.music-btn i {
    font-size: 1.5em;
    margin-bottom: 3px;
}
.music-btn.playing {
    color: #4CAF50;
}

/* Animations - (Tidak Berubah) */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes fadeInSlideUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInScale {
    from { opacity: 0; transform: scale(0.8); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes beat {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.1); }
}

.beat-animation {
    animation: beat 1.5s infinite;
}


/* ========================================================= */
/* RESPONSIVE DESIGN (FINAL)                               */
/* ========================================================= */

/* Tablet & Smaller Laptops (max-width: 1024px) */
@media (max-width: 1024px) {
    .hero-names {
        font-size: 4.8em;
    }
    .countdown-item-hero span {
        font-size: 2.2em;
    }
    .countdown-item-hero p {
        font-size: 0.75em;
    }

    .section {
        padding: 50px 20px;
        margin: 30px auto;
    }
    .section-title {
        font-size: 2.8em;
    }
    .section-description {
        font-size: 1em;
    }

    .couple-profile {
        gap: 30px;
    }
    .groom-profile, .bride-profile {
        min-width: 280px;
        max-width: 45%;
    }

    /* Event Details - Tablet */
    .event-details {
        gap: 15px; /* Sedikit kurangi gap */
        padding: 40px 15px; /* Kurangi padding samping */
        /* flex-wrap: wrap; sudah default dari parent */
    }
    .event-details .event-card {
        padding: 25px;
        flex: 1 1 48%; /* Akan tetap sejajar di tablet */
        min-width: 280px; /* Minimal lebar untuk tetap sejajar */
        max-width: 48%;
    }
    .event-card h3 {
        font-size: 2em;
    }
    .event-card p {
        font-size: 0.9em;
    }
    .icon-event {
        font-size: 2.5em;
    }
    .btn-map {
        padding: 10px 20px;
        font-size: 0.9em;
    }

    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 20px;
    }
    .gallery-item {
        height: 220px;
    }

    .rsvp-form, .bank-card {
        padding: 30px;
    }
    .rsvp-form input, .rsvp-form textarea, .submit-btn {
        font-size: 1em;
    }
    .bank-card p {
        font-size: 1em;
    }
}

/* Phones & Small Tablets (max-width: 768px) */
@media (max-width: 768px) {
    /* Hero Section */
    .hero-names {
        font-size: 4em;
    }
    .countdown-item-hero span {
        font-size: 2em;
    }
    .countdown-item-hero p {
        font-size: 0.7em;
    }
    .countdown-item-hero {
        max-width: 80px;
        padding: 10px 5px;
        gap: 10px;
    }

    /* General Sections */
    .section-title-our-wedding h2 {
        font-size: 2.2em;
    }
    .section-title {
        font-size: 2.5em;
    }
    .section-description {
        font-size: 0.95em;
    }
    .section {
        padding: 40px 15px;
        margin: 25px auto;
    }

    /* Couple Profile */
    .couple-profile {
        gap: 20px;
        flex-direction: column; /* Stack profiles vertically on mobile */
        align-items: center;
    }
    .groom-profile, .bride-profile {
        max-width: 90%;
        min-width: unset;
        padding: 18px;
    }
    .couple-profile h3 {
        font-size: 1.6em;
    }
    .couple-profile p {
        font-size: 0.9em;
    }

    /* Event Details (AKAN TURUN KE BAWAH DI MOBILE) */
    .event-details {
        flex-direction: column; /* Ini yang membuat kartu turun ke bawah */
        align-items: center; /* Pusatkan kartu saat stack */
        padding: 30px 15px; /* Sesuaikan padding */
        gap: 0; /* Gap bisa dihilangkan karena pakai margin-bottom di card */
    }
    .event-details .event-card {
        max-width: 90%; /* Ambil lebih banyak lebar di mobile */
        min-width: unset; /* Izinkan menyusut */
        margin-bottom: 20px; /* Jarak antar kartu saat stack */
        padding: 20px; /* Kurangi padding kartu */
    }
    .event-details .event-card:last-child {
        margin-bottom: 0; /* Hapus margin bawah di kartu terakhir */
    }
    .event-card h3 {
        font-size: 1.8em;
        margin-bottom: 10px;
    }
    .event-card p {
        font-size: 0.9em;
        gap: 5px;
        margin-bottom: 5px;
    }
    .icon-event {
        font-size: 2.5em;
        margin-bottom: 15px;
    }
    .btn-map {
        padding: 10px 20px;
        font-size: 0.9em;
        margin-top: 15px;
    }

    /* Gallery */
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
        gap: 10px;
    }
    .gallery-item {
        height: 150px;
    }

    /* RSVP & Gift */
    .rsvp-form, .bank-card {
        padding: 25px;
    }
    .rsvp-form input, .rsvp-form textarea, .submit-btn {
        font-size: 0.9em;
        padding: 12px;
    }
    .bank-card p {
        font-size: 0.9em;
    }
    .bank-card .copy-btn {
        padding: 6px 10px;
        font-size: 0.8em;
    }

    .bottom-navbar .nav-item {
        font-size: 0.65em;
    }
    .bottom-navbar .nav-item i {
        font-size: 1.2em;
    }
}

/* Extra Small Phones (max-width: 480px) */
@media (max-width: 480px) {
    .hero-names {
        font-size: 3em;
        margin-bottom: 20px;
    }
    .hero-sub-heading {
        font-size: 0.9em;
    }
    .countdown-hero {
        gap: 5px;
    }
    .countdown-item-hero {
        min-width: 55px;
        max-width: 65px;
        padding: 8px 3px;
    }
    .countdown-item-hero span {
        font-size: 1.5em;
    }
    .countdown-item-hero p {
        font-size: 0.6em;
    }

    /* General Sections */
    .section-title-our-wedding h2 {
        font-size: 1.8em;
    }
    .section-title {
        font-size: 2em;
    }
    .section-description {
        font-size: 0.9em;
    }
    .section {
        padding: 30px 10px;
        margin: 20px auto;
    }

    /* Couple Profile */
    .groom-profile, .bride-profile {
        padding: 15px;
        max-width: 100%;
    }
    .couple-profile h3 {
        font-size: 1.4em;
    }
    .couple-profile p {
        font-size: 0.85em;
    }

    /* Event Details (AKAN TURUN KE BAWAH & SANGAT KOMPAK DI PONSEL KECIL) */
    .event-details {
        padding: 20px 10px; /* Minimal padding samping */
    }
    .event-details .event-card {
        max-width: 100%; /* Ambil lebar penuh */
        padding: 15px; /* Minimal padding kartu */
        font-size: 0.8em; /* Kecilkan font lebih jauh */
    }
    .event-card h3 {
        font-size: 1.5em;
        margin-bottom: 8px;
    }
    .event-card p {
        font-size: 0.8em;
        gap: 3px;
        margin-bottom: 5px;
    }
    .icon-event {
        font-size: 2em;
        margin-bottom: 10px;
    }
    .btn-map {
        padding: 8px 15px;
        font-size: 0.8em;
        margin-top: 10px;
    }

    /* Gallery */
    .gallery {
        grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
        gap: 8px;
    }
    .gallery-item {
        height: 120px;
    }

    /* RSVP & Gift */
    .rsvp-form, .bank-card {
        padding: 20px;
    }
    .rsvp-form input, .rsvp-form textarea, .submit-btn {
        font-size: 0.85em;
        padding: 10px;
    }
    .bank-card h3 {
        font-size: 1.2em;
    }
    .bank-card p {
        font-size: 0.85em;
    }
    .bank-card .copy-btn {
        padding: 5px 8px;
        font-size: 0.7em;
    }

    .bottom-navbar .nav-item {
        font-size: 0.6em;
    }
    .bottom-navbar .nav-item i {
        font-size: 1em;
    }
}