/*
  Clean full-width fluid CSS for onlajn.ru / Artisteer-style pages
  Replaces: style.css + style.responsive.css + layout-related JS behavior.
  Keep existing HTML classes and inline page styles.
  Desktop width has no 1920px cap: the page stretches with small side gaps.
*/

:root {
  --page-bg-top: #cccccc;
  --page-bg-bottom: #ffffff;
  --sheet-bg: #ffffff;
  --text: #000000;
  --link: #004985;
  --link-visited: #8a3fb0;
  --link-hover: #fe5039;
  --blue: #005faf;
  --blue-2: #006dc7;
  --nav-hover: #005398;
  --nav-active: #df1b01;
  --footer-bg: #005faf;
  --footer-text: #c2eeff;
  --border-soft: #d7e2e8;
  --shadow: 0 0 7px 4px rgba(0, 0, 0, .10);
  --radius: 0;
  --page-gap: 22px;
  --side-pad: 11px;
}

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

html {
  min-height: 100%;
  -ms-text-size-adjust: 100%;
  -webkit-text-size-adjust: 100%;
}

body {
  min-width: 0;
  min-height: 100%;
  margin: 0;
  padding: 0;
  color: var(--text);
  background: linear-gradient(to bottom, var(--page-bg-top) 0, var(--page-bg-bottom) 250px) no-repeat fixed;
  font: 16px/1.55 Arial, "Arial Unicode MS", Helvetica, sans-serif;
  overflow-x: hidden;
}

#art-main {
  width: 100%;
  min-height: 100vh;
  margin: 0 auto;
  background: transparent;
  cursor: default;
}

header,
footer,
article,
nav,
.art-sheet,
.art-nav,
.art-footer,
.art-footer-inner,
.art-layout-wrapper,
.art-content-layout,
.art-content-layout-row,
.art-layout-cell {
  display: block;
}

.clearfix::after,
.art-sheet::after,
.art-nav::after,
.art-footer::after,
.art-layout-wrapper::after,
.art-layout-cell::after,
.cleared {
  content: "";
  display: table;
  clear: both;
}

/* Top menu */
.art-nav {
  width: calc(100% - var(--page-gap));
  max-width: none;
  margin: 0 auto;
  padding: 8px 11px 0;
  background: #ffffff;
  box-shadow: var(--shadow);
  position: relative;
  z-index: 10;
  text-align: left;
}

ul.art-hmenu,
ul.art-hmenu ul {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0;
  margin: 0;
  padding: 0;
  list-style: none;
  border: 0;
}

ul.art-hmenu li {
  display: block;
  margin: 0;
  padding: 0;
  background: none;
  border: 0;
}

ul.art-hmenu a,
ul.art-hmenu a:link,
ul.art-hmenu a:visited,
ul.art-hmenu a:hover {
  display: block;
  position: relative;
  min-height: 33px;
  padding: 0 17px;
  color: #ffffff;
  background: #0075d6;
  border-radius: 3px 3px 0 0;
  outline: none;
  font: bold 16px/33px "Trebuchet MS", Arial, Helvetica, sans-serif;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}

ul.art-hmenu > li > a:visited {
  color: #ffffff;
}

ul.art-hmenu > li > a:hover {
  color: #d1eaff;
  background: var(--nav-hover);
  text-decoration: none;
}

ul.art-hmenu > li > a.active,
ul.art-hmenu > li > a.active:link,
ul.art-hmenu > li > a.active:visited,
ul.art-hmenu > li > a.active:hover {
  color: #ffffff;
  background: var(--nav-active);
  text-decoration: none;
}

ul.art-hmenu ul {
  display: none;
}

/* Main sheet */
.art-sheet {
  width: calc(100% - var(--page-gap));
  max-width: none;
  min-width: 0;
  margin: 10px auto 0;
  padding: clamp(8px, 2vw, 18px);
  background: var(--sheet-bg);
  box-shadow: var(--shadow);
  position: relative;
  cursor: auto;
}

.art-layout-wrapper {
  width: 100%;
  margin: 0 auto;
}

.art-content-layout,
.art-content-layout-row {
  width: 100%;
}

.art-layout-cell {
  width: auto;
  min-width: 0;
  vertical-align: top;
}

.art-content-layout .art-content {
  width: 100%;
  margin: 0 auto;
}

.art-post,
.art-article,
.art-postcontent {
  width: 100%;
  max-width: 100%;
}

.art-postcontent,
.art-postcontent li,
.art-postcontent table,
.art-postcontent a,
.art-postcontent a:link,
.art-postcontent a:visited,
.art-postcontent a:hover {
  font-family: Arial, "Arial Unicode MS", Helvetica, sans-serif;
  font-size: 16px;
}

.art-postcontent {
  text-align: left;
  overflow-wrap: anywhere;
  word-break: normal;
}

.art-postcontent p {
  margin: 12px 0;
}

h1,
h2,
h3,
h4,
h5,
h6,
p,
a,
ul,
ol,
li {
  margin: 0;
  padding: 0;
}

.art-postcontent h1,
.art-blockcontent h1 {
  margin: 12px 0;
  color: var(--blue);
  font: bold clamp(22px, 3.2vw, 28px)/1.25 "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.art-postcontent h2,
.art-blockcontent h2 {
  margin: 20px 0 10px;
  color: var(--blue-2);
  font: normal clamp(20px, 2.8vw, 24px)/1.25 "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.art-postcontent h3,
.art-blockcontent h3 {
  margin: 18px 0 8px;
  color: var(--blue-2);
  font: normal clamp(18px, 2.4vw, 21px)/1.3 "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.art-postcontent h4,
.art-blockcontent h4 {
  margin: 18px 0 8px;
  color: #002d52;
  font: normal 18px/1.3 "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.art-postcontent h5,
.art-blockcontent h5 {
  margin: 16px 0 8px;
  color: #002d52;
  font: bold 14px/1.35 "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.art-postcontent h6,
.art-blockcontent h6 {
  margin: 14px 0 8px;
  color: #006bc2;
  font: bold 12px/1.35 "Trebuchet MS", Arial, Helvetica, sans-serif;
}

.art-postcontent a,
.art-postcontent a:link {
  color: var(--link);
  text-decoration: underline;
}

.art-postcontent a:visited {
  color: var(--link-visited);
}

.art-postcontent a:hover {
  color: var(--link-hover);
}

.art-postcontent ul,
.art-postcontent ol {
  margin: 12px 0 12px 1.4em;
  padding: 0;
}

.art-postcontent ul {
  list-style: disc;
}

.art-postcontent ol {
  list-style-position: outside;
}

.art-postcontent li {
  margin: 6px 0;
}

.art-postcontent table {
  width: 100%;
  max-width: 100%;
  border-collapse: collapse;
}

.art-postcontent img,
.art-postcontent video,
.art-postcontent iframe,
.art-postcontent object,
.art-postcontent embed {
  max-width: 100%;
}

.art-postcontent img,
.art-postcontent video {
  height: auto;
}

.art-responsive-embed,
.video-wrapper {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  height: 0;
  overflow: hidden;
}

.art-responsive-embed iframe,
.video-wrapper iframe,
.art-responsive-embed object,
.video-wrapper object,
.art-responsive-embed embed,
.video-wrapper embed {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Existing inline layout helper classes from generated pages */
.art-content .art-postcontent-0 .layout-item-0 {
  margin-bottom: 5px;
}

.art-content .art-postcontent-0 .layout-item-old-1 {
  border-spacing: 10px 0;
  border-collapse: separate;
}

.art-content .art-postcontent-0 .layout-item-old-2 {
  border: 1px solid #bbc5c9;
  padding-right: 10px;
  padding-left: 10px;
}

.art-content .art-postcontent-0 .layout-item-1 {
  border: 1px solid #80dbff;
  padding-right: 10px;
  padding-left: 10px;
}

/* Footer */
.art-footer {
  width: calc(100% - var(--page-gap));
  max-width: none;
  margin: 0 auto;
  padding: 0;
  color: var(--footer-text);
  background: var(--footer-bg);
  box-shadow: var(--shadow);
}

.art-footer-inner {
  width: 100%;
  padding: 10px var(--side-pad);
}

.art-footer .art-content-layout-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
}

.art-footer .art-layout-cell {
  flex: 1 1 260px;
  min-width: 0;
}

.art-footer .layout-item-0 {
  padding: 5px;
}

.art-footer .layout-item-1 {
  padding: 25px;
  vertical-align: top;
}

.art-footer p,
.art-footer li,
.art-footer a {
  color: var(--footer-text);
  font: 13px/1.35 Arial, "Arial Unicode MS", Helvetica, sans-serif;
}

.art-page-footer,
.art-page-footer a,
.art-page-footer a:link,
.art-page-footer a:visited,
.art-page-footer a:hover {
  color: #fea59a;
  font: 10px/1.4 Arial, sans-serif;
  text-align: center;
  text-decoration: underline;
}

/* Code blocks from the old custom CSS */
code {
  padding: 2px 4px;
  color: #d63384;
  background: #f8f9fa;
  border: 1px solid #dee2e6;
  border-radius: 4px;
  font: 14px/1.4 "Courier New", Courier, monospace;
}

pre {
  max-width: 100%;
  margin: 14px 0;
  padding: 16px;
  overflow: auto;
  color: #212529;
  background: #f0f0f0;
  border: 1px solid #ced4da;
  border-radius: 8px;
  font: 14px/1.5 "Courier New", Courier, monospace;
  white-space: pre-wrap;
  word-wrap: break-word;
}

kbd {
  padding: 2px 6px;
  color: #495057;
  background: #e9ecef;
  border: 1px solid #adb5bd;
  border-radius: 4px;
  box-shadow: 0 1px 1px rgba(0, 0, 0, .1);
  font: 13px/1.4 "Courier New", Courier, monospace;
}

form {
  margin: 0 !important;
  padding: 0 !important;
}

/* Fluid responsive rules */
@media (max-width: 900px) {
  .art-nav,
  .art-sheet,
  .art-footer {
    width: 100%;
    margin-left: 0;
    margin-right: 0;
    box-shadow: none;
  }

  .art-sheet {
    margin-top: 0;
  }
}

@media (max-width: 700px) {
  body {
    font-size: 15px;
    line-height: 1.55;
  }

  .art-nav {
    padding: 6px 6px 0;
  }

  ul.art-hmenu {
    width: 100%;
    align-items: stretch;
  }

  ul.art-hmenu li {
    flex: 1 1 50%;
  }

  ul.art-hmenu a,
  ul.art-hmenu a:link,
  ul.art-hmenu a:visited,
  ul.art-hmenu a:hover {
    min-height: 38px;
    padding: 0 10px;
    border-radius: 3px;
    font-size: 14px;
    line-height: 38px;
    text-align: center;
  }

  .art-content-layout,
  .art-content-layout-row,
  .art-layout-cell,
  .art-footer .art-content-layout-row,
  .art-footer .art-layout-cell {
    display: block;
    width: 100% !important;
  }

  .art-sheet {
    padding: 12px;
  }

  .art-footer .layout-item-0,
  .art-footer .layout-item-1 {
    width: 100% !important;
    padding: 10px 12px;
  }

  .art-postcontent,
  .art-postcontent li,
  .art-postcontent table,
  .art-postcontent a,
  .art-postcontent a:link,
  .art-postcontent a:visited,
  .art-postcontent a:hover {
    font-size: 15px;
  }

  code,
  pre,
  kbd {
    font-size: 12px;
  }
}

@media (max-width: 430px) {
  ul.art-hmenu li {
    flex-basis: 100%;
  }

  .art-sheet {
    padding: 10px;
  }

  .art-postcontent h1 {
    font-size: 21px;
  }

  .art-postcontent h2 {
    font-size: 19px;
  }
}

@media print {
  body,
  #art-main,
  .art-sheet {
    background: #fff !important;
    box-shadow: none !important;
  }

  .art-nav,
  .art-footer {
    display: none !important;
  }

  .art-sheet {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0;
  }
}

/* Buttons: existing links like <a class="art-button">Подробнее</a> */
.art-button,
.art-button:link,
.art-button:visited,
.art-postcontent .art-button,
.art-postcontent .art-button:link,
.art-postcontent .art-button:visited,
button.art-button,
input.art-button {
  display: inline-block;
  min-height: 31px;
  padding: 0 22px;
  margin: 6px 0;
  border: 1px solid #004f8f;
  border-radius: 3px;
  color: #ffffff !important;
  background: #005faf;
  background: linear-gradient(to bottom, #007be0 0%, #004175 100%);
  box-shadow: 0 1px 3px rgba(0, 0, 0, .22);
  font: bold 15px/31px "Trebuchet MS", Arial, Helvetica, sans-serif !important;
  text-align: center;
  text-decoration: none !important;
  white-space: nowrap;
  cursor: pointer;
  vertical-align: middle;
  -webkit-appearance: none;
  appearance: none;
}

.art-button:hover,
.art-button:focus,
.art-postcontent .art-button:hover,
.art-postcontent .art-button:focus,
button.art-button:hover,
button.art-button:focus,
input.art-button:hover,
input.art-button:focus {
  color: #ffffff !important;
  background: #0075d6;
  background: linear-gradient(to bottom, #118ceb 0%, #005398 100%);
  border-color: #003f73;
  text-decoration: none !important;
  outline: none;
}

.art-button:active,
.art-postcontent .art-button:active,
button.art-button:active,
input.art-button:active {
  background: #004f8f;
  background: linear-gradient(to bottom, #004175 0%, #007be0 100%);
  box-shadow: inset 0 1px 3px rgba(0, 0, 0, .28);
  transform: translateY(1px);
}

.art-postcontent p > .art-button {
  margin-top: 4px;
}

@media (max-width: 430px) {
  .art-button,
  .art-button:link,
  .art-button:visited,
  .art-postcontent .art-button,
  .art-postcontent .art-button:link,
  .art-postcontent .art-button:visited,
  button.art-button,
  input.art-button {
    width: 100%;
    min-height: 38px;
    padding: 0 14px;
    font-size: 15px !important;
    line-height: 38px;
  }
}

/* Inline code */
code {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #b00020;
    background-color: #fff3cd;
    padding: 2px 5px;
    border-radius: 4px;
    border: 1px solid #d39e00;
    font-weight: 600;
}

/* Code blocks */
pre {
    font-family: 'Courier New', Courier, monospace;
    font-size: 14px;
    color: #f8f9fa;
    background-color: #1f2933;
    padding: 16px;
    border-radius: 8px;
    border: 1px solid #111827;
    overflow: auto;
    line-height: 1.5;
    white-space: pre-wrap;
    word-wrap: break-word;
}

/* Remove inline-code decoration inside pre blocks */
pre code {
    color: inherit;
    background: transparent;
    padding: 0;
    border: 0;
    border-radius: 0;
    font-size: inherit;
    font-weight: normal;
}

/* Keyboard keys */
kbd {
    font-family: 'Courier New', Courier, monospace;
    font-size: 13px;
    color: #111827;
    background-color: #ffffff;
    padding: 2px 7px;
    border-radius: 4px;
    border: 1px solid #6b7280;
    box-shadow: 0 2px 0 #6b7280;
    font-weight: 700;
}

/* Mobile */
@media (max-width: 768px) {
    code, pre, kbd {
        font-size: 12px;
    }

    pre {
        padding: 12px;
    }
}