/* Стили для блоков */

/* Стили для модального окна */
.service-modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
    padding: 20px;
    overflow-y: auto; /* Добавляем прокрутку для всего модального окна */
}

.service-modal-content {
    background-color: #ffffff;
    margin: 20px auto;
    padding: 40px;
    border-radius: 16px;
    max-width: 730px;
    width: 100%;
    position: relative;
    animation: slideDown 0.3s ease;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    /* Ограничиваем высоту и добавляем прокрутку внутри */
    max-height: 80vh;
    overflow-y: auto;
}

/* Стилизация скроллбара для модального окна */
.service-modal-content::-webkit-scrollbar {
    width: 6px;
}

.service-modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.service-modal-content::-webkit-scrollbar-thumb {
    background: #FF6B00;
    border-radius: 10px;
}

.service-modal-content::-webkit-scrollbar-thumb:hover {
    background: #e05e00;
}

.close-service-modal {
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    font-size: 30px;
    font-weight: 300;
    color: #999;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1;
    /*background: #fff;*/
    /*padding: 0 0 0 15px;*/
    z-index: 10;
}

.close-service-modal:hover {
    color: #FF6B00;
    transform: rotate(90deg);
}

#service-modalTitle {
    color: #1a1a1a;
    font-size: 28px;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 3px solid #FF6B00;
    display: inline-block;
    clear: both;
}

#service-modalServices {
    clear: both;
}

.service-item {
    display: flex;
	gap: 15px;
    justify-content: space-between;
    align-items: center;
    padding: 15px 0;
    border-bottom: 1px solid #f0f0f0;
    transition: all 0.2s ease;
}

.service-item:hover {
    background: #fff7f0;
    padding-left: 10px;
    padding-right: 10px;
    border-radius: 8px;
}

.service-name {
    font-size: 16px;
    color: #1a1a1a;
    font-weight: 500;
}

.service-unit {
    font-size: 14px;
    color: #808080;
    font-weight: 400;
}

.service-price {
    font-size: 18px;
    color: #FF6B00;
    font-weight: 700;
    white-space: nowrap;
}

/* Анимации */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Адаптивность */
@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        padding: 20px 15px;
    }
    
    .service-modal {
        padding: 10px;
    }
    
    .service-modal-content {
        margin: 10px auto;
        padding: 25px;
        max-height: 90vh;
    }
    
    #service-modalTitle {
        font-size: 22px;
    }
    
    .service-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .service-price {
        font-size: 16px;
    }
}