.caption {
    position: absolute;
    width: 700px;
    height: 30px;
    bottom: 25px;
    left: 25px;
    font-family: Noto Sans;
    font-size: 25px;
    font-weight: 700;
    line-height: 35px;
    text-align: left;
    color: #E4E4E6;
    padding: 5px 20px;
    display: flex;
    align-items: center;
    gap: 25px;
    border-left: 3px solid #45e8ff;
}

.caption .arrow {
    position: relative;
}

@media (min-width: 1025px) {
    .section-ServiceSliders {
        padding-top: 0;
        padding-bottom: 80px;
    }

    .caption .arrow {
        position: relative;
        animation: moveLeftRight 1.5s infinite;
    }

    @keyframes moveLeftRight {
        0% {
            left: 0;
            border-bottom: 2px solid rgba(69, 232, 255, 1);
            /* Fully opaque border */
        }

        50% {
            left: -10px;
            border-bottom: 2px solid rgba(69, 232, 255, 0);
            /* Fully transparent border */
        }

        85%,
        100% {
            left: 0;
            border-bottom: 2px solid rgba(69, 232, 255, 1);
            /* Fully opaque again */
        }
    }

    .portfolio-container {
        display: flex;
        flex-direction: row;
        justify-content: center;
    }

    .portfolio-slide {
        display: flex;
        width: 100%;
        max-width: 1200px;
        gap: 8px;
        overflow: hidden;
        height: 480px;
        /* Fixed height for all items */
    }

    .portfolio-item {
        position: relative;
        flex: 1;
        transition: flex 0.5s ease;
        overflow: hidden;
        cursor: pointer;
    }

    .portfolio-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;    
    }

    .portfolio-item:hover {
        flex: 5;
        /* Expand width only */
    }

    .portfolio-item:hover img {
        transform: scale(1);
        /* Keep height the same */
    }

    .portfolio-item:not(:hover) {
        flex: 1;
    }

    .portfolio-default-hover {
        flex: 5 !important;
    }

    .text-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin: 0 0 40px 0;
    }

    .title {
        font-family: Noto Sans;
        font-size: 48.83px;
        font-weight: 700;
        line-height: 61.04px;
        text-align: center;
        margin-bottom: 0;
        color: #21272D;
    }

    .sub-title {
        font-family: Noto Sans;
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
        text-align: center;
        margin-bottom: 0;
        color: #646970;
    }
}

/* Styles for mobile and tablet */
@media (max-width: 1024px) {
    .section-ServiceSliders {
        padding-top: 0;
        padding-bottom: 80px;
    }

    .caption {
        width: 90%;
        height: auto;
        display: flex;
        justify-content: space-between;
        font-size: 20px;
        line-height: 28px;
    }

    .portfolio-container {
        width: 100vw;
        overflow-x: scroll;
        -ms-overflow-style: none;
        /* IE and Edge */
        scrollbar-width: none;
        /* Firefox */
    }

    .portfolio-container::-webkit-scrollbar {
        display: none;
    }

    .portfolio-slide {
        display: flex;
        width: fit-content;
        gap: 16px;
        overflow: hidden;
        height: 480px;
        /* Fixed height for all items */
        margin: 0 5% 0 5%;
    }

    .portfolio-item {
        position: relative;
        overflow: hidden;
        cursor: pointer;
        width: 330px;
    }

    .portfolio-item img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        transition: transform 0.5s ease;
    }
    .section-ServiceSliders {
        padding-top: 0;
        padding-bottom: 60px;
    }

    .caption {
        width: 90%;
        height: auto;
        display: flex;
        justify-content: space-between;
        font-size: 20px;
        line-height: 28px;
    }

    .text-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 8px;
        margin: 0 0 40px 0;
    }

    .title {
        font-family: Noto Sans;
        font-size: 39.06px;
        font-weight: 700;
        line-height: 48.83px;
        text-align: center;
        margin-bottom: 0;
        color: #21272D;
    }

    .sub-title {
        font-family: Noto Sans;
        font-size: 16px;
        font-weight: 600;
        line-height: 24px;
        text-align: center;
        margin-bottom: 0;
        color: #646970;
    }
}

@media (max-width: 580px) {
    .text-container {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        margin: 0 0 32px 0;
    }

    .caption {
        width: 90%;
        height: auto;
        display: flex;
        justify-content: space-between;
        font-size: 20px;
        line-height: 28px;
    }

    .title {
        font-family: Noto Sans;
        font-size: 31.25px;
        font-weight: 700;
        line-height: 39.06px;
        text-align: center;
        margin-bottom: 0;
        color: #21272D;
    }

    .sub-title {
        font-family: Noto Sans;
        font-size: 14px;
        font-weight: 600;
        line-height: 21px;
        text-align: center;
        margin-bottom: 0;
        color: #646970;
    }
}