/* 03.11.2026 Viacheslav Vikhliaiev */
.home-category-links,
.home-blog,
.home-certificates {
    margin: 72px 0;
}

.home-module-title {
    margin: 0 0 28px;
    color: #3f3f3f;
    font-family: "Gilroy", sans-serif;
    font-size: 32px;
    font-weight: 800;
    line-height: 1.15;
    text-align: center;
}

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

.home-category-links__card,
.home-blog__card,
.home-certificates__item {
    display: block;
    color: #3f3f3f;
    text-decoration: none;
}

.home-category-links__card {
    overflow: hidden;
    border: 1px solid #ececec;
    border-radius: 8px;
    background: #fff;
    transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}

.home-category-links__card:hover,
.home-category-links__card:focus {
    border-color: #fff;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .12);
    color: #cc2323;
    text-decoration: none;
    transform: translateY(-3px);
}

.home-category-links__image {
    display: block;
    aspect-ratio: 14 / 9;
    overflow: hidden;
    background: #f6f6f6;
}

.home-category-links__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.home-category-links__card:hover .home-category-links__image img {
    transform: scale(1.04);
}

.home-category-links__name {
    display: block;
    padding: 17px 18px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.2;
    text-align: center;
}

.home-blog {
    padding: 62px 0;
    background: #f7f7f7;
}

.home-blog__grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.home-blog__card {
    overflow: hidden;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 4px 16px rgba(0, 0, 0, .06);
    transition: box-shadow .2s ease, transform .2s ease;
}

.home-blog__card:hover {
    box-shadow: 0 10px 24px rgba(0, 0, 0, .12);
    transform: translateY(-3px);
}

.home-blog__image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e9e9e9;
}

.home-blog__image img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform .25s ease;
}

.home-blog__card:hover .home-blog__image img {
    transform: scale(1.04);
}

.home-blog__content {
    padding: 20px 22px 24px;
}

.home-blog__content h3 {
    margin: 0 0 11px;
    font-size: 22px;
    font-weight: 700;
    line-height: 1.2;
}

.home-blog__content h3 a {
    color: #3f3f3f;
    text-decoration: none;
}

.home-blog__content h3 a:hover,
.home-blog__content h3 a:focus {
    color: #cc2323;
}

.home-blog__content p {
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    color: #6b7982;
    font-size: 16px;
    line-height: 1.45;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
}

.home-module-action {
    margin-top: 28px;
    text-align: center;
}

.home-module-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 24px;
    border: 1px solid #cc2323;
    border-radius: 4px;
    background: #cc2323;
    color: #fff;
    font-size: 16px;
    font-weight: 700;
    text-decoration: none;
    transition: background .2s ease, border-color .2s ease;
}

.home-module-button:hover,
.home-module-button:focus {
    border-color: #a91b1b;
    background: #a91b1b;
    color: #fff;
    text-decoration: none;
}

.home-certificates__carousel {
    padding: 0 46px;
}

.home-certificates__item {
    min-height: 100%;
    padding: 16px;
    border: 1px solid #ededed;
    border-radius: 8px;
    background: #fff;
    box-sizing: border-box;
    transition: box-shadow .2s ease, transform .2s ease;
}

.home-certificates__item:hover,
.home-certificates__item:focus {
    box-shadow: 0 8px 20px rgba(0, 0, 0, .1);
    color: #cc2323;
    text-decoration: none;
    transform: translateY(-2px);
}

.home-certificates__preview {
    display: flex;
    align-items: center;
    justify-content: center;
    aspect-ratio: 210 / 297;
    overflow: hidden;
    background: #f7f7f7;
}

.home-certificates__preview img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.home-certificates__fallback {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: #cc2323;
    color: #fff;
    font-size: 15px;
    font-weight: 800;
}

.home-certificates__title {
    display: block;
    min-height: 2.6em;
    margin-top: 13px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.3;
    text-align: center;
}

.home-certificates .owl-nav button {
    position: absolute;
    top: calc(50% - 25px);
    width: 38px;
    height: 38px;
    border: 1px solid #d9d9d9;
    border-radius: 50%;
    background: #fff;
    color: #3f3f3f;
    font-size: 30px;
    line-height: 30px;
    transition: background .2s ease, color .2s ease;
}

.home-certificates .owl-nav button:hover {
    border-color: #cc2323;
    background: #cc2323;
    color: #fff;
}

.home-certificates .owl-nav .owl-prev {
    left: 0;
}

.home-certificates .owl-nav .owl-next {
    right: 0;
}

@media (max-width: 1040px) {
    .home-category-links__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .home-category-links__name {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .home-category-links,
    .home-blog,
    .home-certificates {
        margin: 48px 0;
    }

    .home-blog {
        padding: 44px 0;
    }

    .home-module-title {
        margin-bottom: 22px;
        font-size: 27px;
    }

    .home-blog__grid {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .home-certificates__carousel {
        padding: 0 36px;
    }
}

@media (max-width: 480px) {
    .home-category-links__grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .home-category-links__card {
        display: grid;
        grid-template-columns: 130px minmax(0, 1fr);
        align-items: center;
    }

    .home-category-links__image {
        aspect-ratio: 1 / 1;
    }

    .home-category-links__name {
        padding: 16px;
        text-align: left;
    }
}

#common-home .home-category-links .container,
#common-home .home-blog .container,
#common-home .home-certificates .container {
    width: 100%;
    max-width: 1800px;
    box-sizing: border-box;
}

#common-home .home-certificates__carousel {
    box-sizing: border-box;
}

#common-home .home-certificates__item {
    padding: 0;
    overflow: hidden;
}

#common-home .home-certificates__title {
    padding: 0 12px 16px;
}

#common-home .home-blog {
    padding: 0;
    background: transparent;
}
/* 03.11.2026 Viacheslav Vikhliaiev */
