/* ============================================
   1. MUUTTUJAT & PERUSASETUKSET
   ============================================ */
:root {
  --primary-blue: #003366;
  --primary-blue-light: #005599;
  --primary-blue-dark: #001f3f;
  --primary-green: #28a745;
  --primary-green-dark: #218838;
  --accent-orange: #e65c00;
  --text-dark: #222;
  --text-light: #fff;
  --text-muted: #555;
  --bg-light: #fafafa;
  --bg-very-light: #fdfdfd;
  --border-light: #eee;
  
  --max-width: 1100px;
  --spacing-xl: 2rem;
  --spacing-2xl: 3rem;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  line-height: 1.6;
  color: var(--text-dark);
  background: var(--text-light);
  -webkit-font-smoothing: antialiased;
}

section[id] {
  scroll-margin-top: 170px; 
}

/* ============================================
   2. HEADER & NAVIGAATIO (Desktop)
   ============================================ */

header {
  position: sticky;
  top: 5px;
  z-index: 1000;
  background: transparent;
  display: flex;
  align-items: center;
  height: 80px;
  margin-bottom: 1.5rem;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

header.scrolled {
  top: 0;
  height: 70px;
  align-items: flex-start; 
}

.header-container {
  max-width: 1200px;
  width: 95%;
  margin: 0 auto;
  background: var(--primary-blue);
  padding: 0.8rem 2.5rem; 
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-radius: 50px;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
  transition: all 0.4s ease;
  gap: 1rem;
}

header.scrolled .header-container {
  width: 96%;
  border-radius: 0 0 25px 25px;
  padding: 0.5rem 2rem;
  box-shadow: 0 2px 15px rgba(0, 0, 0, 0.3);
}

/* Logo & Navigaatio linkit */
.logo-link, .floating-logo {
  display: flex;
  flex-direction: column; /* Tämä pakottaa tekstit päällekkäin */
  align-items: flex-start; /* Pitää tekstit vasemmassa reunassa */
  align-items: center;
  transition: opacity 0.3s ease, transform 0.3s ease;
}

header.scrolled .logo-link, 
header.scrolled .floating-logo {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-15px);
  pointer-events: none;
}

nav {
  display: flex;
  gap: 2rem;
  align-items: center;
}

nav a {
  color: var(--text-light);
  text-decoration: none;
  font-weight: 500;
  position: relative;
  padding-bottom: 5px;
  transition: color 0.3s ease;
}

nav a::after {
  content: '';
  position: absolute;
  width: 0; height: 2px;
  bottom: 0; left: 0;
  background-color: var(--accent-orange);
  transition: width 0.3s ease;
}

nav a:hover::after, nav a.active::after { width: 100%; }
nav a.active { color: var(--accent-orange); }

/* Kielivalinta */
.lang-switch { display: flex; gap: 1.2rem; align-items: center; }
.lang-link {
  font-size: 1.6rem;
  text-decoration: none;
  opacity: 0.75;
  transition: all 0.3s ease;
}
.lang-link:hover { opacity: 1; transform: scale(1.15); }
.lang-link.active { opacity: 1; pointer-events: none; }
.nav-lang { display: none; }

/* ============================================
   3. MOBIILI-NAVIGAATIO & BURGER
   ============================================ */

.burger {
  display: none;
  background: none;
  border: none;
  color: var(--text-light);
  font-size: 2.5rem;
  cursor: pointer;
  padding: 0.5rem;
}

@media (max-width: 768px) {
  header {
    top: 0;
    height: 70px;
    padding: 0;
    margin-bottom: 1rem;
  }

  header.scrolled {
    height: 60px;
  }

  .header-container {
    width: 95%;
    padding: 0.5rem 1.2rem;
    flex-direction: row;
    justify-content: space-between;
    border-radius: 20px;
    margin-top: 5px;
  }

  header.scrolled .header-container {
    width: 100%;
    height: 50px;
    margin-top: 0;
    border-radius: 0 0 15px 15px;
    padding: 0 1rem;
  }

  .logo-link { margin-top: -2px; }
  .burger { 
    display: block; 
    margin-top: 3px; 
    font-size: 2.2rem;
  }
  header.scrolled .burger { font-size: 1.8rem; margin-top: 0; }

  nav {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%; left: 0; width: 100%;
    background: #002244;
    padding: 1.5rem 2rem;
    box-shadow: 0 10px 20px rgba(0,0,0,0.4);
    z-index: 99;
    gap: 1.5rem;
  }

  nav.open { display: flex; }
  .desktop-lang { display: none; }
  .nav-lang {
    display: flex;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    justify-content: center;
  }
}

/* ============================================
   4. SISÄLTÖALUEET (Hero, Prosessi, UKK jne.)
   ============================================ */

main {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: var(--spacing-2xl) var(--spacing-xl);
}

h1, h2 { color: var(--primary-blue); }
h1 { margin-bottom: 1.5rem; }
h2 { margin: 2rem 0 1rem; }
p { margin-bottom: 1.2rem; }

/* Napit */
.cta-button, .small-cta-button {
  display: inline-block;
  text-decoration: none;
  border-radius: 8px;
  transition: all 0.3s ease;
  box-shadow: 0 3px 10px rgba(0,0,0,0.15);
  cursor: pointer;
  font-weight: bold;
}

.cta-button { padding: 1rem 2.5rem; font-size: 1.2rem; background: var(--primary-blue); color: #fff; }
.cta-button.primary { background: var(--primary-green); }
.cta-button:hover { transform: translateY(-3px); box-shadow: 0 6px 15px rgba(0,0,0,0.25); background: var(--primary-blue-light); }
.cta-button.primary:hover { background: var(--primary-green-dark); }

.small-cta-button {
  padding: 0.5rem 1.4rem;
  background: var(--primary-blue);
  color: #fff;
  font-size: 0.95rem;
  border-radius: 6px;
}
.small-cta-button:hover { background: var(--primary-blue-light); transform: translateY(-1px); }

/* Gridit & Listat */
.toteutukset-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1rem 0;
}
.toteutus {
  text-align: center; background: #fafafa; padding: 0.5rem; border-radius: 4px; transition: transform 0.2s;
}
.toteutus:hover { transform: translateY(-5px); }

.toteutus-kuvat {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.25rem;
}
.toteutus-kuvat img { width: 100%; border-radius: 6px; transition: transform 0.2s; }
.toteutus-kuvat img:hover { transform: scale(1.05); }

ul { padding-left: 1.5rem; list-style: none; margin-bottom: 1.5rem; }
ul li { position: relative; padding-left: 1.8rem; margin-bottom: 0.8rem; }
ul li::before {
  content: ""; position: absolute; left: -0.2rem; top: 0.65em;
  width: 8px; height: 8px; background: var(--primary-blue); border-radius: 50%;
}

/* Prosessi-osio */
.prosess-section { padding: 4rem 0; text-align: center; }
.step-container { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }
.step { padding: 2rem; background: #fafafa; border-radius: 12px; transition: transform 0.3s ease; }
.step:hover { transform: translateY(-5px); background: #fff; }
.step-number {
  width: 50px; height: 50px; background: var(--primary-blue); color: white;
  border-radius: 50%; display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem; font-weight: bold; margin: 0 auto 1.5rem;
}

/* UKK / FAQ */
.faq-section { max-width: 800px; margin: 3rem auto; }
.faq-item { background: #f9f9f9; border-radius: 8px; margin-bottom: 1rem; border: 1px solid #eee; overflow: hidden; }
.faq-item[open] { border-color: var(--primary-blue); background: #fff; }
summary { padding: 1.2rem; font-weight: 700; cursor: pointer; list-style: none; display: flex; justify-content: space-between; color: var(--primary-blue); }
summary::after { content: '+'; font-size: 1.5rem; transition: transform 0.3s; }
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-content { padding: 0 1.2rem 1.2rem; color: #555; }

/* Footer & Map */
.map-container { border-radius: 8px; overflow: hidden; margin: 2rem 0; }
.map-container iframe { width: 100%; height: 400px; border: 0; }
footer { background: var(--primary-blue); color: #fff; padding: var(--spacing-xl); text-align: center; margin-top: 4rem; }
footer a { color: #a8c0ff; text-decoration: none; }

/* ============================================
   5. LOPUT MOBIILI-SÄÄDÖT
   ============================================ */
@media (max-width: 768px) {
  main { padding: 1.5rem 1rem; }
  .toteutukset-grid, .toteutus-kuvat, .step-container { grid-template-columns: 1fr; }
  .toteutus-kuvat { grid-template-columns: repeat(2, 1fr); }
  .map-container iframe { height: 300px; }
  .muki-cta-group { flex-direction: column; gap: 1rem; }
}
@media (max-width: 480px) {
  .toteutus-kuvat { grid-template-columns: 1fr; }
}