/* ═══════════════════════════════════════════════════════════════
   SERVICES SECTION — WITH MOBILE SLIDER
═══════════════════════════════════════════════════════════════ */

:root {
    --srv-primary: #6366f1;
    --srv-accent: #06b6d4;
    --srv-success: #10b981;
    --srv-orange: #f59e0b;
    --srv-purple: #8b5cf6;
    --srv-pink: #ec4899;
    --srv-dark: #0f172a;
    --srv-gray: #64748b;
    --srv-light: #f8fafc;
    --srv-white: #ffffff;
    --srv-gradient: linear-gradient(135deg, #6366f1 0%, #06b6d4 100%);
    --srv-shadow: 0 10px 40px -10px rgba(0,0,0,0.12);
    --srv-radius: 20px;
    --srv-radius-sm: 14px;
}

.srv-wrapper {
position: relative;
    padding: 80px 0;
    color: var(--srv-dark);
    line-height: 1.6;
    overflow: hidden;
}

.srv-wrapper *, .srv-wrapper *::before, .srv-wrapper *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

/* Background */
.srv-bg {
    position: absolute;
    inset: 0;
    pointer-events: none;
    overflow: hidden;
}

.srv-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(100px);
    opacity: 0.25;
}

.srv-orb-1 { width: 400px; height: 400px; background: var(--srv-primary); top: -100px; right: -100px; }
.srv-orb-2 { width: 300px; height: 300px; background: var(--srv-accent); bottom: -50px; left: -50px; }

.srv-container {
    position: relative;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
.srv-header {
    text-align: center;
    margin-bottom: 60px;
}

.srv-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(99,102,241,0.1);
    color: var(--srv-primary);
    padding: 8px 20px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 13px;
    margin-bottom: 20px;
    border: 1px solid rgba(99,102,241,0.15);
}

.srv-badge-dot {
    width: 6px; height: 6px;
    background: var(--srv-success);
    border-radius: 50%;
    animation: srv-pulse 2s infinite;
}

@keyframes srv-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.3); }
}

.srv-title {
    font-size: clamp(32px, 6vw, 48px);
    font-weight: 800;
    line-height: 1.1;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}

.srv-title-gradient {
    background: var(--srv-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.srv-subtitle {
    font-size: 18px;
    color: var(--srv-gray);
    margin-top: 16px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}

/* Slider Wrapper */
.srv-slider-wrapper {
    position: relative;
}

/* Navigation Buttons */
.srv-nav-btn {
    display: none; /* Показываем только на планшете */
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 48px;
    height: 48px;
    background: var(--srv-white);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: all 0.3s;
}

.srv-nav-btn:hover {
    background: var(--srv-primary);
    border-color: var(--srv-primary);
}

.srv-nav-btn:hover svg { color: white; }

.srv-nav-btn svg {
    width: 20px;
    height: 20px;
    color: var(--srv-dark);
    transition: color 0.3s;
}

.srv-nav-prev { left: -24px; }
.srv-nav-next { right: -24px; }

/* Grid (Desktop) */
.srv-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* Card */
.srv-card {
    position: relative;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.9);
    border-radius: var(--srv-radius);
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: var(--srv-shadow);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), 
                box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow: hidden;
}

.srv-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 25px 60px -15px rgba(99,102,241,0.2);
}

.srv-card:hover .srv-card-glow { opacity: 0.15; }
.srv-card:hover .srv-card-icon { transform: scale(1.1) rotate(-5deg); }
.srv-card:hover .srv-card-link svg { transform: translateX(4px); }

/* Card Glow */
.srv-card-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 200px;
    background: var(--srv-gradient);
    filter: blur(80px);
    opacity: 0;
    transition: opacity 0.5s;
    pointer-events: none;
}

/* Card Icon */
.srv-card-icon {
    width: 60px;
    height: 60px;
    background: var(--srv-gradient);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    box-shadow: 0 8px 24px rgba(99,102,241,0.25);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.srv-card-icon svg {
    width: 28px;
    height: 28px;
    color: white;
}

/* Icon Colors */
.srv-icon-cyan { background: linear-gradient(135deg, #06b6d4, #0891b2); box-shadow: 0 8px 24px rgba(6,182,212,0.25); }
.srv-icon-green { background: linear-gradient(135deg, #10b981, #059669); box-shadow: 0 8px 24px rgba(16,185,129,0.25); }
.srv-icon-orange { background: linear-gradient(135deg, #f59e0b, #d97706); box-shadow: 0 8px 24px rgba(245,158,11,0.25); }
.srv-icon-purple { background: linear-gradient(135deg, #8b5cf6, #7c3aed); box-shadow: 0 8px 24px rgba(139,92,246,0.25); }
.srv-icon-pink { background: linear-gradient(135deg, #ec4899, #db2777); box-shadow: 0 8px 24px rgba(236,72,153,0.25); }

/* Card Content */
.srv-card-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.srv-card-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--srv-dark);
    margin-bottom: 12px;
    line-height: 1.3;
}

.srv-card-text {
    font-size: 14px;
    color: var(--srv-gray);
    line-height: 1.7;
    flex: 1;
    margin-bottom: 16px;
}

.srv-card-link {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--srv-primary);
    font-weight: 600;
    font-size: 14px;
    text-decoration: none;
    transition: gap 0.3s;
}

.srv-card-link:hover { gap: 12px; }

.srv-card-link svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s;
}

/* Dots (Hidden on Desktop) */
.srv-dots {
    display: none;
}

/* CTA Block */
.srv-cta {
    margin-top: 60px;
    background: url(/themes/RJG/assets/images/bg4.jpg) no-repeat center center / cover;
    border-radius: var(--srv-radius);
    padding: 40px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 30px;
    position: relative;
    overflow: hidden;
}

.srv-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 300px;
    height: 300px;
    background: var(--srv-primary);
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
}

.srv-cta-content { position: relative; z-index: 1; }
.srv-cta-content h3 { font-size: 24px; font-weight: 700; color: white; margin-bottom: 8px; }
.srv-cta-content p { font-size: 15px; color: #f8f8f8; }

.srv-cta-btn {
    position: relative;
    z-index: 1;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: var(--srv-gradient);
    color: white;
    padding: 16px 28px;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 16px;
    transition: transform 0.3s, box-shadow 0.3s;
    white-space: nowrap;
}

.srv-cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(99,102,241,0.4);
}

.srv-cta-btn svg { width: 20px; height: 20px; }

/* ═══════════════════════════════════════════════════════════════
   TABLET — 2 columns
═══════════════════════════════════════════════════════════════ */
@media (max-width: 1024px) {
    .srv-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .srv-nav-btn { display: flex; align-items: center; justify-content: center; }
    .srv-nav-prev { left: 10px; }
    .srv-nav-next { right: 10px; }
}

/* ═══════════════════════════════════════════════════════════════
   MOBILE — Horizontal Slider
═══════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
    .srv-wrapper { padding: 60px 0; }
    .srv-container { padding: 0; }
    .srv-header { padding: 0 20px; margin-bottom: 30px; }
    
    .srv-slider-wrapper { padding: 0; }
    
    /* Hide nav buttons on small mobile */
    .srv-nav-btn { display: none; }
    
    /* Convert Grid to Horizontal Slider */
    .srv-grid {
        display: flex;
        gap: 16px;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        scroll-behavior: smooth;
        -webkit-overflow-scrolling: touch;
        padding: 10px 10px 35px;
        margin: 0;
        
        /* Hide scrollbar */
        scrollbar-width: none;
        -ms-overflow-style: none;
    }
    
    .srv-grid::-webkit-scrollbar { display: none; }
    
    /* Card as Slide */
    .srv-card {
        flex: 0 0 85%;
        min-width: 280px;
        max-width: 320px;
        scroll-snap-align: center;
        padding: 24px;
    }
    
    .srv-card:first-child { margin-left: 0; }
    .srv-card:last-child { margin-right: 20px; }
    
    .srv-card-icon {
        width: 50px;
        height: 50px;
    }
    
    .srv-card-icon svg {
        width: 24px;
        height: 24px;
    }
    
    .srv-card-title { font-size: 16px; }
    .srv-card-text { font-size: 13px; line-height: 1.6; }
    
    /* Show Dots */
    .srv-dots {
        display: flex;
        justify-content: center;
        gap: 8px;
        padding: 16px 20px 0;
    }
    
    .srv-dot {
        width: 8px;
        height: 8px;
        background: #cbd5e1;
        border: none;
        border-radius: 50%;
        cursor: pointer;
        transition: all 0.3s;
        padding: 0;
    }
    
    .srv-dot.active {
        width: 24px;
        border-radius: 4px;
        background: var(--srv-gradient);
    }
    
    /* CTA */
    .srv-cta {
        flex-direction: column;
        text-align: center;
        padding: 30px 24px;
        margin: 40px 10px 0;
        border-radius: var(--srv-radius-sm);
    }
    
    .srv-cta-content h3 { font-size: 20px; }
    .srv-cta-btn { width: 100%; justify-content: center; }
}

/* ═══ Very Small Screens ═══ */
@media (max-width: 380px) {
    .srv-card {
        flex: 0 0 90%;
        min-width: 260px;
    }
}