/* Yleiset tyylit */
 
*{
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #EEEEEE;
    color: #007c87;
}

.grid-container {
    display: grid;
    grid-template-rows: auto 1fr;
    grid-template-columns: 1fr 2fr 1fr;
    grid-template-areas: 
        "header header header"
        "left-sidebar main-content right-sidebar";
    min-height: 100vh;
    width: 100%;
}

/* Header alueen grid-jako */
.header {
    grid-area: header;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr; /* Jaetaan kolmeen yhtä suureen osaan */
    align-items: center;
    background-color: #EEEEEE;
    padding: 10px;
    border-bottom: 15px solid;
}

/* Logon ja tekstin sijoittaminen vasemmalle */
.logo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.logo {
    width: 250px;
    height: auto;
}

#logotxt {
    font-family: 'Quattrocento', serif;
    font-size: 17px;
    font-weight: bolder;
    color: #007c87;
    text-align: center;
    margin-top: 10px;
}

/* Asettelu keskikuville */
.middle-images {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    text-align: center;
    font-family: 'Quattrocento', serif;
    color: #007c87;
    font-size: 25px;
    font-weight: bold;
    width: 100%; /* Varmistaa, että teksti kattaa koko alueen */
}

.teksti {
    width: auto;
    height: 100px;
    font-family: 'Quattrocento', serif;
    color: #007c87;
    font-size: 17px;
    font-weight: bold;
}

/* Oikealle sijoitettu kuva */
.image-container {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    height: 100%;
}

.tikku-ukot {
    width: 550px;
    height: auto;
}

/* Vasen sarake */
.left-sidebar {
    text-align: center;
    padding: 20px;
    font-family: 'Quattrocento', serif;
    font-size: 14px;
    font-weight: bold;
}

.right-sidebar {
    padding: 20px;
}

.inner {
    position: absolute;
}

/* Pääsisältö */
.main-content {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    padding: 20px;
    position: relative; /* Lisätään suhteellinen asettelu, jotta voimme piilottaa osioita */
}

/* Sijoita kuvausteksti slideshow'n alle */
.kuvausteksti {
    margin: 10px;
    padding: 10px;
    text-align: center;
    font-size: 20px;
    color: #007c87;
    width: 80%;
    font-family: 'Quattrocento', serif;
    font-size: 17px;
    font-weight: bold;
}

.slideshow-container {
    display: flex;
    align-items: center;
    flex-direction: column;
    justify-content: center;
    width: auto;
    height: auto;
}

#slideshow {
    width: 650px;
    height: 488px;
    border-style: solid;
    border-width: 10px;
    margin: 0 auto;
}

/* TEST */
.upper-section, .lower-section {
    display: flex;
    align-items: flex-start;
    margin-bottom: 20px;
    padding: 20px;
}

.kirja {
    width: 120px;
    height: auto;
    margin-right: 15px;
    float:left;
}

.text-content {
    flex-grow: 1;
    text-align: left;
}

.attplanera-content {
    width: 120px;
    height: auto;
    margin-right: 15px;
    margin-bottom: 15px;
}

/* Oikea sarake */
.right-sidebar {
    grid-area: right-sidebar;
    background-color: #EEEEEE;
    padding: 20px;
    text-align: left;
}

/* Piilotetaan sisältö aluksi */
.hidden {
    display: none;
}

.main-image {
    width: 40%;
    height: auto;
    max-width: 600px;
    margin-bottom: 20px;
    float: left;
    margin-right: 15px;
    margin-bottom: 15px;
    text-align: left;
}

/* Sulkunapin tyylit */
button {
    padding: 10px 20px;
    background-color: #007c87;
    color: white;
    border: none;
    cursor: pointer;
}

button:hover {
    background-color: #005f66;
}

/* Yleinen tyylien korjaus pienille näytöille */
@media screen and (max-width: 768px) {
    body {
        padding: 0;
        margin: 0;
    }

    .grid-container {
        display: grid;
        grid-template-columns: 1fr;
        grid-template-areas:
            "header"
            "main-content"
            "left-sidebar"
            "right-sidebar";
    }

    .header {
        grid-area: header;
        display: flex;
        flex-direction: column;
        text-align: center;
    }

    .middle-images {
        display: none;
    }

    .image-container {
        display: none;
    }

    .logo {
        width: 250px;
    }

    .main-content {
        grid-area: main-content;
        padding: 20px;
    
    }

    .left-sidebar {
        grid-area: left-sidebar;
        padding: 10px;
        text-align: center;
    }

    .mobile-hide {
        display: none;
    }

    .right-sidebar {
        grid-area: right-sidebar;
        padding: 10px;
        text-align: center;
    }

    .slideshow-container {
        width: 100%;
    }

    #slideshow {
        width: 100%;
        height: auto;
    }

    .kirja {
        width: 80px;
    }

    .main-image {
        width: 100%;
        max-width: none;
    }

    .content {
        padding: 10px;
        font-size: 0.9em;
    }

    button {
        width: 100%;
        padding: 15px;
        font-size: 1.1em;
    }
}

/* Lisätyyli erittäin pienille näytöille (kuten puhelimet alle 480px leveitä) */
@media screen and (max-width: 480px) {
    .logo {
        width: 200px;
    }

    .header {
        padding: 5px;
    }

    .slideshow-container {
        padding: 0;
    }

    .left-sidebar, .right-sidebar {
        font-size: 0.9em;
    }
}
