* {
    font-family: Arial, Helvetica, sans-serif;
    padding: 0;
    margin: 0;
    box-sizing: border-box;
}

header {
    position: relative;
    width: 100%;
    height: 200px;
    background-image: url('../images/oulu2.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    overflow: hidden;
}

.header-overlay {
    position: absolute;
    top: 0; left: 0;
    width: 100%; height: 100%;
    background: rgba(255,255,255,0.6);
    z-index: 1;
}

.header-tekstit {
    position: relative;
    z-index: 2;
    color: black;
    text-align: center;
}

.header-tekstit h1 {
    font-weight: bold;
    margin-bottom: 0.75rem;
}

.header-tekstit h3 {
    font-weight: bold;
    margin-top: 0.5rem;
}

nav a {
    text-decoration: none;
    color: black;
    padding: 1rem 0.5rem;
}

a:hover {
    font-weight: bold;
    color: #666;
}

nav {
    padding: 1rem 0.5rem;
    color: black;
    text-align: center;
    background-color: #fff8f2;
}

nav ul {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem 1.5rem;
    list-style: none;
    padding: 0;
}

nav li {
    margin: 0; 
}

hr {
    border: none;
    height: 3px;
    background-color: #3b2e26;
    margin: 0.5rem 0;
}

body {
    background-color: #f2e6dc;
    width: 100%;
}

p {
    line-height: 1.6;
}

button {
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-size: 1rem;
    background-color: #e9d8c3;
    cursor: pointer;
    transition: background-color 0.2s ease-in-out;
}

#onnennumero-tulos, 
#sanonnat-vastaus, 
#arvonta-vastaus,  
#tekosyy-vastaus {
    font-weight: bold;
    color: #4b3621;
    min-height: 4.5rem;
    display: flex;
    align-items: center;
}

div#onnennumero {
    text-align: left;
    padding: 1rem 0.5rem;   
}

.kahavi-mittari {
    width: 100%;
    height: 20px;
    background-color: #f3e5d8;
    border: 2px solid #ccc;
    border-radius: 10px;
    margin: 8px 0;
    overflow: hidden;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.2)
}

#kahavi-palkki {
    height: 100%;
    width: 0%;
    background-color: #6f4e37;
    transition: width 0.5s ease;
}

#kahavi-arvo, #kahavi-kommentti {
    text-align: center;
    margin: 0.25rem 0;
    padding: 0;
    font-weight: bold;
    color: #4b3621;
    min-height: 2.5rem;
}

#sanonnat img {
    width: auto;
    height: 200px;
}

#kuvakkeet button {
    background: none;
    border: none;
    cursor: pointer;
    margin: 1rem;
    padding: 0;
    transition: transform 0.1s ease-in-out;
}

#kuvakkeet button:hover {
    transform: scale(1.1);
}

#kuvakkeet img {
    width: 64px;
    height: 64px;
}

footer {
    display: flex;
    justify-content: center;
    align-items: center;
    background-color: #e9d8c3;
    height: 60px;
    margin-top: auto; 
    position: relative;
}

footer::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: #3b2e26;
}

footer a {
    color: black;
    text-decoration: none;
    font-weight: bold;
}

footer a:hover {
    font-weight: bold;
    color: #4b3621;
}

.otsikko {
    text-align: center;
    margin-bottom: 1rem;
}

.sisalto {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    padding: 0 1rem;
}

.sisaltolohko-keskitetty {
    padding: 2rem 1rem;
    margin: 2rem auto;
    background: #fff8f2;
    border-radius: 12px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.15);
    max-width: 900px;
    text-align: center;
}

.sisaltolohko-vasen,
.sisaltolohko-oikea {
  padding: 2rem 1rem;
  margin: 2rem auto;
  background: #fff8f2;
  border-radius: 12px;
  box-shadow: 5px 5px 15px rgba(0,0,0,0.15);
  max-width: 900px;
}

.sisalto img {
    width: 200px;
    height: auto;
    align-self: center;
    margin-right: 1.5rem;
}

.teksti {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    max-width: 500px;
    text-align: left;
}

/*tekosyyt-sivun määritykset, ei omaa css-tiedostoa kun pieni projekti*/
#tekosyy-buttoni {
    margin-top: 2rem;
    margin-bottom: 2rem;
}

body#tekosyyt {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

body#tekosyyt p {
    line-height: 1.3;
    margin: 1rem 0;
}

body#tekosyyt footer {
    margin-top: auto;
}

/*Info-sivun määritykset*/
body#infosivu {
    background-color: #f2e6dc;
    line-height: 1.8;
}

.logo-otsikko {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.oamk-logo {
    width: 160px;
    height: auto;
}
 
#infosivu article {
    padding: 2rem;
    background-color: #fff8f2;
    border-radius: 12px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.15);
    max-width: 900px;
    margin: 2rem auto;
}

body#infosivu article h1, 
body#infosivu article h3 {
    text-align: left;
}

body#infosivu p {
    margin-bottom: 1.2rem;
}

body#infosivu ul {
    margin-left: 1.5rem;
    padding-left: 1rem;
}

body#infosivu .sisaltolohko-vasen {
    padding: 2rem 1rem;
    margin: 2rem auto;
    background: #fff8f2;
    border-radius: 12px;
    box-shadow: 5px 5px 15px rgba(0,0,0,0.15);
    max-width: 900px;
    text-align: justify;
}

@media (min-width: 768px) {

    .sisalto {
        display: flex;
        align-items: flex-start;
    }

    .sisaltolohko-vasen .sisalto {
        flex-direction: row;
    }

    .sisaltolohko-oikea .sisalto {
        flex-direction: row-reverse;
    }

    .sisalto img {
        flex-shrink: 0;
        width: 200px;
        height: 200px;
        object-fit: contain;
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .teksti {
        flex-grow: 1;
        max-width: none;
        padding-left: 1rem;
        padding-right: 1rem;
        text-align: left
    }

    .sisaltolohko-vasen .sisalto img{
        margin-left: 1rem;
        margin-right: 1rem;
    }

    .sisaltolohko-oikea .sisalto img {
        margin-right: 1rem;
        margin-left: 1rem;
    }

    .sisaltolohko-oikea .teksti {
        padding-left: 1.5rem;
    }

    .sisaltolohko-vasen .teksti {
        padding-right: 1.5rem;
    }
}  




