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

* {
  margin: 0;
}

body {
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  font-family: "Geologica", serif;
  font-optical-sizing: auto;
  font-weight: 500;
}

img,
picture,
video,
canvas,
svg {
  display: block;
  max-width: 100%;
}

input,
button,
textarea,
select {
  font: inherit;
  outline: none;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

p {
  text-wrap: pretty;
}

h1,
h2,
h3,
h4,
h5,
h6 {
  text-wrap: balance;
}

ul,
ol {
  margin-left: 15px;
  margin-bottom: 15px;
  padding: 0;
}

ul li,
ol li {
  margin-bottom: 15px;
}

a {
  text-decoration: none;
}

#root,
#__next {
  isolation: isolate;
}

/* Custom scroll */
::-webkit-scrollbar {
  height: 3px;
  width: 3px;
}

::-webkit-scrollbar-track {
  background: #bebebe;
  border-radius: 0.688rem;
}

::-webkit-scrollbar-thumb {
  background: #9398c3;
  border-radius: 0.688rem;
}

::-webkit-scrollbar-thumb:hover {
  background: #9398c3;
}

/* Header */
.header {
  display: flex;
  align-items: center;
  position: fixed;
  top: 0;
  left: 0;
  z-index: 10;
  width: 100%;
  padding: 20px 24px;
  background-color: #fff;
}

.logo_side {
  display: flex;
  align-items: center;
  margin-right: 84px;
  padding: 6px 12px;
  border-radius: 15px;
  background: #ebecf4;
  width: 300px;
  order: 2;
}

.logo {
  margin-right: 30px;
}

.back-to {
  display: flex;
  align-items: center;
  font-size: 12px;
  color: #4646b7;
}

.back-to span {
  margin-left: 7px;
  border-bottom: 0.5px solid #4646b7;
}

.search {
  position: relative;
  display: flex;
  border: 1px solid #bbb;
  border-radius: 15px;
  width: 548px;
  height: 40px;
  order: 3;
}

.search_icon {
  position: absolute;
  top: 9px;
  right: 12px;
}

.search input {
  border: 0;
  border-radius: 15px;
  width: 100%;
  height: 100%;
  padding: 0 40px 0 16px;
}

.lang {
  display: flex;
  text-align: center;
  justify-content: center;
  margin-left: auto;
  order: 4;
}

.lang a {
  margin-right: 10px;
  font-size: 14px;
  color: #9398c3;
  transition: color 0.2s ease;
}

.lang a:hover {
  color: #4646b7;
}

.lang .active {
  font-weight: bold;
  color: #4646b7;
}

.wrap_nav-link {
  color: #4646b7 !important;
}

/* Hamburger menu */
.hamburger {
  display: none;
  flex-direction: column;
  cursor: pointer;
  padding: 5px;
  order: 1;
}

.hamburger span {
  width: 20px;
  height: 2px;
  background-color: #273186;
  margin: 2px 0;
  transition: 0.3s;
  border-radius: 2px;
}

.hamburger.active span:nth-child(1) {
  transform: rotate(-45deg) translate(-3px, 5px);
}

.hamburger.active span:nth-child(2) {
  opacity: 0;
}

.hamburger.active span:nth-child(3) {
  transform: rotate(45deg) translate(-3px, -6px);
}

/* Overlay */
.overlay {
  display: none;
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.5);
  z-index: 8;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}

.overlay.active {
  display: block;
  opacity: 1;
  visibility: visible;
}

/* Main layout */
.main {
  display: flex;
  padding: 100px 24px 0;
}

/* Sidebar */
.sidebar {
  position: fixed;
  top: 80px;
  padding-bottom: 20px;
  padding-right: 20px;
  flex-shrink: 0;
  width: 320px;
  height: calc(100% - 80px);
  overflow-y: auto;
  background-color: #fff;
  transition: left 0.3s ease;
}

/* Navigation */
.navigation {
  margin: 0;
  list-style-type: none;
}

.nav-link,
.sub-nav-link {
  display: flex;
  align-items: center;
  padding: 7px 9px;
  font-size: 16px;
  color: #273186;
  transition: background-color 0.2s ease, color 0.2s ease;
}

.nav-link:hover,
.sub-nav-link:hover,
.sub-nav-active {
  background-color: #ebecf4;
  border-radius: 15px;
}

.nav-number {
  width: 25px;
}

.nav-number,
.sub-nav-number {
  margin-right: 6px;
  color: #9398c3;
  font-size: 16px;
}

.nav-link--with-submenu {
  cursor: pointer;
}

.subitem {
  margin-left: auto;
  width: 25px;
  height: 25px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-right: 0 !important;
}

.subitem svg {
  transform: rotate(-90deg);
  transition: transform 0.3s ease;
}

.nav-item--active .subitem svg {
  transform: rotate(0deg);
}

/* Submenu animations */
.sub-navigation {
  margin-left: 29px;
  margin-bottom: 5px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.4s ease, opacity 0.3s ease, padding 0.3s ease;
  padding-top: 0;
  padding-bottom: 0;
}

.nav-item--active .sub-navigation {
  max-height: 300px;
  opacity: 1;
  padding-top: 5px;
  padding-bottom: 5px;
}

.wrapper {
  margin-left: 320px;
  padding-left: 64px;
  max-width: 950px;
}

/* Content */
.content {
  color: #273186;
}

/* Content Typography Classes */
.content-title {
  margin-bottom: 24px;
  font-size: 30px;
  font-weight: bold;
  color: #273186;
}

.content-title--main {
  border-bottom: 2px solid #ebecf4;
  padding-bottom: 12px;
}

.content-subtitle {
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: bold;
  color: #273186;
}

.content-heading {
  margin-bottom: 24px;
  font-size: 26px;
  font-weight: bold;
  color: #273186;
}

.content-subheading {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: bold;
  color: #273186;
}

.content-text {
  margin-bottom: 24px;
  font-size: 16px;
  color: #273186;
  line-height: 1.6;
}

.content-text--intro {
  font-weight: 600;
  font-size: 18px;
  color: #4646b7;
}

.content-text--links {
  font-weight: 500;
}

/* Fallback Typography (for elements without classes) */
h1 {
  margin-bottom: 24px;
  font-size: 30px;
  font-weight: bold;
  color: #273186;
}

h2 {
  margin-bottom: 24px;
  font-size: 28px;
  font-weight: bold;
  color: #273186;
}

h3 {
  margin-bottom: 24px;
  font-size: 26px;
  font-weight: bold;
  color: #273186;
}

h4 {
  margin-bottom: 24px;
  font-size: 24px;
  font-weight: bold;
  color: #273186;
}

p {
  margin-bottom: 24px;
  font-size: 16px;
  color: #273186;
}

/* Mobile styles */
@media screen and (max-width: 992px) {
  .hamburger {padding-left: 0;}
  .header {
    padding: 15px 16px;
    flex-wrap: wrap;
  }

  .logo_side {
    width: auto;
    margin-right: 15px;
    padding: 6px;
    background: transparent;
  }

  .logo {
    margin-right: 0;
  }

  .logo svg {
    width: 80px;
    height: auto;
  }

  .back-to {
    display: none;
  }

  .search {
    width: 300px;
    height: 35px;
    margin-right: 15px;
  }

  .search input {
    font-size: 14px;
    padding: 0 35px 0 12px;
  }

  .search_icon {
    top: 8px;
    right: 10px;
    width: 16px;
    height: 16px;
  }

  .lang {
    margin-left: 0;
    margin-right: 15px;
  }

  .lang a {
    font-size: 12px;
    margin-right: 8px;
  }

  .hamburger {
    display: flex;
  }

  .main {
    padding: 80px 16px 0;
  }

  .sidebar {
    position: fixed;
    top: 0;
    left: -100%;
    width: 280px;
    height: 100vh;
    background-color: #fff;
    padding: 80px 20px 20px;
    z-index: 9;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
  }

  .sidebar.open {
    left: 0;
  }

  .wrapper {
    margin-left: 0;
    padding-left: 0;
    width: 100%;
  }

  .nav-link,
  .sub-nav-link {
    font-size: 14px;
    padding: 10px 12px;
  }

  /* Content classes mobile */
  .content-title {
    font-size: 24px;
  }

  .content-subtitle {
    font-size: 22px;
  }

  .content-heading {
    font-size: 20px;
  }

  .content-subheading {
    font-size: 18px;
  }

  .content-text {
    font-size: 14px;
  }

  .content-text--intro {
    font-size: 16px;
  }

  /* Fallback mobile */
  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 22px;
  }

  h3 {
    font-size: 20px;
  }

  h4 {
    font-size: 18px;
  }

  p {
    font-size: 14px;
  }
}

@media screen and (max-width: 576px) {
  .header {
    padding: 12px;
    align-items: flex-start;
  }

  .logo svg {
    width: 70px;
  }

  .search {
    width: 100%;
    margin-right: 0;
    margin-bottom: 10px;
    margin-top: 10px;
    order: 4;
  }

  .lang {
    margin-right: 0;
    margin-left: auto;
    margin-top: 7px;
    order: 3;
  }

  .lang a:last-child {
    margin-right: 0;
  }

  .main {
    padding: 120px 12px 0;
  }

  .sidebar {
    width: 90%;
    padding: 120px 15px 15px;
  }

  /* Content classes mobile small */
  .content-title {
    font-size: 20px;
    margin-bottom: 16px;
  }

  .content-subtitle {
    font-size: 18px;
    margin-bottom: 16px;
  }

  .content-heading {
    font-size: 16px;
    margin-bottom: 16px;
  }

  .content-subheading {
    font-size: 15px;
    margin-bottom: 16px;
  }

  .content-text {
    font-size: 13px;
    margin-bottom: 16px;
  }

  .content-text--intro {
    font-size: 14px;
  }

  /* Fallback mobile small */
  h1 {
    font-size: 20px;
    margin-bottom: 16px;
  }

  h2 {
    font-size: 18px;
    margin-bottom: 16px;
  }

  h3 {
    font-size: 16px;
    margin-bottom: 16px;
  }

  h4 {
    font-size: 15px;
    margin-bottom: 16px;
  }

  p {
    font-size: 13px;
    margin-bottom: 16px;
  }
}
