/* ── Shared top bar & side menu (used on every page) ── */
html {
  scroll-padding-top: 96px;
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
body { padding-top: 96px; }

.topbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 64px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  padding: 0 20px;
  box-shadow: 0 2px 8px rgba(0,48,135,0.1);
  z-index: 300;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  color: #003087;
  letter-spacing: 1px;
  text-transform: uppercase;
  font-size: 0.9rem;
}

.topbar-logo-img {
  height: 40px;
  width: auto;
  display: block;
}

.menu-btn {
  background: #1d4ed8;
  color: #fff;
  border: none;
  border-radius: 10px;
  width: 44px;
  height: 44px;
  font-size: 1.3rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.menu-btn:hover { background: #1e40af; }

.menu-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.4);
  z-index: 350;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.25s ease;
}

.menu-overlay.visible { opacity: 1; pointer-events: auto; }

.side-menu {
  position: fixed;
  top: 0; right: 0;
  height: 100vh;
  width: 280px;
  max-width: 80vw;
  background: #003087;
  color: #fff;
  z-index: 400;
  padding: 24px 16px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  transform: translateX(100%);
  transition: transform 0.3s ease;
  box-shadow: -4px 0 20px rgba(0,0,0,0.25);
  overflow-y: auto;
}

.side-menu.open { transform: translateX(0); }

.side-menu-brand {
  text-align: left;
  color: #fff;
  font-weight: 700;
  letter-spacing: 1px;
  font-size: 1.1rem;
}

.side-menu-brand-accent { color: #D21034; }

.side-menu-divider {
  height: 1px;
  background: rgba(255,255,255,0.15);
  margin: 4px 0 8px;
}

.side-menu-item {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #fff;
  text-decoration: none;
  font-weight: 600;
  padding: 12px 16px;
  border-radius: 10px;
}

.side-menu-item.active { background: #1d4ed8; }
.side-menu-item:hover:not(.active) { background: rgba(255,255,255,0.08); }

.side-menu-group-toggle {
  width: 100%;
  background: none;
  border: none;
  font-family: inherit;
  cursor: pointer;
  text-align: left;
}

.side-menu-group-toggle span:nth-child(2) { flex: 1; }

.side-menu-group-arrow {
  transition: transform 0.2s ease;
  font-size: 0.8rem;
}

.side-menu-group-toggle[aria-expanded="true"] .side-menu-group-arrow {
  transform: rotate(90deg);
}

.side-menu-submenu {
  display: flex;
  flex-direction: column;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.25s ease;
}

.side-menu-submenu.open { max-height: 200px; }

.side-menu-subitem {
  display: flex;
  align-items: center;
  color: rgba(255,255,255,0.85);
  text-decoration: none;
  font-weight: 600;
  padding: 10px 16px 10px 42px;
  border-radius: 10px;
}

.side-menu-subitem.active { background: #1d4ed8; color: #fff; }
.side-menu-subitem:hover:not(.active) { background: rgba(255,255,255,0.08); }

.side-menu-lang { margin-top: auto; }

.lang-toggle {
  position: relative;
  display: flex;
  box-sizing: border-box;
  background: rgba(255,255,255,0.12);
  border-radius: 10px;
  padding: 4px;
  margin-top: 16px;
}

.lang-toggle-option {
  position: relative;
  z-index: 1;
  flex: 1;
  min-width: 0;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
  background: none;
  border: none;
  box-shadow: none;
  outline: none;
  color: rgba(255,255,255,0.8);
  font-family: inherit;
  font-weight: 700;
  font-size: 0.78rem;
  letter-spacing: 1px;
  padding: 9px 0;
  border-radius: 8px;
  cursor: pointer;
  transition: color 0.2s ease;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.lang-toggle-option::-moz-focus-inner {
  border: 0;
  padding: 0;
}

.lang-toggle-option.active { color: #003087; }

.lang-toggle-slider {
  position: absolute;
  top: 4px;
  left: 4px;
  box-sizing: border-box;
  width: calc(33.333% - 2.667px);
  height: calc(100% - 8px);
  background: #ffffff;
  border-radius: 8px;
  transition: transform 0.25s ease;
  z-index: 0;
}
