/* --------------------
   RESET
-------------------- */
* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: "Inter", sans-serif;
  font-size: clamp(1rem, 1.2vw, 1.125rem);
  color: #000;
  background: rgb(226, 228, 229);
  line-height: 1.2;
}

img {
  max-width: 100%;
  height: auto;
  display: block;
}

a {
  text-decoration: none;
  color: inherit;
}

body.home .site-header {
  margin-bottom: 0rem;
}

li {
  list-style-type: none;
}

/* --------------------
   TYPOGRAFIA
-------------------- */
h1,
h2,
h3 {
  font-family: "Poppins", sans-serif;
}

h1 {
  font-size: 2.5rem;
}
h2 {
  font-size: 1.8rem;
}
h3 {
  font-size: 1.2rem;
}

/* --------------------
   YLEISET RAKENTEET
-------------------- */
.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

section {
  padding: 3rem 0;
}

/* =========================
   HEADER & NAVIGAATIO
========================= */

.site-header {
  background-image: url("images/turkkilevy.jpg");
  background-size: cover;
  background-position: center;
  position: sticky;
  top: 0;
  z-index: 1000;
  border-top: 1px solid #000;
  border-bottom: 1px solid #000;
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 0;
}

/* Logo */
.logo {
  height: 55px;
}

/* Hamburger button */
.nav-toggle {
  display: none;
  flex-direction: column;
  cursor: pointer;
  gap: 5px;
}

.nav-toggle span {
  width: 26px;
  height: 3px;
  background: #000;
  transition: 0.3s;
}

/* Nav links */
.main-nav {
  display: flex;
}

.main-nav ul {
  display: flex;
  gap: 1.5rem;
}

.main-nav a {
  font-family: "Poppins", sans-serif;
  font-weight: 600;
  font-size: 1.1rem;
  position: relative;
  padding-bottom: 4px;
}

/* Hover underline */
.main-nav a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 0;
  height: 2px;
  background: #000;
  transition: width 0.3s;
}

.main-nav a:hover::after {
  width: 100%;
}

/* --------------------
   HERO
-------------------- */
.hero {
  position: relative;
  background-color: #fff;

  /* Taustakuva */
  background-image: url("images/paja_ulkoa.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  /* Korkeus -> täyttää alueen ja antaa tilaa */
  min-height: 420px;

  /* sisätilaa, ettei sisältö ole kiinni reunoissa */
  padding: 4rem 0;
}

.hero-content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-start;
  align-items: center;
}

.hero-card {
  background: rgba(255, 255, 255, 0.7);
  padding: 2rem 2rem;
  border-radius: 10px;
  max-width: 460px;
  width: 100%;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.25);
  backdrop-filter: blur(6px);
  text-align: center;
}

.hero-title {
  text-align: center;
  margin: 0;
}

.hero-title > span {
  display: block;
  font-size: clamp(1.5rem, 5vw, 2.5rem);
}

.hero-logos {
  display: flex;
  justify-content: center;
  align-items: flex-end; /* tärkeä → alareunat tasan*/
  gap: 1.5rem;
  margin-bottom: 1.5rem;
}

.hero-logo {
  width: 100%;
  height: auto;
}

.hero-logo.honda {
  max-width: 55%; /* hieman suurempi */
}

.hero-logo.polaris {
  max-width: 45%;
}

/* --------------------
   PALVELUKORTIT
-------------------- */
.service-cards {
  background: rgb(226, 228, 229);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(380px, 1fr));
  gap: 1.5rem;
  align-items: stretch; /* tärkeä */
  background: rgb(226, 228, 229);
  margin-top: 1rem;
}

.card {
  display: flex;
  flex-wrap: wrap;
  flex-direction: column;
  padding: 2rem;
  border-radius: 10px;
  background: #ffffff;
  border: 1.5px solid #000;
  color: inherit;
  position: relative;
  transition:
    transform 0.5s ease,
    box-shadow 0.5s ease;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.card-header {
  margin-bottom: 0;
}

.card-header h3 {
  font-size: 1.25rem;
  margin: 0;
}

.card p {
  margin: 0;
  font-size: 0.95rem;
  line-height: 1.5;
  color: #555;
}

.card-logo {
  position: absolute;
  bottom: 4rem;
  right: 1rem;
  width: clamp(6rem, 45%, 12rem);
  max-width: 50%;
  height: auto;
  object-fit: contain;
}

.card-logo.honda {
  transform: scale(1.2);
  right: 2rem;
}

.card-logo.aprilia {
 
  bottom: 4rem;
  right: 1rem;
  max-width: 15%;
}

/* Ylempi logo */
.card-logo.honda_crash {
  max-width: 35%;
  height: auto;
  bottom: 4rem;
}

/* Alempi logo */
.card-logo.polaris_crash {
  max-width: 23%;
  height: auto;
  bottom: 2.5rem;
}

/* --------------------
   HINNASTO
-------------------- */

.image-table-section {
  position: relative;

  /* koko sivun levyinen kuva taustaksi */
  background-image: url("images/paja_sisalta.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  padding: 6rem 0;
}

.image-table-section p {
  font-size: 1.2rem;
}

/* itse "taulukko" */
.image-table {
  max-width: 600px; /* <-- tämä tekee kapeammaksi */
  margin: 0 auto; /* keskelle */
  padding: 1rem 2.5rem;

  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2.5rem;

  background: rgba(255, 255, 255, 0.7);
}

.image-table .col p {
  margin: 0.7rem 0;
  font-family: "Inter", sans-serif;
  line-height: 1.6;
}

.narrow-block {
  max-width: 600px;
  margin: 0 auto;
}
.below-white {
  max-width: 600px;
  margin: 0 auto;
  padding: 1rem 2.5rem;
  background: rgba(255, 255, 255, 0.7);
  line-height: 2;
}
.below-white span {
  display: block;
}

/* --------------------
   SISÄLTÖSIVUJA
-------------------- */
.simple {
  background: #fff;
  line-height: 1.6;
  text-align: center;
}

.simple h2 span,
.simple h3 span {
  display: block; /* pakottaa jokaisen spanin omalle riville */
}

/* H2: isompi ja väljempi */
.simple h2 {
  margin: 0;
  line-height: 1.25; /* väljempi riviväli */
}

/* H3: lista-tyylinen, väljempi */
.simple h3 {
  margin-top: 1.5rem;
  line-height: 1.5;
}

/* palvelukortit */
.three-cards {
  padding: 4rem 0;
  background: #fff;
}

.three-cards h2 {
  font-family: "Poppins", sans-serif;
  margin-bottom: 2rem;
}

.cards-3 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 2rem;
}

.info-card {
  background: #fff;
  border: 1px solid #ddd;
  padding: 1rem;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.08);
}

.info-card h3 {
  margin: 1rem 0;
  font-family: "Poppins", sans-serif;
}

.info-card p {
  margin-bottom: 0;
  line-height: 1.6;
  font-family: "Inter", sans-serif;
}

.info-card img {
  width: 100%;
  aspect-ratio: 4 / 3; /* kaikki kuvat samaan suhteeseen */
  object-fit: cover; /* rajaa kuvan siististi */
  display: block;
  margin-left: auto;
  margin-right: auto;
}

.two-cards {
  padding: 2rem 0;
  background: #fff;
  text-align: center;
}

.two-cards h2 {
  font-family: "Poppins", sans-serif;
  margin-bottom: 2rem;
}

.cards-2 {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 2rem;
  text-align: center;
}

/* --------------------
  APRILIARACING
-------------------- */

.april-page {
  padding: 4rem 0;
  background: #fff;
}

/* Ylälogo keskelle */
.april-top-logo {
  text-align: center;
  margin-bottom: 2.5rem;
}

.april-top-logo img {
  max-width: 260px;
  width: 100%;
  height: auto;
  display: inline-block;
}

/* Vaakakuva keskelle */
.april-wide {
  max-width: 600px;
  margin: 0 auto 2.5rem auto;
}

.april-wide img {
  width: 100%;
  height: auto;
  display: block;

  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
}

/* Copy kuvan alle vasemmalle pienellä */
.april-credit {
  margin-top: 0.3rem;
  font-size: 0.85rem;
  opacity: 0.75;
  text-align: left;
}

/* Pystykuvat vierekkäin */
.april-portraits {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 2rem;

  margin: 0 auto 1.8rem auto;
}

.april-portraits img {
  width: 100%;
  max-width: 360px;
  height: auto;
  display: block;

  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.18);
}

/* Alalogo keskelle */
.april-bottom-logo {
  text-align: center;
  margin-bottom: 2.2rem;
}

.april-bottom-logo img {
  max-width: 320px;
  width: 100%;
  height: auto;
  display: inline-block;
}

/* -------------------- 
JAETUT SIVUT HONDA JA POLARIS
-------------------- */
.split {
  display: flex;
  align-items: stretch; /* tärkeä */
  min-height: 600px; /* tekee alueelle korkeuden */
  background: #fff;
  margin: 0;
  padding: 0;
}

.split-right {
  flex: 1;
}
/* vasen */
.split-left {
  flex: 1;
  padding: 4rem;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.logo-link img {
  height: 300px; /* logo hallittu */
  width: auto;
  display: block;
  margin: auto;
  padding-top: 4rem;
}

.logo-link-smaller img {
  height: 200px; /* logo hallittu */
  width: auto;
  display: block;
  margin: auto;
  padding-top: 4rem;
}

.split-right img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.split-left span,
.split-left h2 {
  padding-bottom: 1rem;
}

/* --------------------
  KOLARIKORJAUKSET
-------------------- */
.split-crash {
  position: relative;
  overflow: hidden;
  padding: 8rem 0;
}

.crash_bg_images {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  z-index: 1;
}

.bg {
  background-size: cover;
  background-position: center;
}

.bg1 {
  background-image: url("images/Kolari.jpg");
}
.bg2 {
  background-image: url("images/Kolari3.jpg");
}
.bg3 {
  background-image: url("images/Kolari2.jpg");
}

.crash_content {
  position: relative;
  z-index: 2;
  text-align: center;
  max-width: 45%; /* <-- tämä tekee kapeammaksi */
  margin: 0 auto; /* keskelle */
  background: rgba(255, 255, 255, 0.7);
  padding: 2rem 2.5rem;
}

.crash_content h2,
.crash_content h3 {
  line-height: 1.6;
}

/* --------------------
  YHTEYSTIETOSIVU
-------------------- */

.contact-map {
  padding: 3rem 0;
  background: #fff;
}

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}

.contact-text h2 {
  margin-top: 0;
  font-family: "Poppins", sans-serif;
}

.contact-text p {
  line-height: 1.7;
}

.map-embed iframe {
  width: 100%;
  height: 340px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.15);
}

.contact-card {
  background: rgb(226, 228, 229);
  width: 90%;
  border: 1px solid #ddd;
  padding: 1rem;
  text-align: center;
}

.contact-card img {
  margin-bottom: 1rem;
}

.contact-card p {
  margin: 0;
}

.contact-card a:hover {
  color: #fff;
}

/* --------------------
   FOOTER
-------------------- */
footer {
  background: rgb(191, 191, 192);
  color: #000;
  padding-top: 2rem;
  text-align: center;
}

footer p {
  margin-bottom: 0.5rem;
}

.copy {
  background: rgb(65, 65, 65);
  color: #fff;
  padding: 0.5rem;
  font-size: 0.75rem;
  text-align: center;
  margin-top: 0rem;
}
.copy p {
  margin: 0;
}

.contacts {
  margin-bottom: 2rem;
}

.contacts a:hover {
  color: #fff;
}

/* =========================
   MOBIILI
========================= */
@media (max-width: 900px) {
  /* Hamburger näkyviin */
  .nav-toggle {
    display: flex;
  }

  /* Piilotetaan valikko oletuksena */
  .main-nav {
    position: absolute;
    top: 100%;
    right: 0;
    background: #fff;
    width: 100%;
    flex-direction: column;
    align-items: center;
    display: none;
    padding: 1.5rem 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
  }

  .main-nav ul {
    flex-direction: column;
    gap: 1.2rem;
  }

  .main-nav.active {
    display: flex;
  }
  
  .nav {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  /* HERO pienempi mobiilissa */
  .hero {
    padding: 4rem 1rem;
    min-height: auto;
  }

  /* Palvelukortit */
  .cards {
    grid-template-columns: 1fr;
  }

  .cards-3 {
    grid-template-columns: 1fr;
  }

  .cards-2 {
    grid-template-columns: 1fr;
  }

  /* Split layout */
  .split {
    flex-direction: column;
  }

  .split-left {
    padding: 2rem;
  }

  /* Contact */
  .contact-grid {
    grid-template-columns: 1fr;
  }

  /* Crash */
  .crash_content {
    max-width: 90%;
  }

  /* Aprilia portraits stack */
  .april-portraits {
    flex-direction: column;
    align-items: center;
  }
  
  
  .logo {
    height: 40px;
  }
  
   .card {
    position: relative;
    padding-right: 130px; /* tilaa logolle oikealle */
  }

  .card-logo,
  .card-logo.honda,
  .card-logo.aprilia
   {
    position: absolute;
    top: 1.5rem;   /* 👈 säätö tästä */
    bottom: auto;
    right: 1rem;
    transform: none;

    width: 130px;
    max-width: 40%;
  }
  
  .card.honda-crash {
    padding-right: 130px;
  }

  .card-logo.honda_crash {
    position: absolute;
    top: 1.2rem;
    right: 1rem;
    width: 95px;
  }

  .card-logo.polaris_crash {
    position: absolute;
    top: 3rem;   /* 👈 siirtää alemmas */
    right: 1rem;
    width: 90px;
  }

}
