
:root {
    --primary: #12c48b;
    --primary-dark: #0ea374;
    --bg: #eef5f3;
    --surface-solid: #FFFFFF;
    --text: #183126;
    --text-soft: #6b7d74;
    --header-height: 70px;
}

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

/* Mengatur background gambar agar memenuhi layar dan tetap di belakang */
body {
    font-family: 'Plus Jakarta Sans', sans-serif;
    color: var(--text);
    width: 100%;
    min-height: 100vh;
    margin: 0;
    /* Gambar background di sini */
    background: url("https://blog.attaqwahmd.com/wp-content/uploads/2025/08/Back-hijau-1.jpg") center center/cover fixed no-repeat;
}

main {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 85px 16px 100px 16px;
}

/* Mengatur overlay hijau dan efek blur */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    /* Lapisan hijau transparan agar gambar tidak terlalu mencolok/tetap terbaca */
    background: rgba(220, 245, 230, 0);
    backdrop-filter: blur(5px); /* Efek blur pada gambar */
    z-index: -1;
}


/* ======================= CONTAINER UTAMA ======================= */

main {
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 10px 16px 100px;
    box-sizing: border-box; /* KUNCI FIX: Mencegah layar jebol ke samping karena padding */
}


/* --- TOPBAR REFINED --- */

.topbar {
    position: sticky;
    top: 0;
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between; /* Menjaga jarak antar elemen tetap seimbang */
    height: 72px;
    padding: 0 16px;
    box-sizing: border-box; /* KUNCI FIX: Menjaga lebar topbar tetap 100% pas layar */
    background: rgba(255, 255, 255, 0.72);
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.05);
    transition: 0.3s;
}

/* Area Logo */
.logo-area img {
    width: 46px; 
    height: 46px;
    object-fit: contain; /* Menjaga proporsi logo */
}

/* Area Pencarian */
.search-box {
    flex: 1; /* Memaksa search box mengisi sisa ruang */
    height: 46px;
    margin: 0 12px;
    display: flex;
    align-items: center;
    padding: 0 16px;
    border-radius: 24px;
    background: #F8FAF8;
    border: 1px solid rgba(0, 0, 0, 0.06);
    box-sizing: border-box; /* Memastikan padding tidak merusak lebar */
    box-shadow: 
        inset 0 1px 2px rgba(255, 255, 255, 0.8),
        0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.25s ease;
}

.search-box:focus-within {
    border-color: #39c54a;
    box-shadow: 
        0 0 0 3px rgba(57, 197, 74, 0.15),
        0 4px 12px rgba(57, 197, 74, 0.12);
}

.search-box input {
    flex: 1;
    min-width: 0; /* Penting: Mencegah input memanjang melebihi search-box */
    margin-left: 10px;
    border: none;
    outline: none;
    background: transparent;
    font-size: 16px;
    color: var(--text);
}

.search-box input::placeholder {
    color: #8b8b8b;
}

/* Area Tombol Theme */
.theme-btn {
    width: 46px; /* FIX: Sebelumnya tertulis 46pxpx */
    height: 46px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #F0F5F1;
    transition: 0.3s;
    flex-shrink: 0; /* Mencegah tombol mengecil saat layar sempit */
}

.theme-btn:hover {
    background: #22C55E;
    color: white;
}

/* Ikon Dark Mode */
.dark-mode-toggle {
    width: 42px;
    height: 42px;
    border-radius: 50%;
    border: none;
    background: #F4F8F5;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: 0.25s;
    flex-shrink: 0; /* Mencegah tombol mengecil saat layar sempit */
}

.dark-mode-toggle:hover {
    background: #22C55E;
    color: #fff;
}

.dark-mode-toggle:active {
    transform: scale(0.9);
}

/* =====================================================
   HERO SLIDER
===================================================== */

.hero-slider{
    position:relative;
    width:100%;
    height:185px;
    margin:0 0 22px;
    overflow:hidden;
    border-radius:30px;
    background:#1b5e20;
    box-shadow:
        0 12px 25px rgba(0,0,0,.15),
        0 25px 45px rgba(0,0,0,.12);
    isolation:isolate;
}

.hero-slider::before{
    content:"";
    position:absolute;
    inset:0;
    background:
    linear-gradient(
        135deg,
        rgba(255,255,255,.14),
        transparent 45%
    );
    pointer-events:none;
    z-index:2;
}

.hero-slider::after{
    content:"";
    position:absolute;
    inset:0;
    border-radius:30px;
    border:1px solid rgba(255,255,255,.22);
    pointer-events:none;
}

.slides{
    display: flex;
    width: 100%;
    height: 100%;
}

.slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.7s ease;
    display: block; /* Penting untuk tag 'a' */
}

.slide.active {
    opacity: 1;
    visibility: visible;
}

.slide img{
    width:100%;
    height:100%;
    object-fit:cover;
    display:block;
    transform:scale(1);
    transition:
        transform 8s linear,
        filter .4s;
}

.slide.active img{
    transform:scale(1.08);
}

/* Overlay Gelap */

.overlay{
    position:absolute;
    inset:0;
    display:flex;
    flex-direction:column;
    justify-content:flex-end;
    padding:24px;
    background:
    linear-gradient(
        to top,
        rgba(0,0,0,.55),
        rgba(0,0,0,.08),
        transparent
    );
    color:#fff;
}

.overlay h2{
    font-size:26px;
    font-weight:700;
    margin-bottom:10px;
    line-height:1.1;
}

.overlay p{
    max-width:220px;
    font-size:14px;
    line-height:1.6;
    opacity:.95;

    margin-bottom:20px;
}

/* Tombol */

.hero-btn{
    display:inline-flex;
    align-items:center;
    justify-content:center;
    width:120px;
    height:38px;
    background:#fff;
    color:#0b6847;
    border-radius:25px;
    text-decoration:none;
    font-size:15px;
    font-weight:700;
    transition:.25s;
}

.hero-btn:hover{
    transform:translateY(-2px);
    background:#f5f5f5;
}

/* Dot Slider */

.dots{
    position:absolute;
    bottom:14px;
    left:50%;
    transform:translateX(-50%);
    display:flex;
    gap:8px;
    z-index:5;
}

.dot{
    width:8px;
    height:8px;
    border-radius:20px;
    background:rgba(255,255,255,.45);
    transition:.35s;
}

.dot.active{
    width:32px;
    background:#fff;
    box-shadow:
        0 0 12px rgba(255,255,255,.5);
}

.hero-slider{

    animation:heroUp .6s ease;
}

@keyframes heroUp{

from{

opacity:0;

transform:translateY(20px);

}

to{

opacity:1;

transform:none;

}

}

/* Mobile */

@media (max-width:480px){

.hero-slider{
    height:205px;

}

.overlay{
    padding:22px;

}

.overlay h2{
    font-size:24px;

}

.overlay p{
    font-size:13px;
    max-width:180px;

}

.hero-btn{
    width:135px;
    height:42px;
    font-size:14px;

}

}

/* ======================= MENU GRID ======================= */

.menu-grid {
    display: grid;
    grid-template-columns: 1fr; /* Bagian ini diubah dari repeat(2, 1fr) menjadi 1fr */
    gap: 14px;
    margin-top: 18px;
}

/* 1. Kondisi Awal & Base Style Menu Card */

.menu-card {
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 8px;
    height: 78px;
    padding: 0 14px;
    border-radius: 22px; /* Ukuran ini sudah pas dan membulat elegan untuk card */
    text-decoration: none;
    background: linear-gradient(135deg, rgba(255,255,255,.10), rgba(255,255,255,.04));
    border: 1px solid rgba(255,255,255,.12);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), 0 10px 24px rgba(0,0,0,.12);
    
    /* Digabung agar tidak saling timpa: animasi awal lambat, animasi interaksi cepat */
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.3s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

/* 2. Kondisi Saat Muncul (Triggered by JS) */
.menu-card.show {
    opacity: 1;
    transform: translateY(0);
}

.menu-card:hover {
    transform: translateY(-4px);
    border-color: rgba(180,255,120,.45);
    box-shadow: 0 14px 28px rgba(0,0,0,.18), 0 0 20px rgba(120,255,80,.18);
}

.menu-card:active {
    transform: scale(.96); /* Diubah jadi .96 agar efek tap lebih terasa */
}

/* ======================= MENU ICON & TEXT ======================= */

.menu-icon {
    width: 45px;
    height: 45px;
    border-radius: 14px; /* Sudut membulat (squircle) yang serasi dengan bentuk card */
    flex-shrink: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #22C55E, #D9FF3D);
    color: #fff;
    font-size: 24px;
    position: relative;
    box-shadow: 0 6px 16px rgba(34,197,94,.35);
}

.menu-icon::before {
    content: "";
    position: absolute;
    inset: -6px;
    border-radius: 18px;
    background: radial-gradient(circle, rgba(140,255,90,.25), transparent 70%);
    z-index: -1;
}

.menu-text {
    flex: 1;
    margin-left: 2.3px;
    color: #fff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.3;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.menu-arrow {
    font-size: 17px;
    color: rgba(255,255,255,.75);
    transition: .25s;
}

.menu-card:hover .menu-arrow {
    transform: translateX(5px);
    color: #D8FF7A;
}

/* ======================= DECORATIVE EFFECTS ======================= */

.menu-card::before {
    content: "";
    position: absolute;
    top: 0;
    left: -120%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg, transparent, rgba(255,255,255,.16), transparent);
    transition: .8s;
}

.menu-card:hover::before {
    left: 140%;
}

.menu-card::after {
    content: "";
    position: absolute;
    top: 0;
    left: 18px;
    right: 18px;
    height: 2px;
    border-radius: 5px;
    background: linear-gradient(90deg, transparent, #9CFF69, transparent);
    opacity: 0;
    transition: .3s;
}

.menu-card:hover::after {
    opacity: 1;
}

/* ======================= BOTTOM NAVIGATION ======================= */

.bottom-nav{
    position:fixed;
    left:50%;
    bottom:14px;
    transform:translateX(-50%);
    width:calc(100% - 24px);
    max-width:560px;
    height:74px;
    padding:0 12px;
    display:flex;
    justify-content:space-around;
    align-items:center;
    border-radius:28px;
    background:rgba(255,255,255,.78);
    backdrop-filter:blur(25px);
    -webkit-backdrop-filter:blur(25px);
    border:1px solid rgba(255,255,255,.35);
    box-shadow:
        0 18px 40px rgba(0,0,0,.18),
        inset 0 1px 0 rgba(255,255,255,.45);
    z-index:999;
}

.nav-item{
    position:relative;
    width:58px;
    height:58px;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    text-decoration:none;
    color:#8F969A;
    border-radius:18px;
    transition:.3s;
}

.nav-item.active{
    color:#fff;
    background:
        linear-gradient(
            135deg,
            #21C45D,
            #B9FF30
        );
    transform:translateY(-10px);
    box-shadow:
        0 10px 22px rgba(34,197,94,.38);
}

.nav-item i{
    font-size:21px;
    margin-bottom:4px;
    transition:.3s;
}

.nav-item.active i{
    animation:bounce .45s;
    color:white;
}

.nav-item:hover{
    color:#21C45D;
}

.nav-item.active::before{
    content:"";
    position:absolute;
    inset:-6px;
    border-radius:22px;
    background:
        radial-gradient(
            circle,
            rgba(80,255,80,.28),
            transparent 70%
        );
    z-index:-1;
}

@keyframes bounce{
    0%{
        transform:scale(.85);
    }
    50%{
        transform:scale(1.15);
    }
    100%{
        transform:scale(1);
    }
}

@media(max-width:480px){

.bottom-nav{
    height:70px;
    border-radius:24px;
    bottom:10px
}

.nav-item{
    width:54px;
    height:54px;
}

.nav-item i{
    font-size:20px;
}

.nav-item span{
    font-size:10px;
}

}

/* ======================= MODAL ======================= */

.modal {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    background: rgba(0, 0, 0, 0.45);
    z-index: 9999;
}

.modal-content {
    width: 88%;
    max-width: 360px;
    background: white;
    border-radius: 22px;
    padding: 30px;
    text-align: center;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.modal-content h2 {
    margin-top: 18px;
    margin-bottom: 10px;
}

.modal-content p {
    color: #666;
    line-height: 1.6;
}

.modal-content button {
    margin-top: 25px;
    width: 100%;
    height: 46px;
    border: none;
    border-radius: 14px;
    background: var(--primary);
    color: white;
    cursor: pointer;
}

/* ======================= TOAST & SCROLLBAR ======================= */

::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-thumb {
    background: #b7d5cb;
    border-radius: 10px;
}

.empty-search {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    margin-top: 50px;
    color: #999;
}

.empty-search i {
    font-size: 60px;
    margin-bottom: 15px;
    opacity: 0.3;
}

.empty-search h3 {
    margin-bottom: 10px;
}

.empty-search p {
    font-size: 14px;
}

.toast {
    position: fixed;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%) translateY(40px);
    background: #222;
    color: #fff;
    padding: 14px 20px;
    border-radius: 30px;
    opacity: 0;
    transition: 0.35s;
    z-index: 99999;
    font-size: 14px;
    pointer-events: none;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

/* Ripple Effect for Buttons */
button {
    position: relative;
    overflow: hidden;
}

.ripple {
    position: absolute;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%) scale(0);
    animation: ripple 0.6s linear;
}

@keyframes ripple {
    to {
        transform: translate(-50%, -50%) scale(25);
        opacity: 0;
    }
}

.no-result, .empty-search {
    display: none;
}
