/* ==================== SERVICES SECTION ==================== */

.services-section {
    padding: 100px 0;
    background: white;
    position: relative;
}

.services-grid-new {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 25px;
    animation: fadeInGrid 0.8s ease;
}

@keyframes fadeInGrid {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

.service-item {
    text-align: center;
    animation: popIn 0.6s ease;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 45px 35px;
    border: 1.5px solid var(--border-color);
    border-radius: 12px;
    background: white;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(30px);
}

.service-item.visible {
    animation: slideUp 0.6s ease forwards;
}

.service-item:nth-child(1).visible {
    animation-delay: 0s;
}

.service-item:nth-child(2).visible {
    animation-delay: 0.1s;
}

.service-item:nth-child(3).visible {
    animation-delay: 0.2s;
}

.service-item:nth-child(4).visible {
    animation-delay: 0.3s;
}

.service-item:nth-child(5).visible {
    animation-delay: 0.4s;
}

.service-item:nth-child(6).visible {
    animation-delay: 0.5s;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    width: 0;
    height: 6px;
    background: linear-gradient(90deg, var(--primary), var(--primary));
    transform: translateX(-50%);
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 3px;
}

.service-item:hover::before {
    width: 100%;
}

/* Red bar for special items on hover */
.service-item:nth-child(2)::before,
.service-item:nth-child(4)::before,
.service-item:nth-child(6)::before {
    background: linear-gradient(90deg, var(--danger), var(--danger));
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes popIn {
    from {
        opacity: 0;
        transform: scale(0.92);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.service-item:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 10px 30px rgba(0, 153, 216, 0.15);
}

/* Special items keep their red border on hover */
.service-item:nth-child(2):hover,
.service-item:nth-child(4):hover,
.service-item:nth-child(6):hover {
    border-color: var(--danger);
    box-shadow: 0 10px 30px rgba(230, 57, 70, 0.15);
}

.service-icon-box {
    margin-bottom: 24px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100px;
    height: 100px;
    background: linear-gradient(135deg, #f0f4f8 0%, #e8ecf0 100%);
    border-radius: 14px;
    transition: all 0.3s ease;
    animation: float 3s ease-in-out infinite;
    overflow: hidden;
}

.service-icon-image {
    width: 78px;
    height: 78px;
    object-fit: contain;
    display: block;
    transition: transform 0.3s ease;
}

@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-8px);
    }
}

.service-item:hover .service-icon-box {
    transform: scale(1.1) rotate(2deg);
    box-shadow: 0 8px 20px rgba(0, 153, 216, 0.3);
}

.service-item:hover .service-icon-image {
    transform: scale(1.08);
}

.service-item:nth-child(2):hover .service-icon-box,
.service-item:nth-child(4):hover .service-icon-box,
.service-item:nth-child(6):hover .service-icon-box {
    box-shadow: 0 8px 20px rgba(230, 57, 70, 0.3);
}

.service-item h3 {
    color: var(--primary);
    font-size: 20px;
    font-weight: 700;
    margin-bottom: 18px;
    letter-spacing: -0.3px;
    line-height: 1.3;
    transition: all 0.3s ease;
}

.service-item:hover h3 {
    transform: scale(1.05);
}

/* Special styling only on hover */
.service-item:nth-child(2):hover h3,
.service-item:nth-child(4):hover h3,
.service-item:nth-child(6):hover h3 {
    color: var(--danger);
}

.service-list-compact {
    list-style: none;
    padding: 0;
    margin: 0;
}

.service-list-compact li {
    color: var(--text-light);
    font-size: 14px;
    padding: 8px 0;
    border-bottom: 1px solid #f0f0f0;
    position: relative;
    padding-left: 24px;
    transition: all 0.3s ease;
    font-weight: 500;
}

.service-list-compact li:last-child {
    border-bottom: none;
}

.service-list-compact li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    background-color: var(--danger);
    border-radius: 50%;
}

.service-item:hover .service-list-compact li {
    color: var(--text-dark);
    padding-left: 28px;
}

.service-item:hover .service-list-compact li::before {
    background-color: var(--primary);
    transform: translateY(-50%) scale(1.3);
}

.service-collaboration {
    color: var(--danger);
    font-style: italic;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 12px;
    line-height: 1.5;
    transition: all 0.3s ease;
}

.service-description {
    color: var(--text-light);
    font-size: 14px;
    line-height: 1.7;
    margin: 0;
    transition: all 0.3s ease;
}

.service-item:hover .service-collaboration,
.service-item:hover .service-description {
    color: var(--text-dark);
}

/* Responsive */
@media (max-width: 1024px) {
    .services-section {
        padding: 80px 0;
    }

    .services-grid-new {
        grid-template-columns: repeat(2, 1fr);
        gap: 22px;
    }

    .service-item {
        padding: 40px 30px;
    }

    .service-icon-box {
        width: 90px;
        height: 90px;
    }

    .service-icon-image {
        width: 70px;
        height: 70px;
    }

    .service-item h3 {
        font-size: 18px;
    }
}

@media (max-width: 768px) {
    .services-section {
        padding: 60px 0;
    }

    .services-grid-new {
        grid-template-columns: 1fr;
        gap: 18px;
    }

    .service-item {
        padding: 35px 28px;
    }

    .service-icon-box {
        width: 80px;
        height: 80px;
    }

    .service-icon-image {
        width: 62px;
        height: 62px;
    }

    .service-item h3 {
        font-size: 17px;
    }

    .service-list-compact li,
    .service-description {
        font-size: 13px;
    }
}

@media (max-width: 480px) {
    .services-section {
        padding: 40px 0;
    }

    .services-grid-new {
        gap: 15px;
    }

    .service-item {
        padding: 32px 24px;
    }

    .service-icon-box {
        width: 70px;
        height: 70px;
        margin-bottom: 16px;
    }

    .service-icon-image {
        width: 54px;
        height: 54px;
    }

    .service-item h3 {
        font-size: 16px;
        margin-bottom: 14px;
    }

    .service-list-compact li {
        font-size: 12px;
        padding: 6px 0 6px 20px;
    }

    .service-collaboration {
        font-size: 12px;
    }

    .service-description {
        font-size: 12px;
    }
}
