/* Õnnela ühine päis ja jalus Tilda lehtedel (sama välimus mis pealeht.css-is).
   Kõik reeglid on .pais / .jalus all, et Tilda plokke mitte puutuda. */
:root {
  --kuld: #e6b850;
  --kuld-tume: #8f6f24;
  --kuld-hover: #d9a93c;
  --tint: #1d1a16;
  --joon: #e9e3d6;
  --valge: #ffffff;
  --kiri: 'TildaSans', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html { scroll-padding-top: 90px; }

.pais, .pais *, .pais *::before, .pais *::after,
.jalus, .jalus * { box-sizing: border-box; }

.pais {
  position: sticky; top: 0; z-index: 9990;
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--joon);
  font-family: var(--kiri); font-size: 17px; line-height: 1.6; color: var(--tint);
  -webkit-font-smoothing: antialiased;
}
.pais a { color: inherit; }
.pais img { max-width: 100%; display: block; }
.pais :focus-visible, .jalus :focus-visible { outline: 3px solid var(--kuld-tume); outline-offset: 3px; border-radius: 4px; }
.pais .visuaalselt-peidus {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.pais__sisu {
  max-width: 1440px; margin: 0 auto;
  display: flex; align-items: center; gap: 2rem;
  padding: .7rem clamp(1rem, 3vw, 3rem);
}
.pais .logo { display: block; flex-shrink: 0; }
.pais .logo img { width: 150px; height: auto; }

.pais .menyy { display: flex; align-items: center; flex: 1; gap: 2rem; }
.pais .menyy__lingid {
  list-style: none; margin: 0 auto; padding: 0;
  display: flex; gap: clamp(1rem, 2vw, 2.2rem);
}
.pais .menyy__lingid li { margin: 0; padding: 0; }
.pais .menyy__lingid a {
  text-decoration: none; font-size: .95rem; font-weight: 600; white-space: nowrap;
}
.pais .menyy__lingid a:hover { color: var(--kuld-tume); }
.pais .menyy__lingid a[aria-current="page"] { color: var(--kuld-tume); text-decoration: underline; text-decoration-color: var(--kuld); text-underline-offset: 6px; }

.pais .menyy__lisa { display: flex; align-items: center; gap: .6rem; }
.pais .ikoon {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--kuld-tume);
  display: grid; place-items: center;
}
.pais .ikoon svg { width: 18px; height: 18px; fill: var(--valge); }
.pais .ikoon:hover { background: var(--tint); }
.pais .nupp {
  display: inline-block; margin-left: 1rem;
  background: var(--kuld); color: var(--tint);
  font-family: inherit; font-size: .95rem; font-weight: 600; line-height: 1.6;
  text-decoration: none;
  padding: .55rem 1.4rem;
  border: 2px solid var(--kuld); border-radius: 12px;
  transition: background-color .2s, border-color .2s;
}
.pais .nupp:hover { background: var(--kuld-hover); border-color: var(--kuld-hover); }
.pais .keeled { display: flex; gap: 1rem; margin-left: 1rem; font-size: .9rem; font-weight: 600; }
.pais .keeled a { text-decoration: none; }

.pais .menyy-nupp {
  display: none; margin-left: auto;
  width: 44px; height: 44px; border: 0; background: none; cursor: pointer; padding: 0;
  position: relative;
}
.pais .menyy-nupp__joon,
.pais .menyy-nupp__joon::before,
.pais .menyy-nupp__joon::after {
  position: absolute; left: 10px; width: 24px; height: 2px; background: var(--kuld-tume);
  transition: transform .2s, opacity .2s;
}
.pais .menyy-nupp__joon { top: 21px; }
.pais .menyy-nupp__joon::before { content: ''; left: 0; top: -7px; }
.pais .menyy-nupp__joon::after { content: ''; left: 0; top: 7px; }
.pais .menyy-nupp[aria-expanded="true"] .menyy-nupp__joon { background: transparent; }
.pais .menyy-nupp[aria-expanded="true"] .menyy-nupp__joon::before { transform: translateY(7px) rotate(45deg); }
.pais .menyy-nupp[aria-expanded="true"] .menyy-nupp__joon::after { transform: translateY(-7px) rotate(-45deg); }

.jalus {
  background: var(--tint); color: rgba(255, 255, 255, .75);
  padding: 2.5rem clamp(1rem, 3vw, 2rem);
  text-align: center; font-family: var(--kiri); font-size: .92rem; line-height: 1.6;
}
.jalus nav { display: flex; flex-wrap: wrap; justify-content: center; gap: .6rem 2rem; margin-bottom: 1.2rem; }
.jalus p { margin: 0; }
.jalus p + p { margin-top: .4rem; }
.jalus a { color: var(--valge); text-decoration: none; }
.jalus a:hover { color: var(--kuld); }

@media (max-width: 1180px) {
  .pais .menyy-nupp { display: block; }
  .pais .menyy {
    display: none;
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--valge); border-bottom: 1px solid var(--joon);
    flex-direction: column; align-items: stretch; gap: 1.2rem;
    padding: 1.2rem clamp(1rem, 3vw, 3rem) 1.8rem;
    box-shadow: 0 20px 30px -20px rgba(0, 0, 0, .2);
  }
  .pais .menyy--avatud { display: flex; }
  .pais .menyy__lingid { flex-direction: column; margin: 0; gap: 0; }
  .pais .menyy__lingid a { display: block; padding: .8rem 0; font-size: 1.1rem; border-bottom: 1px solid var(--joon); }
  .pais .menyy__lisa { flex-wrap: wrap; }
}
@media (max-width: 560px) {
  .pais .keeled { margin-left: 0; }
  .pais .nupp { margin-left: 0; }
}
