﻿.home-service {
    background-image: url(../../../Design/img/Layer27.png);
    background-size: cover;
    padding-top: 135px;
    position: relative;
}

.home-service-container .descript-s {
              color: var(--default-color-1);
              margin-top: 20px;
              padding-top: 27px;
              font-size: 25px;
              font-weight: bolder;
              border-top: dashed  1px;
              font-family: 'monM';
              width: 100%;
              display: block;       /* hoặc inline-block */
              width: 58%;
              margin: 0 auto;       /* căn giữa theo chiều ngang */
              text-align: center;   /* căn giữa nội dung trong span */
              padding: 0;
              margin-top: 20px;
              padding-top: 27px;
}

.home-service-container {
    /* padding-top: 180px; */
}

    .home-service-container span {
        display: block;
        width: 100%;
        font-size: 20px;
        padding: 0 95px;
        text-align: center;
    }

    .home-service-container h2 {
        gap: 15px;
        text-align: center;
        color: var(--default-color-2);
        font-family: 'monB';
        font-size: 30px;
        display: flex;
        justify-content: center;
        align-items: center;
    }

.home-service-list {
    display: grid;
    grid-auto-rows: minmax(min-content,max-content);
    grid-template-columns: repeat(2,minmax(0,1fr));
    column-gap: 20px;
    row-gap: 20px;
    margin-top: 41px;
}

.service-item:hover .Service-bottom {
    background-color: var(--default-color-3);
}

.service-item:hover .icons-s svg {
    overflow: hidden;
    clip-path: polygon(0 0, 100% 0, 100% 87%, 0% 87%);
}

.service-item:hover .legend-left {
    background: var(--default-color-3);
    color: #FFF;
}

.service-item:hover .service-more {
    border: 1px solid #FFF;
    background: var(--default-color-3);
}

.service-item:hover .service-detail {
    color: #FFF;
}

.service-item:hover .service-name {
    color: var(--default-color-4);
    text-transform: uppercase;
}

.service-item:hover .icons-s img {
    filter: invert(38%) sepia(74%) saturate(653%) hue-rotate(115deg) brightness(98%) contrast(93%);
}

;

.service-item,
.service-item * {
    transition: all 0.3s ease; /* tổng thể, bạn có thể tách nếu cần tinh chỉnh */
}

/* Hoặc tối ưu hơn, chỉ chuyển những gì thay đổi */

.Service-bottom,
.service-more,
.legend-left,
.service-detail,
.service-name,
.icons-s svg path,
.number-stt {
    transition: background 0.3s ease, color 0.3s ease, border 0.3s ease, fill 0.3s ease;
}

.service-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
}

    .service-item:hover .icons-s svg path {
        fill: var(--default-color-4);
    }

    .service-item:hover .number-stt {
        background: #00eeab00;
        color: red;
    }

.service-item, service-top {
    width: 100%;
    position: relative;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.15);
    border: 1px solid var(--default-color-5);
    border-radius: 20px;
    background-color: #FFF;
    transition: background-color 0.5s ease,transform 1s ease, box-shadow 1s ease;
    overflow: hidden;
}

.service-imgg img {
    width: 100%;
    clip-path: polygon(0 0, 100% 0, 100% 100%, 18% 121%, 0 91%);
    position: relative;
    z-index: 999;
    left: 0px;
}

.icons-s svg path {
    fill: #FFF;
    .service-item: hover;
    .service-item: hover;
    .service-item: hover;
}

.service-imgg {
    position: relative;
    overflow: hidden; /* NGĂN ảnh tràn ra ngoài khi scale */
    background: #FFF;
    border-top-left-radius: 20px;
    border-top-right-radius: 20px;
}

.service-text {
    position: absolute;
    bottom: 0px;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 7px;
    z-index: 9999;
}

.service-icon:hover .icons-s img {
    color: var(--default-color-4);
}

.icons-s {
    position: relative;
    width: 60px;
    height: 54px;
    left: -4px;
}

    .icons-s svg {
        clip-path: polygon(0 0, 100% 0, 100% 87%, 0% 87%);
        width: 103%;
    }

.number-stt span {
    padding: 0;
}

.number-stt {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 23px;
    height: 23px;
    background-color: #ffffff00; /* hoặc transparent nếu muốn ẩn nền */
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 21px;
    color: #ff0202; /* hoặc màu bạn muốn */
    pointer-events: none; /* để không che click SVG nếu cần */
    font-family: 'monM';
    z-index: 999999;
}

.service-name {
    font-family: 'monB';
    color: var(--default-white);
    font-size: 18px;
    text-transform: uppercase;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}

.Service-bottom:before {
    content: "";
    width: 100%;
    height: 100%;
    position: absolute;
    background: #ff000000;
    top: 0px;
    left: 0px;
    box-shadow: 0 0 70px 76px rgb(40 136 116);
}

.Service-bottom {
    padding: 27px;
    background: #FFFF;
    box-shadow: 0px -76px 133px 0px rgb(40 136 116 / 0%);
    z-index: 999;
    position: relative;
    /* border-bottom-left-radius: 19px; */
    /* border-bottom-right-radius: 17px; */
    /* overflow: hidden; */ /* NGĂN ảnh tràn ra ngoài khi scale */
}

.service-detail {
    color: #000000bf;
    overflow: hidden;
    text-overflow: ellipsis;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    display: -webkit-box;
}

.service-more {
    position: relative;
    border: 1px solid #007f5f8f;
    border-radius: 4px;
    padding: 16px; /* chừa không gian bên trái */
    width: 20%;
    color: #007f5f;
    background: white;
    margin-top: 18px;
    margin-left: 46px;
}

.legend-left {
    position: absolute;
    top: 7px;
    left: -48px; /* nằm đè lên viền trái */
    background: #ffffff;
    font-weight: bold;
    color: #007f5fb3;
    /* để "dính" vào viền */
    font-family: 'monM';
    text-transform: uppercase;
}

.home-service-bottom {
    display: flex;
    width: 100vw;
    height: auto;
    position: absolute;
    bottom: 0;
}

    .home-service-bottom img {
        width: 50vw; /* mỗi ảnh chiếm 50% màn hình */
        height: auto;
        object-fit: cover; /* hoặc 'contain' nếu muốn toàn bộ ảnh hiển thị */
        display: block;
    }

@media(max-width:739px) {
    .home-service {
        padding-top: 20px;
        /* padding-bottom: 74px; */
    }
.home-service-container h2 svg{
    width:20px;
    height:20px
}
    .home-service-container h2 {
        font-size: 16px;
        margin-bottom: 6px;
    }

    .home-service-list {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        margin-top: 31px;
    }

    .service-detail {
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 2;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        font-size: 13px;
    }

    .service-more {
        width: 41%;
        margin-top: 10px;
        margin-left: 21px;
        padding: 12px;
    }

    .service-name {
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-line-clamp: 1;
        -webkit-box-orient: vertical;
        display: -webkit-box;
        font-size: 13px;
    }

    .service-item {
        border-radius: 20px;
        height: 100%;
    }

    .service-imgg {
        border-top-left-radius: 20px;
        border-top-right-radius: 20px;
    }

    .legend-left {
        font-size: 9px;
        top: 6px;
        left: -22px;
    }

    .home-service-container span {
        padding: 0;
        font-size: 14px;
    }

    .home-service-container .descript-h {
        font-size: 14px;
        text-align: justify;
    }

    .Service-bottom {
        padding: 11px 15px;
    }

    .service-icon img {
        width: 119%;
    }

    .icons-s {
        width: 30px;
        height: 33px;
        left: 0;
        bottom: 0;
    }

    .number-stt {
        font-size: 14px;
        left: 60%;
    }

    .service-icon {
    }

    .service-text {
        gap: 12px
    }

    .service-imgg img {
    }
    .Service-bottom:before{
        box-shadow: 0 0 41px 39px rgb(40 136 116);
    }
    .home-service-container .descript-s{
        /* width: 100%; */
        font-size: 15px;
        padding-top: 12px;
    }
}
