/* ---------- Perusasetukset ---------- */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, BlinkMacSystemFont,
        "Segoe UI", Roboto, sans-serif;
    line-height: 1.7;
    color: #2b2d42;
    background: #eef2f5;
}

/* ---------- Rakenne ---------- */

.wrapper {
    max-width: 960px;
    margin: 30px auto 0;
    background: #ffffff;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    overflow: hidden;
}

article {
    padding: 25px 35px;
}

/* ---------- Header ---------- */

header {
    background: linear-gradient(135deg, #1d3557, #274c77);
    color: white;
    padding: 40px 35px;
}

.unity {
    background-color: #2caba9;
    background-image: url('../images/banner_peliohjelmointi.png');
    background-position: center;
    /* Center the image */
    background-repeat: no-repeat;
    /* Do not repeat the image */
    background-size: cover;
}

.unitycolor {
    background-color: #2caba9;
}

footer {
    max-width: 960px;
    margin: 0 auto 30px;
    min-height: 40px;
    border-radius: 0 0 12px 12px;
    color: white;
    text-align: center;
    padding: 15px 15px;
}


header h1 {
    margin: 0;
    font-size: 2rem;
    font-weight: 600;
}

#divHeadLink {
    float: right;
}

#divHeadLink a {
    color: #cde7ff;
}

#divHeadLink a:hover {
    color: white;
}

/* ---------- Footer ---------- */

.footer {
    max-width: 960px;
    margin: 0 auto 30px;
    min-height: 40px;
    background: #2caba9;
    border-radius: 0 0 12px 12px;
}

/* ---------- Otsikot ---------- */

h2 {
    color: #1d3557;
    border-bottom: 2px solid #dbe5ec;
    padding-bottom: 8px;
    margin-top: 0;
}

h3 {
    color: #2caba9;
    margin-top: 2rem;
    margin-bottom: .5rem;
}

h4 {
    color: #1d3557;
}

/* ---------- Linkit ---------- */

a {
    color: #d62839;
    text-decoration: none;
    transition: all .2s ease;
}

a:hover {
    color: #2caba9;
}

/* ---------- Listat ---------- */

ul {
    padding-left: 1.4rem;
}

li {
    margin-bottom: .3rem;
}

/* ---------- Koodiesimerkit ---------- */

pre {
    overflow: auto;
    padding: 15px;
    border-radius: 8px;
    background: #2caba9;
    color: #f8f9fa;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08);
}

code {
    font-family: Consolas, Monaco, monospace;
}

/* ---------- Kuvat ---------- */

img {
    max-width: 100%;
    border-radius: 8px;
}

/* ---------- Taulukot ---------- */

table {
    border-collapse: collapse;
    width: 100%;
    margin: 1rem 0;
}

th {
    background: #457b9d;
    color: white;
    padding: 10px;
    text-align: left;
}

td {
    padding: 10px;
    border: 1px solid #dbe5ec;
}

tr:nth-child(even) {
    background: #f8fafc;
}

/* ---------- Lomakkeet ---------- */

form {
    padding: 15px;
    background: #f4f7f9;
    border-radius: 8px;
}

input,
select,
textarea {
    padding: 8px 10px;
    border: 1px solid #cfd8dc;
    border-radius: 6px;
    font-size: 1rem;
}

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: #457b9d;
}

/* ---------- Painikkeet ---------- */

button,
input[type=button],
input[type=submit] {
    background: #457b9d;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    cursor: pointer;
    transition: background .2s ease;
}

button:hover,
input[type=button]:hover,
input[type=submit]:hover {
    background: #1d3557;
}

/* ---------- Mobiili ---------- */

@media (max-width: 825px) {

    .wrapper {
        width: 96%;
        margin-top: 10px;
    }

    article {
        padding: 20px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.6rem;
    }

    #divHeadLink {
        float: none;
        margin-top: 10px;
    }

    .footer {
        width: 96%;
    }
}