/* Shared site header. One class, so page stylesheets cannot restyle it. */

html {
  scrollbar-gutter: stable;
}

.site-nav {
  box-sizing: border-box;
  align-self: stretch;
  width: auto;
  margin: 0;
  min-height: 64px;
  padding-top: 12px;
  padding-bottom: 12px;
  padding-left: max(16px, env(safe-area-inset-left));
  padding-right: max(16px, env(safe-area-inset-right));
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #FFF8F1;
  position: sticky;
  top: 0;
  z-index: 40;
}

@media (min-width: 861px) {
  .site-nav {
    align-self: center;
    width: min(1080px, 100%);
    margin-inline: auto;
    padding: 16px 40px;
    gap: 24px;
    background: transparent;
    position: static;
  }
}

.site-nav .logo,
.site-nav .logo:link,
.site-nav .logo:visited,
.site-nav .logo:hover,
.site-nav .logo:active {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: none;
  text-decoration: none;
  color: #2A1810;
  -webkit-text-fill-color: #2A1810;
}

.site-nav .logo img {
  width: 36px;
  height: 36px;
  flex: none;
  display: block;
  border-radius: 0;
  object-fit: contain;
}

.site-nav .logo-name {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.3px;
  line-height: 1;
  color: #2A1810;
  -webkit-text-fill-color: #2A1810;
  white-space: nowrap;
}

.nav-right {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  flex: none;
}

nav a.nav-link {
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #61483C;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

nav a.nav-link:hover { color: #2A1810; }

/* Language menu: <details> with plain links (works without JS). */
.lang-menu {
  position: relative;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.lang-menu summary {
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
  border: 1px solid #F3E4D8;
  background: #fff;
  color: #61483C;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  padding: 7px 12px;
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
}

.lang-menu summary::-webkit-details-marker { display: none; }

.lang-menu summary::after {
  content: "";
  width: 6px;
  height: 6px;
  margin-left: 2px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: translateY(-2px) rotate(45deg);
}

.lang-menu[open] summary::after { transform: translateY(1px) rotate(-135deg); }

.lang-menu summary:hover,
.lang-menu[open] summary { color: #2A1810; border-color: #FFD0C2; }

.lang-menu summary:focus-visible { outline: 2px solid #FF5A36; outline-offset: 2px; }

.lang-menu-list {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 50;
  min-width: 170px;
  margin: 0;
  padding: 6px;
  list-style: none;
  background: #fff;
  border: 1px solid #F3E4D8;
  border-radius: 14px;
  box-shadow: 0 12px 32px rgba(42, 24, 16, 0.12);
}

.lang-flag {
  flex: none;
  display: block;
  border-radius: 3px;
  box-shadow: 0 0 0 1px rgba(42, 24, 16, 0.12);
}

.lang-menu-list a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  border-radius: 10px;
  color: #2A1810;
  text-decoration: none;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
}

.lang-menu-list a:hover,
.lang-menu-list a:focus-visible { background: #FFE9E1; outline: none; }

.lang-menu-list a[aria-current="true"] { font-weight: 800; }

.lang-menu-list a[aria-current="true"]::after {
  content: "";
  width: 5px;
  height: 10px;
  border-right: 2px solid #FF5A36;
  margin-left: auto;
  border-bottom: 2px solid #FF5A36;
  transform: translateY(-2px) rotate(45deg);
}

/* "Read this page in English →" — shown by site-lang.js, never a redirect. */
.lang-suggest {
  box-sizing: border-box;
  align-self: stretch;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 0 auto 8px;
  width: min(1080px, calc(100% - 32px));
  padding: 10px 12px 10px 16px;
  background: #FFF3D9;
  border-radius: 14px;
  font-family: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  font-weight: 700;
}

.lang-suggest a { color: #2A1810; text-decoration: none; }
.lang-suggest a:hover { text-decoration: underline; }

.lang-suggest button {
  flex: none;
  margin-left: auto;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: #61483C;
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
}

.lang-suggest button:hover { background: rgba(42, 24, 16, 0.06); color: #2A1810; }

/* Breadcrumb on guide pages. */
.breadcrumb ol {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 0 0 14px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #61483C;
}

.breadcrumb li + li::before { content: "›"; margin-right: 6px; color: #C9B3A6; }
.breadcrumb a { color: #FF5A36; text-decoration: none; }
.breadcrumb a:hover { text-decoration: underline; }

@media (max-width: 640px) {
  .site-nav .nav-right { gap: 14px; }
  .site-nav .nav-contact { display: none; }
}
