/* ==========================================================================
   1. IMPORT FONT & RESET DASAR 
   ========================================================================== */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Poppins', sans-serif; 
}

body { 
    background-color: #f8fafc; 
    color: #334155; 
    line-height: 1.6; 
}

/* ==========================================================================
   2. HEADER, LOGO & NAVIGASI MENU
   ========================================================================== */
header { 
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), url('image/bckhead.jpg');
    background-size: cover;                     
    background-position: center;                
    background-repeat: no-repeat;               
    padding: 20px 5%; 
    display: flex; 
    align-items: center; 
    gap: 20px; 
    border-bottom: 1px solid #e2e8f0; 
}

.logo { 
    width: 60px; 
    height: 60px; 
    border-radius: 50%; 
    object-fit: cover; 
    border: 2px solid #0ea5e9; 
}

.header-text h1 { 
    font-size: 1.6rem; 
    font-weight: 700; 
    color: #e7e8eb; 
}

.header-text p { 
    font-size: 0.95rem; 
    color: #e3e8ed; 
    font-weight: 500; 
}

nav { 
    background: linear-gradient(to right, #0284c7, #0ea5e9); 
    position: sticky; 
    top: 0; 
    z-index: 100; 
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1); 
}

nav ul { 
    list-style: none; 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
}

nav a { 
    display: block; 
    color: #ffffff; 
    text-decoration: none; 
    padding: 15px 25px; 
    font-weight: 500; 
    transition: background-color 0.3s; 
}

nav a:hover, 
nav a.active { 
    background-color: rgba(255, 255, 255, 0.2); 
}

/* ==========================================================================
   3. TATA LETAK UTAMA (KOTAK PUTIH KONTEN)
   ========================================================================== */
main { 
    max-width: 1050px; 
    margin: 40px auto; 
    padding: 0 20px; 
    min-height: 50vh; 
}

section { 
    background: #ffffff; 
    padding: 40px; 
    border-radius: 12px; 
    border: 1px solid #e2e8f0; 
    box-shadow: 0 1px 3px rgba(0,0,0,0.05); 
    margin-bottom: 30px; 
}

section h2 { 
    color: #0f172a; 
    font-size: 1.8rem; 
    font-weight: 600; 
    margin-bottom: 15px; 
    border-left: 5px solid #0ea5e9; 
    padding-left: 15px; 
}

section p { 
    color: #475569; 
    font-size: 1.05rem; 
    margin-bottom: 25px; 
}

/* ==========================================================================
   4. DESAIN GALERI KARTU KATEGORI SAMPAH (TAMPILAN PORTAL BERITA)
   ========================================================================== */
.kategori-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr); 
    gap: 25px;
    margin-top: 30px;
}

.kategori-card {
    background-color: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden; 
    text-align: left; 
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    display: flex;
    flex-direction: column;
}

.kategori-card:hover {
    transform: translateY(-8px); 
    box-shadow: 0 12px 20px rgba(0,0,0,0.1);
    border-color: #0ea5e9;
}

.kategori-card img {
    width: 100%;
    height: 180px;
    object-fit: cover; 
    border-bottom: 1px solid #e2e8f0;
}

.kategori-card-body {
    padding: 20px;
    flex: 1;
}

.kategori-card h3 { 
    color: #0f172a; 
    font-size: 1.25rem; 
    margin-bottom: 10px; 
    line-height: 1.4; 
}

.kategori-card p { 
    color: #64748b; 
    font-size: 0.95rem; 
    margin-bottom: 0; 
    line-height: 1.6; 
}

@media (max-width: 900px) { 
    .kategori-grid { 
        grid-template-columns: repeat(2, 1fr); 
    } 
}

@media (max-width: 500px) { 
    .kategori-grid { 
        grid-template-columns: 1fr; 
    } 
}

/* ==========================================================================
   5. MULTIMEDIA (GAMBAR KIRI & VIDEO YOUTUBE KANAN)
   ========================================================================== */
.multimedia-container { 
    display: flex; 
    gap: 30px; 
    flex-wrap: wrap; 
}

.multimedia-container > a, 
.video-wrapper { 
    flex: 1; 
    min-width: 300px; 
}

.img-clickable { 
    width: 100%; 
    height: 100%; 
    max-height: 315px; 
    object-fit: cover; 
    border-radius: 10px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    transition: transform 0.3s, box-shadow 0.3s; 
    cursor: pointer; 
}

.img-clickable:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 15px rgba(0,0,0,0.15); 
}

.video-wrapper iframe { 
    width: 100%;    
    height: 315px;  
    border-radius: 10px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.1); 
    border: none;
}

/* ==========================================================================
   6. TABEL TABUNGAN & FORM SETORAN
   ========================================================================== */
.data-table { 
    width: 100%; 
    border-collapse: collapse; 
    margin-bottom: 20px; 
    border: 1px solid #94a3b8; 
}

.data-table th, 
.data-table td { 
    padding: 15px; 
    text-align: left; 
    border: 1px solid #cbd5e1; 
}

.data-table th { 
    background-color: #f1f5f9; 
    color: #0f172a; 
    font-weight: 600; 
}

.data-table tr:hover { 
    background-color: #f8fafc; 
}

.chk-hapus { 
    transform: scale(1.4); 
    cursor: pointer; 
}

.form-group { 
    margin-bottom: 20px; 
}

.form-group label { 
    display: block; 
    font-weight: 500; 
    margin-bottom: 8px; 
    color: #334155; 
}

.form-group input, 
.form-group select { 
    width: 100%; 
    padding: 12px 15px; 
    border: 1px solid #cbd5e1; 
    border-radius: 6px; 
    font-size: 1rem; 
    transition: border 0.3s; 
}

.form-group input:focus, 
.form-group select:focus { 
    border-color: #0ea5e9; 
    outline: none; 
}

.item-row { 
    display: flex; 
    gap: 15px; 
    margin-bottom: 15px; 
    align-items: center; 
    background: #f8fafc; 
    padding: 15px; 
    border-radius: 8px; 
    border: 1px dashed #cbd5e1; 
}

/* ==========================================================================
   7. DESAIN SEMUA TOMBOL AKSI (EFEK MELAYANG)
   ========================================================================== */
.btn-add { 
    background: #10b981; 
    color: white; 
    border: none; 
    padding: 10px 20px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: 600; 
    margin-bottom: 20px; 
    display: inline-block; 
    transition: all 0.3s ease; 
}

.btn-add:hover { 
    background: #059669; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); 
}

.btn-submit { 
    background-color: #0ea5e9; 
    color: white; 
    padding: 12px 25px; 
    border: none; 
    cursor: pointer; 
    border-radius: 6px; 
    font-weight: 600; 
    font-size: 1rem; 
    transition: all 0.3s ease; 
}

.btn-submit:hover { 
    background-color: rgb(23, 67, 197); 
    color: white; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(23, 67, 197, 0.4); 
}

.btn-remove { 
    background: #ef4444; 
    color: white; 
    border: none; 
    padding: 10px 15px; 
    border-radius: 6px; 
    cursor: pointer; 
    font-weight: bold; 
    transition: all 0.2s ease; 
}

.btn-remove:hover { 
    background: #b91c1c; 
    transform: scale(1.05); 
}

.btn-reset { 
    background-color: #ef4444; 
    color: white; 
    padding: 10px 20px; 
    border: none; 
    cursor: pointer; 
    border-radius: 6px; 
    font-weight: 500; 
    transition: all 0.2s ease; 
}

.btn-reset:hover { 
    background-color: #dc2626; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(220, 38, 38, 0.3); 
}

.btn-warning { 
    background-color: #f59e0b; 
    color: white; 
    padding: 10px 20px; 
    border: none; 
    cursor: pointer; 
    border-radius: 6px; 
    font-weight: 500; 
    transition: all 0.2s ease; 
}

.btn-warning:hover { 
    background-color: #d97706; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(217, 119, 6, 0.3); 
}

.btn-success { 
    background-color: #10b981; 
    color: white; 
    padding: 10px 20px; 
    border: none; 
    cursor: pointer; 
    border-radius: 6px; 
    font-weight: 500; 
    transition: all 0.2s ease; 
}

.btn-success:hover { 
    background-color: #059669; 
    transform: translateY(-2px); 
    box-shadow: 0 4px 10px rgba(16, 185, 129, 0.3); 
}

.btn-detail { 
    background-color: #3b82f6; 
    color: white; 
    padding: 6px 12px; 
    border: none; 
    border-radius: 4px; 
    cursor: pointer; 
    font-size: 0.85rem; 
    transition: all 0.2s ease; 
}

.btn-detail:hover { 
    background-color: #2563eb; 
    box-shadow: 0 2px 5px rgba(59, 130, 246, 0.4); 
}

/* ==========================================================================
   8. NOTIFIKASI & MODAL POPUP
   ========================================================================== */
#notifikasi { 
    margin-top: 20px; 
    padding: 15px; 
    background: #dcfce7; 
    color: #166534; 
    border-radius: 6px; 
    border: 1px solid #bbf7d0; 
    font-weight: 500; 
}

.hidden { 
    display: none !important; 
}

.list-syarat { 
    margin-left: 20px; 
    line-height: 2; 
    color: #475569; 
    margin-bottom: 25px; 
}

.modal { 
    display: none; 
    position: fixed; 
    z-index: 1000; 
    left: 0; 
    top: 0; 
    width: 100%; 
    height: 100%; 
    background-color: rgba(0,0,0,0.5); 
    align-items: center; 
    justify-content: center; 
}

.modal-content { 
    background-color: #fff; 
    padding: 30px; 
    border-radius: 12px; 
    width: 90%; 
    max-width: 500px; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2); 
    position: relative; 
}

.close-modal { 
    position: absolute; 
    top: 15px; 
    right: 20px; 
    font-size: 1.5rem; 
    font-weight: bold; 
    color: #64748b; 
    cursor: pointer; 
}

.close-modal:hover { 
    color: #ef4444; 
}

.modal-header { 
    border-bottom: 1px solid #e2e8f0; 
    padding-bottom: 15px; 
    margin-bottom: 15px; 
}

.modal-waktu { 
    font-size: 0.85rem; 
    color: #64748b; 
    margin-top: 5px; 
}

.modal-body ul { 
    list-style: none; 
    padding: 0; 
    margin-bottom: 15px; 
}

.modal-body li { 
    display: flex; 
    justify-content: space-between; 
    border-bottom: 1px dashed #e2e8f0; 
    padding: 8px 0; 
}

.modal-total { 
    text-align: right; 
    font-size: 1.2rem; 
    font-weight: bold; 
    color: #0ea5e9; 
    border-top: 2px solid #e2e8f0; 
    padding-top: 15px; 
}

/* ==========================================================================
   9. FOOTER BAWAH
   ========================================================================== */
.site-footer { 
    background-color: #ffffff; 
    border-top: 1px solid #e2e8f0; 
    padding: 40px 20px 20px; 
    text-align: center; 
    margin-top: 50px; 
}

.footer-banner-wrapper { 
    max-width: 400px; 
    margin: 0 auto 30px; 
}

.footer-banner { 
    width: 100%; 
    height: auto; 
    border-radius: 8px; 
    box-shadow: 0 4px 6px rgba(0,0,0,0.05); 
}

.footer-links { 
    display: flex; 
    justify-content: center; 
    flex-wrap: wrap; 
    gap: 25px; 
    margin-bottom: 25px; 
    padding-bottom: 25px; 
    border-bottom: 1px solid #f1f5f9; 
}

.footer-links a { 
    color: #64748b; 
    text-decoration: none; 
    font-size: 0.95rem; 
    font-weight: 500; 
    transition: color 0.2s; 
}

.footer-links a:hover { 
    color: #0ea5e9; 
}

.footer-bottom { 
    color: #94a3b8; 
    font-size: 0.85rem; 
}

/* ==========================================================================
   10. PENGATURAN EXPORT CETAK PDF (@media print)
   ========================================================================== */
.print-header, 
.print-footer { 
    display: none; 
}

@media print {
    body { 
        background-color: white; 
        color: black; 
    }

    /* Sembunyikan elemen navigasi dan tombol saat diekspor ke PDF */
    header, 
    nav, 
    .site-footer, 
    .hide-on-print { 
        display: none !important; 
    }

    /* Sembunyikan kolom checkbox (kolom 1) dan tombol aksi (kolom 6) */
    th:nth-child(1), td:nth-child(1), 
    th:nth-child(6), td:nth-child(6) { 
        display: none !important; 
    }

    main { 
        margin: 0; 
        padding: 0; 
        width: 100%; 
        max-width: none; 
    }

    section { 
        border: none; 
        box-shadow: none; 
        padding: 0; 
        margin: 0; 
    }

    h2 { 
        border: none; 
        padding: 0; 
        text-align: center; 
        margin-bottom: 20px; 
    }

    .print-header { 
        display: block; 
        text-align: center; 
        margin-bottom: 30px; 
        border-bottom: 2px solid black; 
        padding-bottom: 10px; 
    }

    .print-footer { 
        display: block; 
        position: fixed; 
        bottom: 0; 
        width: 100%; 
        text-align: center; 
        font-size: 0.85rem; 
        border-top: 1px solid black; 
        padding-top: 10px; 
        color: #333; 
    }
}