/* Страница категорий: две половины-ссылки с фоновыми изображениями. Общее — в public-base.css */

.public-categories {
    display: flex;
    gap: 16px;
    min-height: 60vh;
}

.public-category {
    position: relative;
    flex: 1 1 50%;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    border-radius: 6px;
    overflow: hidden; /* обрезаем увеличенное изображение */
    text-align: center;
    text-decoration: none;
}

/* Слой фонового изображения — он и масштабируется при наведении */
.public-category__image {
    position: absolute;
    inset: 0;
    background-color: #2D3648; /* фон-заглушка, пока нет картинки */
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    transform: scale(1);
    transition: transform .4s ease;
    z-index: 0;
}

/* Слой затемнения поверх изображения */
.public-category__overlay {
    position: absolute;
    inset: 0;
    background-color: rgba(16, 24, 32, .35);
    transition: background-color .3s ease;
    z-index: 1;
}

.public-category__title {
    position: relative;
    z-index: 2;
    color: #FFF;
    font-family: Inter, sans-serif;
    font-size: 32px;
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .35);
}

/* Наведение: изображение увеличивается и чуть сильнее затемняется */
.public-category:hover .public-category__image {
    transform: scale(1.06);
}

.public-category:hover .public-category__overlay {
    background-color: rgba(16, 24, 32, .5);
}

/* На узких экранах — друг под другом */
@media (max-width: 768px) {
    .public-categories {
        flex-direction: column;
        min-height: 0;
    }

    .public-category {
        min-height: 200px;
        padding: 32px;
    }

    .public-category__title {
        font-size: 26px;
    }
}
