/* ===== MOBILE FIX FULLCALENDAR & FILTER (WRAP MODE) ===== */
@media (max-width: 768px) {

    /* container calendar section */
    #calendar .container {
        padding-left: 12px;
        padding-right: 12px;
    }

    /* ===== EVENT FILTER ===== */
    #category-filter {
        order: 2;
        margin-top: 16px !important;
        background: #f8f8f8;
        padding: 12px;
        border-radius: 10px;
    }

    /* container list kategori */
    #category-filter > div {
        display: flex;
        flex-direction: row;
        flex-wrap: wrap;              /* INI KUNCI */
        gap: 12px 16px;               /* row gap | column gap */
        align-items: center;
    }

    /* tiap kategori */
    .custom-category-label {
        flex: 0 0 auto;
        font-size: 14px;
        white-space: nowrap;
    }

    /* judul EVENT FILTER */
    #category-filter > span {
        display: block;
        margin-bottom: 10px;
        font-size: 14px !important;
        letter-spacing: 0.5px;
    }

    /* ===== CALENDAR ===== */
    #calendar-container {
        order: 1;
        width: 100%;
        max-width: 100%;
        border-radius: 12px;
    }

    /* ===== FULLCALENDAR HEADER ===== */
    .fc-header-toolbar {
        display: flex !important;
        flex-direction: row !important;
        align-items: center;
        justify-content: space-between;
        flex-wrap: nowrap !important;
        gap: 8px;
    }

    .fc-toolbar-title {
        font-size: 14px;
        white-space: nowrap;
        text-align: center;
    }

    .fc .fc-button {
        padding: 4px 8px;
        font-size: 12px;
    }

    /* tanggal */
    .fc-daygrid-day-number {
        font-size: 12px;
        padding: 4px;
    }

    .fc-daygrid-day-frame {
        min-height: 60px;
    }

    .fc-event-title {
        font-size: 11px;
        white-space: normal;
    }
}

/* Desktop: kategori rata tengah */
.category-filter-list {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 24px;
    align-items: center;
    justify-content: center;
    margin-left: auto;
    margin-right: auto;
}

@media (max-width: 768px) {
    .category-filter-list {
        justify-content: flex-start !important;
        gap: 12px 16px !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
    }
}
