/* Section 5 - shell/header/navigation */

.headerRow {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  position: sticky;
  top: 12px;
  z-index: 40;
  padding: 12px 18px;
  background: white;
  border-radius: 16px;
  box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
}

.logoWrap {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}

.logoWrap img {
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.logoTitle {
  font-size: 28px;
  font-weight: 800;
  color: #123d74;
}

.headerMeta {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.navMenu {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.mobileMenuBtn {
  display: none;
  border: 2px solid #123d74;
  background: #ffffff;
  color: #123d74;
  width: 21px;
  height: 38px;
  border-radius: 10px;
  cursor: pointer;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
  align-items: flex-start;
  justify-content: center;
}

.navDropdown {
  position: relative;
}

.navDropBtn {
  border: none;
  background: transparent;
  color: #123d74;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  padding: 8px 2px;
}

.navDropBtn:hover,
.navDropBtn:focus {
  color: #7c2d83;
  outline: none;
}

.navDropdownMenu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 30;
  min-width: 220px;
  display: none;
  background: white;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  padding: 8px;
}

.navDropdown.open .navDropdownMenu {
  display: grid;
  gap: 4px;
}

.navServicesMenu {
  min-width: 240px;
}

.navSubDropdown {
  position: relative;
}

.navSubBtn {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: none;
  background: transparent;
  color: #123d74;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  padding: 10px 12px;
  border-radius: 8px;
  text-align: left;
}

.navSubBtn::after {
  content: "›";
  font-size: 18px;
  line-height: 1;
  color: #7c2d83;
  margin-left: 12px;
}

.navSubBtn:hover,
.navSubBtn:focus {
  background: #f1f5f9;
  outline: none;
}

  .navSubMenu {
    position: absolute;
    left: calc(100% + 8px);
    top: 0;
  z-index: 31;
  min-width: 250px;
  display: none;
  background: white;
  border: 1px solid #dbe3ef;
  border-radius: 12px;
  box-shadow: 0 14px 34px rgba(15, 23, 42, 0.16);
  padding: 8px;
}

  .navSubDropdown.open .navSubMenu {
    display: grid;
    gap: 4px;
  }

.navSubMenu a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #123d74;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.navSubMenu a:hover,
.navSubMenu a:focus {
  background: #f1f5f9;
  outline: none;
}

.navDropdownMenu a {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #123d74;
  text-decoration: none;
  font-size: 15px;
  font-weight: 700;
  padding: 10px 12px;
  border-radius: 8px;
  white-space: nowrap;
}

.navDropdownMenu a:hover,
.navDropdownMenu a:focus {
  background: #f1f5f9;
  outline: none;
}

#aboutDynamicLinks {
  display: contents;
}

.navIcon {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  object-fit: contain;
}

.navBookIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  line-height: 1;
}

.premiumIcon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 58px;
  height: 18px;
  flex: 0 0 auto;
  border-radius: 999px;
  background: #f7c948;
  color: #123d74;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
  line-height: 1;
  box-shadow: inset 0 0 0 1px rgba(18, 61, 116, 0.18);
}

#clock {
  font-weight: 600;
  color: #475569;
  display: none;
}

#loginBtn {
  border: none;
  background: #123d74;
  color: white;
  padding: 10px 18px;
  border-radius: 10px;
  cursor: pointer;
  font-weight: 700;
}

#loginBtn:hover {
  opacity: 0.9;
}

.loginMenuWrap {
  position: relative;
}

.loginDropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  background: #fff;
  border: 1px solid #dbe3ef;
  border-radius: 8px;
  box-shadow: 0 10px 24px rgba(15, 23, 42, 0.15);
  z-index: 30;
  min-width: 120px;
  padding: 6px;
}

.loginDropdown button {
  width: 100%;
  border: none;
  background: transparent;
  text-align: left;
  padding: 8px 10px;
  border-radius: 6px;
  color: #123d74;
  font-weight: 700;
  cursor: pointer;
}

.loginDropdown button:hover {
  background: #eef2ff;
}

.settingsGear {
  width: 40px;
  height: 38px;
  display: none;
  align-items: center;
  justify-content: center;
  border: 2px solid #dbe3ef;
  background: white;
  color: #7c2d83;
  border-radius: 10px;
  cursor: pointer;
  font-size: 22px;
  font-weight: 900;
}

.settingsGear.visible {
  display: inline-flex;
}

.languageBtn {
  width: 40px;
  height: 38px;
  min-width: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  border: 2px solid #123d74;
  background: white;
  color: #123d74;
  border-radius: 10px;
  cursor: pointer;
  font-size: 15px;
  font-weight: 900;
  line-height: 1;
  box-sizing: border-box;
}

.languageBtn:hover,
.languageBtn:focus {
  background: #f1f5f9;
  outline: none;
}

@media (max-width: 1024px) {
  .headerRow {
    padding: 10px 14px;
  }

  .logoTitle {
    font-size: 24px;
  }
}

@media (max-width: 860px) {
  .headerRow {
    align-items: flex-start;
    gap: 12px;
    flex-direction: column;
  }

  .headerMeta {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 8px;
  }

  .navMenu {
    display: none;
    width: 100%;
    order: 4;
    justify-content: stretch;
    gap: 8px;
    flex-wrap: nowrap;
    flex-direction: column;
    margin-top: 6px;
  }

  .headerMeta.mobileNavOpen .navMenu {
    display: flex;
  }

  .mobileMenuBtn {
    display: inline-flex;
    order: 2;
  }

  .headerMeta.mobileNavOpen .mobileMenuBtn {
    background: #eef2ff;
  }

  .navDropBtn,
  #loginBtn,
  .languageBtn {
    min-height: 44px;
  }

  .navDropdown {
    width: 100%;
  }

  .navDropBtn {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #ffffff;
  }

  .navDropdownMenu {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    max-width: 100%;
    min-width: 0;
    margin-top: 6px;
    box-shadow: none;
    border-radius: 10px;
  }

  .navDropdown.open .navDropdownMenu {
    display: grid;
  }

  .navSubBtn {
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 1px solid #dbe3ef;
    border-radius: 10px;
    background: #ffffff;
  }

  .navSubBtn::after {
    margin-left: auto;
  }

  .navSubMenu {
    position: static;
    left: auto;
    right: auto;
    top: auto;
    min-width: 0;
    box-shadow: none;
    margin: 6px 0 0 12px;
  }

  .navSubDropdown.open .navSubMenu {
    display: grid;
  }
}

@media (max-width: 700px) {
  .headerRow {
    align-items: flex-start;
    gap: 14px;
    flex-direction: column;
  }

  .headerMeta {
    width: 100%;
    justify-content: space-between;
    flex-wrap: wrap;
  }

  .navMenu {
    order: 3;
    width: 100%;
    justify-content: space-between;
    gap: 8px;
  }

  .navDropdownMenu {
    left: 0;
    right: auto;
  }

  .logoTitle {
    font-size: 24px;
  }
}

@media (max-width: 480px) {
  .logoWrap img {
    width: 44px;
    height: 44px;
  }

  .logoTitle {
    font-size: 20px;
  }

  #clock {
    font-size: 14px;
  }
}
