* {
  box-sizing: border-box;
}

:root {
  --accent-color: #A3C9A8;
  --accent-shadow: 0 8px 16px rgba(163, 201, 168, 0.80);
}

html {
  overflow-x: hidden;
  max-width: 100%;
}

body {
  font-family: Arial, sans-serif;
  font-size: 12px;
  line-height: 1.4;
  margin-top: 10px;
  margin-right: 2px;
  margin-bottom: 10px;
  margin-left: 2px;
  overflow-x: hidden;
  max-width: 100vw;
}

/* Yläpalkkien säiliö */
.ylapalkit {
  display: flex;
  max-width: 100vw;
  overflow: visible;
}

.top1 {
  flex: 3;
  background-color: #8B6F4E;
  padding: 0px;
  text-align: left;
  height: 170px;
}

.top1 img {
  margin-top: 5px;
  margin-left: 20px;
  width: auto;
  height: 150px;
  max-width: calc(100vw - 40px);
  filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.5));
}

.top2 {
  flex: 1;
  background-color: #8B6F4E;
  padding: 0px;
  text-align: right;
  height: 170px;
  display: flex;
  align-items: center;
}

/* Keskiosio */
.paasivu {
  background-color: #FFFFFF;
  padding: 20px;
  text-align: center;
  min-height: 100vh;
  box-sizing: border-box;
  display: flex;
  flex-direction: column;
}

/* Alapalkki */
.alapalkki {
  background-color: #8B6F4E;
  text-align: left;
  min-height: auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 15px;
}

.footer-content {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: 20px;
  margin-bottom: 15px;
}

.footer-section {
  width: 100%;
  color: #FFFFFF;
  text-align: center;
}

.footer-section h3 {
  color: #A3C9A8;
  font-size: 16px;
  margin-bottom: 10px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.footer-section p {
  margin: 6px 0;
  line-height: 1.5;
  font-size: 14px;
}

.copyright {
  text-align: center;
  font-size: 14px;
  font-weight: 600;
  color: #FFFFFF;
  width: 100%;
  text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.5);
  letter-spacing: 0.5px;
  border-top: 1px solid rgba(255, 255, 255, 0.2);
  padding-top: 10px;
  margin-top: 10px;
}

.social-icons {
  display: flex;
  gap: 15px;
  align-items: center;
  justify-content: center;
  width: 100%;
  flex-wrap: nowrap;
  padding: 0;
}

.social-icons a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

/* CTA Button Mobile */
.cta-button {
  display: inline-block;
  background: linear-gradient(135deg, #A3C9A8 0%, #8FBC8F 100%);
  color: #FFFFFF !important;
  padding: 12px 24px;
  border-radius: 25px;
  text-decoration: none;
  font-weight: 700;
  font-size: 15px;
  transition: all 0.3s ease;
  box-shadow: 0 4px 12px rgba(163, 201, 168, 0.4);
  text-align: center;
  width: auto;
  margin: 10px auto;
}

.cta-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 15px rgba(163, 201, 168, 0.6);
}


/* Hamburger-kuvake */
.menu-icon {
  display: inline-block;
  cursor: pointer;
  padding: 15px;
  background: #A3C9A8;
  border: none;
  border-radius: 8px;
  transition: background-color 0.3s;
  margin-left: auto;
  margin-right: 20px;
  margin-top: -10px;
}

.menu-icon:hover {
  background-color: #88b894;
}

.menu-icon:active,
.menu-icon.change {
  background-color: #2e7d32;
}

.menu-icon:focus,
.menu-icon:focus-visible {
  outline: 2px solid #2e7d32;
  outline-offset: 2px;
}

.menu-icon span {
  width: 22px;
  height: 2.5px;
  border-radius: 8px;
  background-color: #333;
  margin: 4px 0;
  transition: 0.4s;
}

/* Animaatio ruksiksi */
.change .bar1 { transform: rotate(-45deg) translate(-6px, 6px); }
.change .bar2 { opacity: 0; }
.change .bar3 { transform: rotate(45deg) translate(-6px, -6px); }

/* Dropdown-valikko */
.menu {
  display: none;
  flex-direction: column;
  background-color: #1C1C1C;
  border-radius: 8px;
  position: fixed;      /* kelluu sivun päällä, ei siirrä sisältöä */
  top: 100px;           /* etäisyys yläreunasta */
  right: 20px;          /* sama sisennys kuin desktopissa */
  width: 200px;
  min-width: 200px;
  max-height: calc(100vh - 120px); /* näkyy kokonaan pienissä näytöissä */
  overflow-y: auto;     /* rullaus valikon sisällä tarvittaessa */
  -webkit-overflow-scrolling: touch;
  box-shadow: 0 4px 16px rgba(0,0,0,0.1);
  z-index: 99999;       /* pysyy muiden päällä */
  isolation: isolate;
  -webkit-transform: translateZ(0);
  transform: translateZ(0);
}

.menu a {
  display: block;
  padding: 15px;
  margin: 5px;
  border-radius: 8px;
  background-color: #EAE7DC;
  border: 1px solid #ccc;
  text-decoration: none;
  color: #333;
  transition: background-color 0.3s, color 0.3s;
}

.menu a:hover {
  background-color: #A3C9A8;
  color: #fff;
}

/* Säiliö, joka asettaa divit allekkain Etusivulla */
.container {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 15px;
  flex: 1;
}

/* Yleinen tyyli kehyksille */
.box {
  padding: 50px;
  background-color: #FFFFFF;
  box-sizing: border-box;
  margin: 0;
  border: 2px solid var(--accent-color);
  box-shadow: var(--accent-shadow);
}

/* Oikean puolen laatikko */
.oikea {
  background-color: #F5F5F5;
  border-radius: 20px;
  flex: 1;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
}

.oikea img {
  width: 150px;
  height: auto;
  border-radius: 8px;
  border: none;
  outline: 2px solid var(--accent-color);
  outline-offset: -1px;
  box-shadow: var(--accent-shadow);
}

/* Vasemman puolen laatikko */
.vasen {
  background-color: #F5F5F5;
  border-radius: 20px;
  flex: 2;
  text-align: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: flex-start;
  gap: 15px;
  padding: 15px;
}

.vasen img {
  width: 150px;
  height: auto;
  border-radius: 8px;
  border: none;
  outline: 2px solid var(--accent-color);
  outline-offset: -1px;
  box-shadow: var(--accent-shadow);
}
/* Oikean puolen laatikko */
.oikea1 {
  background-color: #F5F5F5;
  border-radius: 20px;
  flex: 2;
}

.oikea1 img {
  width: 150px;
  height: auto;
  margin-left: 45px;
  margin-top: 15px;
  border-radius: 8px;
  border: none;
  outline: 2px solid var(--accent-color);
  outline-offset: -1px;
  box-shadow: var(--accent-shadow);
}

/* Vasemman puolen laatikko */
.vasen1 {
  background-color: #F5F5F5;
  border-radius: 20px;
  flex: 1;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
}

.vasen1 img {
  width: 150px;
  height: auto;
  margin: 15px auto 0;
  border-radius: 8px;
  border: none;
  outline: 2px solid var(--accent-color);
  outline-offset: -1px;
  box-shadow: var(--accent-shadow);
}

/* Lomake */
form {
  max-width: 500px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
fieldset { border: none; padding: 0; }
legend { font-size: 1.4em; margin-bottom: 10px; font-weight: bold; }
label { display: block; margin-top: 15px; font-weight: bold; }
input[type="text"], input[type="email"], input[type="tel"], textarea {
  width: 100%;
  padding: 10px;
  margin-top: 5px;
  border: 1px solid #ccc;
  border-radius: 4px;
  box-sizing: border-box;
}
textarea { resize: vertical; }
input[type="checkbox"] { margin-right: 8px; }
button {
  margin-top: 20px;
  padding: 10px 20px;
  background-color: #2e7d32;
  color: white;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 1em;
}
button:hover { background-color: #1b5e20; }

/* Yritystiedot */
.container2 {
  display: flex;
  flex-direction: column; /* pinotaan allekkain */
  align-items: center;    /* keskitetään sisältö */
  max-width: 300px;
  margin: 0 auto;
  background-color: white;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0 0 10px rgba(0,0,0,0.1);
}
.company-image {
  width: 200px;
  height: auto;
  margin-bottom: 20px;
  border-radius: 8px;
  border: none;
  outline: 2px solid var(--accent-color);
  outline-offset: -1px;
  box-shadow: var(--accent-shadow);
}
.company-info h1 { font-size: 1.8em; margin-bottom: 10px; }
.company-info p { margin: 6px 0; font-size: 1em; color: #333; }

/* Ilmoitukset */
.alert {
  padding: 15px;
  margin-bottom: 20px;
  border-radius: 6px;
  font-size: 1rem;
}
.alert.success {
  background-color: #e6f7e6;
  border: 1px solid #4CAF50;
  color: #2e7d32;
}
.alert.error {
  background-color: #fdecea;
  border: 1px solid #f44336;
  color: #c62828;
}
.alert ul { margin: 0; padding-left: 20px; }

/* Korostus */
.highlight { font-weight: bold; }

/* Facebook timeline kehys */
.fb-embed {
  min-height: 500px;
  width: 100% !important;
  max-width: 100% !important;
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  box-shadow: var(--accent-shadow);
  overflow: hidden;
  display: block;
  margin: 0 auto;
}

/* Kuvien stabiliteetti mobiilissa */
img {
  display: block;
  max-width: 100%;
  height: auto;
}

/* Slideshow mobiilissa: suurempi leveys ilman vaikutusta muihin kuviin */
.slideshow {
  width: 100%;
  max-width: none;
  margin-bottom: 16px;
  margin-left: 0;
  margin-right: 0;
  border: 2px solid var(--accent-color);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: var(--accent-shadow);
}

.slideshow-frame img {
  aspect-ratio: 4 / 3;
}

.slideshow-frame {
  border: none;
  box-shadow: none;
  border-radius: 0;
  min-height: 360px;
  width: 100%;
}

.slideshow-caption {
  margin-top: 0;
  border-top: 1px solid #ddd;
}

.oikea1 {
  padding: 20px;
}

/* Varmistetaan, ettei .oikea1 img -sääntö pienennä slideshow-kuvia */
.slideshow-frame img {
  width: 100% !important;
  height: 100% !important;
  max-width: none !important;
  margin: 0 !important;
  left: 0;
  right: 0;
  position: absolute !important;
  top: 0;
  bottom: 0;
  backface-visibility: hidden;
  will-change: opacity, transform;
  transform: translateZ(0) scale(1.06);
  transition: opacity 1s ease, transform 1.2s ease;
}

/* FAQ-osiolle mobiilissa */
.faq {
  background-color: #ffffff;
  color: #111;
  padding: 12px;
  border-radius: 8px;
  box-shadow: 0 6px 14px rgba(0,0,0,0.06);
  margin-top: 12px;
}
.faq details { margin-bottom: 8px; padding: 6px 6px; }
.faq summary {
  font-weight: 700;
  cursor: pointer;
  padding: 6px 4px;
  list-style: none;
  display: block;
  border-radius: 6px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+";
  display: inline-block;
  width: 1em;
  text-align: center;
  margin-right: 8px;
  color: #2e7d32;
  font-weight: 700;
}
.faq details[open] summary::before { content: "–"; }
.faq details[open] summary { color: #2e7d32; }
.faq summary:focus, .faq summary:focus-visible { box-shadow: 0 0 0 4px rgba(163,201,168,0.20); }
.faq details p { margin: 6px 0 0 1.4em; line-height: 1.4; color: #333; }

/* Takaisin ylös -nappi */
#backToTop {
  position: fixed;
  bottom: 20px;
  right: 10px;
  width: 45px;
  height: 45px;
  background-color: #A3C9A8;
  color: #1C1C1C;
  border: none;
  border-radius: 50%;
  font-size: 24px;
  font-weight: bold;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s, visibility 0.3s, background-color 0.3s;
  z-index: 1000;
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
}

#backToTop.show {
  opacity: 1;
  visibility: visible;
}

#backToTop:hover {
  background-color: #8BB68F;
}

