﻿/* =========================================
   CATEGORY SUMMARY HEADER
========================================= */

.category-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

    .category-summary-header h2 {
        margin: 0;
        font-size: 20px;
        font-weight: 600;
        color: #172033;
    }

    .category-summary-header span {
        font-size: 13px;
        color: #738096;
    }


/* =========================================
   CATEGORY GRID
========================================= */

.category-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 28px;
}


/* =========================================
   CATEGORY CARD
========================================= */

.category-card {
    min-width: 0;
    min-height: 64px;
    padding: 10px 13px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: #ffffff;
    border: 1px solid #e0e6ee;
    border-radius: 11px;
    text-decoration: none;
    cursor: pointer;
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease, background .2s ease;
}


    .category-card:hover {
        transform: translateY(-2px);
        border-color: #9db9e7;
        box-shadow: 0 7px 20px rgba(20, 50, 90, .10);
        text-decoration: none;
    }


/* =========================================
   LEFT AREA
========================================= */

.category-info {
    min-width: 0;
    display: flex;
    align-items: center;
}


/* =========================================
   ICON
========================================= */

.category-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    border-radius: 9px;
    background: #f4f7fb;
}


    .category-icon img {
        width: 27px;
        height: 27px;
        object-fit: contain;
    }


/* =========================================
   ALL ARTICLES ICON
========================================= */

.all-icon {
    color: #0d4da3;
    background: #edf4ff;
    font-size: 19px;
    font-weight: bold;
}


/* =========================================
   CATEGORY NAME
========================================= */

.category-name {
    min-width: 0;
    color: #26364d;
    font-size: 14px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}


/* =========================================
   COUNT BADGE
========================================= */

.category-count {
    min-width: 34px;
    height: 27px;
    padding: 0 9px;
    margin-left: 8px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 20px;
    background: #edf4ff;
    color: #0b57b7;
    font-size: 12px;
    font-weight: 700;
}


/* =========================================
   ACTIVE CATEGORY
========================================= */

.category-card.active {
    background: linear-gradient( 135deg, #164d91, #0876b9 );
    border-color: transparent;
    box-shadow: 0 7px 18px rgba(13, 77, 163, .20);
}


    .category-card.active .category-name {
        color: #ffffff;
    }


    .category-card.active .category-icon {
        background: #ffffff;
    }


    .category-card.active .category-count {
        background: rgba(255,255,255,.20);
        color: #ffffff;
    }


/* =========================================
   TABLET
========================================= */

@media (max-width: 950px) {

    .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}


/* =========================================
   MOBILE
========================================= */

@media (max-width: 600px) {

    .category-summary-header {
        align-items: flex-start;
    }


    .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }


    .category-card {
        min-height: 58px;
        padding: 8px 9px;
    }


    .category-icon {
        width: 32px;
        height: 32px;
        flex-basis: 32px;
        margin-right: 7px;
    }


        .category-icon img {
            width: 23px;
            height: 23px;
        }


    .category-name {
        font-size: 12px;
    }


    .category-count {
        min-width: 29px;
        height: 24px;
        padding: 0 6px;
        font-size: 11px;
    }
}
