/* ==================== Anime Page — Section Filter ==================== */

/* --- إخفاء أزرار رمضان --- */
#alpha-filter {
    display: none !important;
}

/* ========================================================
   Container — Desktop: في النص + Sticky
   ======================================================== */
#section-filter {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
    align-items: center;
    margin: 10px auto 12px;
    direction: rtl;
    padding: 10px 16px;

    /* Sticky */
    position: sticky;
    top: 0;
    z-index: 999;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(0, 210, 255, 0.2);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    width: 100%;
    box-sizing: border-box;
}

/* ========================================================
   الأزرار — نيون
   ======================================================== */
.section-filter-btn {
    padding: 8px 18px;
    font-family: 'Almarai', sans-serif;
    font-weight: bold;
    font-size: 14px;
    border: 1px solid rgba(0, 210, 255, 0.5);
    border-radius: 6px;
    background: rgba(255, 255, 255, 0.05);
    color: #ffffff;
    cursor: pointer;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.section-filter-btn:hover {
    background: rgba(0, 210, 255, 0.15);
    border-color: #00d2ff;
    color: #00d2ff;
    transform: scale(1.05);
    box-shadow: 0 0 10px rgba(0, 210, 255, 0.4);
}

.section-filter-btn.active {
    background: rgba(0, 210, 255, 0.2);
    border-color: #00d2ff;
    color: #00d2ff;
    box-shadow: 0 0 12px rgba(0, 210, 255, 0.5);
    transform: scale(1.05);
}

/* ========================================================
   موبايل — 2 × 2 × 2
   ======================================================== */
@media screen and (max-width: 1024px) {

    #section-filter {
        display: grid !important;
        grid-template-columns: 1fr 1fr !important;
        gap: 5px !important;
        padding: 8px 5px !important;
        margin: 0 !important;
        width: 100% !important;
        box-sizing: border-box !important;

        /* Sticky موبايل */
        position: sticky !important;
        top: 0 !important;
        z-index: 999 !important;
        background: rgba(0, 0, 0, 0.95) !important;
        backdrop-filter: blur(8px) !important;
        -webkit-backdrop-filter: blur(8px) !important;
        border-bottom: 1px solid rgba(0, 210, 255, 0.2) !important;
        box-shadow: 0 4px 16px rgba(0, 0, 0, 0.7) !important;
    }

    /* كل الأزرار متساوية — بدون أي زرار يفرش سطر كامل */
    .section-filter-btn {
        width: 100% !important;
        height: 36px !important;
        padding: 0 4px !important;
        font-size: 11px !important;
        border-radius: 4px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        white-space: nowrap !important;
        text-align: center !important;
    }
}

/* ========================================================
   إصلاح أزرار رمضان على الموبايل لو ظهرت
   ======================================================== */
@media screen and (max-width: 1024px) {
    #alpha-filter {
        flex-wrap: wrap !important;
        gap: 5px !important;
        padding: 8px 5px !important;
        justify-content: center !important;
    }

    #alpha-filter .alpha-btn {
        flex: 0 1 calc(25% - 5px) !important;
        min-width: 70px !important;
        height: 34px !important;
        font-size: 10px !important;
        white-space: normal !important;
        text-align: center !important;
        padding: 2px 4px !important;
    }

    #alpha-filter .alpha-btn[data-filter="ALL"] {
        flex: 0 1 100% !important;
        height: 38px !important;
        font-size: 12px !important;
        grid-column: unset !important;
    }
}
