@import "/css/cookies.css";

* {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
  font-synthesis: none;
  text-rendering: optimizeSpeed;
  margin: 0;
  padding: 0;
}

body,
html {
  background-color: #f5f5f5;
  height: 100%;
  margin: 0;
  padding: 0;
  font-size: 16px;
}

h1 {
  font-size: 1.6rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

h2 {
  font-size: 1.4rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

h3 {
  font-size: 1.2rem;
  margin-bottom: 0.5rem;
  font-weight: 400;
}

li {
  margin-left: 1rem;
}

p {
  display: block;
  margin-bottom: 1rem;
  margin-top: 1rem;
}

a {
  text-decoration: none;
  color: #0046b9;
}
a:hover {
  color: #f00;
}

/* Шапка */

.header {
  display: block;
  position: fixed;
  left: 0;
  top: 0;
  flex-direction: row;
  width: 100%;
  height: 3rem;
  background-color: #e74a29;
  z-index: 2;
}
.header__container {
  position: relative;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  max-width: 62rem;
  min-width: 48rem;
  height: 100%;
  margin: 0 auto;
}

.header-container__logo {
  display: block;
  margin-left: 1rem;
}
.logo-image {
  display: block;
  width: 10.5rem;
}

/* Меню */

.mainmenu {
  display: flex;
  flex-direction: row;
  gap: 1rem;
}

.mainmenu__mobile-button {
  display: none;
  margin-left: 1rem;
}
.mainmenu__mobile-close-button {
  display: none;
}

.mainmenu__item {
  display: flex;
  position: relative;
  flex-direction: row;
  align-items: center;
  height: 3rem;
}
.mainmenu__link {
  display: flex;
  position: relative;
  flex-direction: row;
  align-items: center;
  color: #fff;
  text-decoration: none;
  font-size: 1.4rem;
  line-height: 1.4rem;
  font-weight: 100;
  height: 100%;
  cursor: pointer;
}
.mainmenu__link:hover {
  color: #ffd2c5;
}

.mainmenu__submenu {
  display: none;
  position: absolute;
  flex-direction: column;
  left: 0;
  top: 3rem;
  background-color: #495b64;
}
.mainmenu__subitem {
  display: flex;
  white-space: nowrap;
  flex-direction: row;
  align-items: center;
  color: #fff;
  font-size: 1rem;
  text-decoration: none;
  font-weight: 100;
  height: 1rem;
  padding: 1rem;
}
.mainmenu__subitem:hover {
  background-color: #2f3d44;
  color: #fff;
}
.mainmenu__item:hover > .mainmenu__submenu {
  display: flex;
}

/* Анимации */
/* Сокрытие лого */

.logo_hide {
  animation: animation_logo_hide 0.7s forwards;
}

@keyframes animation_logo_hide {
  0% {
    opacity: 1;
  }
  40% {
    transform: translateX(40%);
    opacity: 1;
  }
  100% {
    transform: translateX(-100%);
    opacity: 0;
    filter: blur(10px);
  }
}

/* Сокрытие меню */

.mainmenu_hide {
  animation: animation_mainmenu_hide 0.7s forwards;
}

@keyframes animation_mainmenu_hide {
  0% {
  }
  30% {
    transform: translateX(30%);
  }
  100% {
    transform: translateX(-100%);
    opacity: 0;
    filter: blur(5px);
  }
}

.mainmenu__mobile-button_hide {
  animation: animation_mobile-button_hide 0.7s forwards;
}

@keyframes animation_mobile-button_hide {
  0% {
  }
  30% {
    transform: translateX(100%);
  }
  100% {
    transform: translateX(-100%);
    opacity: 0;
    filter: blur(5px);
  }
}

/* Иконка поиска */

.header-container__search-open-button {
  margin-right: 1rem;
  color: #fff;
  background: url(/images/lupa-temp.svg);
  background-repeat: no-repeat;
  background-size: 2.5rem;
  background-position: center;
  width: 2.5rem;
  height: 2.5rem;
  cursor: pointer;
}
.header-container__search-close-button {
  background: url(/images/close-search.svg);
}

/* Форма поиска по сайту */

.header__search-container {
  position: absolute;
  display: none;
  top: 0;
  right: 4rem;
  flex-direction: column;
  align-items: end;
  justify-content: center;
  width: calc(100% - 4rem);
  height: 3rem;
  z-index: 2;
}
.header__search-container_appear {
  display: flex;
}

.search-form {
  display: flex;
  position: relative;
  flex-direction: row;
  width: 0%;
  height: 2rem;
  opacity: 0;
}

.search-form__input {
  position: relative;
  width: 100%;
  height: 100%;
  font-size: 1.6rem;
  color: #666;
  font-weight: 400;
  outline: 0;
  border: 0;
  padding: 0 0.5rem;
}
.search-form__button {
  position: absolute;
  width: 4rem;
  height: 2rem;
  border: 0;
  outline: 0;
  right: 0rem;
  top: 0rem;
  background: url(/images/arrow-right.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.5rem;
  background-color: #ddd;
  z-index: 3;
  cursor: pointer;
}
.search-form-container__close-button {
  position: relative;
  width: 2rem;
  height: 2rem;
  background-color: #0043a8;
}

.search-form_appear {
  animation: animation_search_form_appear 0.4s forwards;
  animation-delay: 0.15s;
}

@keyframes animation_search_form_appear {
  0% {
    opacity: 0;
    width: 0%;
  }
  100% {
    opacity: 1;
    width: calc(100% - 1rem);
  }
}

/* Контент */

.container {
  display: flex;
  position: relative;
  flex: 1 0 auto;
  flex-direction: column;
  max-width: 62rem;
  min-width: 48rem;
  min-height: 100%;
  background-color: #fff;
  margin: 0 auto;
}

.content {
  display: flex;
  flex-direction: row;
  flex: 1 0 auto;
  min-height: 100%;
}
.article {
  display: block;
  flex-direction: column;
  flex: 1;
  padding: 1rem;
  margin-top: 3rem;
  font-size: 1rem;
  width: 100%;
  min-height: 100%;
}
.sidebar {
  --sidibar-width: 240px;
  display: flex;
  flex-direction: column;
  width: var(--sidibar-width);
  min-width: var(--sidibar-width);
  max-width: var(--sidibar-width);
  margin-top: 3rem;
  margin-right: 1rem;
  padding: 1rem 0rem;
  overflow-x: hidden;
  gap: 1rem;
}
.sidebar-ads {
  display: flex;
  width: 240px;
  min-width: 240px;
  max-width: 240px;
}

.footer {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 4rem;
  color: #7e7c7c;
  padding: 0.5rem 0rem;
}
.footer__item {
  display: flex;
  flex-direction: row;
  text-align: center;
}
.footer__separator {
  margin: 0 0.5rem;
}
.footer__link {
  color: #7e7c7c;
}

.footer__policy-link {
  color: #b6b6b6;
  font-size: 0.8rem;
}
.footer__separator_policy {
  margin: 0 0.3rem;
  color: #aaa;
  font-size: 0.8rem;
}
.book-navigation {
  display: flex;
  flex-direction: row;
  gap: 1rem;
  margin: 0 auto;
  width: fit-content;
}
.book-navigation__arrow {
  display: block;
  width: 100%;
}
.book-navigation__arrow-back {
  width: 30px;
  height: 30px;
}
.book-navigation__arrow-forward {
  width: 30px;
  height: 30px;
}

/* Общие */
.tableOfContentsLevel-1 {
  margin-left: 0rem;
}
.tableOfContentsLevel-2 {
  margin-left: 1rem;
}
.tableOfContentsLevel-3 {
  margin-left: 2rem;
}
.tableOfContentsLevel-4 {
  margin-left: 3rem;
}
.tableOfContentsLevel-5 {
  margin-left: 4rem;
}

/* Сервис "Неорганические реакции" */
.reaction {
  font-size: 1.4rem;
  line-height: 2.2rem;
  font-weight: 400;
  position: relative;
  margin-left: 2rem;
}
.reaction::before {
  content: "";
  position: absolute;
  background-color: #e74a29; /* #0078bf; */
  left: -1.25rem;
  top: 0.9rem;
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.table_over {
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 32rem;
  overflow-x: scroll;
}

.sidebar_banner {
  z-index: 0;
}

/* Похожие статьи */
.similar-articles-container {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}
.similar-articles__title {
  display: flex;
  position: relative;
  justify-content: end;
  font-size: 0.8rem;
  font-weight: 300;
  color:rgb(158, 158, 158);
  margin-bottom: -1rem;
} 

.similar-articles__link {
  text-decoration: none;
  color: #000;
  font-size: 1.2rem;
  font-weight: 300;
}
.similar-articles__item {
  display: flex;
  padding: 1rem;
  border: 0;
  border-radius: 4px;
  /* margin: 0 0.5rem; */
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
}
.similar-articles__item:hover {
}
.similar-articles__link:hover {
  color: #f00;
}
.similar-articles__button {
  display: flex;
  margin: 0 auto;
  box-shadow: rgba(60, 64, 67, 0.3) 0px 1px 2px 0px, rgba(60, 64, 67, 0.15) 0px 2px 6px 2px;
  background-color: #fff;
  border: 0;
  outline: 0;
  padding: 0.5rem;
  border-radius: 4px;
  width: fit-content;
  font-size: 1rem;
  font-weight: 200;
  color: #444;
}
.similar-articles__item_hidden {
  display: none;
}

/* Синонимы */
.synonyms {
  margin-top: 1rem;
}
.synonyms__title {
  font-weight: 600;
}
.synonyms__attention {
  font-size: 0.8rem;
  color: #999;
  margin-top: 0.5rem;
}

/* Поиск по справочникам */

.guides-search-container {
  display: flex;
  flex-direction: column;
  height: 100dvh;
  position: relative;
  width: 100%;
}
.guides-search__header {
  position: relative;
  background-color: #fff;
  display: flex;
  flex-direction: column;
  width: 100%;
  height: auto;
  gap: 1rem;
}
.guides-search__alphabet-container {
  position: relative;
  width: 100%;
}

.alphabet-container__alfabet {
  display: flex;
  position: relative;
  flex-direction: row;
  flex-wrap: wrap;
  font-size: 1.5rem;
  font-weight: 400;
  color: #666;
}

.alphabet-container__alfabet-letter-box {
  --size: 1.9rem;
  display: flex;
  justify-content: center;
  align-items: center;
  width: var(--size);
  height: var(--size);
  min-height: var(--size);
  min-width: var(--size);
  line-height: 1;
  cursor: pointer;
}
.alfabet-letter-box__letter {
  margin-top: -2px;
}

.guides-selection__select {
  width: 100%;
  height: 2rem;
  font-size: 1.25rem;
  color: #444;
  border: 0;
  padding: 0 0.5rem;
  border-radius: 4px;
  background-color: #dce7ee;
}
.guides-selection__option {
}
.guides-selection__alphabet {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 2rem;
  height: 2rem;
  background-color: #dbdbdb;
  border-radius: 4px;
}
.alphabet-container__terms-list {
  overflow-y: auto;
  flex: 1;
  min-height: 0;
  margin-top: 1rem;
}
.terms-list__item {
  list-style-type: "› ";
  margin-top: 0.5rem;
}
.terms-list__link {
  text-decoration: none;
  color: #0d59b1;
  font-size: 1.1rem;
}

.articles-comment {
  position: relative;
}

.articles-comment__title {
  position: absolute;
  right: 0;
  top: -1rem;
  font-size: 0.7rem;
  color: #ccc;
  /* background-color: bisque; */
}
.articles-comment__attention {
  position: relative;
  font-size: 0.7rem;
  color: #ccc;
  margin-top: 1rem;
}


/* ************************************************************************************** */
/*                                        Mobile                                          */
/* ************************************************************************************** */

@media screen and (max-width: 768px) {
  /* Для отладки */
  body {
    /* background-color: aqua; */
  }

  h1 {
    font-size: 1.5rem;
    font-weight: 600;
  }

  h2 {
    font-size: 1.4rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
  }
  p,
  div {
    font-size: 1.1rem;
  }

  /* конец отладки - удалить */

  .body_no-scroll {
    overflow: hidden;
  }

  .header {
    width: 100%;
    height: 3rem;
  }
  .header__container {
    max-width: 100%;
    min-width: 320px;
  }

  .header-container__logo {
    order: 2;
    width: 7rem;
  }

  .logo-image {
    width: 9rem;
  }

  .sidebar {
    display: none;
  }

  .footer {
    display: flex;
    height: 8rem;
  }

  .footer__item {
    display: flex;
    flex-direction: column;
  }

  .footer__separator,
  .footer__separator_policy {
    display: none;
  }

  /* Меню */

  .mainmenu {
    display: none;
    position: fixed; /*+*/
    left: 0; /*+*/
    top: 0;
    /* bottom: 0; */
    flex-direction: column; /*+*/
    gap: 0rem; /*+*/
    width: 100%; /*+*/
    height: auto;
    overflow-x: hidden;
    overflow-y: scroll; /*+*/
    max-height: 100dvh;
    background-color: #495b64;
    z-index: 1;
  }

  .mainmenu__mobile-button {
    display: block; /*+*/
    position: relative;
    width: 2rem; /*+*/
    height: 2rem; /*+*/
    background: url(/images/mobile-menu.svg); /*+*/
    background-repeat: no-repeat; /*+*/
    background-position: center; /*+*/
    background-size: 2rem; /*+*/
    order: 1; /*+*/
  }
  .mainmenu__mobile-close-button {
    --button-size: 2.5rem;
    display: none;
    position: absolute;
    right: 1rem;
    top: 1rem;
    width: var(--button-size);
    height: var(--button-size);
    background: url(/images/mobile-menu-close.svg);
    background-repeat: no-repeat; /*+*/
    background-position: center; /*+*/
    background-size: var(--button-size); /*+*/
  }
  .mainmenu-mobile-close-button_add {
    display: block;
    z-index: 2;
  }

  .mainmenu__item {
    display: flex;
    position: relative;
    flex-direction: column; /*+*/
    align-items: start; /*+*/
    height: auto; /*+*/
    padding: 0rem 1rem;
  }
  .mainmenu__link {
    display: flex;
    position: relative;
    flex-direction: row;
    align-items: center;
    color: #fff;
    text-decoration: none;
    font-size: 3rem; /*+*/
    line-height: 4rem; /*+*/
    font-weight: 100;
    height: auto; /*+*/
  }

  .mainmenu__submenu {
    display: flex; /*+*/
    position: relative; /*+*/
    flex-direction: column;
    left: 0;
    top: 0; /*+*/
    /* background-color: black; */
    /* width: 100%; */
    width: auto;
  }
  .mainmenu__subitem {
    display: flex;
    white-space: nowrap;
    flex-direction: row;
    align-items: center;
    color: #fff;
    font-size: 1.2rem; /*+*/
    line-height: 2rem; /*+*/
    text-decoration: none;
    font-weight: 100;
    height: auto; /*+*/
    padding: 0.5rem;
    margin-left: 1rem; /*+*/
  }
  .mainmenu__subitem:hover {
    background-color: #000000;
  }
  .mainmenu__item:hover > .mainmenu__submenu {
    display: flex;
  }

  .mainmenu_open {
    display: flex;
  }

  /* Иконка поиска */

  .header-container__search-open-button {
    margin-right: 1rem;
    color: #fff;
    background: url(/images/lupa-temp.svg);
    background-repeat: no-repeat;
    background-size: 2rem; /*+*/
    background-position: center;
    width: 2rem; /*+*/
    height: 2rem; /*+*/
    cursor: pointer;
    order: 3; /*+*/
  }

  .header-container__search-close-button {
    background: url(/images/close-search.svg);
  }

  /* Контент */

  .container {
    max-width: 100%;
    min-width: 320px;
  }

  .content {
  }
  .article {
    font-size: 1.3rem;
  }

  .table_over {
    min-width: 280px;
  }
  .table_over table {
    width: 100%;
  }
  .table_over table td,
  th {
    background-color: #f7f7f7;
  }

  .hide-element {
    visibility: hidden;
  }
  .mobile_banner {
    display: block;
    position: relative;
    margin-bottom: 1em;
    margin-top: 1rem;
    text-align: center;
    z-index: 0;
  }
}

/* Хук очипяток */
.sendtypo-widget {
  position: fixed;
  bottom: 0;
  right: 0;
  left: 0;
  margin: 0 auto;
  width: fit-content;
  background: #007cba;
  color: white;
  padding: 12px 20px;
  border-radius: 25px;
  opacity: 0.3;
  box-shadow: 0 2px 10px rgba(0, 0, 0, 0.2);
  cursor: pointer;
  transform: translateY(100%);
  transition: all 0.4s ease;
  z-index: 1000;
  font-size: 14px;
}

.sendtypo-widget.show {
  opacity: 1;
  transform: translateY(-100%);
}

.sendtypo-widget:hover {
  background: #005a87;
}

/* Форма комментариев */
.send-comment-form {
  display: flex;
  flex-direction: row;
  width: 100%;
  gap: 1rem;
  margin-top: 1rem;
}

.send-comment-input {
  width: 100%;
  min-height: 1rem;
  max-height: 6rem;
  padding: 10px 12px;
  outline: 1px solid #ddd;
  border-radius: 6px;
  font-family: inherit;
  font-size: 14px;
  overflow-y: auto;
  white-space: pre-wrap;
  word-wrap: break-word;
  background: white;
}

.send-comment-input:empty::before {
  content: attr(placeholder);
  color: #999;
}

.send-comment-input:focus {
  outline: 1px solid #007bff;
}

.send-comment-button {
  font-weight: 100;
  background-image: url("data:image/svg+xml;base64,PHN2ZyB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHdpZHRoPSIyNCIgaGVpZ2h0PSIyNCIgdmlld0JveD0iMCAwIDE1IDE1Ij4NCiAgICA8cGF0aCBmaWxsPSIjNjY2NjY2IiBkPSJNOC4yOTMgMi4yOTNhMSAxIDAgMCAxIDEuNDE0IDBsNC41IDQuNWExIDEgMCAwIDEgMCAxLjQxNGwtNC41IDQuNWExIDEgMCAwIDEtMS40MTQtMS40MTRMMTEgOC41SDEuNWExIDEgMCAwIDEgMC0ySDExTDguMjkzIDMuNzA3YTEgMSAwIDAgMSAwLTEuNDE0WiIgLz4NCjwvc3ZnPg==");
  color: #444;
  border: 1px #d4d4d4 solid;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1rem;
  background-color: #ebebeb;
  width: 3rem;
  margin: 0;
  border-radius: 3px;
  padding: 10px 12px;
  line-height: 1.2;
  cursor: pointer;
}

/* Список литературы - спойлер */
.enc-spoiler {
  cursor: pointer;
  margin: 1rem auto;
  color: #888;
}

.enc-spoiler__header::marker {
  color: #888;
  cursor: pointer;
} 
.enc-spoiler__content {
}