footer {
    background-color: #002831;
    color: #ffffff;
    padding-inline: 15px;
    padding-top: 60px;
    padding-bottom: 30px;
    text-align: start;
}

footer > div {
    max-width: 940px;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr;
    grid-template-rows: auto auto 5px auto auto;
    grid-auto-flow: column;
    column-gap: 60px;
    row-gap: 15px;
}

footer > div > div {
    display: flex;
    flex-direction: column;
}
.footer-buttons {
    flex-direction: row;
}

/* skippa tom rad */
footer > div > div:nth-child(3){
    grid-row-start: 4;
}

.footer-buttons {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    gap: 10px;
}

footer a, footer button {
    background-color: #026873;
    color: white;
    display: flex;
    justify-content: center;
    align-items: center;
    width: fit-content;
    height: auto;
    border: 3px solid #026873;
    border-radius: 10px;
    font-weight: 600;
    font-size: 17.5px;
    padding-inline: 10px;
    padding-block: 10px;
}
footer a:active, footer button:active {
    border-color: #002831
}

@media (hover:hover) {
    footer a:hover, footer button:hover {
        /* transparent */
        background-color: #02687399
    }
}

/* tablet layout */
@media only screen and (min-width: 600px) {
    footer {
        padding-inline: 30px;
        padding-bottom: 60px;
    }
}

/* desktop layout */
@media only screen and (min-width: 769px) {
    footer > div{
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, auto) !important;
    }
    .footer-buttons {
        height: 100%;
        flex-wrap: nowrap;
    }
    footer > div > div:nth-child(3){
        grid-row-start: 1;
    }
}