/* variables */
:root {
    --primary: #aa1916;
    --secondary: blue;
    --txt_white: rgb(250,250,250);
    --txt: rgb(7,7,7);
    --bg: rgb(235,235,235);
}

/* main */
body, html {
    background-color: gray;
    background-color: var(--bg);
    margin: 0;
    padding: 0;
    /* height: 100vh; */
    /* font-family: 'Open Sans', Arial, Helvetica, sans-serif; */
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;       
}
.container {
    max-width: 1440px;
    margin: 0 auto;
}
h1,h2,h3,h4,h5 {
    font-family: 'Ubuntu', sans-serif;
    font-weight: 700;
}
ul {
    list-style-type: square;
}
  ul li {
      padding-left: 0.6em;
  }
a {
    text-decoration: none;
    color: inherit;
}
a:hover {
    cursor: pointer;
    /* color: var(--primary); */
}
.text {
    padding: 30px 30px;
    font-size: 1.2em;
    line-height: 1.5;
}
.btn {
    font-size: 1em;
    font-family: 'Work Sans', sans-serif;
    font-weight: 300; 
    text-transform: uppercase;
    display: block;
    padding: 25px 50px;
    margin: 150px auto;
    margin-top: 0px;
    border: 1.5px solid var(--primary);
    color:  var(--primary); 
    transition: 0.5s;
}
.btn:hover {
    background-color: var(--primary);
    color: white;
}

/* page elements */
#heroTop {
    background-image: url(../assets/worker_small.jpg);
    background-size: cover;
    background-position-x: right;
    padding: 30px 20px;
    height: 40vh;
    position: relative;
    box-sizing: border-box;
}
img.heroTop__logo {
    max-width: 230px;
    max-width: 55%;
}
.heroTop__slogan {
    position: absolute;
    bottom:30px;
    left:30px;
}
.heroTop__slogan::after {
    content: "";
    display: inline-block;
    width: 4em;
    border-top: 2px solid var(--primary);
}
.heroTop__slogan h1,h2 {
    margin: 0;
    color: var(--primary);
}
.heroTop__slogan h1 {
    font-size: 1.9em;
}
.heroTop__slogan h2 {
    font-size: 1.2em;
}

#works_wide {
    width: 100%;
    background-color: rgb(218, 218, 218);
}

#works {
    padding: 70px 15px;
    display: grid;
    grid-template-columns: repeat(2, auto);
    column-gap: 5px;
    row-gap: 20px;
    justify-content: space-around;
}
.works__card {
    width: 140px;
    margin:0;
    padding: 0;
    justify-self: center; 
    /* background-color: aliceblue; */
    /* overflow: hidden;  */
    background-color: transparent;
} 
.works__card img {
    box-sizing: border-box;
    display: block;
    margin:0;
    width: 100%;
    border: 3px solid var(--primary);
}

.works__card img:hover {
    border: 3px solid rgba(170, 25, 22, 0.8);
    box-shadow: 0px 0px 85px 5px rgba(170, 25, 22, 1);
    transition: box-shadow 0.1s;
}
.works__card img:not(hover) {
    transition: 1.6s;
    box-shadow: unset;
}
.works__card h5 {
    color: var(--primary);
    margin: 5px 0 0 0;
    text-align: center;
    font-size: 1em;
    font-weight: 500;
    line-height: 1.4em;
}

.photos {
    padding:10px 0 150px 0;
    margin: 0 auto;
    max-width: 620px;
    display: grid;
    grid-template-columns: repeat(2, auto);
    /* justify-content: space-e;  */
    /* justify-items: start; */
    column-gap: 2vw;
    row-gap: 2vw;
}
.photos__card {
    background-color: silver;
    overflow: hidden;
    /* width: 200px; */
}
.photos__card img {
    display: block;
    width: 100%;
    /* height: 120px; */
    transition: 0.2s ease-out;
}

.photos__card img:hover {
    transform: scale(110%);
}

#footer {
    position: relative;
    grid-template-columns: repeat(1, auto);
    display: grid;
    column-gap: 5vw;
    row-gap: 20px;
    justify-content: center  ;
    text-align: left;
    background-color: var(--primary);
    padding: 150px 30px;
    color: var(--txt_white);
    background-image: url(../assets/bg_solderpath.svg);
    background-repeat: no-repeat;
    background-position-x: right;
    background-position-y: bottom;
    background-blend-mode: soft-light;
    /* background-size: contain; */
}
.footer__card {
    /* background-color: greenyellow; */
    max-width: 500px;
    min-width: 200px;
    display: block;
}
.footer__logo {
    max-width: 150px;
    margin-bottom: 30px;
}
#footer hr {
    border: 1px solid var(--txt_white);
    width: 50px;
    text-align: left;
    margin: 20px 0;
}
#footer__bg {
    position: absolute;
    right: 0px;
    bottom:0px;
    width: 300px;
}

#cForm {
    padding: 0;
    margin: 0;
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    font-size: 0.9em;
    border: 0px;
    /* box-sizing: border-box; */
}
#cForm h2 {
    color: silver;
}
#cForm input, #cForm textarea {
    box-sizing: border-box;
    width: 100%;
    background-color: var(--primary);
    color: white;
    border: 1px solid white;
    font-family: 'Work Sans', sans-serif;
    font-weight: 300;
    margin: 10px 0;
    padding: 15px;
}
#cForm input:focus, #cForm textarea:focus {
outline: none;
border-color: yellow;
}
#cForm input::placeholder, #cForm textarea::placeholder {
    color: var(--txt_white);
}
#cForm input::-ms-input-placeholder, #cForm textarea::-ms-input-placeholder {
    color: var(--txt_white);
}
.cForm__result{
    /* background-color: red; */
    min-height: 20px;
    margin-bottom: 12px;
}
#cForm button {
    width: 100%;
    padding: 10px;
    font-size: 1em;
    border: 0px;
    cursor: pointer;
}
#cForm button:focus {
    outline: none;
}

.submit_btn {
    background-color: rgba(255,255,255,0.3);
    background-color: whitesmoke;
    text-transform: uppercase;
    transition: 0.3s ease-out;
    
}
.submit_btn:hover {
    background-color: red;
    color: whitesmoke;
}
#xyz {
    position: absolute;
    left: 12px;
    /* left: 0; */
    bottom: 9px;
    color: pink;
    font-size: small;
}
#xyz img {
    height: 10px;
}

/* ******** SCREENS ********************* */
/* ******** SCREENS ********************* */
/* ******** SCREENS ********************* */
/* ******** SCREENS ********************* */
/* ******** SCREENS ********************* */
/* ******** SCREENS ********************* */

/* small tablet */
@media screen and (min-width: 620px){
    #heroTop {
        background-image: url(../assets/worker_960.jpg);
        background-size: cover;
        background-position-x: center;
        padding: 40px 40px;
        height: 100vh;
    }
    img.heroTop__logo {
        max-width: 45%;
    }
    .heroTop__slogan {
        position: absolute;
        bottom:30px;
        left:50px;
    }
    .heroTop__slogan h1,h2 {
        margin: 0;
        color: var(--primary);
    }
    .heroTop__slogan h1 {
        font-size: 5zem;
    }
    .heroTop__slogan h2 {
        font-size: 1.8em;
    }

    .photos {
        column-gap: 1vw;
        row-gap: 1vw;
    }

    .text {
        padding: 70px 110px;
    }
    #works {
        /* background-color: green; */
        padding: 70px 30px;
        grid-template-columns: repeat(3, 1fr);
        padding: 70px 30px;
    }
    .works__card {
        /* max-width: 100%; */
        width: 170px;
    }
    .works__card h5 {
        font-size: 1.1em;
    }
    #footer {
        grid-template-columns: repeat(2, auto);
    }



}

/* largre tablet and laptop */
@media screen and (min-width: 960px){
    body {
        font-size: 18px; /*reference size of every fonts in ems*/
    }
    #heroTop {
        height: 100vh;
        background-image: url(../assets/worker_medium.jpg);
        background-size: cover;
        background-position-x: center;
        background-position-y: top;
        padding: 70px 100px;
    }
    .heroTop__logo {
        width: 40%;
    }
    .heroTop__slogan {
        position: absolute;
        left: 110px;
        bottom: 90px;
    }
    .heroTop__slogan h1 {
        font-size: 4em;
    }
    .heroTop__slogan h2 {
        font-size: 3em;
    }
    .heroTop__slogan::after {
        width: 6em;
        border-top: 4px solid var(--primary);
    }

    .photos {
        column-gap: 1vw;
        row-gap: 1vw;
    }

    .text {
        padding: 100px 250px;
        font-size: 1.2em;
        line-height: 1.5;
    }
    #works {
        grid-template-columns: repeat(4, 1fr);
        padding: 70px 30px;
    }
    .works__card h5 {
        font-size: 1.4em;
    }

    #footer {
        grid-template-columns: repeat(3, auto);
    }
}

/* desktop */
@media screen and (min-width: 1200px){
    body {
        font-size: 20px;
    }
    #heroTop {
        height: 100vh;
        background-image: url(../assets/worker.webp);
        background-size: cover;
        background-position-x: center;
        background-position-y: top;
        padding: 70px 100px;
    }
    img.heroTop__logo {
        max-width: 25%;
    }
    .heroTop__slogan {
        position: absolute;
        left: 110px;
        bottom: 100px;
    }
    .heroTop__slogan h1 {
        font-size: 4em;
    }
    .heroTop__slogan h2 {
        font-size: 3em;
    }

    .photos {
        column-gap: 1vw;
        row-gap: 1vw;
    }

    #works {
        grid-template-columns: repeat(4, 1fr);
        padding: 70px 200px;
    }
    .works__card {
        width: 180px;
    }
    .works__card h5 {
        font-size: 1em;
    }
    .text {
        padding: 100px 250px;
        font-size: 1.2em;
        line-height: 1.4;
    }
    #footer {
        padding-left: 250px;
        font-size: 0.8em;

    }
}