.services {
    position: relative;
    overflow: hidden;
    background-color: #f2f5fa;
    background-image: url("/src/assets/img/services/services-bg.png");
    background-size: cover;
    background-position: center right;
    background-repeat: no-repeat;
}

.services::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(
        100deg,
        rgba(248, 250, 252, 0.96) 0%,
        rgba(248, 250, 252, 0.82) 42%,
        rgba(248, 250, 252, 0.35) 100%
    );
    pointer-events: none;
}

.services__container {
    position: relative;
    z-index: 1;
}

.services__header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: clamp(28px, 4vw, 44px);
}

.services__title {
    margin: 0;
    color: var(--dark-color);
}

.services__grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: clamp(18px, 2vw, 26px);
}

.services__card {
    display: flex;
    flex-direction: column;
    height: 100%;
    border-radius: 18px;
    overflow: hidden;
    text-decoration: none;
    color: inherit;
    background: var(--light-color);
    border: 1px solid rgba(0, 18, 63, 0.06);
    box-shadow:
        0 4px 6px rgba(0, 18, 63, 0.04),
        0 14px 32px rgba(0, 18, 63, 0.07);
    transition:
        transform 0.4s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.25s ease;
}

.services__card:hover {
    transform: translateY(-8px);
    border-color: rgba(20, 190, 254, 0.35);
    box-shadow:
        0 8px 16px rgba(0, 18, 63, 0.06),
        0 28px 56px rgba(0, 18, 63, 0.12);
}

.services__card:focus-visible {
    outline: 3px solid var(--accent-color);
    outline-offset: 4px;
}

.services__card-media {
    position: relative;
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(145deg, #e8eef6, #f4f7fb);
}

.services__image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.001);
    transition: transform 0.55s cubic-bezier(0.22, 1, 0.36, 1);
}

.services__card:hover .services__image {
    transform: scale(1.07);
}

.services__card-shade {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        transparent 40%,
        rgba(0, 18, 63, 0.45) 100%
    );
    opacity: 0.65;
    transition: opacity 0.35s ease;
}

.services__card:hover .services__card-shade {
    opacity: 0.85;
}

.services__card-body {
    display: flex;
    flex-direction: column;
    flex: 1;
    gap: 10px;
    padding: clamp(18px, 2.2vw, 22px);
}

.services__card-title {
    margin: 0;
    font-size: clamp(16px, 1.05vw, 18px);
    font-weight: 600;
    line-height: 1.35;
    color: var(--dark-color);
    letter-spacing: -0.02em;
}

.services__price {
    margin: 0;
    align-self: flex-start;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.2;
    color: var(--accent-color);
    background: rgba(20, 192, 254, 0.051);
    border: 1px solid rgba(20, 190, 254, 0.2);
}

.services__price:empty {
    display: none;
}

.services__card-text {
    margin: 0;
    flex: 1;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-gray-color);
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 3;
    overflow: hidden;
}

.services__card-cta {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 4px;
    font-size: 15px;
    font-weight: 600;
    color: var(--accent-color);
    transition: gap 0.25s ease, color 0.2s ease;
}

.services__card:hover .services__card-cta {
    gap: 10px;
    color: var(--accent-color-hover);
}

.services__card-cta-icon {
    flex-shrink: 0;
}

@media (max-width: 1200px) {
    .services__grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (max-width: 900px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 560px) {
    .services__grid {
        grid-template-columns: 1fr;
    }

    .services__header {
        flex-direction: column;
        align-items: flex-start;
    }
}
