/* services.css */

/* Оверлей (затемнение фона) */
.services-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(3px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    z-index: 99;
}

.services-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Выезжающая панель на весь экран */
.services-drawer {
    position: fixed;
    top: 0;
    right: -100%;
    /* Скрыта за правым краем на 100% */
    width: 100%;
    max-width: 100%;
    /* Полноэкранный режим */
    height: 100%;
    background: #2a2a2a;
    color: #fff;
    z-index: 99;
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.services-drawer.active {
    right: 0;
    /* Выезжает на весь экран */
}

/* Шапка панели с центрированным содержимым */
.drawer-header {
    width: 100%;
    max-width: 880px;
    margin: 0 auto;
    padding: 20px 0px;
    height: 60px;
    border-bottom: 1px solid #444;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-sizing: border-box;
}

.close-btn {
    background: none;
    border: none;
    color: #fff;
    font-size: 28px;
    cursor: pointer;
    line-height: 1;
}

/* Контент панели, центрированный по ширине */
.drawer-content {
    width: 100%;
    max-width: 920px;
    margin: 0 auto;
    padding: 20px;
    overflow-y: auto;
    box-sizing: border-box;
}

/* Сетка для карточек услуг (2 колонки на десктопе) */
#services-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    gap: 16px;
    /* Расстояние между элементами */
}

/* Элемент списка услуг */
#services-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 32px;
    color: #fff;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* Hover-эффект для карточки */
#services-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: #8b5cf6;
    transform: translateY(-2px);
}

/* Ссылка внутри элемента */
.drawer-service-link {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 24px 32px;
    border-radius: 32px;
    text-decoration: none;
    color: #fff;
    background-color: transparent;
    transition: all 0.2s ease;
}

/* Группа с иконкой и текстом слева */
.service-info {
    display: flex;
    align-items: center;
    gap: 24px;
}

/* Иконка услуги */
.service-icon {
    width: 120px;
    height: 120px;
    object-fit: cover;
    border-radius: 60px;
}

/* Бейдж по умолчанию (когда count === 0) */
.service-badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 13px;
    background-color: rgba(255, 255, 255, 0.1);
    color: #888;
}

/* Если у услуги ЕСТЬ предложения (count > 0) */
.drawer-service-link.has-offers {
    background-color: rgba(43, 127, 255, 0.15);
}

.drawer-service-link.has-offers .service-badge {
    background-color: #2b7fff;
    color: #ffffff;
}

/* Адаптивность для мобильных экранов */
@media (max-width: 767px) {
    #services-list {
        gap: 10px;
    }

    .drawer-header,
    .drawer-content {
        padding: 15px;
    }

    /* Иконка услуги */
    .service-icon {
        width: 60px;
        height: 60px;
    }

    .drawer-service-link {
        padding: 12px 16px;
        border-radius: 24px;
    }

    #services-list li {
        border-radius: 24px;
        font-size: 16px;
    }

    .service-info {
        gap: 12px;
    }
}