.service-section {
    padding: 40px 0 16px;
    background-color: var(--light-gray);
    background: url(../../../img/publishImg/service/service_bg.jpg) no-repeat center center;
    background-size: cover;
}
.service-section-main {
}
.service-section-main-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    margin-bottom: 40px;
}

.service-section-main-lst > div:first-child > :nth-child(1),
.service-section-main-lst > div:last-child > :nth-child(3) {
    flex: 25;
}
.service-section-main-lst > div:first-child > :nth-child(2),
.service-section-main-lst > div:last-child > :nth-child(1) {
    flex: 42;
}
.service-section-main-lst > div:first-child > :nth-child(3),
.service-section-main-lst > div:last-child > :nth-child(2) {
    flex: 33;
}

.service-section-main-item {
    position: relative;
    display: block;
    width: 100%;
    height: 280px;
    border-radius: 11px;
    overflow: hidden;
    margin-bottom: 24px;
}
.service-section-main-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.service-section-main-item-info {
    position: absolute;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    color: var(--white-color);
    background: linear-gradient(
        180deg,
        rgba(0, 0, 0, 0.1) 65%,
        rgba(0, 0, 0, 0.4) 80%,
        rgba(0, 0, 0, 0.5) 90%,
        rgba(0, 0, 0, 0.4) 100%
    );
    display: flex;
    flex-direction: column;
    justify-content: end;
    padding: 12px 20px;
}
.service-section-main-item-info h6 {
    margin: 0;
    font-size: 22px;
    line-height: 1.5;
    font-weight: 700;
    transition: opacity .5s ease;
}

.service-section-main-item-button {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgbA(9, 6, 6, 0.75);
    align-items: center;
    justify-content: center;
    display: none;
    border-radius: 11px;
    animation: fadeIn 0.5s ease;
}
.service-section-main-item-button::before,
.service-section-main-item-button::after {
    content: '';
    position: absolute;
    background-color: transparent;
    width: 0;
    height: 0;
    border-radius: 3px;
}
.service-section-main-item-button::before {
    top: 8px;
    left: 10px;
    border-top: 1px solid #fff;
    border-right: 1px solid #fff;
}
.service-section-main-item-button::after {
    right: 10px;
    bottom: 8px;
    border-bottom: 1px solid #fff;
    border-left: 1px solid #fff;
}

@keyframes lineAround {
    0% {
        width: 0;
        height: 0;
    }
    50% {
        width: calc(100% - 20px);
        height: 0;
    }
    100% {
        width: calc(100% - 20px);
        height: calc(100% - 16px);
    }
}


.service-section-main-item-button button {
    border: 1px solid var(--white-color);
    color: var(--white-color);
    border-top-left-radius: 10px;
    border-bottom-right-radius: 19px;
    font-size: 18px;
    font-weight: 500;
    padding: 13px 16px;
    min-width: 240px;
    max-width: calc(100% - 32px);
    transition: 0.3s ease;
    position: relative;
    z-index: 1;
}

.service-section-main-item:hover .service-section-main-item-button {
    display: flex;
}
.service-section-main-item-button button:hover {
    background-color: var(--white-color);
    color: var(--primary-color);
}
.service-section-main-item:hover .service-section-main-item-button::before {
    animation: lineAround 0.5s linear forwards;
}
.service-section-main-item:hover .service-section-main-item-button::after {
    animation: lineAround 0.5s linear 0.5s forwards;
}

.service-section-main-item-info p {
    display: none;
}

@media (max-width: 768px) {
    .service-section {
        padding-bottom: 0px;
    }
    .service-section-main-lst > div {
        flex-direction: column;
        gap: 0 !important;
    }
    .service-section-main-item {
        flex: auto !important;
        height: 260px;
    }
}
