/*region Нормализация стилей*/


/**
  Нормализация блочной модели
 */
*,
::before,
::after {
  box-sizing: border-box;
}

/**
  Убираем внутренние отступы слева тегам списков,
  у которых есть атрибут class
 */
:where(ul, ol):where([class]) {
  padding-left: 0;
}

/**
  Убираем внешние отступы body и двум другим тегам,
  у которых есть атрибут class
 */
body,
:where(blockquote, figure, fieldset):where([class]) {
  margin: 0;
}

/**
  Убираем внешние отступы вертикали нужным тегам,
  у которых есть атрибут class
 */
:where(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  ul,
  ol,
  dl
):where([class]) {
  margin-block: 0;
}

:where(dd[class]) {
  margin-left: 0;
}

:where(fieldset[class]) {
  padding: 0;
  border: none;
}

/**
  Убираем стандартный маркер маркированному списку,
  у которого есть атрибут class
 */
:where(ul[class]) {
  list-style: none;
}

:where(address[class]) {
  font-style: normal;
}

/**
  Обнуляем вертикальные внешние отступы параграфа,
  объявляем локальную переменную для внешнего отступа вниз,
  чтобы избежать взаимодействие с более сложным селектором
 */
p {
  --paragraphMarginBottom: 24px;

  margin-block: 0;
}

/**
  Внешний отступ вниз для параграфа без атрибута class,
  который расположен не последним среди своих соседних элементов
 */
p:where(:not([class]):not(:last-child)) {
  margin-bottom: var(--paragraphMarginBottom);
}


/**
  Упрощаем работу с изображениями и видео
 */
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

/**
  Наследуем свойства шрифт для полей ввода
 */
input,
textarea,
select,
button {
  font: inherit;
}

html {
  /**
    Пригодится в большинстве ситуаций
    (когда, например, нужно будет "прижать" футер к низу сайта)
   */
  height: 100%;
  /**
    Убираем скачок интерфейса по горизонтали
    при появлении / исчезновении скроллбара
   */
  scrollbar-gutter: stable;
}

/**
  Плавный скролл
 */
html {
  scroll-behavior: smooth;
}

body {
  /**
    Пригодится в большинстве ситуаций
    (когда, например, нужно будет "прижать" футер к низу сайта)
   */
  min-height: 100%;
  /**
    Унифицированный интерлиньяж
   */
  line-height: 1.5;
}

/**
  Нормализация высоты элемента ссылки при его инспектировании в DevTools
 */
a:where([class]) {
  display: inline-flex;
}

/**
  Курсор-рука при наведении на элемент
 */
button,
label {
  cursor: pointer;
}

/**
  Приводим к единому цвету svg-элементы
  (за исключением тех, у которых уже указан
  атрибут fill со значением 'none' или начинается с 'url')
 */
:where([fill]:not(
  [fill="none"],
  [fill^="url"]
)) {
  fill: currentColor;
}

/**
  Приводим к единому цвету svg-элементы
  (за исключением тех, у которых уже указан
  атрибут stroke со значением 'none')
 */
:where([stroke]:not(
  [stroke="none"],
  [stroke^="url"]
)) {
  stroke: currentColor;
}

/**
  Чиним баг задержки смены цвета при взаимодействии с svg-элементами
 */
svg * {
  transition-property: fill, stroke;
}

/**
  Приведение рамок таблиц в классический 'collapse' вид
 */
:where(table) {
  border-collapse: collapse;
  border-color: currentColor;
}

/**
  Удаляем все анимации и переходы для людей,
  которые предпочитают их не использовать
 */
@media (prefers-reduced-motion: reduce) {
  *,
  ::before,
  ::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

/*endregion-*/

/*region ------------- VARS --------------*/

:root {
  --header-height: 90px;
  --white-color: #fff;
  --main-green: #194000;
  --light-green: #679D45;
  --dark-green: #01261e;
  --red-color: #FF0000;

}

/*endregion*/

body {
  font-family: -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif,
  Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
  background-image: url("../img/asset.svg");
  background-color: var(--dark-green);
  background-repeat: repeat;
  background-size: cover;
  background-position: center;
}


a {
  text-decoration: none;
  color: inherit;
  outline: none;
}

/* region ----------- HEADER ------------*/

.burger {
  display: none;
  font-size: 2em;
  background: none;
  border: none;
  cursor: pointer;
  margin-left: auto;
}

/* region ----------- scroll to top button ----------- */
.scroll-to-top {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 1000;
  padding: 10px 15px;
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transition: all 0.3s ease;
}

.scroll-to-top img {
  width: 40px;
  height: 40px;
  cursor: pointer;
}

#scrollToTopBtn.show {
  opacity: 1;
  visibility: visible;
}

/* endregion */

.header {
  width: 100%;
  background: var(--white-color);
  position: fixed;
  border-bottom: 3px solid var(--main-green);
}

.header-menu {
  padding: 10px 5vw;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  height: var(--header-height);
}

.logo {
  height: 80px;
  padding: 5px;
  margin-top: 10px;
  margin-left: 10px;
  box-sizing: border-box;
}

.header__menu-element {
  font-size: 1em;
  margin-left: 0.8em;
  cursor: pointer;
  border: none;
  background: var(--white-color);
  padding: 0.5em;
}

.header__menu-element:hover {
  border-bottom: 2px solid var(--dark-green);
}

.header__menu-button {
  border: none;
  background: var(--light-green);
  border-radius: 50px;
  margin-left: auto;
  padding: 10px 20px;
  transition: all 0.5s ease;
}

.header__menu-button:hover {
  color: var(--white-color);
  background: var(--main-green);
}

/*endregion*/

/*region -------- MAIN INFO --------- */

.layout {
  padding: 92px 0 1rem 0;
  max-width: 1920px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 4fr;
  background: var(--white-color);
  border-top: 3px solid var(--main-green);
}

.sidebar-toggle {
  background: none;
  border: none;
  display: none;
}

.sidebar,
.content {
  display: flex;
  flex-direction: column;
}

.sidebar {
  border-right: 3px solid var(--main-green);
}

.sidebar a {
  align-self: center;
  padding: 1rem;
  border-bottom: 2px solid var(--main-green);
  cursor: pointer;
}

.articles li {
  padding: 1rem;
  border-bottom: 2px solid var(--main-green);
  margin: 0 1rem 1rem 1rem;
}

/*endregion*/

/*region -------- FOOTER --------- */

.footer {
  max-width: 1920px;
  margin: 0 auto;
  padding: 30px;
}


/*endregion*/

/*region --------Mobile media query---------*/

@media (max-width: 1150px) {

  .header {
    position: relative;
  }

  .header-menu {
    height: auto;
    flex-direction: row;
    margin: 0;
  }

  .header__menu-button {
    display: none;
  }

  .burger {
    display: block;
  }

  .nav {
    display: none;
    flex-direction: row;
    align-items: center;
    width: 100%;
    height: 90px;
  }

  .logo.active {
    display: none;
  }

  .nav.active {
    display: flex;
    flex-wrap: wrap;
    height: 200px;
  }

  .header__menu-element {
    margin: 10px 0;
  }

  .layout {
    display: flex;
    flex-direction: column;
    padding: 1rem;
    align-items: center;
  }

  .sidebar{
    display: none;
  }

  .sidebar-toggle {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
  }

  .sidebar-toggle svg {
    flex-shrink: 0;
  }

  .sidebar.active{
    display: inline-flex;
    border: none;
    width: 90%;
  }

  .sidebar.active a{
    width: 100%;
    text-align: center;
    font-weight: bold;
  }
}


/*endregion*/