.category-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    cursor: pointer;
    transition: transform 0.3s ease-in-out;
    width: 100%;
    padding-top: 100%; /* Соотношение сторон 1:1 для квадратной формы */
}

.category-item > a {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.category-item>a>img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Обрезка изображений, чтобы они заполняли карточку */
    transition: transform 0.3s ease-in-out;
}

.category-item h3 {
    padding: 0 10px;
    width: 100%;
    text-align: center;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #fff;
    font-size: 2.8rem;
    font-weight: bold;
    margin: 0;
    opacity: 1;
    transition: opacity 0.3s ease-in-out;
    z-index: 2;
}

.category-item .icon {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    opacity: 0;
    color: #fff;
    background-color: #ffa500;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease-in-out;
    z-index: 3;
    font-size: 1.5rem;
}

.category-item:hover img {
    transform: scale(1.1);
}

.category-item:hover h3 {
    opacity: 0.7;
}

.category-item:hover .icon {
    opacity: 1;
}

.category-item:hover {
    transform: scale(1.05);
}
