/* --- Umum & Reset Ringan --- */
html, body {
    margin: 0;
    padding: 0;
    font-family: 'Chewy', cursive; /* Font utama website */
    background: #fffbe6;
    color: #333;
    overflow-x: hidden; /* Mencegah scroll horizontal keseluruhan halaman */
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1 {
    text-align: center;
    font-size: 2.5rem;
    color: #ff6f61;
    animation: bounce 2s infinite;
    line-height: 1.2;
    margin-top: 0;
    margin-bottom: 0;
    padding-top: 40px;
    padding-bottom: 0;
    box-sizing: border-box;
    width: 100%;
    position: relative;
}

h1 span {
    display: block;
}

/* Animated Header Lines - Continuous Collision */
.header-lines-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 3px;
    overflow: hidden;
    margin-top: 20px;
    position: relative;
    padding-bottom: 20px;
}

.header-line {
    width: 50px;
    height: 3px;
    background-color: #00bcd4;
    border-radius: 5px;
    position: absolute;
    opacity: 0;
    animation-duration: 2.5s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-out;
    animation-delay: 0.2s;
}

.header-line:first-child {
    left: 0;
    transform-origin: left center;
    animation-name: line-collide-left;
}

.header-line:last-child {
    right: 0;
    transform-origin: right center;
    animation-name: line-collide-right;
}

/* Keyframes for Left Line (moves right) */
@keyframes line-collide-left {
    0% {
        transform: translateX(-100%);
        width: 0;
        opacity: 0;
    }
    25% {
        transform: translateX(calc(50vw - 55px - 50%));
        width: 50px;
        opacity: 1;
    }
    50% {
        transform: translateX(calc(50vw - 55px - 50%));
        width: 50px;
        opacity: 1;
    }
    75% {
        transform: translateX(100vw);
        width: 0;
        opacity: 0;
    }
    100% {
        transform: translateX(-100%);
        width: 0;
        opacity: 0;
    }
}

/* Keyframes for Right Line (moves left) */
@keyframes line-collide-right {
    0% {
        transform: translateX(100%);
        width: 0;
        opacity: 0;
    }
    25% {
        transform: translateX(calc(-50vw + 55px + 50%));
        width: 50px;
        opacity: 1;
    }
    50% {
        transform: translateX(calc(-50vw + 55px + 50%));
        width: 50px;
        opacity: 1;
    }
    75% {
        transform: translateX(-100vw);
        width: 0;
        opacity: 0;
    }
    100% {
        transform: translateX(100%);
        width: 0;
        opacity: 0;
    }
}
/* End Animated Header Lines */

/* --- Umum untuk Semua Section --- */
.section {
    background: #fff;
    border-radius: 15px;
    padding: 20px;
    /* Margin akan diatur oleh container grid di desktop */
    margin: 20px auto; /* Default untuk mobile/non-grid */
    width: auto;
    max-width: 600px; /* Lebar maksimum di desktop untuk section konten */
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    box-sizing: border-box;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

/* Animated Border for .section */
.section::before {
    content: '';
    position: absolute;
    top: -3px;
    left: -3px;
    right: -3px;
    bottom: -3px;
    border-radius: 18px;
    background: linear-gradient(45deg, #ff6f61, #00bcd4, #ff6f61, #00bcd4);
    background-size: 400% 400%;
    animation: animated-border 4s linear infinite;
    z-index: -1;
    pointer-events: none;
}

@keyframes animated-border {
    0% { background-position: 0% 0%; }
    100% { background-position: 100% 100%; }
}
.section h2 {
    font-family: 'Chewy', cursive; /* Pastikan judul section menggunakan Chewy */
    color: #fff;
    background-color: #00bcd4; /* Warna solid untuk visibilitas maksimal */
    padding: 10px 15px;
    border-radius: 10px;
    margin-top: 0;
    margin-bottom: 15px;
    display: block; /* Mengambil lebar penuh yang tersedia */
    width: 100%; /* Menyesuaikan lebar pembungkus dengan lebar konten .section */
    box-sizing: border-box; /* Memastikan padding termasuk dalam 100% width */
    white-space: nowrap; /* Memaksa teks pada satu baris */
    text-align: center; /* Menengahkan teks dan ikon secara horizontal */
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    text-shadow: 1px 1px 2px rgba(0,0,0,0.3);
    cursor: default; /* Default cursor for static headers */
    position: relative; /* For dropdown arrow positioning */
    display: flex;
    justify-content: center;
    align-items: center;
}

ul {
    list-style: none;
    padding: 0;
    margin: 0;
    flex-grow: 1; /* Biarkan ul mengisi ruang yang tersisa */
    display: flex;
    flex-direction: column;
    justify-content: flex-start; /* Atau space-around jika ingin item tersebar */
}

li {
    margin: 8px 0;
    background: #f0f0f0;
    border-radius: 10px;
    padding: 10px;
    transition: transform 0.3s;
    cursor: pointer;
    text-align: left; /* Ensure text is left-aligned by default */
}

li:hover {
    transform: scale(1.05);
    background: #ffe0b2;
}

/* ----- PERUBAHAN UTAMA UNTUK PERATAAN AWAL HURUF & COLON PER BAGIAN ----- */
/* Gaya umum untuk item daftar yang memiliki label (bagian 1, 2, 3) */
.section:nth-of-type(1) ul li,
.section:nth-of-type(2) ul li,
.section:nth-of-type(3) ul li {
    display: grid;
    grid-template-columns: max-content 5px 1fr;
    gap: 0px;
    align-items: baseline;
}
/* Penyesuaian khusus untuk colon-char dan label */
.section ul li .label {
    text-align: left;
    font-weight: bold;
    color: #444;
    padding-right: 2px;
}

.section ul li .colon-char {
    text-align: left;
}

.section ul li .value {
    text-align: left;
    padding-left: 5px;
}

/* Override khusus untuk item daftar yang TIDAK memiliki label/nilai (bagian 4, S&K, dan Kebijakan Privasi) */
.section ul li:not(:has(span.label)) {
    display: block;
    text-align: left;
}
/* ----- AKHIR PERUBAHAN UTAMA ----- */

footer {
    text-align: center;
    margin: 40px auto 20px;
    font-size: 1.1rem;
    color: #777;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 600px;
    padding: 0 20px;
    box-sizing: border-box;
    position: relative;
    display: flex; /* Untuk flexbox agar item footer tertata vertikal */
    flex-direction: column;
    align-items: center; /* Untuk menengahkan item secara horizontal */
}

/* Footer Lines Container */
.footer-lines-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    height: 3px;
    overflow: hidden;
    margin-top: 0; /* Reset margin top */
    margin-bottom: 20px; /* Margin bawah untuk memisahkan dari teks */
    position: relative;
    order: 0; /* Pastikan garis di atas teks */
}

.footer-line {
    width: 50px;
    height: 3px;
    background-color: #00bcd4;
    border-radius: 5px;
    position: absolute;
    opacity: 0;
    animation-duration: 2.5s;
    animation-iteration-count: infinite;
    animation-timing-function: ease-out;
    animation-delay: 0.2s;
}

.footer-line:first-child {
    left: 0;
    transform-origin: left center;
    animation-name: line-collide-left;
}

.footer-line:last-child {
    right: 0;
    transform-origin: right center;
    animation-name: line-collide-right;
}

.footer-copyright {
    font-size: 0.9rem;
    color: #999;
    margin-top: 10px;
    margin-bottom: 0; /* Pastikan tidak ada margin bawah berlebih */
    order: 2; /* Atur urutan agar di bawah teks terima kasih */
}

.footer-text-thanks {
    margin-bottom: 10px; /* Margin bawah untuk memisahkan dari copyright */
    order: 1; /* Atur urutan agar di bawah garis */
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: translateY(0);
    }
    40% {
        transform: translateY(-10px);
    }
    60% {
        transform: translateY(-5px);
    }
}

/* === CSS Khusus untuk Formulir Pendaftaran === */
.section.registration-section {
    max-width: 750px; /* Lebar maksimum FORMULIR di desktop, agar dua kolom terlihat bagus */
    background: linear-gradient(135deg, #f8f8f8, #e0e0e0); /* Subtle gradient background */
}

/* KONSISTENSI JUDUL FORMULIR DENGAN JUDUL SECTION LAINNYA */
.section.registration-section h2 {
    cursor: pointer; /* Tetap pointer karena bisa diklik */
    background: linear-gradient(90deg, #00bcd4, #0097a7); /* Pertahankan gradien jika Anda suka */
    border-bottom: 3px solid #ff6f61; /* Pertahankan border bottom jika Anda suka */
    /* Pastikan properti lain (font-family, color, padding, border-radius, margin, box-shadow, text-shadow)
       sudah diwarisi dengan benar dari .section h2 atau disetel di sini jika ada perbedaan. */
}

.section.registration-section h2::after {
    content: '▼';
    position: absolute;
    right: 15px;
    font-size: 1.1rem;
    transition: transform 0.3s ease-in-out;
    color: #fff;
}
.section.registration-section.active h2::after {
    content: '▲';
    transform: rotate(0deg);
}

.registration-form-content {
    max-height: 0;
    overflow: hidden; /* Pertahankan ini agar transisi bekerja */
    transition: max-height 0.5s ease-out, padding-top 0.5s ease-out, padding-bottom 0.5s ease-out;
    padding-top: 0;
    padding-bottom: 0;
}

.registration-form-content.active {
    /* PERUBAHAN UTAMA DI SINI: MENINGKATKAN MAX-HEIGHT SECUKUPNYA */
    /* Ini harus cukup besar untuk menampung semua konten (form + pesan + tombol WA) */
    max-height: 700px; /* Nilai yang lebih besar untuk akomodasi konten fleksibel */
    padding-top: 20px;
    padding-bottom: 20px; /* Pastikan ada padding bawah */
}

/* Styling untuk form itu sendiri */
.registration-form-content form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.form-group {
    margin-bottom: 0;
}

/* PENINGKATAN GAYA UNTUK LABEL INPUT (JUDUL) */
.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 800;
    color: #333;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.1rem;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    line-height: 1.2;
    /* Tambahkan text-shadow untuk efek "outer glow" */
    text-shadow: 0.5px 0.5px 1px rgba(0, 0, 0, 0.2), /* Shadow tipis untuk kedalaman */
                 -0.5px -0.5px 1px rgba(255, 255, 255, 0.5); /* Highlight tipis untuk kilau */
}

.form-group label i { /* Gaya untuk ikon di dalam label */
    color: #ff6f61;
    margin-right: 8px;
    font-size: 1.1em;
    vertical-align: middle;
    text-shadow: none; /* Hapus shadow pada ikon agar tidak terlalu berat */
}

.form-group input[type="text"],
.form-group input[type="file"] {
    width: 100%;
    padding: 12px 15px;
    box-sizing: border-box;
    border: 1px solid #d0d0d0;
    border-radius: 8px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1rem;
    color: #444;
    background-color: #ffffff;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.08);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}
.form-group input[type="text"]:focus,
.form-group input[type="file"]:focus {
    border-color: #00bcd4;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 188, 212, 0.2), inset 0 1px 3px rgba(0,0,0,0.08);
}

/* Styling untuk button "Pilih File" di dalam input type="file" */
.form-group input[type="file"]::file-selector-button {
    background-color: #eee;
    color: #333;
    border: none;
    border-right: 1px solid #d0d0d0;
    padding: 8px 15px;
    margin-right: 15px;
    border-radius: 6px;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 0.95rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.form-group input[type="file"]::file-selector-button:hover {
    background-color: #ddd;
}
.registration-form-content button[type="submit"] {
    padding: 14px 30px;
    background: linear-gradient(90deg, #ff6f61, #e65c50);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.2rem;
    font-family: 'Chewy', cursive;
    cursor: pointer;
    transition: background-color 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(255, 111, 97, 0.4);
    margin-top: 15px;
    max-width: 350px;
    align-self: center;
    letter-spacing: 0.5px;
    position: relative; /* Penting untuk penempatan pesan di atas tombol */
    overflow: hidden; /* Pastikan konten di dalam tombol tidak keluar */
}

.registration-form-content button[type="submit"]:hover:not(:disabled) {
    background-color: #e65c50;
    background: linear-gradient(90deg, #e65c50, #ff6f61);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(255, 111, 97, 0.6);
}

.registration-form-content button[type="submit"]:disabled {
    background: #cccccc;
    cursor: not-allowed;
    box-shadow: none;
    transform: none;
}
/* Style untuk pesan di dalam tombol */
.registration-form-content button[type="submit"] .button-content {
    display: inline-block; /* Agar teks dan ikon bisa diatur */
    transition: opacity 0.3s ease; /* Transisi untuk menghilang */
}
.registration-form-content button[type="submit"] .loading-spinner {
    display: none; /* Sembunyikan spinner secara default */
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.registration-form-content button[type="submit"].loading .button-content {
    opacity: 0; /* Sembunyikan teks asli saat loading */
}
.registration-form-content button[type="submit"].loading .loading-spinner {
    display: block; /* Tampilkan spinner saat loading */
}
@keyframes spin {
    0% { transform: translate(-50%, -50%) rotate(0deg); }
    100% { transform: translate(-50%, -50%) rotate(360deg); }
}

/* Styling untuk pesan respons yang muncul di bawah tombol */
.response-message {
    text-align: center;
    margin-top: 20px; /* PERUBAHAN DI SINI: MENYESUAIKAN MARGIN ATAS */
    font-weight: bold;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    font-size: 1.05rem;
    padding: 10px;
    border-radius: 5px;
    display: block; /* Pastikan selalu blok */
    opacity: 0; /* Mulai dengan tidak terlihat */
    visibility: hidden; /* Sembunyikan sepenuhnya dari layout */
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s; /* Transisi */
    box-sizing: border-box; /* Pastikan padding termasuk dalam lebar */
    width: 100%; /* Lebar penuh */
}

.response-message.show {
    opacity: 1; /* Tampilkan */
    visibility: visible; /* Buat terlihat */
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0s; /* Transisi */
}

.response-message.success {
    background-color: #d4edda; /* Warna latar belakang hijau terang yang lebih solid */
    color: #155724; /* Warna teks hijau gelap yang lebih kontras */
    border: 1px solid #155724;
}

.response-message.error {
    background-color: #f8d7da; /* Warna latar belakang merah terang yang lebih solid */
    color: #721c24; /* Warna teks merah gelap yang lebih kontras */
    border: 1px solid #721c24;
}

/* WhatsApp Button Styles */
.whatsapp-button-container {
    text-align: center;
    margin-top: 15px; /* PERUBAHAN UTAMA DI SINI: MENYESUAIKAN MARGIN ATAS */
    margin-bottom: 0; /* Pastikan tidak ada margin bawah berlebih dari elemen ini */
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0.5s;
}

.whatsapp-button-container.show {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.5s ease-in-out, visibility 0s linear 0s;
}

.whatsapp-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 25px;
    background: linear-gradient(90deg, #25D366, #128C7E); /* WhatsApp green gradient */
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1.1rem;
    font-family: 'Chewy', cursive;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.3s ease, transform 0.2s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 10px rgba(37, 211, 102, 0.4);
}

.whatsapp-button:hover {
    background: linear-gradient(90deg, #128C7E, #25D366);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(37, 211, 102, 0.6);
}

.whatsapp-button i {
    margin-right: 10px;
    font-size: 1.3em;
}


/* --- Media Queries untuk Responsivitas Desktop --- */
@media (min-width: 768px) {
    /* Kontainer untuk bagian 1-4 */
    .sections-grid-container {
        display: grid;
        grid-template-columns: 1fr 1fr; /* Dua kolom sama lebar */
        gap: 40px; /* Jarak antar kotak */
        max-width: 1200px; /* Sesuaikan lebar maksimum kontainer grid */
        margin: 40px auto; /* Pusatkan kontainer grid */
        padding: 0 20px; /* Padding samping agar tidak terlalu mepet ke tepi */
        box-sizing: border-box;
    }

    /* Penyesuaian untuk .section di dalam grid container */
    .sections-grid-container .section {
        margin: 0; /* Hapus margin auto karena sudah diatur oleh grid gap */
        max-width: none; /* Biarkan grid mengatur lebar */
    }

    /* ===== PERUBAHAN UTAMA DI SINI UNTUK KONSISTENSI TINGGI KOTAK ===== */
    .section {
        display: flex;
        flex-direction: column;
        min-height: 400px; /* Meningkatkan min-height agar semua kotak terlihat lebih seragam. Sesuaikan jika perlu. */
        padding: 40px;
        /* margin: 40px auto; <-- Dihapus/diatur ulang di .sections-grid-container atau .sections-grid-container .section */
    }

    /* Memastikan `ul` mengambil seluruh sisa ruang vertikal yang tersedia */
    .section ul {
        flex-grow: 1; /* Ini akan membuat UL mengisi ruang kosong */
        display: flex;
        flex-direction: column;
        justify-content: flex-start; /* Items akan menempel ke atas */
    }
    /* ===== AKHIR PERUBAHAN UTAMA DI SINI ===== */

    /* Untuk layout 2 kolom pada form */
    .registration-form-content form {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 25px;
    }

    /* Pastikan input file dan tombol submit membentang penuh (2 kolom) */
    .form-group.file-input-group,
    .registration-form-content button[type="submit"],
    .response-message,
    .whatsapp-button-container { /* Added for WhatsApp button */
        grid-column: 1 / -1;
    }

    .section.registration-section {
        max-width: 800px; /* Tetap untuk form */
        padding: 50px;
        margin: 40px auto; /* Pertahankan margin auto untuk form agar tetap di tengah */
    }

    /* Penyesuaian untuk header utama di desktop */
    h1 {
        font-size: 3rem;
    }

    .section h2 {
        font-size: 1.9rem;
        padding: 15px 25px;
    }
}

/* Media Query untuk Mobile (jika diperlukan penyesuaian khusus) */
@media (max-width: 767px) {
    body {
        padding: 10px;
    }

    /* Pastikan kontainer grid tidak aktif di mobile */
    .sections-grid-container {
        display: block; /* Kembali ke block display */
        margin: 0; /* Hapus margin kontainer grid */
        max-width: none;
        padding: 0;
    }

    .section {
        margin: 15px 15px; /* Kembalikan margin individual section di mobile */
        padding: 20px;
        display: block;
        min-height: auto;
    }

    h1 {
        font-size: 2.2rem;
        padding-top: 20px;
    }

    .section h2 {
        font-size: 1.6rem;
        padding: 12px 18px;
    }

    /* Pada mobile, form-group akan tetap menumpuk karena flex-direction: column */
    .form-group input,
    .form-group select,
    .form-group textarea,
    .registration-form-content button[type="submit"] {
        width: 100%;
        max-width: none;
    }
.registration-form-content.active {
        /* PERUBAHAN UTAMA DI SINI: MENYESUAIKAN MAX-HEIGHT UNTUK MOBILE JUGA */
        max-height: 700px; /* Disesuaikan, pastikan cukup untuk semua elemen */
    }
}
