/* Стили для блока услуг */

.services {
    background: var(--color-darker);
    position: relative;
    overflow: hidden;
}

.services::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(
            circle at 20% 50%,
            rgba(255, 215, 0, 0.05) 0%,
            transparent 50%
        ),
        radial-gradient(
            circle at 80% 20%,
            rgba(0, 255, 157, 0.05) 0%,
            transparent 50%
        );
    pointer-events: none;
}

.services .section-header {
    position: relative;
    z-index: 2;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 30px;
    position: relative;
    z-index: 2;
}

.service-card {
    background: rgba(26, 26, 26, 0.8);
    backdrop-filter: blur(10px);
    border-radius: var(--border-radius-xl);
    padding: 40px 30px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.4s ease;
    position: relative;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        135deg,
        transparent 0%,
        rgba(255, 215, 0, 0.05) 50%,
        transparent 100%
    );
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.service-card:hover::before {
    transform: translateX(100%);
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-gold);
    box-shadow: 
        var(--shadow-lg),
        0 10px 30px rgba(255, 215, 0, 0.2);
}

.service-icon {
    width: 80px;
    height: 80px;
    background: rgba(255, 215, 0, 0.1);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    border: 2px solid rgba(255, 215, 0, 0.3);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--color-gold);
    transform: scale(1.1);
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.3);
}

.service-icon i {
    font-size: 2rem;
    color: var(--color-gold);
    transition: all 0.3s ease;
}

.service-card:hover .service-icon i {
    color: var(--color-neon-green);
    transform: rotate(10deg);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--color-white);
    transition: color 0.3s ease;
}

.service-card:hover .service-title {
    color: var(--color-gold);
}

.service-desc {
    font-size: 0.95rem;
    color: var(--color-gray-light);
    margin-bottom: 25px;
    line-height: 1.6;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 20px 0 0;
    text-align: left;
    width: 100%;
}

.service-features li {
    color: var(--color-gray);
    font-size: 0.9rem;
    margin-bottom: 12px;
    padding-left: 24px;
    position: relative;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.service-features li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--color-neon-green);
    font-weight: bold;
    transition: all 0.3s ease;
}

.service-card:hover .service-features li {
    color: var(--color-gray-light);
    transform: translateX(5px);
}

.service-card:hover .service-features li::before {
    color: var(--color-gold);
    transform: scale(1.2);
}

/* Эффект свечения для активных карточек */
.service-card::after {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(
        45deg,
        transparent 5%,
        rgba(255, 215, 0, 0.1) 50%,
        transparent 95%
    );
    border-radius: var(--border-radius-xl);
    z-index: -1;
    opacity: 0;
    transition: opacity 0.4s ease;
}

.service-card:hover::after {
    opacity: 1;
    animation: glowBorder 2s ease-in-out infinite;
}

@keyframes glowBorder {
    0%, 100% {
        background: linear-gradient(
            45deg,
            transparent 5%,
            rgba(255, 215, 0, 0.1) 50%,
            transparent 95%
        );
    }
    50% {
        background: linear-gradient(
            45deg,
            transparent 5%,
            rgba(0, 255, 157, 0.1) 50%,
            transparent 95%
        );
    }
}

/* Анимация появления карточек */
@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(20px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.service-card {
    animation: fadeInScale 0.6s ease-out both;
}

.service-card:nth-child(1) { animation-delay: 0.1s; }
.service-card:nth-child(2) { animation-delay: 0.2s; }
.service-card:nth-child(3) { animation-delay: 0.3s; }
.service-card:nth-child(4) { animation-delay: 0.4s; }

/* Адаптация для планшетов */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 25px;
    }
    
    .service-card {
        padding: 30px 25px;
    }
    
    .service-icon {
        width: 70px;
        height: 70px;
        margin-bottom: 20px;
    }
    
    .service-icon i {
        font-size: 1.8rem;
    }
    
    .service-title {
        font-size: 1.3rem;
    }
}

/* Адаптация для мобильных */
@media (max-width: 768px) {
    .services-grid {
        grid-template-columns: 1fr;
        max-width: 400px;
        margin: 0 auto;
        gap: 20px;
    }
    
    .service-card {
        padding: 25px 20px;
    }
    
    .service-icon {
        width: 60px;
        height: 60px;
        margin-bottom: 15px;
    }
    
    .service-icon i {
        font-size: 1.5rem;
    }
    
    .service-title {
        font-size: 1.2rem;
    }
    
    .service-desc {
        font-size: 0.9rem;
        margin-bottom: 20px;
    }
    
    .service-features li {
        font-size: 0.85rem;
        margin-bottom: 10px;
    }
}

/* Адаптация для очень маленьких экранов */
@media (max-width: 480px) {
    .services {
        padding: 60px 0;
    }
    
    .service-card {
        padding: 20px 15px;
    }
    
    .service-title {
        font-size: 1.1rem;
    }
    
    .service-desc {
        font-size: 0.85rem;
    }
}

/* Эффект параллакса для фона при скролле */
@media (prefers-reduced-motion: no-preference) {
    .services {
        background-attachment: fixed;
        background-image: 
            linear-gradient(
                135deg,
                rgba(10, 10, 10, 0.95) 0%,
                rgba(26, 26, 26, 0.95) 100%
            ),
            url('https://images.unsplash.com/photo-1578662996442-48f60103fc96?ixlib=rb-4.0.3&auto=format&fit=crop&w=1920&q=80');
        background-size: cover;
        background-position: center;
    }
}

/* Кастомные иконки услуг */
.service-icon img {
    width: 46px;
    height: 46px;
    object-fit: contain;
    filter: drop-shadow(0 0 8px rgba(255, 215, 0, 0.45));
    transition: all 0.3s ease;
}

.service-card:hover .service-icon img {
    transform: scale(1.08);
    filter: drop-shadow(0 0 10px rgba(0, 255, 157, 0.45));
}

.service-cta {
    margin-top: 18px;
    color: var(--color-neon-green);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    border-bottom: 1px dashed rgba(0, 255, 157, 0.5);
    transition: all 0.25s ease;
}

.service-cta:hover {
    color: var(--color-gold);
    border-bottom-color: rgba(255, 215, 0, 0.8);
}
