html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: 'Poppins', sans-serif;
    background: #fff;
    color: #333;
    overflow-x: hidden;
}

/* HEADER */
header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #55AAFF;
    padding: 15px 40px;
    color: white;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}
.logo img {
    height: 35px; /* Mengatur tinggi logo */
}
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #55AAFF;
    padding: 10px 18px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
}
.whatsapp-btn:hover {
    background: #e6f3ff;
    transform: scale(1.05);
}
.whatsapp-btn-icon {
    height: 18px;
}

/* HERO */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    padding: 50px 40px;
    background: linear-gradient(-45deg, #55AAFF, #89D6FF, #E6F3FF, #FFFFFF);
    background-size: 400% 400%;
    animation: gradientFlow 10s ease infinite;
    overflow: hidden;
}
@keyframes gradientFlow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}
.hero-content {
    max-width: 500px;
}
.hero-content h1 {
    font-size: 2.5em;
    color: #333333;
}
.hero-content p {
    color: #555;
    line-height: 1.6;
    margin: 15px 0;
}
.cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 30px;
    background: #55AAFF;
    color: white;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 400;
    transition: all 0.3s ease;
}

.cta-btn:hover {
    background: #3b94e6;
    box-shadow: 0 4px 12px rgba(85,170,255,0.4);
}

.cta-btn.small {
    padding: 8px 18px;
    font-size: 0.9em;
}

.cta-btn-icon {
    height: 20px;
}

.hero img {
    max-width: 420px;
    border-radius: 20px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}
.hero-slider {
    position: relative;
    max-width: 420px;
    width: 100%;
    aspect-ratio: 1 / 0.7; /* Menjaga rasio gambar */
    border-radius: 20px;
    overflow: hidden; /* Memastikan gambar tetap di dalam border radius */
    margin-right: 100px;
}
.hero-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Membuat gambar mengisi kontainer */
    opacity: 0;
    transition: opacity 1.2s ease-in-out;
}
.hero-slide.active {
    opacity: 1;
}

/* Efek kilau */
.shine {
    position: relative;
    overflow: hidden;
}
.shine::after {
    content: "";
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(120deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.6) 50%, rgba(255,255,255,0) 100%);
    transition: 0.6s;
}
.shine:hover::after {
    left: 120%;
}

/* Spark effect */
.spark::before, .spark::after {
    content: "";
    position: absolute;
    width: 6px;
    height: 6px;
    background: #fff;
    border-radius: 50%;
    animation: sparkle 3s infinite;
}
.spark::after {
    animation-delay: 1.5s;
}
@keyframes sparkle {
    0%, 100% { opacity: 0; transform: translateY(0) scale(0.5); }
    50% { opacity: 1; transform: translateY(-10px) scale(1); }
}

/* PRODUCTS */
.products {
    text-align: center;
    padding: 30px 20px;
}
.products h2 {
    font-size: 2em;
    margin-bottom: 40px;
    color: #333333;
}
.card-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(230px, 1fr));
    gap: 25px;
}
.card {
    background: #fff;
    border-radius: 15px;
    box-shadow: 0 3px 15px rgba(0,0,0,0.08);
    padding: 15px;
    transition: all 0.3s;
}
.card img {
    width: 100%;
    border-radius: 12px;
    margin-bottom: 10px;
}
.card-footer {
    display: flex;
    flex-direction: column; /* Menyusun item secara vertikal */
    align-items: center;
    margin-top: 15px;
    margin-bottom: 15px;
    gap: 10px; /* Menambah jarak antara harga dan tombol */
}
.buy-btn {
    display: inline-block;
    padding: 8px 20px;
    background: #55AAFF;
    color: white;
    border-radius: 20px;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
}
.buy-btn:hover {
    background: #3b94e6;
}
.price {
    color: #55AAFF;
    font-weight: bold;
    font-size: 1.1em;
}

/* CTA SECTION */
.cta-section {
    background: #f4f8ff;
    padding: 10px 20px 50px 20px;
    text-align: center;
}
.cta-section .cta-content {
    max-width: 700px;
    margin: 0 auto;
}
.cta-section h2 {
    font-size: 2.2em;
    color: #333;
    margin-bottom: 15px;
}
.cta-section p {
    color: #555;
    line-height: 1.7;
    margin-bottom: 30px;
}

/* ADVANTAGES SECTION */
.advantages {
    padding: 1px 20px 40px 20px;
    text-align: center;
    background-color: #B2D7E8; /* Warna latar biru muda yang lembut */
}
.advantages h2 {
    font-size: 2em;
    margin-bottom: 40px;
    color: #333333;
}
.advantages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 30px;
    max-width: 1000px;
    margin: 0 auto;
}
.advantage-item {
    background-color: #fff;
    padding: 30px 20px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}
.advantage-item:hover {
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}
.advantage-icon {
    height: 45px; /* Atur tinggi ikon */
    margin-bottom: 15px;
}
.advantage-item h3 {
    margin-top: 0;
    color: #5C6873;
}
.advantage-item p {
    font-size: 0.9em;
    color: #5C6873;
}

/* VOUCHER SECTION */
.voucher {
    display: flex;
    max-width: 600px;
    margin: 0 auto;
    background: linear-gradient(to right, #128C7E, #29A399, #2E5788); /* Warna gradient baru */
    color: white;
    border-radius: 10px;
    position: relative;
    text-align: left;
}

.voucher-main {
    padding: 20px 30px;
    flex-grow: 1;
    text-align: center;
}

.voucher-main h3 {
    font-size: 1.2em;
    font-weight: 400;
    margin: 0 0 5px 0;
}

.voucher-amount {
    font-size: 2.5em;
    font-weight: 700;
}

.voucher-rip {
    padding: 20px;
    width: 200px; /* Menggunakan lebar eksplisit */
    flex-shrink: 0; /* Mencegah elemen menyusut */
    box-sizing: border-box; /* Memastikan padding tidak menambah lebar */
    border-left: 2px dashed rgba(255,255,255,0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-size: 0.9em;
}

.voucher::before, .voucher::after {
    content: '';
    position: absolute;
    width: 30px; height: 30px;
    background-color: #fff; /* Warna background .voucher-section */
    border-radius: 50%;
    right: calc(200px - 15px); /* Posisi dihitung dari kanan agar responsif */
}
.voucher::before { top: -15px; }
.voucher::after { bottom: -15px; }

.voucher-section {
    padding: 50px 20px 0 20px;
    background-color: #fff;
    scroll-margin-top: 40px; /* Menambah jarak saat scroll ke ID ini */
}
.purchase-form-container {
    max-width: 600px;
    margin: 0 auto; /* Menghapus margin atas, karena diatur oleh section */
    background-color: #fff;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
}
.purchase-form-container h2 {
    margin-top: 0;
    margin-bottom: 30px;
    text-align: center;
    color: #5C6873;
}
.purchase-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.purchase-form input,
.purchase-form textarea,
.purchase-form select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-family: 'Poppins', sans-serif;
    box-sizing: border-box; /* Penting agar padding tidak menambah lebar */
    font-size: 1em;
    background-color: #fff;
}
.purchase-form select {
    color: #333;
}
.purchase-form select:invalid {
    color: #757575; /* Warna untuk placeholder */
}
.form-consent-group {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Jarak antar item persetujuan */
    margin-top: 5px;
}
.form-consent-item {
    display: flex;
    align-items: center;
    gap: 10px;
}
.form-consent-item input[type="checkbox"] {
    width: auto; /* Mengembalikan lebar default checkbox */
}
.form-consent-item label {
    font-size: 0.85em;
    color: #555;
}
.purchase-form .cta-btn {
    justify-content: center; /* Menengahkan ikon dan teks di dalam tombol */
    border: none; /* Menghapus border default pada button */
    cursor: pointer;
    align-self: center; /* Membuat tombol berada di tengah */
    margin-top: 10px;
    font-size: 17px;
    font-weight: 400;
}
.form-submit-note {
    text-align: center;
    font-size: 0.9em;
    color: #555;
    margin-bottom: 0;
    margin-top: 15px;
}
.form-section {
    padding: 50px 20px;
    background-color: #f9fafb; /* Memberi warna latar agar form terlihat seperti box */
}

.mobile-title {
    display: none; /* Sembunyikan judul mobile di desktop */
}

.advantages-cta {
    margin-top: 20px;
    font-size: 0.9em;
}

/* Promo Popup */
.promo-popup {
    /* Posisi diatur oleh container */
    position: absolute;
    bottom: 0;
    right: 0;
    background: #203D43;
    color: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    z-index: 1001;
    max-width: 320px;
    width: calc(100vw - 40px); /* Lebar popup di mobile */
    transform: translateY(150%);
    opacity: 0;
    transition: transform 0.5s ease-in-out, opacity 0.5s ease-in-out;
}

.promo-popup.show {
    transform: translateY(0);
    opacity: 1;
}

.promo-popup p {
    margin-bottom: 1rem;
    line-height: 1.4;
}

#closePromo {
    background: #DC4E4E;
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background-color 0.3s;
}

#closePromo:hover {
    background: #c74242; /* A slightly darker shade of primary */
}

.popup-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-top: 1.5rem;
}

.popup-link {
    color: #F8C674;
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.popup-link:hover {
    color: white;
    text-decoration: underline;
}

/* Sembunyikan tombol ke atas saat popup promo muncul */

.promo-popup p {
    font-size: 14px;
    text-align: center;
}

/* Wadah untuk elemen fixed */
.fixed-elements-container {
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1000;
}

/* FOOTER */
footer {
    background: #55AAFF;
    color: #fff;
    text-align: center;
    padding: 20px;
    position: relative;
    font-size: 0.9em;
    font-weight: 300;
}
footer a{
    text-decoration: none;
    color: #fff;
}
.wa-floating {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: white;
    border-radius: 50%;
    padding: 10px;
    box-shadow: 0 3px 10px rgba(0,0,0,0.2);
    transition: 0.3s;
}
.wa-floating:hover {
    transform: scale(1.1);
}
.wa-floating img {
    width: 45px;
    height: 45px;
}

/* Responsive Design */
@media (max-width: 768px) {
    header {
        padding: 15px 20px;
    }

    .hero {
        padding: 30px 20px;
        justify-content: center;
        text-align: center;
        padding-bottom: 50px; /* Menambah ruang di bawah section hero */
    }

    .hero-content h1 {
        font-size: 2.2em;
        margin-top: 0; /* Mengurangi jarak atas */
    }

    .hero img {
        margin-top: 30px;
    }

    .hero-slider {
        margin-top: 0px;
        margin-right: 0px;
    }

    .desktop-title {
        display: none; /* Sembunyikan judul desktop di mobile */
    }

    .mobile-title {
        display: block; /* Tampilkan judul mobile */
    }
}
