body {
    background-color: #a665fa;
    font-family: Arial, Verdana;
    margin: 40px 40px;
    font-size: clamp(14px, 1.5vw, 18px);
}

nav {
    font-family: 'Monotype Corsiva', cursive;
    font-size: clamp(15px, 5vw, 30px);
    text-align: center;
    width: 100%;
    max-width: 1200px;
    border-left: 4px solid black;
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    padding-top: 10px;
    padding-bottom: 5px;
    box-sizing: border-box;
    margin: auto auto;
}

.fontti2 {
    font-family: 'Times New Roman', Times, serif;
}

.otsikko {
    width: 100%;
    max-width: 1200px;
    border-top: 4px solid black;
    border-left: 4px solid black;
    border-right: 4px solid black;
    padding-top: 5px;
    padding-bottom: 5px;
    box-sizing: border-box;
    margin: auto auto;
}

.otsikko2 {
    width: 100%;
    max-width: 1200px;
    border-top: 4px solid black;
    border-left: 4px solid black;
    border-right: 4px solid black;
    padding-top: 10px;
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 10px;
    box-sizing: border-box;
    margin: auto auto;
}

.otsikko3 {
    width: 100%;
    max-width: 1200px;
    border-top: 4px solid black;
    border-left: 4px solid black;
    border-right: 4px solid black;
    padding-top: 10px;
    padding-left: 10px;
    padding-right: 10px;
    box-sizing: border-box;
    margin: auto auto;
}

.kehys {
    width: 100%;
    max-width: 1200px;
    border-top: 4px solid black;
    border-left: 4px solid black;
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    padding-top: 0px;
    box-sizing: border-box;
    margin: auto auto;
}

.kehys-notop {
    width: 100%;
    max-width: 1200px;
    border-left: 4px solid black;
    border-right: 4px solid black;
    border-bottom: 4px solid black;
    padding-top: 0px;
    padding-bottom: 20px;
    box-sizing: border-box;
    margin: auto auto;
    display: grid;
    align-items: start;

}

nav a {

    text-decoration: none;
    margin: 0 20px
}

a:link {
    color: black;
}

a:hover {
    color: blueviolet;
    background-color: transparent;
}

h1 {
    font-family: 'Arial', cursive;
    font-size: 40px;
    text-align: center
}

h2 {
    font-family: 'Arial', cursive;
    font-size: 35px;
}

h3 {
    font-family: 'Arial', cursive;
    font-size: 20px;
}

h4 {
    font-family: 'Arial', cursive;
    font-size: 15px;
}

.teksti {
    padding: 20px;
    font-size: clamp(12px, 4vw, 18px);
    text-align: center;
}

.teksti2 {
    font-size: clamp(12px, 4vw, 18px);
    text-align: center;
    margin-left: 10px;
    margin-right: 10px;
}


.syote-ruudukko {
    display: grid;
    grid-template-columns: clamp(90px, 22vw, 260px) minmax(0, 1fr);
    gap: clamp(20px, 5vw, 90px);
    align-items: start;
    padding-top: 40px;
    padding-left: clamp(15px, 4vw, 70px);
    padding-right: clamp(15px, 4vw, 70px);
}

.syote-kuva {
    width: 100%;
    height: auto;
    display: block;
    border: 3px solid #000;
}

.syote-vasen {
    grid-column: 1;
    text-align: left;
    justify-self: start;
    font-size: clamp(1.4rem, 3vw, 2rem);
    text-align: right;
    margin-top: 0px;
    margin-left: 0px;
    margin-bottom: 25px;
}

.syote-otsikko {
    font-size: clamp(0.65rem, 2.2vw, 2rem);
    margin: 0 0 clamp(8px, 1.5vw, 20px) 0;
    overflow-wrap: break-word;
}

.syote-teksti {
    font-size: clamp(0.65rem, 1.5vw, 1rem);
    line-height: 1.4;
    overflow-wrap: break-word;
}


.syote-teksti p {
    font-size: clamp(0.7rem, 1.8vw, 1.1rem);
    line-height: 1.4;
    overflow-wrap: break-word;
}

.galleria {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(250px, 100%), 1fr));
    gap: 15px;
    box-sizing: border-box;
}

.galleria-img {
    width: 100%;
    height: 180px;
    object-fit: cover;
    border: 3px solid black;
    cursor: pointer;
}

.galleria-img-noframe {
    width: 100%;
    height: 180px;
    object-fit: cover;
    cursor: pointer;
}

.kuvateksti {
    margin: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.kuvateksti img {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
}

.kuvateksti2 {
    margin: 0;
    display: flex;
    font-style: normal;
    flex-direction: column;
    align-items: center;
}

.kuvateksti2 img {
    display: block;
    width: 100%;
    max-width: 400px;
    height: auto;
}

.kuvat {
    max-width: 1000px;
    margin: auto auto auto auto;
    padding: 10px 10px 0px 10px;
}

.kuva {
    display: block;
    max-width: 400px;
    width: 100%;
    height: auto;
    border: 3px solid black;
}

.kuva-whiteframe {
    display: block;
    max-width: 400px;
    width: 100%;
    height: auto;
    border: 3px solid white;
}

.kuva-noframe {
    display: block;
    width: 100%;
    height: auto;
}

.kuva-etusivu {
    display: block;
    max-width: 400px;
    width: 100%;
    height: auto;
    border: 3px solid black;

}

.kuva-etusivu-noframe {
    display: block;
    max-width: 800px;
    align-items: center;
    width: 100%;
    height: auto;

}
.kuvateksti {
    margin-top: 6px;
    font-size: clamp(0.75rem, 1.5vw, 0.95rem);
    text-align: center;
    font-style: italic;
}

.lightbox {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox:target {
    display: flex;
}

.lightbox-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.877);
}

.lightbox img {
    position: relative;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: 4px solid white;
    z-index: 1;
}

.lightbox-noframe {
    position: fixed;
    inset: 0;
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    padding: 20px;
    box-sizing: border-box;
}

.lightbox-noframe:target {
    display: flex;
}

.lightbox-noframe-bg {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.747);
}

.lightbox-noframe img {
    position: relative;
    max-width: calc(100vw - 40px);
    max-height: calc(100vh - 40px);
    width: auto;
    height: auto;
    object-fit: contain;
    border: none;
    z-index: 1;
}

.footer-ruudukko {
    max-width: 1200px;
    margin: 0px auto;
    padding: 10px;
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    align-items: center;
}

.footer-vasen h2 {
    font-size: clamp(12px, 2vw, 18px);
}

.footer-vasen h4 {
    font-size: clamp(10px, 1.5vw, 16px);
}


.footer-keski {

    display: flex;
    justify-content: center;
    align-items: center;
    justify-self: stretch;
    width: 100%;
}

.footer-logo {
    display: flex;
    width: clamp(100px, 20vw, 200px);
    max-width: 200px;
    height: auto;
}

.footer-oikea h4 {
    font-size: clamp(10px, 1.5vw, 16px);
}

.footer-oikea {
    display: flex;
    flex-direction: column;
    justify-self: end;
    align-items: flex-end;
    text-align: right;
}

.somekuvat {
    width: 40px;
    height: auto;
    display: block;
}

@media (max-width: 768px) {
    .footer-box {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .footer-left,
    .footer-center,
    .footer-right {
        text-align: center;
    }
}