body {
    background-color: #2E4F3D;
    font-family: Garamond serif ;
    font-size: large;
    color: antiquewhite;
    text-align: center;
}

#logo {
    width: 100%;
    max-width: 1300px;
    height: auto;
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 0 auto;
}

h1 {
    font-family: Georgia serif;
    color: antiquewhite;
    margin-bottom: 70px;
}

#navi {
    padding: 20px;
    font-size: x-large;
}

#hakuvalinta {
    align-items: center;
    justify-content: center;
}

#titlewrapper,
#authorwrapper {
    background-color: #6B8F71;
    padding: 10px;
    border-radius: 60px;
    text-align: center;
    justify-content: center;
    display: flex;
    margin: 20px;
}


#titleBtn,
#authorBtn {
    background-color: transparent;
    border: none;
    color: antiquewhite;
}


.hakutyyppiBtn.active {
    font-weight: bold;
}


#hakuotsikko {
    margin-bottom: 2px;
}

#haku-button {
    background-color: #6B8F71;
    padding: 14px;
    border-radius: 60px;
    text-align: center;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.hakuwrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    max-width: 400px;
    margin: 0 auto;
    background-color: white;
    border-radius: 25px;
    padding: 5px 10px;
}

form {
    width: 100%;
    justify-content: center;
}

.hakukentta {
    color: #5a7ca8bd;
    outline: none;
    border: none;
    background: transparent;
    width: 100%;
    max-width: 300px;
    font-size: large;
    margin: 6px;
}

.hakukentta::placeholder {
    color: #5a7ca8bd;
}

.search-icon {
    color: #5a7ca8bd;
    margin-left: 5px;
    background-color: transparent;
    border: none;
}


#tulokset {
    overflow-x: auto;
    width: 100%;
}

.kirjataulu {
    background-color: #6B8F71;
    border-color: rgb(139, 131, 120);
    border-radius: 30px;
    width: 90%;
    border-collapse: collapse;
    border-spacing: 0;
    table-layout: fixed;
    margin: 20px auto;
}

.kirjataulu th {
    padding: 45px;
    text-align: left;
    font-size: x-large;
    overflow-wrap: break-word;
    border-bottom: 1pt solid #345845;
}

.kirjataulu td {
    padding: 45px;
    text-align: left;
    padding-bottom: 30px;
    font-size: large;
    max-width: 0;
    overflow-wrap: break-word;
}

.kirjataulu th:nth-child(3),
.kirjataulu td:nth-child(3) {
    text-align: center;
}

footer {
    margin-top: 40px;
    position: sticky;
    bottom: 0;
}

@media screen and (max-width: 820px) {
    body {
        font-size: medium;
        padding: 10px;
        text-align: center;
    }

    #logo img {
        max-width: 70%;
    }

    h1 {
        text-align: center;
    }

    #titlewrapper,
    #authorwrapper {
        width: 20%;
        margin: 10px;
        padding: 5px;
    }

    #titleBtn,
    #authorBtn,
    #hakuotsikko {
        font-size: large;
    }

    #haku-button {
        width: 70%;
    }

    .hakuwrapper {
        max-width: 90%;
    }

    .hakukentta {
        width: 100%;
        font-size: medium;
        margin: 8px;
    }
    .kirjataulu {
        width: 100%;
        font-size: medium;
    }

    .kirjataulu th,
    .kirjataulu td {
        font-size: medium;
    }

    .kirjataulu th {
        padding: 25px;;
        text-align: left;
    }

    .kirjataulu td {
        padding: 15px;
        text-align: left;
        padding-bottom: 10px;
    }

    .kirjataulu td:nth-child(2),
    .kirjataulu td:nth-child(3) {
        text-align: center;
    }

}

@media screen and (max-width: 500px) {
    body {
        font-size: medium;
        padding: 10px;
        text-align: center;
    }

    #logo img {
        max-width: 70%;
    }

    h1 {
        font-size: large;
        text-align: center;
        margin-bottom: 20px;
    }

    #titlewrapper,
    #authorwrapper {
        margin: 10px;
        padding: 5px;
        width: 100%;
    }

    #titleBtn,
    #authorBtn,
    #hakuotsikko {
        font-size: medium;
    }

    #haku-button {
        width: 100%;
    }

    .hakuwrapper {
        max-width: 90%;
    }

    .hakukentta {
        width: 100%;
        font-size: medium;
        margin: 8px;
    }
    .kirjataulu {
        width: 100%;
    }

    .kirjataulu th,
    .kirjataulu td {
        font-size: medium;
    }

    .kirjataulu th {
        padding: 18px;
        text-align: left;
    }

    .kirjataulu td {
        padding: 15px;
        text-align: left;
        padding-bottom: 10px;
    }

    .kirjataulu td:nth-child(2),
    .kirjataulu td:nth-child(3) {
        text-align: center;
    }

    footer {
        margin-top: 10px;
    }
}
