nav li:nth-child(4) {
    border-bottom: 2px solid white;
}

header {
    background-size: initial;
    height: initial;
    background-position: initial;
    position: initial;
}

#bg {
    position: relative;
    padding: 120px 120px 40px;
    background-color: #3ABFBC;
    color: #efefef;
}

#bg h2 {
    max-width: 500px;
    font-size: 40px;
    padding-bottom: 20px;
    line-height: normal;
    color: #fff;
}

#bg .highlight {
    color: #FFD966;
}

#title {
    color: #3ABFBC;
    padding-top: 60px;
    padding-left: 120px;
}

#title h2 {
    text-decoration: underline;
}

#intro {
    color: #919396;
    padding: 20px 40px 30px 0px;
    text-align: left;
    max-width: 1100px;
    margin: 0 auto;
}

#intro p {
    padding: 10px;
}

#faci {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-around;
    padding-bottom: 200px;
    max-width: 1000px;
    margin: 0 auto;
}

#faci div {
    position: relative;
    overflow: hidden;
    height: 300px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px;
    margin: 0 5px 20px;
    border: 1px solid #ddd;
    text-align: left;
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #ffffff;
    font-weight: 700;
}
#faci div::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#faci div:hover::before {
    opacity: 1;
}
#faci h2 {
    position: absolute;
    top: 30px;
    left: 30px;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

#faci div:hover h2 {
    opacity: 1;
}

#faci .pigging1 {
    width: 600px;
    background: url("https://visionone.com.my/wp-content/uploads/2016/02/test_facility1.jpg") center/cover no-repeat;
}

#faci .pigging2 {
    width: 320px;
    background: url("https://visionone.com.my/wp-content/uploads/2016/02/test_facility2.jpg") center/cover no-repeat;
}

#faci .pipe26 {
    width: 1000px;
    background: url("https://visionone.com.my/wp-content/uploads/2016/02/pipeline1.jpg") center/cover no-repeat;
}

#faci .pipe4 {
    width: 600px;
    background: url("https://visionone.com.my/wp-content/uploads/2016/02/pipeline2.jpg") center/cover no-repeat;
}

#faci .work {
    width: 320px;
    background: url("https://visionone.com.my/wp-content/uploads/2016/02/working.jpg") center/cover no-repeat;
}

#faci .radiation {
    width: 280px;
    background: url("https://visionone.com.my/wp-content/uploads/2016/02/radiation.jpg") center/cover no-repeat;
}

#faci .subsea {
    width: 640px;
    background: url("https://visionone.com.my/wp-content/uploads/2016/02/susbseamatres.jpg") center/cover no-repeat;
}

#faci h2 {
    margin-top: auto;
    font-size: 20px;
}

@media screen and (max-width: 767px) {
    nav li:nth-child(4) {
        border-bottom: 2px solid white;
    }

    nav {
        background-color: #298482;
    }

    header {
        background-size: initial;
        height: initial;
        background-position: initial;
        position: initial;
    }

    #bg {
        padding: 50px 20px 20px 20px;
    }

    #bg h2 {
        font-size: 30px;
        padding-bottom: 15px;
    }

    #bg .highlight {
        color: #FFD966;
    }

    #title {
        padding-top: 30px;
        padding-left: 20px;
    }

    #title h2 {
        text-decoration: underline;
    }

    #intro {
        padding: 30px 20px 15px 15px;
        text-align: left;
        max-width: 100%;
    }

    #intro p {
        padding: 5px;
    }

    #faci {
        padding-bottom: 100px;
    }

    #faci div {
        height: 200px;
        margin: 0 5px 20px;
        font-weight: 500;
    }

    #faci .pigging1,
    #faci .pigging2,
    #faci .pipe26,
    #faci .pipe4,
    #faci .work,
    #faci .radiation,
    #faci .subsea {
        width: 100%;
        max-width: 100%;
        background-size: cover;
    }

    #faci h2 {
        font-size: 16px;
    }
}