@import url('https://fonts.googleapis.com/css2?family=Poppins:ital,wght@0,100;0,200;0,300;0,400;0,500;0,600;0,700;0,800;0,900;1,100;1,200;1,300;1,400;1,500;1,600;1,700;1,800;1,900&display=swap');

/* Yleiset määrittelyt */
:root {
    --halm-main-color: #1a4061;
    --halm-main-accent-color: #1773c4;
}

body {
    margin: 0;
    padding: 0;
    font-family: Poppins;
    background-color: rgb(26, 26, 26);
    max-width: 100dvw;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

a {
    color: var(--halm-main-accent-color);
}

.linkbutton {
    color: white;
    text-decoration: none;
    padding: 7px;
    background-color: var(--halm-main-accent-color);
    border-radius: 5px;
    display: inline-block;
}

.dark {
    color: rgb(0, 0, 0);
    font-weight: 500;
    text-decoration: none;
    padding: 7px;
    background-color: rgb(241, 241, 241);
    border-radius: 5px;
    display: inline-block;
}

.left {
    text-align: left;
}

.right {
    text-align: right;
}

.center {
    text-align: center;
}

.accent {
    color: var(--halm-main-accent-color);
}

.table {
    border-spacing: 0px;
    background-color: rgb(41, 41, 41);
    border-radius: 4px;
    padding: 7px;
    width: 100%;
}

.table th {
    padding: 10px;
    border-bottom: 1px solid white;
}

.table td {
    padding: 10px;
    border-top: 1px solid white;
}

/* Yläosio */
#top {
    background: linear-gradient(#223547, rgb(26, 26, 26));
    width: 100dvw;
    padding: 130px 0 40px 0;
    color: white;
    display: flex;
    flex-direction: column;
    justify-content: center;
    text-align: center;
    align-content: space-around;
    flex-wrap: wrap;
}

.menu-container {
    position: relative;
    z-index: 1000;
}

.hamburger {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: white;
    background: none;
    border: none;
}

.menulinks {
    position: absolute;
    right: 40px;
    top: 38px;
}

.menulinks a {
    color: white;
    text-decoration: none;
}

.menulinks ul {
    display: flex;
    list-style-type: none;
    flex-direction: row;
    flex-wrap: wrap;
    justify-content: space-around;
    color: white;
    padding: 0;
    margin: 0;
}

.menulinks li {
    margin: 0 7px;
    color: white;
}

/* Tekstit */

#top #texts {
    max-width: 700px;
    padding: 10px;
}

#top h1 {
    font-size: 50px;
    margin: 0;
}

#top .linkbutton {
    margin-top: 15px;
}

#logobar {
    position: absolute;
    padding: 20px;
    display: flex;
    align-content: flex-end;
    flex-wrap: wrap;
    flex-direction: row;
    align-items: center;
}

#logobar img {
    width: 60px;
    filter: invert(1);
    padding-right: 10px;
}

#logobar h1 {
    float: right;
    margin: 0;
    padding-left: 20px;
    line-height: 50px;
    color: white;
    font-weight: 500;
    border-left: 2px solid white;
}

#logobar a {
    text-decoration: none;
    color: white;
}

/* Main */
.main {
    color: white;
    padding: 30px;
    min-height: 300px;
    max-width: 1500px;
    margin-left: auto;
    margin-right: auto;
    box-sizing: border-box;
}

.main p, .main h1 {
    margin: 7px 0 7px 0;
}

.section {
    padding-top: 20px;
    padding-bottom: 20px;
    box-sizing: border-box;
}

/* Palvelut */
.services {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-content: center;
    align-items: center;
    justify-content: center;
}

.services div {
    background-color: rgb(36, 36, 36);
    border-radius: 3px;
    margin: 10px;
    width: 30%;
    padding: 15px 15px 50px 15px;
    flex: 27%;
    align-self: stretch;
    position: relative;
}

.services div h1 {
    font-weight: 600;
    margin-top: 0;
    transition: ease-in-out color 0.25s; 
}


.services div:hover h1 {
    color: var(--halm-main-accent-color);
}

.services a {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: var(--halm-main-accent-color);
    color: white;
    text-decoration: none;
    margin: 0 -15px 0 -15px;
    position: absolute;
    width: 100%;
    box-sizing: border-box;
    bottom: -10px;
}

/* Palvelucontainer */
.imgbox {
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    align-content: stretch;
    justify-content: center;
    margin: 30px 0 30px 0;
}

#textcontainer {
    width: 45%;
    background-color: var(--halm-main-accent-color);
    border-radius: 5px;
    z-index: 100;
    padding: 20px;
    border-bottom-right-radius: 0;
    border-top-right-radius: 0;
}

#textcontainer h1 {
    margin-top: 0;
    font-weight: 300;
}

#imgcontainer {
    width: 40%;
    margin: -20px -2px -20px 0;
    min-width: 400px;
    background-image: url(https://assets.halminen.net/code.jpg);
    background-size: cover;
    background-repeat: no-repeat;
    border-radius: 5px;
    z-index: 200;
    min-height: 350px;
}

/* Referenssit */
.references {
    gap: 20px;
    display: flex;
    flex-wrap: wrap;
    flex-direction: row;
    font-size: 14px;
    justify-content: center;
}

#reference {
    background-color: rgb(36, 36, 36);
    border-radius: 3px;
    margin: 10px;
    width: 300px;
    align-self: stretch;
    color: white;
    position: relative;
    padding-bottom: 30px;
}

#reference h1 {
    margin: 0;
    font-weight: 600;
}

#reference img {
    width: 100%;
    height: 200px;
    object-fit: contain;
    background-color: white;
    padding: 30px;
    box-sizing: border-box;
}

#reference #info {
    padding: 10px;
}

#reference #tags {
    margin: 0;
}

#reference p {
    padding: 5px 0 5px 0;
}

#reference #tags span {
    background-color: var(--halm-main-accent-color);
    font-size: 12px;
    padding: 5px;
}

#reference #tags #new {
    background-color: #d41d9d;
    font-size: 12px;
    padding: 5px;
}

#reference a {
    display: block;
    text-align: center;
    padding: 10px;
    background-color: var(--halm-main-accent-color);
    color: white;
    text-decoration: none;
    position: absolute;
    width: 100%;
    box-sizing: border-box;
    bottom: -10px;
}

/* Docs */
.docs {
    background-color: rgb(36, 36, 36);
    border-radius: 3px;
    margin-top: 40px;
    max-width: 1000px;
    margin: 40px auto 30px auto;
    padding: 20px;
}

/* Kapeampi */
.narrow {
    border-radius: 3px;
    margin-top: 40px;
    max-width: 1000px;
    margin: 40px auto 30px auto;
    padding: 20px;
}

/* Yhteystiedot */
.contact {
    max-width: 1000px;
    margin: 30px auto 0 auto;
    background-color: rgb(36, 36, 36);
    border-radius: 3px;
    padding: 10px;
}

.contact img {
    border-radius: 100%;
    width: 90px;
    height: 90px;
    object-fit: cover;
    margin: 15px;
}

#contacts {
    display: flex;
    align-items: center;
    margin: 20px auto 0 auto;
    text-align: left;
    width: 279px;
}

.contact #text p, .contact #text h3 {
    margin: 0;
    padding: 0;
}

.contact #text a {
    color: var(--halm-main-accent-color);
    text-decoration: none;
}

/* Alapalkki */
footer #links {
    position: relative;
    color: white;
    padding: 0px 40px 40px 40px;
}

footer #links ul {
    padding-left: 20px;
}

footer #links a {
    color: white;
}

footer #links h4 {
    margin: 0;
    margin-top: 40px;
}

footer #logobar {
    position: relative;
    padding: 40px;
    display: flex;
    align-content: flex-end;
    flex-wrap: nowrap;
    flex-direction: row;
    align-items: center;
}

footer #logobar h1 {
    float: right;
    margin: 0;
    padding-left: 20px;
    line-height: 25px;
    color: white;
    font-weight: 400;
    border-left: 1px solid white;
    font-size: 27px;
}

footer #logobar img {
    width: 50px;
    filter: invert(1);
    padding-right: 10px;
}

.divider {
    width: calc(100% - 80px);
    margin: 0 40px 0 40px;
    border: inset 0.2px rgb(66, 66, 66);
}

/* Mainostoimisto */
.adverts {
    max-width: 1000px;
    margin: auto;
    position: relative;
}

.adverts #imgarea {
    background-image: url('kevat_koivu.jpg');
    width: 300px;
    height: 300px;
    background-size: cover;
    border-radius: 100%;
    position: absolute;
}

.adverts #textarea {
    background-color: rgb(36, 36, 36);
    padding: 15px;
    border-radius: 4px;
    width: 80%;
}

/* Mobiilikäyttö */
@media only screen and (max-width: 760px) {
    #logobar h1 {
        font-size: 20px;
    }

    footer #logobar h1 {
        font-size: 18px;
    }

    #logobar img {
        width: 50px;
    }

    #top h1 {
        font-size: 25px;
    }

    #contacts {
        width: 242px;
    }

    .contact #text h1, .contact #text p {
        font-size: 80%;
    }

    .contact img {
        width: 75px;
        height: 75px;
    }

    #top {
        padding: 130px 0 10px 0;
    }

    .services h1 {
        font-size: 25px;
    }

    .hamburger {
        display: block;
        position: absolute;
        right: 10px;
        top: 25px;
        z-index: 100;
    }

    .menulinks {
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        display: none;
        background-color: #333;
    }

    .menulinks ul {
        flex-direction: column;
        text-align: center;
    }

    .menulinks li {
        padding: 10px 0;
        border-top: 1px solid #444;
    }

    .menulinks.active {
        display: block;
        position: absolute;
        top: 90px;
    }
}

@media only screen and (max-width: 890px) {
    .services div {
        flex: 100%;
    }

    #infotext {
        flex: 100%;
    }

    #pic {
        flex: 100%;
        margin: auto;
        margin-top: 30px;
    }

    #pic img {
        width: 120px;
    }

    .info {
        flex-wrap: wrap;
    }

    /* Mainos */
    .imgbox {
        display: flex;
        flex-wrap: wrap;
        flex-direction: column-reverse;
        justify-content: center;
        align-content: stretch;
        align-items: center;
    }

    #textcontainer {
        width: 75%;
        background-color: var(--halm-main-accent-color);
        border-radius: 5px;
        z-index: 100;
        padding: 20px;
        margin: 0 0 0 30px;
        font-size: 85%;
    }

    #textcontainer h1 {
        font-size: 25px;
    }

    #imgcontainer {
        width: 85%;
        min-width: 0;
        margin: 0 0 -90px -30px;
        border-radius: 5px;
        z-index: 50;
    }

}