/* Perustyyli koko sivulle */
body {
    font-family: Arial, sans-serif;
    line-height: 1.6;
    background-color: #ffffff; /* Valkoinen tausta */
    color: #333; /* Tumma teksti */
    margin: 0;
    padding: 0;
    text-align: center; /* Keskitetään tekstit koko sivun osalta */
}

/* Navigaatio */
nav {
    background-color: #003a54; /* Tumma sininen tausta */
    padding: 10px 0;
}

nav ul {
    list-style-type: none;
    padding: 0;
    text-align: center;
    margin: 0;
}

nav ul li {
    display: inline-block;
    margin-right: 10px; /* Pienennetty etäisyys napeissa */
    line-height: 1.4; /* Pienennetty riviväli navigaatioissa */
}

nav ul li:last-child {
    margin-right: 0;
}

nav ul li a {
    color: #ffffff; /* Valkoinen teksti */
    text-decoration: none;
    font-weight: bold;
    font-size: 1em; /* Pienennetty fonttikoko */
    padding: 10px 15px;
    display: inline-block;
    line-height: 0.1; /* Pienennetty riviväli linkeissä */
}

nav ul li a:hover {
    background-color: rgb(0, 86, 179); /* Tummempi sininen hover-tilassa */
    border-radius: 5px;
}

/* Header */
header {
    background-color: #ffffff; /* Valkoinen tausta */
    color: #003a54; /* Tumma sininen teksti */
    text-align: center;
    padding: 20px 0;
}

header h1 {
    margin: 0;
    font-size: 2.5em; /* Pienennetty fonttikoko otsikolle */
    line-height: 1.2; /* Pienennetty riviväli otsikolle */
}

/* Mielipidekirjoitusten tyylit */
main {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 15px;
}

.mp-container {
    background-color: #ffffff; /* Valkoinen tausta */
    border: 1px solid #ddd; /* Vaalea harmaa reunus */
    margin-bottom: 20px;
    padding: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* Hieman varjoa */
    border-radius: 8px;
    transition: background-color 0.3s ease;
}

.mp-container:hover {
    background-color: #f9f9f9; /* Hieman tummempi hover-tilassa */
}

.mp-title {
    font-size: 1.5em; /* Pienennetty fonttikoko */
    font-weight: bold;
    color: #0056b3; /* Vaaleansininen teksti otsikoissa */
    cursor: pointer;
    margin-bottom: 15px;
}

.mp-title:hover {
    color: #003a54; /* Tummansininen hover-tilassa */
}

.mp-container p {
    margin-bottom: 15px;
    font-size: 1em; /* Pienennetty fonttikoko */
    color: #444; /* Tummempi teksti */
}

.mp-container p:last-child {
    margin-bottom: 0;
}

.mp-container strong {
    font-weight: bold;
}

/* Footer */
footer {
    text-align: center;
    padding: 20px 0;
    background-color: #003a54; /* Tumma tausta */
    color: #ffffff; /* Valkoinen teksti */ 
}

footer .footer-section {
    display: inline-block;
    width: 30%;
    padding: 10px;
    vertical-align: top;
}

footer a {
    color: #b0d9eb; /* Vaaleansininen teksti linkeissä */
    text-decoration: none;
}

footer a:hover {
    text-decoration: underline;
}

/* Varmista, että navigaation ja muiden elementtien tilat eivät mene päällekkäin */
footer .footer-section p,
footer .footer-section a {
    margin-bottom: 10px;
}

footer .footer-section p {
    font-size: 1em; /* Pienennetty fonttikoko */
}

/* Responsiivisuus mobiililaitteille */
@media (max-width: 768px) {
    nav ul li {
        display: block;
        margin-bottom: 10px;
    }

    nav ul li a {
        font-size: 1.1em;
        padding: 12px;
    }

    footer .footer-section {
        width: 100%;
        display: block;
        padding: 15px 0;
    }

    main {
        padding: 0 10px;
    }

    header h1 {
        font-size: 2em; /* Pienennetty fonttikoko */
    }

    .mp-title {
        font-size: 1.4em; /* Pienennetty fonttikoko */
    }
}

/* Lisätyyli kuville, varmista että ne skaalautuvat oikein */
img {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.image-container {
    text-align: center;
    margin: 20px 0;
}

.text-placeholder {
    text-align: center;
    font-style: italic;
    color: #666;
    font-size: 1.1em; /* Pienennetty fonttikoko */
    margin-bottom: 20px;
}

/* Mielipiteet-sivun tyylit */
article {
    margin-bottom: 20px;
    font-family: 'Arial', sans-serif;
    color: #333;
}

article h2, article h3 {
    font-size: 1.4em; /* Pienennetty fonttikoko */
    color: #2c3e50;
}

article p {
    font-size: 1em; /* Pienennetty fonttikoko */
    line-height: 1.6;
    margin-bottom: 15px;
}

article ul {
    list-style-type: disc;
    margin-left: 20px;
}

article ul li {
    font-size: 1em; /* Pienennetty fonttikoko */
    margin-bottom: 10px;
}

/* Lisää visio-artikkeleille tyylit */
details summary {
    font-size: 1.4em; /* Pienennetty fonttikoko */
    font-weight: bold;
    cursor: pointer;
    color: #003a54;
    margin-bottom: 10px;
}

details summary:hover {
    color: #0056b3;
}

details p {
    margin-top: 10px;
    font-size: 1em; /* Pienennetty fonttikoko */
    line-height: 1.6;
}

details h3 {
    font-size: 1.2em; /* Pienennetty fonttikoko */
    margin-top: 20px;
}

/* Käytä varjostusta ja pyöristettyjä kulmia teksteissä */
.vision-box {
    background-color: #f9f9f9;
    border: 1px solid #ddd;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
}

details summary {
    font-size: 0.8em;
    font-weight: bold;
    color: #333;
    cursor: pointer;
    margin-bottom: 15px;
}

details p {
    font-size: 1em;
    color: #444;
    margin-bottom: 10px;
}

details img {
    max-width: 80%;
    margin: 20px auto;
    display: block;
    border-radius: 8px;
}

details h3 {
    font-size: 1.2em;
    color: #2c3e50;
}


a {
    color: #0056b3;
    text-decoration: none;
    font-weight: bold;
}

a:hover {
    text-decoration: underline;
}


.etusivu-kuva {
    max-width: 200px; /* Muuta kokoa sopivaksi */
    height: auto;
    display: block;
    margin: 20px auto;
}

html, body {
    height: 100%;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
}

main {
    flex: 1; /* Tämä venyttää pääsisällön niin, että footer pysyy alhaalla */
}

footer {
    background-color: #003a54; /* Tumma tausta */
    color: #ffffff; /* Valkoinen teksti */
    text-align: center;
    padding: 20px 0;
    width: 100%;
    position: relative; /* Ei enää fixed, vaan osa sivun rakennetta */
    bottom: 0;
    left: 0;
}
.logo {
    max-width: 200px; /* Suurennetaan logoa */
    width: 100%; /* Skaalautuu responsiivisesti */
    height: auto; /* Säilyttää mittasuhteet */
    display: block;
    margin: 20px auto 0; /* Siirtää logoa alemmas */
}

img {
    max-width: 80%;  /* Kuvan leveys rajoitetaan 80%:iin alkuperäisestä */
    height: auto;    /* Korkeus skaalautuu automaattisesti */
    display: block;  /* Varmistaa, että kuva ei aiheuta rivinvaihtoa */
    margin: 0 auto;  /* Keskittää kuvan */
}

/* Media query puhelimille */
@media (max-width: 600px) {
    img {
        max-width: 95%;  /* Kuvan leveys skaalautuu 95%:iin näytön leveydestä puhelimella */
        margin: 10px;    /* Pienempi väli kuvien ympärillä puhelimilla */
    }
}

.cv {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.cv h2, .cv p, .cv a {
    text-align: center;
}

.cv ul {
    text-align: left;
    align-self: flex-start;
    padding-left: 0;
}

.cv p {
    text-align: left;
}

ul li {
    margin-bottom: 10px; /* Lisää väli listan kohteiden väliin */
}

ul li:nth-child(2), /* Kehittämismenetelmät */
ul li:nth-child(4), /* Sivuaineena */
ul li:nth-child(6), /* Toisena sivuaineena */
ul li:nth-child(8) { /* 2028 */
    margin-bottom: 20px; /* Lisää enemmän tilaa näiden kohteiden jälkeen */
}
