.categories-main-section {
    background: linear-gradient(180deg, #fbfdf9 0%, #fff 100%);
    padding: 62px 0 72px;
}

.categories-page-container {
    max-width: 1640px;
}

.categories-section-header {
    align-items: center;
    display: flex;
    gap: 18px;
    margin-bottom: 32px;
}

.categories-section-icon {
    align-items: center;
    background: linear-gradient(145deg, #48b91c 0%, #269b0e 100%);
    border: 5px solid #eef8eb;
    border-radius: 50%;
    box-shadow: 0 8px 20px rgba(39, 139, 18, 0.16);
    color: #fff;
    display: flex;
    flex: 0 0 62px;
    font-size: 23px;
    height: 62px;
    justify-content: center;
    width: 62px;
}

.categories-section-header h2 {
    color: #15243d;
    font-size: 31px;
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 38px;
    margin: 0;
}

.categories-section-header p {
    color: #71809a;
    font-size: 15px;
    line-height: 22px;
    margin: 2px 0 0;
}

.main-category-grid {
    display: grid;
    gap: 22px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.main-category-card {
    align-items: center;
    background: #fff;
    border: 1px solid #dfe4e2;
    border-radius: 14px;
    color: #293b62;
    display: flex;
    flex-direction: column;
    min-height: 300px;
    padding: 24px 24px 26px;
    position: relative;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.main-category-card:hover,
.main-category-card:focus {
    border-color: #a9d39e;
    box-shadow: 0 15px 32px rgba(31, 86, 25, 0.1);
    color: #1f7215;
    transform: translateY(-3px);
}

.main-category-card-image {
    align-items: center;
    display: flex;
    height: 194px;
    justify-content: center;
    margin-bottom: 9px;
    width: 100%;
}

.main-category-card-image img {
    display: block;
    height: 100%;
    max-height: 194px;
    max-width: 220px;
    object-fit: contain;
    width: 100%;
}

.main-category-card-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 0 22px;
    text-align: center;
}

.main-category-card-content strong {
    color: inherit;
    font-size: 18px;
    font-weight: 700;
    line-height: 25px;
}

.main-category-card-content small {
    color: #7a879d;
    font-size: 13px;
    line-height: 19px;
    margin-top: 3px;
}

.main-category-card-arrow {
    color: #35aa1c;
    font-size: 16px;
    position: absolute;
    right: 20px;
    top: 50%;
    transform: translateY(-50%);
}

.categories-directory-section {
    background: #fff;
    padding: 26px 0 82px;
}

.categories-group {
    scroll-margin-top: 110px;
}

.categories-group + .categories-group {
    border-top: 1px solid #e8ece9;
    margin-top: 60px;
    padding-top: 60px;
}

.categories-group-header {
    align-items: center;
    display: flex;
    justify-content: space-between;
    margin-bottom: 30px;
}

.categories-group-header h2 {
    color: #15243d;
    font-size: 28px;
    font-weight: 700;
    line-height: 36px;
    margin: 0;
}

.categories-group-header a {
    color: #2f9919;
    font-size: 13px;
    font-weight: 700;
}

.categories-group-header a i {
    margin-left: 5px;
}

.subcategory-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    margin-bottom: 42px;
}

.subcategory-card {
    align-items: center;
    background: linear-gradient(180deg, #fff 0%, #fcfefb 100%);
    border: 1px solid #dfe5e1;
    border-radius: 13px;
    color: #293b62;
    display: flex;
    flex-direction: column;
    min-height: 230px;
    padding: 18px 22px 20px;
    position: relative;
    text-align: center;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.subcategory-card:hover,
.subcategory-card:focus {
    border-color: #a9d39e;
    box-shadow: 0 13px 28px rgba(31, 86, 25, 0.09);
    color: #1f7215;
    transform: translateY(-3px);
}

.subcategory-card-image {
    align-items: center;
    display: flex;
    height: 142px;
    justify-content: center;
    margin-bottom: 5px;
    width: 100%;
}

.subcategory-card-image img {
    display: block;
    height: 100%;
    max-height: 142px;
    max-width: 170px;
    object-fit: contain;
    width: 100%;
}

.subcategory-card-content {
    align-items: center;
    display: flex;
    flex-direction: column;
    padding: 0 18px;
}

.subcategory-card-content strong {
    color: inherit;
    font-size: 16px;
    font-weight: 700;
    line-height: 22px;
}

.subcategory-card-content small {
    color: #7a879d;
    font-size: 12px;
    line-height: 18px;
    margin-top: 2px;
}

.subcategory-card-arrow {
    bottom: 20px;
    color: #35aa1c;
    font-size: 14px;
    position: absolute;
    right: 18px;
}

.categories-subgroup {
    scroll-margin-top: 110px;
}

.categories-subgroup + .categories-subgroup {
    margin-top: 36px;
}

.categories-subgroup h3 {
    align-items: center;
    color: #46546d;
    display: flex;
    font-size: 18px;
    font-weight: 700;
    justify-content: space-between;
    line-height: 26px;
    margin: 0 0 16px;
}

.categories-subgroup h3 a {
    align-items: center;
    border: 1px solid #dce7d9;
    border-radius: 50%;
    color: #309b1a;
    display: inline-flex;
    flex: 0 0 30px;
    font-size: 12px;
    height: 30px;
    justify-content: center;
    width: 30px;
}

.categories-subgroup h3 a:hover,
.categories-subgroup h3 a:focus {
    background: #f1f8ee;
    border-color: #a9d39e;
}

.categories-items-grid {
    display: grid;
    gap: 18px;
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.categories-item-card {
    align-items: center;
    background: #fff;
    border: 1px solid #e0e5e2;
    border-radius: 12px;
    color: #293b62;
    display: grid;
    gap: 15px;
    grid-template-columns: 68px minmax(0, 1fr) 14px;
    min-height: 108px;
    padding: 16px 18px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.categories-item-card:hover,
.categories-item-card:focus {
    border-color: #add8a3;
    box-shadow: 0 10px 24px rgba(31, 86, 25, 0.08);
    color: #1f7215;
    transform: translateY(-2px);
}

.categories-item-card img {
    background: #eef7e9;
    border-radius: 50%;
    height: 68px;
    object-fit: contain;
    padding: 7px;
    width: 68px;
}

.categories-item-card span {
    color: inherit;
    font-size: 14px;
    font-weight: 700;
    line-height: 21px;
    min-width: 0;
    overflow-wrap: anywhere;
}

.categories-item-card i {
    color: #35aa1c;
    font-size: 15px;
    justify-self: end;
}

@media (min-width: 1200px) {
    .categories-page-container {
        width: calc(100vw - 64px);
    }
}

@media (max-width: 1199px) {
    .main-category-grid,
    .subcategory-grid,
    .categories-items-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 991px) {
    .categories-main-section {
        padding: 50px 0 60px;
    }

    .main-category-grid,
    .subcategory-grid,
    .categories-items-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 767px) {
    .categories-main-section {
        padding: 42px 0 50px;
    }

    .categories-section-header {
        gap: 14px;
        margin-bottom: 26px;
    }

    .categories-section-icon {
        border-width: 4px;
        flex-basis: 54px;
        font-size: 20px;
        height: 54px;
        width: 54px;
    }

    .categories-section-header h2 {
        font-size: 25px;
        line-height: 32px;
    }

    .categories-section-header p {
        font-size: 13px;
        line-height: 19px;
    }

    .main-category-card {
        min-height: 250px;
    }

    .main-category-card-image {
        height: 150px;
    }

    .main-category-card-image img {
        max-height: 150px;
        max-width: 180px;
    }

    .categories-directory-section {
        padding-bottom: 62px;
    }

    .categories-group + .categories-group {
        margin-top: 46px;
        padding-top: 46px;
    }

    .categories-group-header {
        align-items: flex-start;
        flex-direction: column;
        gap: 7px;
        margin-bottom: 24px;
    }

    .categories-group-header h2 {
        font-size: 24px;
        line-height: 31px;
    }

    .subcategory-grid {
        margin-bottom: 34px;
    }

    .subcategory-card {
        min-height: 215px;
    }

    .subcategory-card-image {
        height: 128px;
    }

    .subcategory-card-image img {
        max-height: 128px;
        max-width: 150px;
    }
}

@media (max-width: 575px) {
    .main-category-grid,
    .subcategory-grid,
    .categories-items-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .main-category-card {
        min-height: 260px;
    }

    .categories-item-card {
        min-height: 100px;
    }

    .subcategory-card {
        min-height: 220px;
    }
}
.categories-page-intro {
    color: #56635b;
    font-size: 16px;
    line-height: 1.7;
    margin: 0 0 28px;
    max-width: 900px;
}
.categories-directory-search {
    background: #fff;
    border: 1px solid #e0e7e2;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(29, 54, 37, .05);
    margin: 0 0 30px;
    padding: 18px;
}

.categories-directory-search > label {
    color: #304559;
    display: block;
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 8px;
}

.categories-directory-search > div {
    align-items: center;
    border: 1px solid #dce4de;
    border-radius: 7px;
    display: flex;
    overflow: hidden;
}

.categories-directory-search i {
    color: #718091;
    margin-left: 15px;
}

.categories-directory-search input {
    border: 0;
    flex: 1 1 auto;
    min-height: 48px;
    min-width: 0;
    padding: 10px 14px;
}

.categories-directory-search button {
    align-self: stretch;
    background: #2a9717;
    border: 0;
    color: #fff;
    cursor: pointer;
    font-weight: 700;
    min-width: 110px;
    padding: 0 18px;
}

.main-category-card.is-active {
    border-color: #83c977;
    box-shadow: 0 10px 28px rgba(43, 151, 23, .12);
}

.categories-results-header {
    align-items: flex-end;
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-bottom: 24px;
}

.categories-results-header h2 {
    color: #173146;
    margin: 0 0 5px;
}

.categories-results-header p {
    color: #6f7d8a;
    margin: 0;
}

.categories-results-header > a {
    color: #2a861a;
    font-size: 13px;
    font-weight: 700;
}

.categories-item-card {
    grid-template-columns: 38px minmax(0, 1fr) auto auto !important;
}

.categories-item-initial {
    align-items: center;
    background: #edf7ea;
    border-radius: 50%;
    color: #2b851b;
    display: inline-flex;
    font-size: 14px;
    font-weight: 800;
    height: 34px;
    justify-content: center;
    width: 34px;
}

.categories-item-card small {
    background: #eef5f0;
    border-radius: 10px;
    color: #587164;
    font-size: 10px;
    padding: 3px 7px;
    white-space: nowrap;
}

.categories-pagination {
    display: flex;
    justify-content: center;
    padding-top: 30px;
}

.categories-empty-state {
    background: #fff;
    border: 1px solid #e0e7e2;
    border-radius: 10px;
    padding: 50px 24px;
    text-align: center;
}

.categories-empty-state > i {
    color: #2b9518;
    font-size: 34px;
}

@media (max-width: 575px) {
    .categories-directory-search button {
        min-width: auto;
    }

    .categories-results-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
