/* Lemoner 2011 — https://web.archive.org/web/20111007205640/http://www.lemoner.ru/ */

* { margin: 0; padding: 0; }
html { font-size: 100%; height: 101%; }
body {
  font: 11pt Arial, Helvetica, sans-serif;
  background: #f2fbe6;
  margin: 0;
  color: #565656;
}

#container {
  width: 1000px;
  max-width: 100%;
  margin: 0 auto;
  padding-bottom: 2rem;
  box-sizing: border-box;
}

#header { padding: 10px; text-align: center; }
#header a { text-decoration: none; }
#header img { border: 0; max-width: 100%; height: auto; }

#main {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

#sidebar {
  flex: 0 0 236px;
  width: 236px;
  padding: 5px;
  background: #e3febc;
  border: solid #d5f9a1 1px;
  box-sizing: content-box;
}

#content {
  flex: 1 1 auto;
  min-width: 0;
  width: auto;
  max-width: 748px;
  padding: 0;
  background: #f2fbe6;
}

#content h1.page-title {
  padding: 0.4em 0 0.6em 1.5em;
  color: #565656;
  font-size: 12pt;
  font-weight: bold;
  width: 100%;
  max-width: 748px;
  box-sizing: border-box;
}

#content #onerec {
  width: 100%;
  max-width: 748px;
  padding: 10px 40px 20px 40px;
  background: #ebf6cd;
  border: solid #e5e7ab 1px;
  margin-bottom: 5px;
  box-sizing: border-box;
}

#content #onerec h1 {
  color: #565656;
  font-size: 12pt;
  padding: 0;
  margin: 0 0 0.5em;
}
#content #onerec h1.home-title { padding-top: 0.5em; padding-bottom: 0.8em; }
#content #onerec h1 span.tod {
  font-size: 8pt;
  float: right;
  text-align: right;
  font-weight: bold;
}

#content #onerec p {
  color: #565656;
  font-size: 1em;
  line-height: 1.5em;
  text-indent: 2em;
  margin-top: 1.2em;
  text-align: justify;
}
#content #onerec p:first-of-type { margin-top: 0.4em; }

#content #onerec a {
  color: #5d5d27;
  text-decoration: none;
  font-weight: bold;
}
#content #onerec a:hover {
  color: red;
  text-decoration: underline;
}

/* nested menu + lemon icons on section headers */
ul#lmenu,
ul#lmenu ul {
  list-style-type: none;
  margin: 0;
  padding: 0;
  width: 236px;
}
ul#lmenu a { display: block; text-decoration: none; }
ul#lmenu > li { margin-top: 1px; }

ul#lmenu > li > a {
  background: url(../imgs/lmenu_cat_img.png) 5px center #e3febc no-repeat;
  color: #565656;
  padding: 0.5em 0.5em 0.5em 2.4em;
  font-size: 14px;
}
ul#lmenu > li > a:hover {
  background: url(../imgs/lmenu_cat_img_hover.png) 5px center #dcf7b6 no-repeat;
  color: #000;
}

ul#lmenu li ul li a {
  background: #d5f9a1;
  color: #565656;
  padding: 0.25em 0.5em 0.25em 15px;
  font-size: 12px;
}
ul#lmenu li ul li a:hover,
ul#lmenu li ul li.current a {
  background: #ccee9a;
  color: #000;
  border-left: 5px #cecd31 solid;
  padding-left: 10px;
}

/* prev/next — та же ширина, что у #onerec */
#content #buttons {
  float: none;
  width: 100%;
  max-width: 748px;
  box-sizing: border-box;
  text-align: right;
  font-size: 14px;
  background: #e3febc;
  border: #d5f9a1 1px solid;
  margin-bottom: 4px;
  min-height: 44px;
  overflow: hidden;
}
#buttons ul {
  list-style-type: none;
  padding-right: 2px;
  overflow: hidden;
  margin: 0;
}
#buttons li {
  float: right;
  line-height: 3em;
  margin-left: 1em;
  white-space: nowrap;
}
#buttons a {
  background-repeat: no-repeat;
  background-position: center;
  text-decoration: none;
  color: #565656;
  display: inline-block;
}
#buttons a:hover { background-color: #ccee9a; color: #000; }

#buttons #nav_prev a {
  background-image: url(../imgs/prev.png);
  padding: 10px 20px;
  min-width: 24px;
  min-height: 24px;
}
#buttons #nav_prev a:hover { background-image: url(../imgs/prev_hover.png); }
#buttons #nav_next a {
  background-image: url(../imgs/next.png);
  padding: 10px 20px;
  min-width: 24px;
  min-height: 24px;
}
#buttons #nav_next a:hover { background-image: url(../imgs/next_hover.png); }
#buttons #nav_na img {
  padding: 0 8px;
  border: none;
  position: relative;
  top: 7px;
  vertical-align: middle;
}

#container::after {
  content: none;
}

#footer {
  clear: both;
  background: #f2fbe6;
  color: #aaa;
  padding: 10px 10px 20px;
  margin-top: 8px;
  overflow: hidden;
}
#footer .footer-100mb {
  float: right;
  width: 295px;
  max-width: 100%;
  padding-right: 10px;
  color: #aaa;
  font-size: 13px;
  line-height: 1.4;
  text-align: left;
}
#footer .footer-100mb a {
  color: #aaa;
  text-decoration: underline;
  text-underline-offset: 2px;
}
#footer .footer-100mb a:hover {
  color: #5d5d27;
  text-decoration: underline;
}
#footer .views {
  clear: both;
  text-align: center;
  font-size: 12px;
  color: #7f7f53;
  margin-top: 0.75rem;
}

.hotspot {
  color: #565656;
  padding-bottom: 1px;
  border-bottom: 1px dotted #197843;
  cursor: help;
}

#jstt {
  position: fixed;
  z-index: 99999;
  display: none;
  max-width: 320px;
  pointer-events: none;
}
#jstttop, #jsttbot { display: none; }
#jsttcont {
  display: block;
  padding: 8px 12px;
  background: #197843;
  color: #d4e6c7;
  font-size: 13px;
  line-height: 1.35;
  border-radius: 2px;
  word-wrap: break-word;
}

.mobile-bar,
.nav-backdrop {
  display: none;
}

@media (max-width: 800px) {
  body {
    padding-top: 52px;
  }

  .mobile-bar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 10000;
    height: 52px;
    padding: 0 12px;
    background: #e3febc;
    border-bottom: 1px solid #d5f9a1;
    box-sizing: border-box;
  }

  .mobile-brand {
    font: 700 16px/1 Arial, Helvetica, sans-serif;
    color: #565656;
    text-decoration: none;
    letter-spacing: 0.04em;
  }

  .burger {
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 42px;
    height: 42px;
    padding: 8px;
    border: 0;
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    box-sizing: border-box;
  }
  .burger span {
    display: block;
    height: 2px;
    width: 100%;
    background: #565656;
    border-radius: 1px;
    transition: transform 0.2s ease, opacity 0.2s ease;
  }
  body.nav-open .burger span:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
  }
  body.nav-open .burger span:nth-child(2) {
    opacity: 0;
  }
  body.nav-open .burger span:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
  }

  .nav-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 10001;
    background: rgba(0, 0, 0, 0.35);
  }
  .nav-backdrop[hidden] {
    display: none !important;
  }

  #header {
    padding: 8px 10px;
  }
  #header img {
    max-width: min(100%, 420px);
  }

  #main {
    display: block;
    gap: 0;
    padding: 0 8px;
  }

  #content {
    max-width: 100%;
  }

  #content #onerec,
  #content #buttons,
  #content h1.page-title {
    max-width: 100%;
  }

  #content #onerec {
    padding: 12px 16px 16px;
  }

  #content #onerec p {
    text-indent: 1.25em;
  }

  #footer .footer-100mb {
    float: none;
    width: auto;
    padding-right: 0;
  }

  /* drawer */
  #sidebar {
    position: fixed;
    top: 52px;
    left: 0;
    bottom: 0;
    z-index: 10002;
    width: min(80vw, 320px);
    max-width: 80vw;
    margin: 0;
    padding: 8px;
    box-sizing: border-box;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    box-shadow: 2px 0 16px rgba(0, 0, 0, 0.12);
    pointer-events: none;
  }

  body.nav-open #sidebar {
    transform: translateX(0);
    pointer-events: auto;
  }

  body.nav-open {
    overflow: hidden;
  }

  ul#lmenu,
  ul#lmenu ul {
    width: 100%;
  }
}
