.td-category-section,
.td-category-section *,
.td-category-section *:before,
.td-category-section *:after {
    box-sizing: border-box;
}

.td-category-section.page-section.container {
    width: 100%;
    max-width: none;
    margin: 40px 0 0;
    padding: 0;
}

.td-category-section .section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin: 0 0 24px;
}

.td-category-section .section-heading h2 {
    margin: 0;
    padding: 0;
    font-size: 30px;
    font-weight: 700;
    line-height: 1;
}

.td-category-section .section-heading a {
    flex: none;
    color: var(--td-green, #5ac80b);
    font-size: 14px;
    line-height: 1.3;
    text-decoration: none;
}

.td-category-section .section-heading a:hover {
    text-decoration: underline;
}

.td-category-section .section-heading a:focus-visible,
.td-category-section .category-card:focus-visible {
    outline: 2px solid var(--td-green, #5ac80b);
    outline-offset: 3px;
}

.td-category-section .category-grid {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 28px 8px;
}

.td-category-section .category-card {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 14px;
    color: var(--td-ink, #070707);
    font-size: 14px;
    line-height: 1.35;
    text-align: center;
    text-decoration: none;
    overflow-wrap: anywhere;
    transition: color .2s ease;
}

.td-category-section .category-card__media {
    display: grid;
    width: 100%;
    aspect-ratio: 1.45 / 1;
    place-items: center;
    padding: 12px;
    border-radius: var(--td-radius, 6px);
    background: var(--td-surface, #fff);
}

.td-category-section .category-card img {
    display: block;
    width: 78%;
    max-width: 120px;
    height: auto;
    max-height: 104px;
    object-fit: contain;
    transition: transform .2s ease;
}

.td-category-section .category-card__name {
    display: block;
}

.td-category-section .category-card:hover,
.td-category-section .category-card:focus-visible {
    color: var(--td-red, #cd2128);
}

.td-category-section .category-card:hover img {
    transform: translateY(-3px) scale(1.03);
}

.td-main__seo {
    position: relative;
    font-size: 14px;
    line-height: 1.4;
}

.td-main__seo h1 {
    margin: 40px 0 20px;
    padding: 0;
    font-size: 26px;
    font-weight: normal;
}

.td-main__seo-more {
    display: none;
}

@media only screen and (max-width: 1100px) {
    .td-category-section .category-grid {
        grid-template-columns: repeat(4, minmax(0, 1fr));
    }
}

@media only screen and (max-width: 800px) {
    .td-category-section.page-section.container {
        margin-top: 66px;
    }

    .td-category-section .section-heading h2 {
        font-size: 24px;
    }

    .td-category-section .category-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 20px 7px;
    }

    .td-category-section .category-card {
        font-size: 12px;
    }
}

@media only screen and (max-width: 768px) {
    .td-main__seo {
        font-size: 14px;
        line-height: 1.2;
    }

    .td-main__seo h1 {
        display: -webkit-box;
        overflow: hidden;
        max-width: 100%;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        margin: 20px 0 10px;
        font-size: 18px;
        font-weight: bold;
        text-overflow: ellipsis;
    }

    .td-main__seo p {
        display: none;
    }

    .td-main__seo p:nth-child(2) {
        display: -webkit-box;
        overflow: hidden;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 4;
        text-overflow: ellipsis;
    }

    .td-main__seo.seo_full h1,
    .td-main__seo.seo_full p {
        display: block;
    }

    .td-main__seo-more {
        position: relative;
        display: inline-block;
        cursor: pointer;
    }

    .td-main__seo-more:after {
        content: "\3e";
        display: inline-block;
        width: 14px;
        height: 14px;
        margin-left: 10px;
        font-family: 'topdetal', sans-serif;
        font-size: 14px;
        line-height: 18px;
        text-align: center;
        vertical-align: -4px;
        transform: rotate(90deg);
        -webkit-font-smoothing: antialiased;
        -moz-osx-font-smoothing: grayscale;
    }
}

@media only screen and (max-width: 480px) {
    .td-category-section .section-heading {
        align-items: flex-end;
    }

    .td-category-section .category-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}
