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

body {
  font-family: 'Georgia', 'Times New Roman', serif;
  background-color: #f5f0eb;
  color: #2c3e50;
  line-height: 1.6;
  padding-top: 80px; /* valikon korkeus */
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

/* ===== NAVIGAATIO ===== */
#topbar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  z-index: 9999;
  background: #1a2a3a;
  box-shadow: 0 2px 10px rgba(0,0,0,0.2);
  transition: transform 0.3s ease;
  padding: 1rem 0;
}

#topbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.logo {
  color: #e8d5b8;
  font-size: 1.8rem;
  font-weight: bold;
  text-decoration: none;
  font-family: 'Times New Roman', serif;
}

.nav-menu {
  display: flex;
  list-style: none;
  gap: 1.5rem;
  flex-wrap: wrap;
}

.nav-menu a {
  color: #e8d5b8;
  text-decoration: none;
  font-size: 1.1rem;
  padding: 0.5rem 0;
  border-bottom: 2px solid transparent;
  transition: border-color 0.3s, color 0.3s;
}

.nav-menu a:hover,
.nav-menu a.active {
  border-bottom-color: #e8d5b8;
  color: #ffffff;
}

/* ===== PÄÄSISÄLTÖ ===== */
.main-content {
  background: #ffffff;
  padding: 2.5rem 2rem;
  margin: 2rem auto;
  border-radius: 8px;
  box-shadow: 0 4px 16px rgba(0,0,0,0.06);
}

h1 {
  font-size: 2.4rem;
  color: #1a2a3a;
  border-bottom: 4px solid #e8d5b8;
  padding-bottom: 0.5rem;
  margin-bottom: 1.5rem;
  font-family: 'Times New Roman', serif;
}

h2 {
  font-size: 1.6rem;
  color: #1a2a3a;
  margin-top: 2.5rem;
  margin-bottom: 1rem;
  padding-left: 0.5rem;
  border-left: 6px solid #b38b6d;
  font-family: 'Times New Roman', serif;
}

/* ===== ETUSIVUN KUVAPAIKKA ===== */
.hero-image {
  margin-bottom: 1.8rem;
}

.hero-image img {
  width: 100%;
  height: auto;
  object-fit: cover;
  object-position: top center;
  border-radius: 8px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.hero-image .kuvakommentti {
  font-size: 0.9rem;
  color: #7f8c8d;
  text-align: center;
  margin-top: 0.3rem;
  font-style: italic;
}

/* ===== PAINIKKEET ===== */
.btn {
  display: inline-block;
  background-color: #1a2a3a;
  color: #e8d5b8;
  padding: 0.8rem 2rem;
  border-radius: 4px;
  text-decoration: none;
  font-weight: bold;
  transition: background-color 0.3s, transform 0.1s;
  margin-top: 0.5rem;
  border: none;
  cursor: pointer;
}

.btn:hover {
  background-color: #2c4a5a;
  transform: scale(1.02);
}

/* ===== ALUSTUSLISTA (alustukset.html) ===== */
.alustus-lohko {
  padding: 0.8rem 0.5rem;
  border-bottom: 1px solid #eee;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1rem;
}

.alustus-lohko a:first-child {
  font-weight: 500;
  font-size: 1.05rem;
  color: #1a2a3a;
  text-decoration: none;
  flex: 1 1 100%;
}

.alustus-lohko a:first-child:hover {
  color: #b38b6d;
  text-decoration: underline;
}

.pdf, .doc, .odt {
  display: inline-block;
  padding: 0.2rem 0.8rem;
  border-radius: 4px;
  font-size: 0.8rem;
  font-weight: bold;
  text-decoration: none;
  color: #fff;
  transition: background 0.2s, transform 0.1s;
  letter-spacing: 0.5px;
  margin-right: 0.3rem;
}

.pdf {
  background-color: #c0392b;
}
.pdf:hover {
  background-color: #a93226;
  transform: scale(1.03);
}

.doc {
  background-color: #2980b9;
}
.doc:hover {
  background-color: #1f618d;
  transform: scale(1.03);
}

.odt {
  background-color: #27ae60;
}
.odt:hover {
  background-color: #1e8449;
  transform: scale(1.03);
}

/* ===== RESPONSIIVISUUS ===== */
@media (max-width: 768px) {
  #topbar .container {
    flex-direction: column;
    align-items: stretch;
  }

  .nav-menu {
    flex-direction: column;
    gap: 0.4rem;
    margin-top: 0.8rem;
  }

  .nav-menu a {
    display: block;
    padding: 0.4rem 0.8rem;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    border-bottom: none;
  }
  .nav-menu a:hover {
    background: rgba(255,255,255,0.15);
  }

  .main-content {
    padding: 1.5rem 1rem;
    margin: 1rem auto;
  }

  h1 {
    font-size: 1.8rem;
  }
  h2 {
    font-size: 1.3rem;
  }

  .alustus-lohko {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.3rem;
  }
  .alustus-lohko a:first-child {
    flex: 1 1 auto;
  }

  .hero-image img {
    max-height: 200px;
  }
}