/* ==========================================================================
   CSS UNTUK SECTION AKTIVITAS TERBARU (latest-activities.css)
   ========================================================================== */

.activity-section {
    background-color: #ffffff;
    padding: 5rem 0;
}

.activity-card {
    background: #ffffff;
    border-radius: 20px;
    border: 1px solid #f1f5f9;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.04);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    height: 100%;
    display: flex;
    flex-direction: column;
}

.activity-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(249, 115, 22, 0.08);
    border-color: #ffedd5;
}

.activity-img-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.activity-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.activity-card:hover .activity-img {
    transform: scale(1.08);
}

/* Badge Kategori Melayang di atas Gambar */
.activity-badge {
    position: absolute;
    top: 15px;
    left: 15px;
    background: rgba(255, 255, 255, 0.95);
    color: #f97316;
    font-size: 0.8rem;
    font-weight: 800;
    padding: 6px 14px;
    border-radius: 50px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    z-index: 2;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Warna Khusus berdasarkan Kategori */
.badge-pengumuman {
    color: #ef4444;
} /* Merah */
.badge-artikel {
    color: #3b82f6;
} /* Biru */
.badge-event {
    color: #10b981;
} /* Hijau */

.activity-body {
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.activity-date {
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.activity-title {
    font-size: 1.25rem;
    font-weight: 800;
    color: #0f172a;
    line-height: 1.4;
    margin-bottom: 12px;
    /* Truncate 2 baris */
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.activity-desc {
    font-size: 0.95rem;
    color: #475569;
    line-height: 1.6;
    margin-bottom: 20px;
    flex-grow: 1;
    /* Truncate 3 baris */
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.btn-read-more {
    font-size: 0.95rem;
    font-weight: 700;
    color: #f97316;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: gap 0.2s;
}

.btn-read-more:hover {
    color: #ea580c;
    gap: 12px; /* Panah bergerak menjauh saat dihover */
}

/* CSS Khusus untuk Slider di Mobile */
.activity-grid-wrapper {
    display: flex;
    gap: 1.5rem;
    padding-bottom: 1rem;
}

/* Di PC / Laptop: Tampil Grid 3 Kolom */
@media (min-width: 768px) {
    .activity-grid-wrapper {
        flex-wrap: wrap;
        justify-content: center;
    }
    .activity-card-wrapper {
        flex: 0 0 calc(33.333% - 1rem);
        max-width: calc(33.333% - 1rem);
    }
}

/* Di Layar HP: Tampil Slider Horizontal */
@media (max-width: 767.98px) {
    .activity-grid-wrapper {
        flex-wrap: nowrap;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none; /* Sembunyikan scrollbar di Firefox */
        -ms-overflow-style: none; /* IE/Edge */
    }
    .activity-grid-wrapper::-webkit-scrollbar {
        display: none; /* Sembunyikan scrollbar di Chrome/Safari */
    }
    .activity-card-wrapper {
        /* Lebar 85% layar, agar card selanjutnya sedikit 'mengintip' */
        flex: 0 0 85vw;
        scroll-snap-align: center;
    }
}
