/*
 * Карточки «Бронь» / «Доставка» новой мобильной главной (до 767 px).
 * Высота задаётся переменной --main-mobile-height блока .main-mobile (страница).
 */

@media (max-width: 767px) {
    .main-mobile__cards {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 16px;
    }
    .main-mobile-card {
        position: relative;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        height: var(--main-mobile-height);
        padding-bottom: 4px; /* группа «иконка + название» на 2 px выше центра, как в макете */
        overflow: hidden;
        box-sizing: border-box;
        color: var(--color-white);
        -webkit-tap-highlight-color: transparent;
    }
    /* Скруглён верхний левый угол левой карточки */
    .main-mobile-card:first-child {
        border-radius: 48px 0 0 0;
    }
    .main-mobile-card__img {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        object-fit: cover;
    }
    /* Градиент на фото: чёрный снизу → прозрачный сверху, непрозрачность 50% */
    .main-mobile-card:before {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(0deg, #000 0%, rgba(0, 0, 0, 0) 100%);
        opacity: .5;
        z-index: 1;
    }
    /* Нажатие: дополнительное затемнение фото 20% только при удержании */
    .main-mobile-card:after {
        content: "";
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: #000;
        opacity: 0;
        z-index: 1;
        pointer-events: none;
    }
    .main-mobile-card:active:after {
        opacity: .2;
    }
    .main-mobile-card__icon {
        position: relative;
        z-index: 2;
        display: flex;
        align-items: flex-end;
        justify-content: center;
        height: 56px;
        margin-bottom: 12px;
    }
    .main-mobile-card__icon img {
        display: block;
        width: auto;
        height: 100%;
    }
    .main-mobile-card__title {
        position: relative;
        z-index: 2;
        font-family: "Novoposelensky", sans-serif;
        font-weight: 400;
        font-size: 22px;
        line-height: 20px;
        text-align: center;
        color: var(--color-white);
        /* Жирнее макета по просьбе клиента: у Novoposelensky одно тонкое начертание, утолщаем контуром */
        -webkit-text-stroke-width: 1px;
    }
}

/* Узкие экраны (в макете не отрисованы): «Доставка» должна помещаться в карточку */
@media (max-width: 359px) {
    .main-mobile-card__title {
        font-size: 19px;
    }
}

/* Планшет 600–767 px */
@media (min-width: 600px) and (max-width: 767px) {
    .main-mobile-card {
        padding-bottom: 7px;
    }
    .main-mobile-card:first-child {
        border-radius: 72px 0 0 0;
    }
    .main-mobile-card__icon {
        height: 84px;
        margin-bottom: 13px;
    }
    .main-mobile-card__title {
        font-size: 32px;
        line-height: 30px;
        -webkit-text-stroke-width: 1.45px;
    }
}
