*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

:root {
  --accent: #1565a8;
  --accent-hover: #0e4d8a;
  --blue-dark: #072e52;
  --blue-mid: #1565a8;
  --white: #fff;
  --light: #f4f6f9;
  --text: #1a1a1a;
}

body {
  font-family: 'Barlow', sans-serif;
  background: var(--white);
  color: var(--text);
}

/* ── NAV ── */
nav {
  background: var(--white);
  border-bottom: 2px solid var(--accent);
  padding: 0 2.5rem;
  height: 58px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}

.logo {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 1.55rem;
  font-weight: 700;
  color: var(--accent);
  letter-spacing: 1.5px;
  text-transform: uppercase;
  text-decoration: none;
}

.nav-links {
  display: flex;
  list-style: none;
  align-items: center;
  gap: 0.2rem;
}

.nav-links a {
  display: block;
  padding: 0.45rem 0.95rem;
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  letter-spacing: 0.02em;
  transition: color 0.18s;
}

.nav-links a:hover { color: var(--accent); }

.nav-cta {
  background: var(--accent) !important;
  color: var(--white) !important;
  /*border-radius: 3px;*/
  margin-left: 0.6rem;
  transition: background 0.18s !important;
}
.nav-cta:hover { background: var(--accent-hover) !important; }

/* ── HERO ── */
.hero {
  background: linear-gradient(135deg, #041e36 0%, #1565a8 60%, #1a7abf 100%);
  padding: 4.5rem 3rem;
  position: relative;
  overflow: hidden;
  min-height: 340px;
  display: flex;
  align-items: center;
}

.hero-inner {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.hero-content { max-width: 720px; }

.hero h1 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 3rem;
  font-weight: 700;
  color: var(--white);
  line-height: 1.08;
  letter-spacing: 0.3px;
  margin-bottom: 1.1rem;
}

.hero p {
  font-size: 0.95rem;
  color: rgba(255,255,255,0.8);
  line-height: 1.65;
  margin-bottom: 2rem;
  max-width: 420px;
}

.hero-btns {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero-ship {
  flex-shrink: 0;
  width: 260px;
  opacity: 0.95;
}

.btn-primary {
  background: var(--accent);
  color: var(--white);
  padding: 0.7rem 1.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: none;
  cursor: pointer;
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-block;
  transition: background 0.18s, transform 0.15s;
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-1px); }

.btn-secondary {
  background: transparent;
  color: var(--white);
  padding: 0.68rem 1.7rem;
  font-size: 0.9rem;
  font-weight: 600;
  border: 2px solid rgba(255,255,255,0.65);
  text-decoration: none;
  letter-spacing: 0.02em;
  display: inline-block;
  transition: border-color 0.18s, background 0.18s;
}
.btn-secondary:hover { border-color: white; background: rgba(255,255,255,0.1); }

.logo-item img {
  height: 40px;
  width: auto;
  object-fit: contain;
  display: block;
}

/* ── LOGO CAROUSEL ── */
.carousel-section {
  background: var(--white);
  padding: 2.2rem 0;
  border-bottom: 1px solid #e8edf3;
  overflow: hidden;
}

.carousel-track-wrapper {
  overflow: hidden;
  position: relative;
  mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 8%, black 92%, transparent 100%);
}

.carousel-track {
  display: flex;
  align-items: center;
  width: max-content;
  animation: scroll-logos 28s linear infinite;
}

.carousel-track:hover { animation-play-state: paused; }

@keyframes scroll-logos {
  0%   { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.logo-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 3rem;
  opacity: 0.65;
  transition: opacity 0.2s;
  white-space: nowrap;
  flex-shrink: 0;
}
.logo-item:hover { opacity: 1; }

.logo-kesko { font-family: 'Barlow Condensed', sans-serif; font-size: 2rem; font-weight: 700; color: #e31d1d; display: flex; align-items: center; gap: 0.3rem; }
.logo-kesko .k-box { width: 38px; height: 38px; background: #e31d1d; color: white; display: flex; align-items: center; justify-content: center; font-size: 1.4rem; font-weight: 900; border-radius: 3px; }
.logo-saarioinen { width: 42px; height: 42px; background: #c0392b; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: white; font-family: 'Barlow Condensed', sans-serif; font-weight: 700; font-size: 0.65rem; letter-spacing: 0.05em; text-align: center; }
.logo-novart { font-family: 'Barlow Condensed', sans-serif; font-size: 2rem; font-weight: 700; color: #1a1a2e; letter-spacing: -0.5px; }
.logo-johndeere { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo-johndeere .jd-icon { width: 36px; height: 36px; background: #367c2b; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.logo-johndeere .jd-icon svg { width: 22px; height: 22px; fill: #ffde00; }
.logo-johndeere span { font-size: 0.55rem; font-weight: 800; letter-spacing: 0.12em; color: #367c2b; text-transform: uppercase; }
.logo-upm { font-family: 'Barlow Condensed', sans-serif; font-size: 2.2rem; font-weight: 900; color: #003087; letter-spacing: 2px; }
.logo-agco { display: flex; flex-direction: column; align-items: center; gap: 2px; }
.logo-agco .agco-badge { width: 38px; height: 38px; background: #c0392b; clip-path: polygon(50% 0%, 100% 25%, 100% 75%, 50% 100%, 0% 75%, 0% 25%); display: flex; align-items: center; justify-content: center; color: white; font-size: 0.6rem; font-weight: 800; letter-spacing: 0.05em; }
.logo-agco span { font-size: 0.5rem; font-weight: 700; color: #555; letter-spacing: 0.1em; text-transform: uppercase; }
.logo-fortum { display: flex; align-items: center; gap: 0.4rem; font-family: 'Barlow Condensed', sans-serif; font-size: 1.6rem; font-weight: 700; color: #009ee0; letter-spacing: -0.3px; }
.logo-fortum .f-leaf { width: 22px; height: 22px; background: #009ee0; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); flex-shrink: 0; }

/* ── HAMBURGER ── */
.hamburger {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 38px;
  height: 38px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
  border-radius: 4px;
  transition: background 0.18s;
  z-index: 200;
}
.hamburger:hover { background: var(--light); }
.hamburger span { display: block; width: 100%; height: 2.5px; background: var(--accent); border-radius: 2px; transition: transform 0.3s, opacity 0.3s; transform-origin: center; }
.hamburger.open span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* ── MOBILE DRAWER ── */
.mobile-menu {
  display: none;
  position: fixed;
  top: 58px;
  left: 0; right: 0;
  background: var(--white);
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 150;
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.35s cubic-bezier(0.4,0,0.2,1);
}
.mobile-menu.open { max-height: 500px; }
.mobile-menu ul { list-style: none; padding: 0.5rem 0 1rem; }
.mobile-menu ul li a { display: flex; align-items: center; justify-content: space-between; padding: 0.85rem 1.5rem; font-size: 1rem; font-weight: 600; color: var(--text); text-decoration: none; border-bottom: 1px solid #f0f2f5; transition: background 0.15s, color 0.15s; }
.mobile-menu ul li a:hover { background: var(--light); color: var(--accent); }

.submenu { background: var(--light); overflow: hidden; max-height: 0; transition: max-height 0.3s cubic-bezier(0.4,0,0.2,1); }
.submenu.open { max-height: 300px; }
.submenu a { padding: 0.75rem 1.5rem 0.75rem 2.5rem !important; font-size: 0.9rem !important; font-weight: 500 !important; color: var(--text) !important; border-bottom: 1px solid #e8edf3 !important; display: flex !important; align-items: center !important; gap: 0.6rem !important; }
.submenu a::before {width: 6px; height: 6px; border-radius: 50%; background: var(--accent); flex-shrink: 0; }
.submenu a:hover { color: var(--accent) !important; }
.palvelut-toggle .arrow.rotated { transform: rotate(90deg); }

.mobile-cta { display: block; margin: 0.75rem 1.5rem 0.5rem; background: var(--accent); color: var(--white) !important; text-align: center; padding: 0.8rem 1.5rem !important; border-radius: 3px; font-weight: 700 !important; border-bottom: none !important; }
.mobile-cta:hover { background: var(--accent-hover) !important; color: var(--white) !important; }

/* ── SECTION HEADER (shared) ── */
.section-header {
  text-align: center;
  margin-bottom: 2.2rem;
}
.section-header .p-label {
  font-family: 'Barlow', sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #1565a8;
  display: block;
  margin-bottom: 0.4rem;
}
.section-header h2 {
  font-family: 'Barlow Condensed', sans-serif;
  font-size: 2rem;
  font-weight: 700;
  color: #072e52;
}
.section-header p {
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  color: #555;
  line-height: 1.6;
  margin-top: 0.6rem;
}

/* ── PALVELUMME ── */
.palvelut-section {
  background: #fff;
  padding: 6rem 2rem;
  border-top: 1px solid #e4eaf2;
}

.palvelut-grid {
  max-width: 1200px;
  margin: 0 auto;
  display: grid;
  column-gap: 2rem;
  grid-template-columns: repeat(3, 1fr);
  border-radius: 4px;
  overflow: hidden;
}

.p-card {
  padding: 2rem 1.8rem;
  border: 1px solid #dde4ef;
  border-top: 3px solid #1565a8;
  display: flex;
  flex-direction: column;
  transition: background 0.18s;
}
.p-card:hover { background: #f7f9fc; }

.p-card-top { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 1.2rem; }
.p-card-top svg { width: 36px; height: 36px; flex-shrink: 0; }
.p-card-top h3 { font-family: 'Barlow Condensed', sans-serif; font-size: 2rem; font-weight: 700; color: #1565a8; }
.p-card p { font-family: 'Barlow', sans-serif; font-size: 1.075rem; line-height: 1.7; color: #444; flex-grow: 1; margin-bottom: 1.6rem; }
.p-card a { font-family: 'Barlow', sans-serif; font-size: 0.975rem; font-weight: 600; color: #1565a8; text-decoration: none; align-self: flex-start; }
.p-card a::after { content: ' →'; }
.p-card a:hover { text-decoration: underline; }

/*LUOTETTAVA KUMPPANI */
.luotettava-section { padding-top: 6rem; padding-bottom: 6rem; }

.luotettava-wrap { max-width: 800px; margin: 0 auto; padding: 20px; }

.luotettava-wrap h2 { font-family: 'Barlow Condensed', sans-serif; font-size: 2rem; font-weight: 700; color: #1565a8; margin-top: 2rem; margin-bottom: 0.5rem; }
.luotettava-wrap p { font-family: 'Barlow', sans-serif; font-size: 1.075rem; line-height: 1.7; color: #444; margin-bottom: 1.5rem; }

/* PALAUTE*/
.palaute-section { background: #fff; padding: 6rem 2rem; }

.palaute-grid { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2rem; }

.palaute-card { background: #f4f6f9; border-radius: 4px; padding: 2rem 1.8rem 1.5rem; display: flex; flex-direction: column; border-bottom: 3px solid #1565a8; min-height: 280px; }
.palaute-card p { font-family: 'Barlow', sans-serif; font-size: 1.075rem; line-height: 1.7; color: #333; font-style: italic; flex-grow: 1; margin-bottom: 2rem; }
.palaute-card .author { font-family: 'Barlow', sans-serif; font-size: 0.975rem; font-weight: 600; font-style: italic; color: #1565a8; }

/*YHTEYSTIEDOT*/
.yhteystiedot-section { background: #fff; padding: 6rem 2rem; }

.yhteystiedot-grid { max-width: 800px; margin: 0 auto; display: grid; grid-template-columns: 1fr 1fr; row-gap: 1.8rem; column-gap: 2rem; }

.yhteys-item { display: flex; align-items: center; gap: 1.2rem; }
.yhteys-icon { width: 52px; height: 52px; flex-shrink: 0; background: #e8f0fb; border-radius: 50%; display: flex; align-items: center; justify-content: center; }
.yhteys-icon svg { width: 26px; height: 26px; fill: #1565a8; }
.yhteys-item span { font-family: 'Barlow', sans-serif; font-size: 1.2rem; font-weight: 600; color: #1a1a1a; }
.yhteys-item.full { grid-column: 1 / -1; }


/* ── TEKSTI-OSIO ── */
.teksti-wrap {
  max-width: 760px;       /* rajoittaa rivin leveyden luettavaksi */
  margin: 0 auto;         /* keskittää tekstilohkon sivulle */
  text-align: left;       /* teksti vasemmalle */
  padding: 1rem 1.5rem;   /* tilaa reunojen ympärille */
  display: flex;
  flex-direction: column;
  gap: 1.6rem;            /* tilaa kappaleiden ja lohkojen väliin */
}

.teksti-wrap p {
  font-size: 1.075rem;
  line-height: 1.75;       /* hieman suurempi riviväli */
  color: #444;
  margin-bottom: 1.6rem;   /* tilaa kappaleiden väliin */
}

.teksti-wrap h2 {
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--accent);
  margin-top: 2.5rem;
  margin-bottom: 1rem;
}

.teksti-wrap h3 {
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--blue-dark);
  margin-top: 1.8rem;
  margin-bottom: 0.8rem;
}

.teksti-wrap ul {
  margin-left: 1.6rem;
  margin-bottom: 1.6rem;
  line-height: 1.75;
  list-style-type: disc;
}

.teksti-wrap li {
  margin-bottom: 0.6rem;
}

/* ── KOULUTUSLOHKOT ── */
.koulutus-wrap h3 {
  padding-top: 0.5rem;
  padding-bottom: 0.5rem;
  margin-bottom: 0.5rem;  
}

.koulutus-wrap p {
  margin-top: 0;          
  margin-bottom: 1rem;    
  line-height: 1.6;
}

.koulutus-wrap ul {
  padding-left: 1.2rem;
  margin-top: 0.5rem;     /* hieman vähemmän tilaa p:n jälkeen */
  margin-bottom: 1.5rem;
}


/* MOBILE */
@media (max-width: 700px) {
  nav { padding: 0 1rem; }
  .nav-links { display: none; }
  .hamburger { display: flex; }
  .mobile-menu { display: block; }
  

  .hero { padding: 3rem 1.5rem; min-height: auto; }
  .hero-inner { flex-direction: column; align-items: flex-start; gap: 1.5rem; }
  .hero h1 { font-size: 2.1rem; }
  .hero p { max-width: 100%; }
  .hero-ship { width: 180px; align-self: center; }
  .hero-btns { width: 100%; }
  .btn-primary, .btn-secondary { flex: 1; text-align: center; padding: 0.75rem 1rem; }

  .palvelut-grid { grid-template-columns: 1fr; row-gap: 2rem; }
  .p-card { border-right: none; }

  .palaute-grid { grid-template-columns: 1fr; }

  .yhteystiedot-grid { grid-template-columns: 1fr; }
  .yhteys-item.full { grid-column: 1; }
}

/* ── FOOTER ── */
.site-footer {
  background: #1565a8;
  padding: 1.2rem 2rem;
  text-align: center;
}

.site-footer p {
  font-family: 'Barlow', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: #fff;
}


 /* Language switcher */
.lang-switcher {
  display: flex;
  align-items: center;
  gap: 0;
  border: 1.5px solid #d0d8e8;
  border-radius: 4px;
  overflow: hidden;
  margin-left: 0.5rem;
}
.lang-switcher a {
  padding: 0.3rem 0.6rem;
  font-size: 0.78rem;
  font-weight: 700;
  font-family: 'Barlow Condensed', sans-serif;
  letter-spacing: 0.04em;
  text-decoration: none;
  color: #555;
  background: transparent;
  transition: background 0.15s, color 0.15s;
  line-height: 1;
}
.lang-switcher a.active {
  background: #1565a8;
  color: #fff;
}
.lang-switcher a:not(.active):hover {
  background: #f0f4fa;
  color: #1565a8;
}
.lang-divider {
  width: 1px;
  height: 1.2em;
  background: #d0d8e8;
  align-self: center;
}