/* ==========================================================================
   Public header + footer (logged-out pages) — design "Main" / "Mobile"
   Desktop header: 80px, padding 0 80px. Mobile header: 64px, padding 0 16px.
   ========================================================================== */

.site-shell .pub-head,
body.page-landing .site-shell .pub-head {
  position: sticky;
  top: 0;
  z-index: 100;
  height: 80px;
  min-height: 80px;
  padding: 0 80px;
  display: flex;
  align-items: center;
  background: #FFFFFF;
  border-bottom: 1px solid #DCEAE2;
  backdrop-filter: none;
  box-shadow: none;
}
.pub-head__row {
  width: 100%;
  max-width: none;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.pub-brand,
body.page-landing .pub-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #0B2A1F;
  text-decoration: none;
  flex-shrink: 0;
}
.pub-brand:hover { color: #0B2A1F; }
.site-shell .pub-brand__mark {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  overflow: hidden;
  border: 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
  display: block;
}
.site-shell .pub-brand__mark img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 0; }
.pub-brand__name,
body.page-landing .pub-brand .pub-brand__name {
  font-family: 'Unbounded', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0B2A1F;
}
.pub-brand__name span { color: #0E9F6E; }

.site-shell .pub-nav {
  display: flex;
  align-items: center;
  gap: 36px;
  margin: 0;
  padding: 0;
  background: transparent;
  border: 0;
  overflow: visible;
}
.site-shell .pub-nav .pub-nav__link,
body.page-landing .site-shell .pub-nav .pub-nav__link {
  padding: 0;
  font-size: 16px;
  font-weight: 600;
  color: #0B2A1F;
  background: transparent;
  text-decoration: none;
  position: relative;
}
.site-shell .pub-nav .pub-nav__link:hover,
.site-shell .pub-nav .pub-nav__link.is-active,
body.page-landing .site-shell .pub-nav .pub-nav__link:hover { color: #0B7F58; background: transparent; }
.site-shell .pub-nav .pub-nav__link.is-active::after { display: none; }
.site-shell .pub-nav .pub-nav__register { display: none; }

.pub-actions { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.pub-btn {
  height: 44px;
  padding: 0 22px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  font-weight: 700;
  font-size: 15px;
  text-decoration: none;
  white-space: nowrap;
  border: 1px solid transparent;
}
.pub-btn--primary { background: #0B7F58; color: #FFFFFF; }
.pub-btn--primary:hover { background: #075C40; color: #FFFFFF; }
.pub-btn--ghost { padding: 0 20px; color: #0B2A1F; background: transparent; }
.pub-btn--ghost:hover { color: #0B7F58; }

.site-shell .pub-lang { position: relative; }
.site-shell .pub-lang__btn,
.site-shell .shell-head .pub-lang__btn {
  height: 44px;
  min-width: 44px;
  padding: 0 14px;
  border-radius: 12px;
  border: 1px solid #DCEAE2;
  background: #FFFFFF;
  color: #0B2A1F;
  font: 600 14px 'Manrope', sans-serif;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}
.site-shell .pub-lang__btn:hover { border-color: #0B7F58; }
.site-shell .pub-lang .lang-dropdown {
  right: 0;
  left: auto;
  top: calc(100% + 8px);
  min-width: 150px;
  padding: 6px;
  border-radius: 12px;
  border: 1px solid #DCEAE2;
  background: #FFFFFF;
  box-shadow: 0 12px 32px rgba(11, 42, 31, 0.1);
}
.site-shell .pub-lang .lang-dropdown-item {
  border-radius: 8px;
  font: 700 14px 'Manrope', sans-serif;
  color: #0B2A1F;
}
.site-shell .pub-lang .lang-dropdown-item.active,
.site-shell .pub-lang .lang-dropdown-item:hover { background: #E3F4EC; color: #075C40; }

.site-shell .pub-toggle { display: none; }

/* ── Footer ── */
.site-shell .pub-foot {
  margin: 0;
  max-width: none;
  padding: 64px 80px;
  background: #0B2A1F;
  color: #B9D8C9;
  border: 0;
  border-radius: 0;
  font-family: 'Manrope', sans-serif;
}
.pub-foot__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) repeat(3, minmax(0, 1fr));
  gap: 48px;
  align-content: start;
}
.pub-foot__brand { display: flex; flex-direction: column; gap: 16px; }
.pub-foot__name {
  font-family: 'Unbounded', sans-serif;
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #FFFFFF;
  text-decoration: none;
  align-self: flex-start;
}
.pub-foot__name:hover { color: #FFFFFF; }
.pub-foot__name span { color: #FACC15; }
.pub-foot__brand p { margin: 0; font-size: 15px; line-height: 1.6; max-width: 320px; color: #B9D8C9; }
.pub-foot__col { display: flex; flex-direction: column; gap: 12px; font-size: 15px; }
.pub-foot__head { color: #FFFFFF; font-weight: 800; }
.pub-foot__col a { color: #B9D8C9; text-decoration: none; }
.pub-foot__col a:hover { color: #FFFFFF; }
.pub-foot__col a.pub-foot__tg { color: #FACC15; }
.pub-foot__col a.pub-foot__tg:hover { color: #FFE27A; }

/* ── Tablet ── */
@media (max-width: 1200px) {
  .site-shell .pub-head, body.page-landing .site-shell .pub-head { padding: 0 40px; }
  .site-shell .pub-nav { gap: 24px; }
  .site-shell .pub-foot { padding: 56px 40px; }
}

/* ── Mobile (≤768px, same breakpoint as the slide-out menu) ── */
@media (max-width: 768px) {
  .site-shell .pub-head, body.page-landing .site-shell .pub-head {
    height: 64px;
    min-height: 64px;
    padding: 0 16px;
  }
  .pub-head__row { gap: 8px; }
  .pub-brand { gap: 10px; }
  .site-shell .pub-brand__mark { width: 36px; height: 36px; border-radius: 11px; }
  .pub-brand__name, body.page-landing .pub-brand .pub-brand__name { font-size: 18px; }
  .pub-actions { gap: 8px; }
  .pub-actions .pub-lang,
  .pub-actions__register { display: none; }
  .pub-btn--ghost { padding: 0 14px; }
  .pub-actions__cabinet { padding: 0 14px; }
  .site-shell .pub-toggle,
  .site-shell .shell-head .pub-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #DCEAE2;
    background: #FFFFFF;
    color: #0B2A1F;
  }

  /* Slide-out menu (opened by #navToggle) */
  .site-shell .pub-nav {
    gap: 4px;
    padding: calc(72px + env(safe-area-inset-top, 0px)) 16px calc(24px + env(safe-area-inset-bottom, 0px));
    background: #FFFFFF;
    border-color: #DCEAE2;
  }
  .site-shell .pub-nav .pub-nav__link,
  body.page-landing .site-shell .pub-nav .pub-nav__link {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 700;
  }
  .site-shell .pub-nav .pub-nav__link.is-active { background: #E3F4EC; color: #075C40; }
  .site-shell .pub-nav .pub-nav__register { display: flex; margin-top: 12px; height: 50px; }

  .site-shell .pub-foot { padding: 40px 16px; margin-top: 0; }
  .pub-foot__grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px 20px; }
  .pub-foot__brand { grid-column: 1 / -1; }
  .pub-foot__name { font-size: 20px; }
  .pub-foot__brand p { display: none; }
  .pub-foot__col { gap: 10px; }
  .pub-foot__col .pub-foot__wide { display: none; }
  .pub-foot__contact { grid-column: 1 / -1; gap: 8px; }
  .pub-foot__contact .pub-foot__head { display: none; }
}

/* Mobile menu: language row + stacking above the dim overlay */
.site-shell .pub-nav .pub-nav__langs { display: none; }
@media (max-width: 768px) {
  body.nav-open .site-shell .pub-head { z-index: 130; }
  .site-shell .pub-nav .pub-nav__register { width: 100%; }
  .site-shell .pub-nav .pub-nav__langs {
    display: flex;
    gap: 6px;
    margin: 16px 0 0;
    padding: 0;
    border: 0;
    background: none;
    justify-content: flex-start;
  }
  .pub-nav__lang {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #DCEAE2;
    background: #FFFFFF;
    font: 700 13px 'Manrope', sans-serif;
    color: #0B2A1F;
    cursor: pointer;
  }
  .pub-nav__lang.is-active { background: #E3F4EC; border-color: #E3F4EC; color: #075C40; }
}

/* Tablet (769–1100px): the five nav links don't fit next to the actions —
   use the same slide-out menu as on phones. */
@media (min-width: 769px) and (max-width: 1100px) {
  .site-shell .pub-head, body.page-landing .site-shell .pub-head { padding: 0 32px; }
  .pub-actions .pub-lang { display: none; }
  .site-shell .pub-toggle,
  .site-shell .shell-head .pub-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    padding: 0;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid #DCEAE2;
    background: #FFFFFF;
    color: #0B2A1F;
  }
  .site-shell .pub-nav {
    position: fixed;
    top: 0;
    right: 0;
    bottom: 0;
    left: auto;
    z-index: 121;
    width: min(80vw, 340px);
    display: flex;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    padding: 88px 16px 24px;
    background: #FFFFFF;
    border-left: 1px solid #DCEAE2;
    box-shadow: -8px 0 32px rgba(11, 42, 31, 0.12);
    overflow-y: auto;
    transform: translateX(100%);
    visibility: hidden;
    pointer-events: none;
    transition: transform .28s cubic-bezier(.22, 1, .36, 1), visibility .28s ease;
  }
  .site-shell .pub-nav.is-open { transform: translateX(0); visibility: visible; pointer-events: auto; }
  .site-shell .pub-nav .pub-nav__link,
  body.page-landing .site-shell .pub-nav .pub-nav__link {
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    border-radius: 12px;
    font-weight: 700;
  }
  .site-shell .pub-nav .pub-nav__link.is-active { background: #E3F4EC; color: #075C40; }
  .site-shell .pub-nav .pub-nav__langs { display: flex; gap: 6px; margin: 16px 0 0; }
  .pub-nav__lang {
    flex: 1;
    height: 40px;
    border-radius: 10px;
    border: 1px solid #DCEAE2;
    background: #FFFFFF;
    font: 700 13px 'Manrope', sans-serif;
    color: #0B2A1F;
    cursor: pointer;
  }
  .pub-nav__lang.is-active { background: #E3F4EC; border-color: #E3F4EC; color: #075C40; }
  .nav-overlay:not([hidden]) {
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(11, 42, 31, 0.38);
  }
  body.nav-open .site-shell .pub-head { z-index: 130; }
}
