.service-carousel {
    overflow: hidden;
    width: 100%;
    margin: 0 auto;
    padding: 2.5rem 0 3rem;
    position: relative;
}

.service-items.carousel {
    display: flex;
    gap: 1.25rem;
    width: max-content;
    align-items: stretch;
    padding: 0.75rem 0 1.25rem;
    animation: scroll-services 30s linear infinite;
}

.service-items.carousel:hover {
    animation-play-state: paused;
}

.service-item.carousel-card {
    box-sizing: border-box;
    width: 220px;
    min-width: 220px;
    max-width: 220px;
    flex: 0 0 220px;
    min-height: 260px;
    height: 260px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.06);
    padding: 1.25rem 1rem 1.1rem;
    text-align: center;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    border: 2px solid transparent;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    cursor: pointer;
    overflow: hidden;
}

.service-item.carousel-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.12);
    border-color: #f59e0b;
}

.service-icon {
    flex: 0 0 auto;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(45deg, #1e3a8a, #f59e0b);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 0.85rem;
    transition: transform 0.3s ease;
}

.service-icon i {
    font-size: 1.35rem !important;
    color: #ffffff !important;
    margin-bottom: 0 !important;
}

.service-item.carousel-card:hover .service-icon {
    transform: scale(1.08) rotate(4deg);
}

.service-item.carousel-card h3 {
    flex: 0 0 auto;
    width: 100%;
    min-height: 2.6em;
    max-height: 2.6em;
    margin: 0 0 0.55rem;
    padding: 0 0.15rem;
    color: #1e3a8a;
    font-size: 0.92rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    line-height: 1.3;
    display: flex;
    align-items: center;
    justify-content: center;
    text-wrap: balance;
    overflow: hidden;
}

.service-item.carousel-card p {
    flex: 1 1 auto;
    width: 100%;
    margin: 0;
    padding: 0 0.1rem;
    color: #64748b;
    font-size: 0.86rem;
    line-height: 1.45;
    overflow: hidden;
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 4;
    line-clamp: 4;
}

@media (max-width: 768px) {
    .service-item.carousel-card {
        width: 180px;
        min-width: 180px;
        max-width: 180px;
        flex: 0 0 180px;
        min-height: 240px;
        height: 240px;
        padding: 1rem 0.7rem;
    }

    .service-item.carousel-card h3 {
        font-size: 0.82rem;
        min-height: 2.5em;
        max-height: 2.5em;
    }

    .service-item.carousel-card p {
        font-size: 0.78rem;
        -webkit-line-clamp: 4;
        line-clamp: 4;
    }
}

@media (max-width: 480px) {
    .service-item.carousel-card {
        width: 165px;
        min-width: 165px;
        max-width: 165px;
        flex: 0 0 165px;
        min-height: 230px;
        height: 230px;
        padding: 0.9rem 0.55rem;
    }

    .service-item.carousel-card h3 {
        font-size: 0.78rem;
    }

    .service-item.carousel-card p {
        font-size: 0.74rem;
        -webkit-line-clamp: 3;
        line-clamp: 3;
    }
}

@keyframes scroll-services {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}
