.ast-container:has(> .projects-archive) {
    max-width: 100%;
}

.projects-archive {
    padding: 15px 0;
}
.archive-header {
    max-width: 1200px;
    display: flex;
    text-align: center;
    margin: 0 auto 1.5rem;
    padding: 8px 12px;
    border-radius: 8px;
    justify-content: space-between;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.section-title {
    color: #333;
    font-size: 24px;
}

.categories-section {
    margin: 0 auto 1.5rem;
}

@media (min-width: 1431px) {
    .categories-row {
        grid-template-columns: repeat(8, 1fr);
    }
}

.categories-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 0.75rem;
    background: #fff;
    padding: 1rem;
    border-radius: 16px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.06);
    margin: 0 auto;
    width: 100%;
}
.page-category{
    width: 100%;
}

.categories-row.subcategories{
    grid-template-columns: repeat(5, 1fr);
}
.main-category-item {
    display: flex;
    justify-content: center;
}

.category-link {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    border-radius: 12px;
    color: #1e293b;
    line-height: 0;
    font-weight: 500;
    font-size: 0.85rem;
    transition: all 0.25s ease;
    background: #f8fafc;
    border: 1.5px solid #e0e0e0;
    width: 100%;
    justify-content: flex-start;
    white-space: nowrap;
    flex-direction: row;
    text-align: center;
}

.category-link:hover,
.category-link:focus {
    background: #f1f5f9;
    border-color: var(--category-color, #6C3CE1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
    color: #1e293b;
}

.category-link:active {
    transform: scale(0.96);
}

@media (max-width: 1024px) {
    .categories-row {
        grid-template-columns: repeat(4, 1fr);
        gap: 0.6rem;
        padding: 0.8rem;
    }

    .category-link {
        padding: 0.55rem 0.7rem;
        font-size: 0.78rem;
        gap: 0.4rem;
    }
}

@media (max-width: 768px) {
    .categories-row {
        display: flex;
        flex-wrap: nowrap;
        overflow-x: auto;
        gap: 0.5rem;
        padding: 0.6rem 0.4rem;
        scrollbar-width: none;
        -ms-overflow-style: none;
        border-radius: 12px;
    }

    .categories-row::-webkit-scrollbar {
        display: none;
    }
}

@media (max-width: 480px) {
    .categories-section ,.archive-header {
    margin: 0 auto 1rem;
}

    .category-link {
        font-size: 0.6rem;
        border-radius: 8px;
        gap: 0.2rem;
        border-width: 1.5px;
    }
}

@media (max-width: 400px) {
    .main-category-item {
        flex: 0 0 auto;
        min-width: 70px;
    }

    .category-link {
        padding: 0.5rem 0.4rem;
        min-width: 60px;
        gap: 0.2rem;
        border-width: 1.5px;
        justify-content: center;
    }
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 6px;
    margin: 20px 0 0;
    flex-wrap: wrap;
    direction: ltr;
    animation: paginationFadeIn 0.4s ease-out;
}

.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 44px;
    height: 44px;
    padding: 0 14px;
    border: 2px solid transparent;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    background: transparent;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    user-select: none;
    position: relative;
    font-family: inherit;
}

.pagination .prev,
.pagination .next {
    padding: 0 18px;
    background: #F1F2F6;
    font-weight: 600;
    min-width: 80px;
    gap: 6px;
}

.pagination .prev i,
.pagination .next i {
    font-size: 18px;
    justify-content: center;
    display: inline-block;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    padding-top: 2.5px;
}

.pagination .prev:hover i {
    transform: translateX(-4px);
}
.pagination .next:hover i {
    transform: translateX(4px);
}

.pagination a:hover:not(.current) {
    background: #d8dbe5;
    color: #444;
}

.pagination a:focus {
    outline: 3px solid #6C3CE1;
    outline-offset: 2px;
}

.pagination .current {
    background: #6C3CE1;
    color: #FFFFFF;
    border-color: #6C3CE1;
    font-weight: 700;
    box-shadow: 0 4px 16px rgba(108, 60, 225, 0.30);
    transform: scale(1.05);
    position: relative;
    animation: pulse 2s ease-in-out infinite;
}

.pagination .current::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 8px;
    background: linear-gradient(135deg, #6C3CE1, #FF6B6B);
    opacity: 0;
    z-index: -1;
    filter: blur(8px);
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination .current:hover::after {
    opacity: 0.5;
}

.pagination .dots {
    border: none;
    background: transparent;
    color: #8A8AA8;
    font-weight: 700;
    letter-spacing: 2px;
    min-width: 36px;
    cursor: default;
    pointer-events: none;
}

.pagination .dots::before {
    content: '•••';
    font-size: 18px;
    letter-spacing: 4px;
}

.custom-select-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
    min-width: 150px;
}

.custom-select-wrapper select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    width: 100%;
    padding: 10px 16px 10px 40px;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    background: #fff;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: inherit;
    outline: none;
}

.custom-select-wrapper select:hover,
.custom-select-wrapper select:focus {
    border-color: #a3a3a3;
}

.custom-select-wrapper .select-arrow {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%) rotate(-90deg);
    pointer-events: none;
    color: #333;
    font-size: 20px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.custom-select-wrapper select:focus ~ .select-arrow,
.custom-select-wrapper select:hover ~ .select-arrow {
    color: #333;
    transform: translateY(-50%) rotate(-90deg) scale(1.2);
}

.filter-container {
    display: flex;
    align-items: center;
    width: auto;
    min-width: 80px;
}

.filters-row {
    display: flex;
    align-items: center;
    gap: 15px;
    flex-wrap: wrap;
    margin-bottom: 15px;
}

.results-counter {
    display: flex;
    align-items: center;
    font-size: 14px;
    color: #555;
    min-width: 100px;
    border: 2px solid #e0e0e0;
    padding: 8px 12px;
    border-radius: 6px;
    margin-right: auto;
}

.counter-text {
    display: flex;
    align-items: center;
    gap: 5px;
}

.current-range,
.total-count {
    font-weight: bold;
    color: #333;
}

.projects-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
}

body {
    background-color: #fff !important;
}

.project-archive {
    width: 100%;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 1px;
    font-size: 14px;
    color: #666;
}

.breadcrumb i {
    font-size: 16px;
    line-height: 0;
}

.breadcrumb a {
    color: #333;
}
.breadcrumb a:hover {
    color: #333;
    text-decoration: none;
}

.breadcrumb .current {
    color: #480371;
    font-weight: bold;
}

.archive-header-icons {
    display: flex;
    line-height: 0;
    gap: 10px;
}

.archive-header-icons i {
    display: flex;
    align-items: center;
    justify-content: center;
    color: #727579;
    font-size: 18px;
    width: 32px;
    height: 32px;
    min-width: 32px;
    min-height: 32px;
    background: #f4f4f5;
    border-radius: 6px;
    order: 2;
    flex-shrink: 0;
    transition: all 0.3s ease;
}

.archive-header-icons i:hover,
.archive-header-icons i:focus {
    background: #e4e5e7;
    color: #53565a !important;
    border-radius: 6px;
}

.no-results {
    text-align: center;
    padding: 40px 20px;
    background: #fff;
    border-radius: 8px;
    border: 1px dashed #ccc;
}

.no-results p {
    font-size: 16px;
    color: #666;
}

.category-description-section {
    margin-top: 40px;
    padding: 30px 20px 0;
    background: #f8f9fa;
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.category-description-section .section-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 12px;
}

.category-description-section .text-block {
    font-size: 14px;
    line-height: 1.8;
    text-align: justify;
    color: #4a4a6a;
    margin-bottom: 16px;
}

.category-description-section .skill-list {
    list-style: none;
    padding: 0;
    margin: 16px 0 20px 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.category-description-section .skill-list li {
    background: #ffffff;
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    color: #2d2d44;
    border: 1px solid #e0e4ea;
    transition: all 0.2s ease;
}

.category-description-section .skill-list li:hover {
    border-color: #5b1b84;
    color: #5b1b84;
    background: #f5f3ff;
}

.faq-item.active > .faq-question {
    color: #5b1b84;
}

.category-description-section .faq-section {
    margin-top: 30px;
    border-top: 1px solid #e9ecef;
    padding-top: 28px;
}

.category-description-section .faq-title {
    font-size: 18px;
    font-weight: 700;
    color: #1a1a2e;
    margin-bottom: 20px;
}

.category-description-section .faq-item {
    border-bottom: 1px solid #e9ecef;
    padding: 14px 0;
}

.category-description-section .faq-item:last-child {
    border-bottom: none;
}

.category-description-section .faq-question {
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-size: 14px;
    font-weight: 600;
    color: #1a1a2e;
    transition: color 0.2s ease;
}

.category-description-section .faq-question i {
    font-size: 18px;
    line-height: 0;
    color: #a0a0b8;
    transition: transform 0.3s ease;
}

.category-description-section .faq-item.active .faq-question i {
    transform: rotate(180deg);
}

.category-description-section .faq-answer {
    text-align: justify;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.category-description-section .faq-item.active .faq-answer {
    max-height: 200px;
    padding-top: 10px;
}

.category-description-section .faq-answer p {
    font-size: 13px;
    line-height: 1.8;
    color: #5a5a7a;
    margin: 0;
}

@media (max-width: 1214px) {
    .projects-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 768px) {
    .custom-select-wrapper {
        min-width: 120px;
    }
    .custom-select-wrapper select {
        padding: 10px 12px 10px 12px;
        font-size: 13px;
        border-radius: 8px;
    }
    .custom-select-wrapper .select-arrow {
        font-size: 18px;
        left: 10px;
    }
    .results-counter {
        width: auto;
        justify-content: flex-start;
    }
    .projects-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .archive-header h1 {
        font-size: 24px;
    }
    .pagination a,
    .pagination span {
        min-width: 38px;
        height: 38px;
        padding: 0 10px;
        font-size: 13px;
        border-radius: 6px;
    }
    .pagination .prev,
    .pagination .next {
        min-width: 60px;
        padding: 0 12px;
        font-size: 12px;
    }
    .pagination .prev i,
    .pagination .next i {
        font-size: 16px;
    }
    .pagination .dots {
        min-width: 28px;
        font-size: 14px;
    }
    .pagination .dots::before {
        font-size: 16px;
        letter-spacing: 2px;
    }
    .pagination .current {
        transform: scale(1.08);
    }
    .category-description-section {
        padding: 20px 14px 0;
        margin-top: 24px;
    }
    .category-description-section .section-title,
    .category-description-section .faq-title {
        font-size: 16px;
    }
    .category-description-section .text-block {
        font-size: 13px;
    }
    .category-description-section .skill-list li {
        font-size: 12px;
        padding: 4px 12px;
    }
    .category-description-section .faq-question {
        font-size: 13px;
    }
}

@media (max-width: 590px) {
    .archive-header-icons {
        display: none;
    }
    .breadcrumb {
        font-size: 12px;
        padding: 6px;
    }
}

@media (max-width: 480px) {
    .ast-container:has(> .projects-archive) {
        padding: 0 10px;
    }
    .projects-grid {
        grid-template-columns: 1fr;
    }
    .custom-select-wrapper {
        min-width: 100px;
    }
    .custom-select-wrapper select {
        padding: 10px 12px 10px 12px;
        font-size: 12px;
        border-radius: 6px;
    }
    .custom-select-wrapper .select-arrow {
        font-size: 16px;
        left: 8px;
    }
    .pagination a,
    .pagination span {
        min-width: 34px;
        height: 34px;
        padding: 0 8px;
        font-size: 12px;
        border-radius: 6px;
        border-width: 1.5px;
    }
    .pagination .prev,
    .pagination .next {
        min-width: 50px;
        padding: 0 10px;
        font-size: 11px;
        border-radius: 6px;
    }
    .pagination .prev i,
    .pagination .next i {
        font-size: 16px;
    }
    .pagination a:not(.prev):not(.next):not(.current):not(.dots) {
        display: none;
    }
    .pagination .current {
        display: inline-flex !important;
        transform: scale(1);
        min-width: 34px;
        height: 34px;
    }
    .pagination .dots {
        display: none;
    }
}

@keyframes paginationFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(0.95);
    }
    100% {
        transform: scale(1);
    }
}