/* --- YLEISSUOJAT: estä sivusuuntainen rullaus ja ylivuodot --- */
*,
*::before,
*::after {
  box-sizing: border-box;
}
html, body {
  max-width: 100%;
  overflow-x: hidden;
}
img, svg, video, canvas, iframe {
  max-width: 100%;
  height: auto;
  display: block;
}
/* Pitkien sanojen/URL:ien rivitys, jottei leviä yli näytön */
.hero, .search-area, .autocomplete-list, .faq, .site-footer, .cookie-banner {
  overflow-wrap: anywhere;
  word-break: break-word;
}
/* --- /YLEISSUOJAT --- */

body {
  font-family: 'Inter', sans-serif;
  margin: 0;
  padding: 0;
  background: #f9f6f2;
  color: #222;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 60vh;
  padding: 4rem 1rem 2rem 1rem;
  background: linear-gradient(110deg,#fff 0%,#fdf8f5 100%);
  width: 100%;
  max-width: 100vw; /* varmistus */
}

.hero h1 {
  font-size: clamp(2.2rem,6vw,3.2rem);
  font-weight: 700;
  margin: 0 0 1rem 0;
  text-align: center;
  letter-spacing: -1px;
}

.hero p {
  font-size: 1.2rem;
  max-width: 480px;
  margin: 0 auto 2rem auto;
  text-align: center;
  color: #444;
}

.search-area {
  display: flex;
  align-items: stretch;
  justify-content: center;
  width: 100%;
  max-width: min(460px, 100%);
  margin: 0 auto;
  border-radius: 32px;
  overflow: visible;
  background: #fff;
  border: 1.5px solid #e6e2dc;
  position: relative;
}

.search-area input[type="text"] {
  flex: 1;
  padding: 1.1rem 1.2rem;
  border: none;
  font-size: 1.05rem;
  background: #fff;
  outline: none;
  border-radius: 32px 0 0 32px;
  min-width: 0; /* estää sisällön venytyksen */
}

.search-area button {
  padding: 0 1.4rem;
  border: none;
  background: linear-gradient(90deg, #ff9b52, #f27a1c);
  color: #fff;
  font-size: 1.08rem;
  font-weight: 700;
  letter-spacing: .3px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 0.4rem;
  border-radius: 0 32px 32px 0;
  transition: background 0.18s, box-shadow 0.18s;
}

.search-area button svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.search-area button:hover {
  background: linear-gradient(90deg, #f27a1c, #ff9b52);
}

.autocomplete-list {
  position: absolute;
  left: 0; right: 0; top: 100%;
  background: #fff;
  border: 1px solid #ccc;
  z-index: 20;
  margin: 0;
  padding: 4px 0;
  list-style: none;
  border-radius: 0 0 16px 16px;
  box-shadow: 0 4px 12px rgba(0,0,0,0.05);
  display: none;
  max-height: 260px;
  overflow-y: auto;
  max-width: 100vw; /* varmistus */
}

.autocomplete-list li {
  padding: 8px 12px;
  cursor: pointer;
  font-size: 1.02rem;
  border-radius: 8px;
  transition: background .15s;
}

.autocomplete-list li:hover, .autocomplete-list li.active {
  background: #f5e9e0;
}

@media (max-width: 600px) {
  .search-area {
    flex-direction: row-reverse;
    padding: 0.3rem;
  }
  .search-area input[type="text"] {
    border-radius: 32px;
    padding-left: 1rem;
  }
  .search-area button {
    padding: 0.8rem;
    border-radius: 50%;
    background: linear-gradient(90deg, #ff9b52, #f27a1c);
    min-width: 48px;
    height: 48px;
    justify-content: center;
  }
  .search-area button span {
    display: none;
  }
}

.faq {
  max-width: 560px;
  margin: 28rem auto 15rem auto; /* SÄÄDÄ TÄSTÄ TILAA HAKUKENTÄN JA UKK:N VÄLIIN */
  background: #fff;
  border-radius: 22px;
  box-shadow: 0 2px 18px 0 rgba(44,53,66,0.06);
  padding: 2.2rem 1.7rem 1.6rem 1.7rem;
  width: 100%;
  max-width: min(560px, 100vw); /* varmistus */
}

.faq h2 {
  font-size: 1.2rem;
  margin: 0 0 1.5rem 0;
  font-weight: 700;
  color: #d86128;
  text-align: center;
}

.accordion {
  border-top: 1px solid #eee5da;
}

.accordion-item {
  margin-bottom: 0.8rem;
}

.accordion-header {
  cursor: pointer;
  padding: 1rem 0.2rem;
  font-size: 1.07rem;
  font-weight: 600;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: none;
  border: none;
  outline: none;
  color: #353535;
  transition: background 0.14s;
}

.accordion-header:hover {
  background: #f5e9e0;
}

.accordion-content {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.35s cubic-bezier(.63,0,.18,1);
  font-size: 0.98rem;
  color: #444;
  padding-left: 0.8rem;
}

.accordion-item.active .accordion-content {
  max-height: 120px;
  margin-bottom: 0.5rem;
  transition: max-height 0.44s cubic-bezier(.63,0,.18,1);
}

.accordion-item.active .accordion-header {
  background: #f5e9e0;
  color: #d86128;
}

.site-footer {
  width: 100%;
  text-align: center;
  background: #f1ede9;
  padding: 1.3rem 1rem 1rem 1rem;
  font-size: 0.98rem;
  color: #666;
  border-top: 1px solid #e5e1dd;
  letter-spacing: 0.02em;
  margin-top: auto;
  max-width: 100vw; /* varmistus */
}

.site-footer a {
  color: #d86128;
  margin-left: 8px;
  text-decoration: underline;
  font-weight: 600;
}

.cookie-banner {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  background-color: #fef6e4;
  border-top: 1px solid #ddd;
  padding: 6px 10px;
  font-size: 14px;
  display: none;
  z-index: 1000;
}

.cookie-banner p {
  margin: 0;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  gap: 8px; /* pieni väli elementtien väliin */
  flex-wrap: wrap; /* estää leviämisen */
}

.cookie-banner a {
  color: #0066cc;
  text-decoration: underline;
}

.cookie-btn {
  background-color: #ff7f32;
  color: #fff;
  border: none;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
}

.cookie-btn:hover {
  background-color: #e86f2b;
}

/* --- Hero-osion yläreuna mobiilissa --- */
@media (max-width: 600px) {
  .hero {
    min-height: auto !important;
    padding-top: 4.2rem !important;
    padding-bottom: 1.5rem !important;
    justify-content: flex-start !important;
  }

  .hero h1 {
    margin-top: 0 !important;
    font-size: clamp(1.8rem, 6vw, 2.4rem);
    line-height: 1.2;
  }

  .hero p {
    margin-top: 0.4rem !important;
    margin-bottom: 1.2rem !important;
  }
}
/* Footer lukittuna vain mobiilissa */
@media (max-width: 600px) {
  footer,
  .site-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    z-index: 1000;

    background: #f1ede9;   /* sama tausta */
    border-top: 1px solid #e5e1dd;
  }

  main {
    padding-bottom: 70px; /* lisää tilaa footerin korkeuden verran */
  }
}
/* Vie eväste-banneri yläreunaan vain mobiilissa */
@media (max-width: 600px) {
  .cookie-banner {
    top: 0;
    bottom: auto;
    border-top: none;
    border-bottom: 1px solid #ddd;
    box-shadow: 0 2px 10px rgba(0,0,0,0.08);
  }
}

