﻿.mhg-blog-filter-widget {
    width: 100%;
    max-width: 1220px;
    margin: 0 auto;
    padding: 24px 16px 24px;
    font-family: Arial, Helvetica, sans-serif;
    color: #071933;
}

.mhg-blog-filter-sticky {
    position: sticky;
    top: var(--mhg-blog-filter-sticky-top, 115px);
    z-index: 999;
    background: #ffffff;
    padding-top: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid transparent;
}

    .mhg-blog-filter-sticky.is-stuck {
        position: fixed;
        top: 115px;
        left: 50%;
        transform: translateX(-50%);
        z-index: 999;
        background: #ffffff;
        box-shadow: 0 8px 20px rgba(7, 25, 51, 0.08);
        border-bottom: 1px solid #eef0f4;
    }

.mhg-blog-filter-title {
    font-size: 26px;
    line-height: 1.2;
    font-weight: 700;
    margin: 0 0 18px;
    color: #001b3a;
}

.mhg-blog-filter-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.mhg-blog-filter-button {
    appearance: none;
    border: 0;
    background: #f2f3f5;
    color: #172b4d;
    font-size: 16px;
    line-height: 1;
    padding: 13px 22px;
    border-radius: 7px;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

    .mhg-blog-filter-button:hover {
        background: #e7e9ee;
        transform: translateY(-1px);
    }

    .mhg-blog-filter-button.active {
        background: #ed1c24;
        color: #ffffff;
    }

.mhg-blog-filter-count {
    font-size: 17px;
    margin: 42px 0 26px;
    color: #071933;
}

.mhg-blog-filter-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 28px;
}

.mhg-blog-card {
    display: flex;
    flex-direction: column;
    border: 1px solid #d8dee8;
    background: #ffffff;
    min-height: 100%;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

    .mhg-blog-card:hover {
        transform: translateY(-3px);
        box-shadow: 0 10px 28px rgba(7, 25, 51, 0.1);
    }

    .mhg-blog-card[hidden] {
        display: none !important;
    }

.mhg-blog-card-image-link {
    display: block;
    text-decoration: none;
}

.mhg-blog-card-image-wrap {
    position: relative;
    width: 100%;
    height: 190px;
    overflow: hidden;
    background: #eef1f5;
}

.mhg-blog-card-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.25s ease;
}

.mhg-blog-card:hover .mhg-blog-card-image {
    transform: scale(1.04);
}

.mhg-blog-card-category {
    position: absolute;
    top: 14px;
    right: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: #48566a;
    font-size: 16px;
    line-height: 1;
    padding: 7px 12px;
}

.mhg-blog-card-body {
    padding: 22px 24px 18px;
    flex: 1;
}

.mhg-blog-card-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 14px;
    color: #6b778c;
    font-size: 16px;
    margin-bottom: 14px;
}

.mhg-blog-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.mhg-blog-card-title {
    font-size: 17px;
    line-height: 1.45;
    font-weight: 400;
    margin: 0 0 10px;
}

    .mhg-blog-card-title a {
        color: #ed1c24;
        text-decoration: none;
    }

        .mhg-blog-card-title a:hover {
            text-decoration: underline;
        }

.mhg-blog-card-summary {
    font-size: 17px;
    line-height: 1.45;
    color: #071933;
    margin: 0;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.mhg-blog-card-footer {
    border-top: 1px solid #eef0f4;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.mhg-blog-card-author {
    color: #172b4d;
    font-size: 16px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.mhg-blog-card-read {
    color: #ed1c24;
    text-decoration: none;
    font-size: 16px;
    white-space: nowrap;
}

    .mhg-blog-card-read:hover {
        text-decoration: underline;
    }

.mhg-blog-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    margin-top: 48px;
}

    .mhg-blog-pagination button {
        min-width: 44px;
        height: 42px;
        border: 1px solid #cfd6e2;
        background: #ffffff;
        color: #071933;
        border-radius: 7px;
        padding: 0 16px;
        cursor: pointer;
        font-size: 16px;
        transition: background-color 0.2s ease, color 0.2s ease;
    }

        .mhg-blog-pagination button:hover {
            background: #f2f3f5;
        }

        .mhg-blog-pagination button.active {
            background: #ed1c24;
            color: #ffffff;
            border-color: #ed1c24;
        }

        .mhg-blog-pagination button:disabled {
            opacity: 0.45;
            cursor: not-allowed;
        }

.mhg-blog-no-results {
    margin-top: 32px;
    font-size: 18px;
    color: #071933;
}

@media (max-width: 991px) {
    .mhg-blog-filter-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mhg-blog-filter-title {
        font-size: 24px;
    }
}

@media (max-width: 767px) {
    .mhg-blog-filter-widget {
        padding: 18px 16px 40px;
    }

    .mhg-blog-filter-sticky {
        padding-top: 12px;
    }

    .mhg-blog-filter-buttons {
        gap: 10px;
    }

    .mhg-blog-filter-button {
        font-size: 15px;
        padding: 12px 16px;
    }

    .mhg-blog-filter-grid {
        grid-template-columns: 1fr;
    }

    .mhg-blog-card-image-wrap {
        height: 210px;
    }

    .mhg-blog-filter-count {
        margin-top: 28px;
    }
}

@media (max-width: 480px) {
    .mhg-blog-filter-button {
        width: 100%;
        text-align: center;
    }

    .mhg-blog-card-footer {
        align-items: flex-start;
        flex-direction: column;
    }
}
