#services {
    position: relative;
    overflow: hidden;
    background:
        radial-gradient(900px 420px at 0% 0%, rgba(186, 216, 250, 0.45), transparent 70%),
        radial-gradient(820px 460px at 100% 100%, rgba(186, 216, 250, 0.5), transparent 68%),
        linear-gradient(180deg, #f5f9ff 0%, #f8fbff 48%, #eef5fd 100%);
    padding: 6.5rem 0 6rem;
}

#services .container,
#services .section-header,
#services .services-grid {
    position: relative;
    z-index: 1;
}

.services-waves {
    position: absolute;
    width: min(62vw, 720px);
    pointer-events: none;
    z-index: 0;
}

.services-waves-tl {
    top: -8px;
    left: -36px;
    animation: waveFloat 10s ease-in-out infinite;
}

.services-waves-br {
    right: -48px;
    bottom: -12px;
    animation: waveFloat 12s ease-in-out infinite reverse;
}

.services-waves svg {
    width: 100%;
    height: auto;
    display: block;
    overflow: visible;
}

.services-waves .wave-line {
    fill: none;
    stroke: #9ec8f4;
    stroke-width: 26;
    stroke-linecap: round;
    stroke-linejoin: round;
    opacity: 0.85;
    stroke-dasharray: 120 280;
    animation: waveFlow 9s linear infinite;
}

.services-waves .wave-line:nth-child(2) {
    stroke: #c5dff8;
    stroke-width: 18;
    animation-duration: 12s;
    animation-direction: reverse;
}

.services-waves .wave-line:nth-child(3) {
    stroke: #d7ebfc;
    stroke-width: 34;
    opacity: 0.7;
    animation-duration: 14s;
}

.services-waves .wave-line:nth-child(4) {
    stroke: #8ebff2;
    stroke-width: 16;
    opacity: 0.65;
    animation-duration: 8s;
    animation-direction: reverse;
}

@keyframes waveFlow {
    to { stroke-dashoffset: -400; }
}

@keyframes waveFloat {
    0%, 100% { transform: translate3d(0, 0, 0); }
    50% { transform: translate3d(16px, 12px, 0); }
}

#services .section-header {
    margin-bottom: 2.6rem;
}

#services .section-tag {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    background: #e5f1fd;
    color: #1d6fdb;
    box-shadow: 0 8px 18px rgba(90, 150, 210, 0.18);
    font-weight: 600;
    padding: 0.45rem 1rem 0.45rem 0.8rem;
}

#services .section-tag i {
    font-size: 0.85rem;
}

#services .section-title {
    color: #121826;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.55rem;
}

#services .section-title span {
    color: #1a73e8;
}

#services .section-description {
    color: #8b95a5;
    font-size: 1.15rem;
}

#services .section-header::after {
    content: "";
    display: block;
    width: 74px;
    height: 4px;
    margin: 1.05rem auto 0;
    border-radius: 4px;
    background: #2f7eef;
}

#services .services-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 1.25rem 1.2rem;
}

#services .service-card {
    position: relative;
    background: #ffffff;
    border: 1px solid #e6eef8;
    border-radius: 22px;
    padding: 1.45rem 1.35rem 1.25rem;
    box-shadow: 0 12px 32px rgba(80, 130, 190, 0.08);
}

#services .service-card:hover {
    transform: translateY(-4px);
    border-color: #d7e6f8;
    box-shadow: 0 18px 36px rgba(70, 120, 180, 0.14);
}

#services .service-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: linear-gradient(180deg, #4b97f5 0%, #1f6fe3 100%);
    margin-bottom: 0.95rem;
    box-shadow: 0 8px 16px rgba(40, 112, 214, 0.25);
}

#services .service-icon i {
    font-size: 1.2rem;
}

#services .service-card h3 {
    font-size: 1.12rem;
    font-weight: 700;
    margin: 0 2rem 0.45rem 0;
    color: #1a1f2b;
}

#services .service-card p {
    font-size: 0.92rem;
    line-height: 1.45;
    color: #6d7583;
    margin-bottom: 0.9rem;
}

#services .service-features li {
    color: #4b5563;
    font-size: 0.92rem;
    margin-bottom: 0.35rem;
}

#services .service-features i {
    color: #2f80ed;
    font-size: 0.78rem;
}

#services .service-arrow {
    position: absolute;
    top: 14px;
    right: 14px;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 1.5px solid #d5e4f6;
    color: #7ea6d4;
    display: grid;
    place-items: center;
    background: #fff;
    text-decoration: none;
    font-size: 0.78rem;
    transition: color 0.2s ease, border-color 0.2s ease, transform 0.2s ease;
}

#services .service-arrow:hover,
#services .service-arrow:focus-visible {
    color: #1a73e8;
    border-color: #1a73e8;
    transform: translateX(2px);
}

.back-to-top {
    background: #1f74ea;
    box-shadow: 0 10px 22px rgba(31, 116, 234, 0.35);
}

@media (max-width: 980px) {
    #services .services-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    #services {
        padding-top: 5.5rem;
    }

    #services .section-title {
        font-size: 2rem;
    }

    #services .services-grid {
        grid-template-columns: 1fr;
    }

    .services-waves {
        width: 78vw;
        opacity: 0.85;
    }
}

@media (prefers-reduced-motion: reduce) {
    .services-waves,
    .services-waves .wave-line {
        animation: none;
    }
}
