body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    background: linear-gradient(rgba(240, 242, 245, 0.82), rgba(240, 242, 245, 0.82)),
        url('bg.png') no-repeat center center fixed;
    background-size: cover;
    color: #333;
}

header {
    background: linear-gradient(rgba(255, 255, 255, 0.88), rgba(255, 255, 255, 0.88)),
        url('Top.png') no-repeat center center;
    background-size: cover;
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 40px 20px;
    text-align: center;
    border-bottom: 3px solid #0f9d58;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 0;
    z-index: 1000;
}

header::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 6px;
    background: linear-gradient(90deg, #0f9d58, #34a853, #4285f4, #ea4335, #fbbc05);
}

.logo-container {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 30px;
    margin-bottom: 25px;
    flex-wrap: wrap;
    animation: fadeInScale 0.8s ease-out;
}

.top-logo {
    height: 65px;
    width: auto;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.1));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.top-logo:hover {
    transform: scale(1.15) rotate(3deg);
}

header h1 {
    color: #0c7c45;
    margin: 0;
    font-size: 2.2em;
    font-weight: 800;
    letter-spacing: 3px;
    text-transform: uppercase;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

header p {
    margin-top: 12px;
    color: #555;
    font-size: 1.05em;
    font-weight: 500;
    letter-spacing: 0.5px;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 20px;
    padding: 30px 20px;
    max-width: 1600px;
    margin: auto;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

.card {
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.05);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
    animation: fadeInUp 0.6s ease-out backwards;
    border-top: 5px solid transparent;
}

.card-klaster-1 {
    border-top-color: #4285f4;
    background-color: #f8faff;
}

.card-klaster-2 {
    border-top-color: #ea4335;
    background-color: #fff8f8;
}

.card-klaster-3 {
    border-top-color: #fbbc05;
    background-color: #fffdf5;
}

.card-klaster-4 {
    border-top-color: #34a853;
    background-color: #f8fff9;
}

.card-klaster-lintas {
    border-top-color: #ff6d01;
    background-color: #fffaf5;
}

.card-lintas {
    border-top-color: #ff6d01;
    background-color: #fffaf5;
}

.card-umum {
    border-top-color: #9aa0a6;
    background-color: #f8f9fa;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

.card img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
    display: block;
}

.card-content {
    padding: 15px;
}

.card-headers {
    display: flex;
    gap: 8px;
    margin-bottom: 12px;
}

.badge {
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 0.75em;
    font-weight: bold;
    display: inline-block;
}

.klaster-badge {
    background: #e8f5e9;
    color: #2e7d32;
}

.program-badge {
    background: #e3f2fd;
    color: #1565c0;
}

.card h3 {
    margin: 0 0 10px 0;
    font-size: 1.1em;
    color: #1a73e8;
    line-height: 1.3;
}

.meta {
    font-size: 0.8em;
    color: #5f6368;
    margin-bottom: 12px;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.meta-item {
    display: flex;
    align-items: center;
}

.desc-box {
    background: #f8f9fa;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
}

.desc {
    font-size: 0.9em;
    line-height: 1.5;
    color: #3c4043;
    margin: 0;
}

.card-footer-info {
    border-top: 1px solid #eee;
    padding-top: 12px;
}

.pj {
    font-size: 0.85em;
    color: #5f6368;
    margin: 0;
}

.card-img-container {
    width: 100%;
    height: 220px;
    background: #eef1f4;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-image {
    color: #889;
    font-size: 0.9em;
    padding: 20px;
    text-align: center;
    background: #f1f3f4;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.main-container {
    max-width: 1200px;
    margin: 30px auto;
    padding: 0 20px;
}

.stats-bar {
    display: flex;
    justify-content: space-around;
    background: white;
    padding: 20px;
    border-radius: 12px;
    margin-bottom: 25px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex-wrap: wrap;
    gap: 15px;
}

.stat-item {
    text-align: center;
    flex: 1;
    min-width: 100px;
}

.stat-num {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #0f9d58;
}

.stat-label {
    font-size: 0.8em;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.stat-total .stat-num {
    color: #0f9d58;
}

.stat-klaster-1 .stat-num {
    color: #4285f4;
}

.stat-klaster-2 .stat-num {
    color: #ea4335;
}

.stat-klaster-3 .stat-num {
    color: #fbbc05;
}

.stat-klaster-4 .stat-num {
    color: #34a853;
}

.stat-lintas .stat-num {
    color: #ff6d01;
}

.stat-umum .stat-num {
    color: #9aa0a6;
}

.controls-bar {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    margin-bottom: 40px;
    background: white;
    padding: 30px;
    border-radius: 20px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.button-group {
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

.search-date-group {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
    width: 100%;
}

.btn-filter {
    background: #f8f9fa;
    color: #555;
    border: 1px solid #eee;
    padding: 10px 24px;
    border-radius: 30px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 0.9em;
    font-weight: 600;
}

.btn-filter.active,
.btn-filter:hover {
    background: #0f9d58;
    color: white;
    border-color: #0f9d58;
    box-shadow: 0 5px 15px rgba(15, 157, 88, 0.2);
    transform: translateY(-2px);
}

#dateFilter,
#searchInput {
    height: 48px;
    border-radius: 30px;
    border: 1px solid #dfe1e5;
    background: white;
    padding: 0 25px;
    font-size: 0.95em;
    color: #3c4043;
    transition: all 0.3s;
    box-sizing: border-box;
}

#dateFilter {
    width: 220px;
    cursor: pointer;
}

#searchInput {
    width: 450px;
    max-width: 100%;
}

#searchInput:focus,
#dateFilter:focus {
    outline: none;
    border-color: #0f9d58;
    box-shadow: 0 4px 12px rgba(15, 157, 88, 0.1);
}

.btn-load-more {
    background: white;
    color: #0f9d58;
    border: 2px solid #0f9d58;
    padding: 12px 30px;
    border-radius: 30px;
    font-size: 1em;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-load-more:hover {
    background: #0f9d58;
    color: white;
    box-shadow: 0 5px 15px rgba(15, 157, 88, 0.3);
}

footer {
    text-align: center;
    padding: 30px;
    background: white;
    color: #666;
    border-top: 1px solid #eee;
}

.footer-credit {
    font-size: 0.85em;
    margin-top: 10px;
}

.brand-text {
    font-weight: bold;
    color: #0f9d58;
    letter-spacing: 1px;
}

.admin-container {
    max-width: 600px;
    margin: 40px auto;
    padding: 30px;
    background: white;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
}

.back-btn {
    background: none;
    border: none;
    color: #1a73e8;
    cursor: pointer;
    padding: 0;
    margin-bottom: 20px;
    font-weight: bold;
}

form h2 {
    margin-bottom: 25px;
    color: #0f9d58;
    text-align: center;
}

input,
select,
textarea {
    width: 100%;
    padding: 12px;
    margin-bottom: 15px;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1em;
}

textarea {
    height: 100px;
    resize: vertical;
}

.file-input {
    margin-bottom: 20px;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

#submitBtn {
    background: #0f9d58;
    color: white;
    padding: 15px;
    border: none;
    border-radius: 8px;
    width: 100%;
    font-size: 1.1em;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

#submitBtn:hover {
    background: #0b8043;
}

#submitBtn:disabled {
    background: #ccc;
    cursor: not-allowed;
}

.modal {
    display: none;
    position: fixed;
    z-index: 9999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.9);
    backdrop-filter: blur(8px);
    overflow-y: auto;
    padding: 20px;
}

.modal-content {
    background: white;
    margin: 30px auto;
    max-width: 800px;
    border-radius: 20px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    animation: fadeInScale 0.3s ease-out;
}

#modalImg {
    width: 100%;
    max-height: 70vh;
    object-fit: cover;
    display: block;
}

.modal-info {
    padding: 30px;
}

.close-modal {
    position: fixed;
    right: 25px;
    top: 15px;
    color: white;
    font-size: 50px;
    font-weight: bold;
    cursor: pointer;
    z-index: 10001;
}

.close-modal:hover {
    color: #f44336;
    transform: scale(1.1);
}

@keyframes pulse {
    0% {
        background-color: #f1f3f4;
    }

    50% {
        background-color: #e8eaed;
    }

    100% {
        background-color: #f1f3f4;
    }
}

.skeleton-card {
    height: 350px;
    background: #f1f3f4;
    border-radius: 20px;
}

.skeleton-img {
    height: 220px;
    animation: pulse 1.5s infinite;
}

.skeleton-text {
    padding: 20px;
}

.skeleton-line {
    height: 15px;
    margin-bottom: 10px;
    border-radius: 5px;
    animation: pulse 1.5s infinite;
}

#backToTop {
    display: none;
    position: fixed;
    bottom: 30px;
    right: 30px;
    z-index: 1000;
    background: #0f9d58;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
    font-size: 20px;
    transition: all 0.3s;
}

#backToTop:hover {
    transform: scale(1.1);
    background: #0b8043;
}

.chart-container {
    max-width: 500px;
    margin: 0 auto 40px;
    padding: 20px;
    background: white;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

@media (max-width: 768px) {
    .modal-content {
        margin: 10px auto;
        width: 95%;
    }
}
