body {
  background-color: #e8e4ef;
  margin: 0;
}

header {
    position: relative;
}

blockquote {
  font-style: italic;
  color: #002204;
  border-radius: 6px;
  font-family: sans-serif;
    font-size: 1rem;           /* ~21–22px */
    line-height: 1.6;
        background: rgba(73,122,39,0.08); border-left: 5px solid #497A27; padding: 0.5em 0.5em;
}
@media (max-width: 500px) {
  blockquote {
    font-size: 0.8rem;      /* ~15–16 px, selkeä mutta tiiviimpi */
    padding: 0.5em 0.5em;      /* hieman enemmän tilaa tekstille pienellä näytöllä */
    
  }
}


/* KIELIVALITSIMET - KESKITETTY YLÖS, VALKOISET TAUSTAT */

.language-selector {
    position: absolute;
    top: -35px;
    left: 18%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    z-index: 100;
}

.lang-btn {
    background-color: white;
    color: #666666;
    padding: 4px 10px;
    text-decoration: none;
    font-size: 0.7rem;
    font-weight: 500;
    transition: all 0.3s;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.lang-btn:hover {
    background-color: #f0f0f0;
    color: #333333;
}

.lang-btn.active {
    background-color: #002204;
    color: white;
}

/* TABLET - 25% SUUREMPI */
@media (max-width: 1200px) and (min-width: 501px) {
    .language-selector {
        top: -30px;
        gap: 2px;
    }
    
    .lang-btn {
        font-size: 0.70rem !important;  /* 25% suurempi kuin 0.56rem */
        padding: 3.13px 7.81px !important;
        border-radius: 4px;
    }
}

/* MOBIILI - 15% PIENEMPI */
@media (max-width: 500px) {
    .language-selector {
        top: -18px;
        gap: 2px;
    }
    
    .lang-btn {
        font-size: 0.531rem !important;  /* 15% pienempi kuin 0.625rem */
        padding: 2.66px 5.31px !important;
        border-radius: 3px;
    }
}


/* Hamburger-valikko näkyviin vain pienillä näytöillä */
.hamburger {
    display: none;
    flex-direction: column;
    gap: 6px;
    width: 35px;
    cursor: pointer;
    position: absolute;
    top: 0px;
    right: 20px;
    z-index: 100;
}

.hamburger span {
    height: 4px;
    background: white;
    border-radius: 2px;
    transition: all 0.3s;
}

.menu-toggle {
    display: none;
}

@media (max-width: 1200px) {
    .hamburger {
        display: flex;
        top: 0px;               /* tai mikä arvo sopii sinun headeriisi */
        right: 15px;
        z-index: 200;            /* varmistaa että hamburger on näkyvissä */
    }

    nav {
        position: fixed;         /* ← TÄRKEIN MUUTOS: fixed → ei liiku scrollatessa eikä jää alle */
        top: 0;                  /* alkaen aivan ylhäältä */
        right: 0;                /* kiinni oikeaan reunaan */
        left: auto;
        bottom: auto;
        width: 240px;            /* sopiva leveys pienelle valikolle */
        max-width: 85vw;         /* estää liian leveäksi menemisen kapeilla näytöillä */
        background: #497A27;
        flex-direction: column;
        padding: 20px 0 10px 0;  /* tilaa ylhäällä hamburgerille / X:lle */
        margin: 0;
        border-radius: 12px; /* pyöristys vain vasemmassa alakulmassa */
        box-shadow: -4px 4px 16px rgba(0,0,0,0.3);
        
        /* näkyvyys ja animaatio */
        opacity: 0;
        visibility: hidden;
        transform: translateX(20px);
        transition: all 0.25s ease;
        
        /* TÄRKEÄÄ: nousee kaiken muun päälle */
        z-index: 999;            /* korkea arvo → tulee hero-kuvan ja kaiken muun päälle */
    }

    /* Kun valikko avataan */
    #menu-toggle:checked ~ nav {
        opacity: 1;
        visibility: visible;
        transform: translateX(0);
    }

    nav a {
        padding: 14px 24px;
        font-size: 1.15rem;
        color: white;
        text-decoration: none;
        border-bottom: 1px solid rgba(255,255,255,0.15);
    }

    nav a:last-child {
        border-bottom: none;
    }

    nav a:hover {
        background-color: #3d651f;
    }

    /* X-muoto (sama kuin ennen) */
    #menu-toggle:checked + .hamburger span:nth-child(1) {
        transform: rotate(45deg) translate(7px, 7px);
    }
    #menu-toggle:checked + .hamburger span:nth-child(2) {
        opacity: 0;
    }
    #menu-toggle:checked + .hamburger span:nth-child(3) {
        transform: rotate(-45deg) translate(7px, -7px);
    }
}

/* Isolla näytöllä palautetaan normaali nav */
@media (min-width: 1201px) {
    nav {
        position: absolute;
        top: 20px;
        right: 10%;
        background: none;
        flex-direction: row;
        gap: 20px;
        transform: none;
        opacity: 1;
        visibility: visible;
        padding: 0;
    }
    
    nav a {
        padding: 12px 18px;
        border-bottom: none;
    }
    
    /* Estetään hamburgerin näkyminen isolla näytöllä */
    .hamburger {
        display: none;
    }
}


nav {
    position: absolute;
    top: 20px;
    right: 10%;
    display: flex;
    gap: 20px; /* väli laatikoiden välissä */
}

nav a {
    display: block;
    text-decoration: none;
    color: white;
    font-family: 'Roboto', sans-serif;  /* LISÄÄ TÄMÄ RIVI */
    font-weight: 500;                   /* Valinnainen, mutta suositeltu */
    background-color: #497A27;
    padding: 12px 18px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    font-size: 24px;  /* Jätä tämä ennalleen */
}

nav a:hover {
    background-color: #3d651f; /* tummempi vihreä hoverissa */
    text-decoration: none;
}

nav a.active {
    text-decoration: underline;
}

h1 {
  color: #002204;
  font-family: sans-serif;
  font-size: 200%;
  padding: 0px;x;;
  text-align: left;
  margin: 40px;x;
}

.site-title {
  color: #002204;
  font-family: sans-serif;
  font-size: 300%;
  padding: 0px;x;;
  text-align: left;
  margin: 40px;x;
}

.site-title a {
  color: #002204;           /* Sama väri kuin h1 */
  text-decoration: none;    /* Poistaa alleviivauksen */
  font-family: inherit;     /* Perii h1:n fontin */
  font-family: 'Roboto', sans-serif;
  font-weight: 500;     /* Perii h1:n fontin */
}

.hero-container {
    position: relative;  /* Mahdollistaa absoluuttisen asemoinnin sisällä */
}

.hero-image {
    width: 100%;
    height: 60vh;
    object-fit: cover;
    margin-top: 0px;  /* Korjattu virhe */
    position: relative;
    z-index: 1;
}

.hero-title {
    position: absolute;
    top: 50%;           /* Keskelle pystysuunnassa */
    left: 50%;          /* Keskelle vaakasuunnassa */
    transform: translate(-50%, -50%);  /* Keskittää täydellisesti */
    
    color: white;
    font-size: 400%;
    font-weight: bold;
    font-family: sans-serif;
    text-align: center;
    z-index: 5;         /* Kuvan päällä */
    
    /* Lisää varjo jotta teksti näkyy paremmin */
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.7);
    margin: 0;
    padding: 20px;
}


h2 {
  color: #002204;
  font-family: sans-serif;
  font-size: 200%;
  padding: 0px;x;;
  text-align: left;
  margin: 40px;x;
}

.sisalto {
    margin: 50px 10% 80px 10%;
    padding: 45px 35px;
    background-color: #FFFDCD;
    border-radius: 24px;
    box-shadow: 0 6px 18px rgba(0,0,0,0.12);
}

.sisalto p {
    color: #002204;
    font-family: sans-serif;
    font-size: 1.35rem;           /* ~21–22px */
    line-height: 1.6;
    margin: 0 0 1.3em 0;
    text-align: left;             /* vasen tasaus yleensä parempi */
}

.sisalto p:last-child {
    margin-bottom: 0;
}


/* Footer - TÄMÄ PITÄÄ OLLA TÄÄLLÄ, EI @media SISÄLLÄ */
.site-footer {
    background-color: #002204;
    color: #e8e4ef;
    text-align: center;
    padding: 40px 20px;
    margin-top: 60px;
    font-size: 0.95rem;
    border-top: 4px solid #497A27;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.site-footer p {
    margin: 8px 0;
    color: #d0d0d0;
}

.site-footer a {
    color: #a8e063;
    text-decoration: none;
}

.site-footer a:hover {
    color: #e8f5c8;
    text-decoration: underline;
}


@media (max-width: 500px) {
  /* Pakota koko sivu täyttämään näyttö */
  html, body {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    box-sizing: border-box;
  }

  body {
    min-width: 100%;
  }

  /* Kaikki pääkontentit täyteen leveyteen */
  header,
  .hero-container,
  .sisalto {
    width: 100%;
    max-width: 100%;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
    box-sizing: border-box;
  }

  /* Yläotsikko */
  .site-title {
    font-size: clamp(1.4rem, 5vw, 1.8rem);
    margin: 20px 0 12px;
    text-align: center;
    padding: 0 12px;
  }

  /* Sisältöosion h1 – nyt pienempi ja katkeaa oikein */
  h1 {
    font-size: clamp(1.5rem, 5vw, 2rem);  /* max ~2rem (32px) */
    line-height: 1.2;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
    word-break: break-word;
    overflow-wrap: break-word;
    text-align: center;
    padding: 0 12px;
    margin: 20px 0;
  }

  /* Hero-osio */
  .hero-image {
    height: 40vh;
    width: 100%;
    object-fit: cover;
  }

  .hero-title {
    font-size: clamp(1.8rem, 9vw, 2.8rem);
    padding: 0 12px;
    line-height: 1.15;
    width: 90%;
    max-width: 90%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
  }

  .painike {
    padding: 12px 40px;
    font-size: clamp(0.95rem, 4vw, 1.1rem);
    min-width: 220px;
    max-width: 90%;
    top: 82%;
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
  }

  /* Keltainen sisältöosio */
  .sisalto {
    width: 100%;
    max-width: 100%;
    margin: 24px 0 40px 0;
    padding: 20px 16px;
    border-radius: 12px;
    box-sizing: border-box;
    overflow-x: hidden;
  }

  .sisalto h2 {
    font-size: clamp(1.45rem, 5vw, 1.7rem);
    text-align: center;
    margin: 0 0 16px;
    line-height: 1.3;
  }

  .sisalto ul {
    margin: 0 0 20px 0;
    padding-left: 28px;
    list-style-position: outside;
    font-size: clamp(0.95rem, 3.8vw, 1.1rem);
  }

  .sisalto p {
    font-size: clamp(0.95rem, 3.8vw, 1.02rem);
    line-height: 1.7;
    margin: 0 0 1.3em 0;
    text-align: left;
    hyphens: auto;
    -webkit-hyphens: auto;
    -ms-hyphens: auto;
  }

  nav {
    width: 200px;                   /* kiinteä pienempi leveys */
    max-width: 75vw;                /* ei koskaan yli 75 % näytöstä */
    position: absolute;             /* vaihdetaan fixed → absolute, jotta se ei peitä koko ruutua */
    top: 60px;                      /* avautuu hamburgerin alapuolelle */
    right: 12px;                    /* kiinni oikeaan reunaan, pieni marginaali */
    left: auto;
    background: #002204;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.3);
    padding: 8px 0;                 /* pienempi sisäinen tila */
    margin: 0;
    z-index: 999;
    transform: translateY(8px);     /* pieni siirtymä alaspäin hamburgerista */
    transition: transform 0.2s ease, opacity 0.2s ease;
  }

  /* Kun valikko avautuu */
  #menu-toggle:checked ~ nav {
    transform: translateY(0);
    opacity: 1;
  }

  /* Linkkipainikkeet valikossa – pienemmät ja keskitetyt */
  nav a {
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 8px 16px;
    min-height: 38px;
    font-family: 'Roboto', sans-serif;  /* LISÄÄ TÄMÄ */
    font-size: 0.95rem;
    font-weight: 500;                   /* Valinnainen */
    border-bottom: 1px solid rgba(255,255,255,0.12);
  }

  nav a:last-child {
    border-bottom: none;
  }