/* ===== БЛОК УСЛУГ С ПОПАПАМИ ===== */

.services {
    padding: 100px 0;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    position: relative;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 40px;
}

/* Заголовок секции */
.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.section-title {
    font-size: 3rem;
    font-weight: 800;
    color: #1e293b;
    margin-bottom: 20px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -0.02em;
}

.section-subtitle {
    font-size: 1.25rem;
    color: #64748b;
    max-width: 700px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Сетка услуг - 4 карточки в ряд */
.services-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-bottom: 80px;
}

/* Карточка услуги */
.service-card {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.05),
                0 5px 10px -5px rgba(0, 0, 0, 0.02);
    border: 1px solid #e2e8f0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 50px -12px rgba(59, 130, 246, 0.15);
    border-color: #c7d2fe;
}

.service-card:active {
    transform: translateY(-4px);
}

.service-card-inner {
    padding: 32px;
    height: 100%;
    display: flex;
    flex-direction: column;
}

/* Иконка услуги */
.service-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    transform: scale(1.05);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.2);
}

.service-icon svg {
    width: 32px;
    height: 32px;
    color: white;
}

/* Заголовок услуги */
.service-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 16px 0;
    line-height: 1.3;
    transition: color 0.3s ease;
}

.service-card:hover .service-title {
    color: #3b82f6;
}

/* Описание услуги */
.service-description {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 24px;
    font-size: 1rem;
    flex-grow: 1;
}

/* Теги услуги */
.service-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 32px;
}

.service-tag {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: #0369a1;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
    border: 1px solid #bae6fd;
    transition: all 0.3s ease;
}

.service-card:hover .service-tag {
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(3, 105, 161, 0.1);
}

/* Кнопка действия */
.service-action {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #3b82f6;
    font-weight: 600;
    font-size: 0.95rem;
    padding-top: 16px;
    border-top: 1px solid #f1f5f9;
    transition: all 0.3s ease;
}

.service-card:hover .service-action {
    color: #1d4ed8;
    border-top-color: #dbeafe;
}

.service-action svg {
    transition: transform 0.3s ease;
}

.service-card:hover .service-action svg {
    transform: translateX(4px);
}

/* CTA секция */
.services-cta {
    text-align: center;
    padding: 60px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 24px;
    color: white;
    margin-top: 40px;
}

.services-cta p {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 24px;
}

.cta-button {
    display: inline-block;
    padding: 16px 40px;
    background: white;
    color: #3b82f6;
    text-decoration: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.cta-button:hover {
    background: #f8fafc;
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.1);
}

/* ===== МОДАЛЬНОЕ ОКНО ===== */

.service-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: modalFadeIn 0.3s ease-out;
}

.service-modal.active {
    display: flex;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    animation: overlayFadeIn 0.3s ease-out;
}

@keyframes overlayFadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.modal-container {
    position: relative;
    background: white;
    border-radius: 24px;
    max-width: 1200px;
    width: 100%;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.modal-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 48px;
    height: 48px;
    border-radius: 12px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f5f9;
    border-color: #cbd5e1;
    transform: rotate(90deg);
}

.modal-close svg {
    width: 24px;
    height: 24px;
    color: #64748b;
}

.modal-content {
    padding: 60px;
    overflow-y: auto;
    flex-grow: 1;
}

.modal-header {
    display: flex;
    align-items: center;
    gap: 24px;
    margin-bottom: 40px;
    padding-bottom: 32px;
    border-bottom: 2px solid #f1f5f9;
}

.modal-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.modal-icon svg {
    width: 40px;
    height: 40px;
    color: white;
}

.modal-title {
    font-size: 2.5rem;
    font-weight: 800;
    color: #1e293b;
    margin: 0;
    line-height: 1.2;
}

.modal-body {
    margin-bottom: 40px;
}

.modal-summary {
    margin-bottom: 40px;
}

.modal-summary p {
    font-size: 1.25rem;
    color: #475569;
    line-height: 1.7;
    margin-bottom: 24px;
}

.modal-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.modal-tag {
    background: linear-gradient(135deg, #f0f9ff, #e0f2fe);
    color: #0369a1;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 0.95rem;
    font-weight: 600;
    border: 1px solid #bae6fd;
}

.modal-details {
    background: #f8fafc;
    border-radius: 16px;
    padding: 40px;
}

.detail-block {
    margin-bottom: 32px;
}

.detail-block:last-child {
    margin-bottom: 0;
}

.detail-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.detail-title::before {
    content: '';
    display: block;
    width: 8px;
    height: 8px;
    background: #3b82f6;
    border-radius: 50%;
    flex-shrink: 0;
}

.detail-text {
    color: #475569;
    line-height: 1.7;
    font-size: 1.05rem;
    margin-bottom: 0;
}

.solutions-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.solution-item {
    color: #475569;
    line-height: 1.6;
    margin-bottom: 12px;
    padding-left: 28px;
    position: relative;
    font-size: 1rem;
}

.solution-item::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 0;
    color: #10b981;
    font-weight: bold;
    font-size: 1.2rem;
}

.solution-item strong {
    color: #1e293b;
    font-weight: 600;
}

.modal-footer {
    padding-top: 40px;
    border-top: 2px solid #f1f5f9;
    text-align: center;
}

.modal-cta {
    padding: 18px 48px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    color: white;
    border: none;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1.125rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
}

.modal-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(59, 130, 246, 0.3);
}

/* Адаптивность */
@media (max-width: 1200px) {
    .services-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 24px;
    }
    
    .container {
        padding: 0 30px;
    }
    
    .modal-content {
        padding: 40px;
    }
    
    .modal-title {
        font-size: 2rem;
    }
}

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .services {
        padding: 80px 0;
    }
    
    .section-title {
        font-size: 2.5rem;
    }
}

@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
    
    .container {
        padding: 0 20px;
    }
    
    .service-card-inner {
        padding: 24px;
    }
    
    .services-cta {
        padding: 40px 20px;
    }
    
    .modal-container {
        max-height: 95vh;
    }
    
    .modal-content {
        padding: 30px 20px;
    }
    
    .modal-header {
        flex-direction: column;
        text-align: center;
        gap: 20px;
    }
    
    .modal-title {
        font-size: 1.75rem;
    }
    
    .modal-details {
        padding: 24px;
    }
}

/* Скролл для модального окна */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}