.knowledge-base-posts {
    padding: 32px 0;
}

.knowledge-base-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 368px);
    gap: 24px;
    margin: 0 auto;
    max-width: 1160px;
    justify-content: center;
}

@media (max-width: 1200px) {
    .knowledge-base-posts__grid {
        grid-template-columns: repeat(2, 368px);
        max-width: 768px;
        margin: 0 16px;
    }
}

@media (max-width: 800px) {
    .knowledge-base-posts__grid {
        grid-template-columns: 368px;
        max-width: 368px;
        margin: 0 auto;
    }
}

@media (max-width: 400px) {
    .knowledge-base-posts__grid {
        grid-template-columns: 1fr;
        margin: 0 12px;
    }
}

.knowledge-base-posts__title {
    color: #121563;
    font-family: Nunito;
    font-size: 2rem;
    font-weight: 700;
    line-height: 2.375rem;
    text-align: start;
}

.knowledge-base-posts__pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2px;
    margin-top: 48px;
}

.knowledge-base-posts__pagination .page-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 32px;
    height: 32px;
    padding: 0 8px;
    border: none;
    border-radius: 4px;
    color: #121563;
    text-decoration: none;
    transition: all 0.2s ease;
    font-family: Nunito;
    font-size: 14px;
    font-style: normal;
    font-weight: 700;
    line-height: 18px;
}

.knowledge-base-posts__pagination .page-numbers:hover {
    background: #EBEBEC;
    color: #121563;
}

.knowledge-base-posts__pagination .dots,
.knowledge-base-posts__pagination .dots:hover {
    background: transparent;
    color: #55565A;
    cursor: default;
}

.knowledge-base-posts__pagination .current {
    background: #EB660A;
    color: white !important;
    cursor: default;
}

.knowledge-base-posts__pagination .current:hover {
    background: #EB660A !important;
    color: white !important;
}

.knowledge-base-posts__pagination .next,
.knowledge-base-posts__pagination .prev {
    display: flex;
    align-items: center;
    justify-content: center;
}

.knowledge-base-posts__pagination .next:hover,
.knowledge-base-posts__pagination .prev:hover {
    background: #EBEBEC;
}

.knowledge-base-posts__pagination .next svg,
.knowledge-base-posts__pagination .prev svg {
    transition: all 0.2s ease;
}

.knowledge-base-posts__pagination .dots {
    padding: 0 4px;
}

.knowledge-base-posts__grid.loading {
    position: relative;
    min-height: 200px;
}

.knowledge-base-posts__grid.loading::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.8);
    z-index: 10;
}

.knowledge-base-posts__grid.loading::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 4px solid #F8FAFB;
    border-top-color: #FF5C00;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    z-index: 11;
}

@keyframes spin {
    to {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

.knowledge-base-posts__header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

@media (max-width: 576px) {
    .knowledge-base-posts__header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}

/* Custom Select */
.custom-select {
    position: relative;
    min-width: 200px;
}

.custom-select__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    cursor: pointer;
    transition: border-color 0.3s ease;
}

.custom-select__header:hover {
    border-color: #EB660A;
}

.custom-select__current {
    font-family: Nunito;
    font-size: 16px;
    color: #121563;
}

.custom-select__arrow {
    color: #121563;
    transition: transform 0.3s ease;
    margin-left: 8px;
    flex-shrink: 0;
}

.custom-select.open .custom-select__arrow {
    transform: rotate(180deg);
}

.custom-select__options {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 4px 0;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s ease;
    z-index: 100;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.custom-select.open .custom-select__options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.custom-select__option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 16px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.custom-select__option span {
    font-family: Nunito;
    font-size: 16px;
    color: #121563;
    transition: color 0.2s ease;
}

.custom-select__option:hover {
    background: #EB660A;
}

.custom-select__option:hover span {
    color: #FFFFFF;
}

.custom-select__check {
    opacity: 0;
    color: #EB660A;
    transition: all 0.2s ease;
}

.custom-select__option[data-selected="true"] .custom-select__check {
    opacity: 1;
}

.custom-select__option:hover .custom-select__check {
    color: #FFFFFF;
}

@media (max-width: 576px) {
    .custom-select {
        width: 100%;
    }
}

.custom-select--disabled {
    opacity: 0.6;
    cursor: not-allowed;
    pointer-events: none;
}

.custom-select--disabled .custom-select__header {
    cursor: not-allowed;
}

.pagination--disabled {
    opacity: 0.6;
    pointer-events: none;
}

.pagination--disabled a {
    cursor: not-allowed;
} 