@view-transition {
  navigation: auto;
}

/* pseudo */

@media (width >= 1024px) {
  ::placeholder {
    opacity: 1;
    transition: opacity 0.15s ease;
    font-weight: 300;
  }

  :focus::placeholder {
    opacity: 0;
    transition: opacity 0.15s ease;
  }

  ::selection {
    background: var(--color-accent-transparent);
  }

  ::-webkit-scrollbar {
    width: 5px;
    height: 5px;
  }

  ::-webkit-scrollbar-button {
    display: none;
  }

  ::-webkit-scrollbar-track {
    background-color: var(--color-black-light);
  }

  ::-webkit-scrollbar-track-piece {
    background-color: var(--color-grey-dark);
  }

  ::-webkit-scrollbar-thumb {
    height: 5px;
    background-color: var(--color-black-light);
  }

  ::-webkit-scrollbar-corner {
    display: none;
  }

  ::-webkit-resizer {
    display: none;
  }
}

/* default */

html, body, div, span, input, textarea, button, select, applet, object, iframe, h1, h2, h3, h4, h5, h6, p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var, dl, dt, dd, ol, ul, li, fieldset, form, label, legend, table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, details, embed, figure, figcaption, footer, header, hgroup, menu, nav, output, ruby, section, summary, time, mark, audio, video {
  margin: 0;
  padding: 0;
  border: 0;
  color: inherit;

  outline: none;
  font-family: inherit;
  vertical-align: baseline;
  box-sizing: border-box;
}

input,
textarea {
  padding: 7px 16px;
  min-height: 50px;

  background-color: var(--color-grey-extra-light);
  border-bottom: 1px solid var(--color-grey-light);
  border-radius: 2px;
  font-family: var(--font-main);
  font-size: 16px;
  -webkit-appearance: none;

  transition: border-color .1s ease;

  @media (width < 480px) {
    min-height: 40px;
  }

  &:focus {
    border-color: var(--color-grey);
    outline: none;
  }
}

html {
  scroll-behavior: smooth;
}

body {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  width: 100%;
  min-height: 100%;
  color: var(--color-black-light);

  font-family: 'Museo', sans-serif;
  font-size: 19px;
  font-weight: 100;
  line-height: 1.4;
  overflow-y: scroll;
  margin: 0 auto;

  @media (width < 1200px) {
    font-size: 18px;
  }

  @media (width < 1024px) {
    font-size: 16px;
  }
}

h1, h2, h3, h4, h5, h6, .h1, .h2, .h3 {
  font-weight: 600;
  line-height: 1.2;
}

h1, .h1 {
  font-size: 36px;
  margin: 0 0 35px;

  @media (width < 1024px) {
    font-size: 28px;
    margin-bottom: 25px;
  }

  @media (width < 768px) {
    margin: 0 0 20px;
    font-size: 28px;
  }
}

h2, .h2 {
  margin: 35px 0 25px;
  font-size: 26px;

  @media (width < 1024px) {
    margin: 35px 0 20px;
    font-size: 24px;
  }

  @media (width < 480px) {
    margin: 25px 0 15px;
    font-size: 22px;
  }
}

h3, .h3 {
  font-size: 24px;
  margin: 20px 0 20px;

  @media (width < 768px) {
    margin: 20px 0 15px;
    font-size: 22px;
  }

  @media (width < 480px) {
    font-size: 18px;
  }
}

a {
  text-decoration: none;
  color: var(--color-accent);

  &:hover {
    text-decoration: underline;
  }
}

img {
  display: block;
  max-width: 100%;
  margin: 0;
  border: none;
}

table {
  border-collapse: collapse;
  border-spacing: 0;
}

p {
  margin: 0 0 20px 0;

  @media (width < 1024px) {
    margin: 0 0 15px;
  }
}

b,
strong {
  font-weight: 700;
}

ul, ol {
  margin: 0 0 30px 20px;

  @media (width < 1024px) {
    margin: 0 0 25px 20px;
  }
}

ul {
  list-style: square;
}

li {
  margin: 0 0 8px;
}

.main {
  position: relative;
  width: 100%;
  min-height: calc(100vh - 500px);
  padding: 15px 0 230px;
  margin: var(--subheader-height) auto -110px;

  background: var(--color-white);

  @media (width < 1024px) {
    margin: 0 auto;
    padding: 15px 0 80px;
  }

  @media (width < 768px) {
    padding: 15px 0 60px;
  }
}

.container,
header,
footer {
  padding: 0 var(--container-gutter);
}

/* custom */

.logo__svg {
  display: block;
  width: 188px;
  height: 42px;
}

.comment {
  position: relative;
  padding: 20px 20px 20px 30px;
  margin: 40px 0;

  background: var(--color-grey-extra-light);
  border-left: 5px solid var(--color-accent);

  @media (width < 480px) {
    padding: 10px 10px 10px 20px;
  }
}

.overlay {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 100%;
  box-sizing: content-box;
  padding-bottom: 70px;
  z-index: 2;

  background: rgba(0, 0, 0, 0);
  transform: translateY(70px);
  visibility: hidden;

  transition: background .3s ease, visibility 0s .3s;
}

#toggleMobileMenu:checked ~ .overlay {
  background: rgba(0, 0, 0, 0.6);
  visibility: visible;

  transition: background .3s ease, visibility 0s 0s;
}

.tel-text {
  font-weight: 700;
  white-space: nowrap;
}

.icon-small {
  width: 16px;
  height: 16px;
  margin-right: 10px;
}

.color-accent {
  color: var(--color-accent);
}

.bold {
  font-weight: 700;
}

.oferta {
  padding: 3px 10px 3px 15px;
  margin: 0 0 40px 0;

  background: var(--color-grey-extra-light);
  border-left: 2px solid var(--color-grey);
  font-size: 14px;
}

.scroll-to-top {
  position: fixed;
  left: 15px;
  bottom: 12px;
  padding: 0;
  margin: 0;
  width: auto;
  min-width: auto;
  height: auto;
  min-height: auto;
  z-index: 1;

  background: none;
  border: 15px solid transparent;
  border-top: none;
  border-bottom-color: var(--color-grey);
  opacity: 0;
  visibility: hidden;

  transition: opacity .25s ease, visibility .0s .25s;

  &.is-show {
    visibility: visible;
    opacity: .5;

    transition: opacity .25s ease, visibility .0s;
  }
}

.privacy {
  margin: 10px auto 0;
  font-weight: 200;
  font-size: 13px;
  color: var(--color-grey-dark);
  cursor: default;
  opacity: .8;

  @media (width < 768px) {
    text-align: center;
  }
}

.privacy__link {
  border-bottom: 1px dashed var(--color-grey);
  color: var(--color-black-extra-light);
  white-space: nowrap;

  transition: border .1s ease;

  &:hover {
    text-decoration: none;
    border-color: transparent;
  }
}

#vk_community_messages {
  right: 15px !important;

  opacity: 0;

  transition: opacity .15s 1s ease;

  &.is-active {
    opacity: 1;
  }
}

/* flex-grid */

*[class*='fg-'] {
  display: flex;
  justify-content: flex-start;
  flex-wrap: wrap;
  margin: 50px -5px;

  @media (width < 1024px) {
    margin: 30px -5px;
  }

  &[class*='-d6'] > * {
    flex: 1 1 calc(100% / 6 - 10px);
    margin: 0 5px 10px;
  }

  &[class*='-d4'] > * {
    flex: 1 1 calc(100% / 4 - 10px);
    margin: 0 5px 10px;
  }

  &[class*='-d3'] > * {
    flex: 1 1 calc(100% / 3 - 10px);
    margin: 0 5px 10px;
  }

  &[class*='-d2'] > * {
    flex: 1 1 calc(100% / 2 - 10px);
    margin: 0 5px 10px;
  }

  &[class*='-t4'] > * {
    @media (width < 768px) {
      flex: 1 1 calc(100% / 4 - 10px);
      margin: 0 5px 10px;
    }
  }

  &[class*='-t3'] > * {
    @media (width < 768px) {
      flex: 1 1 calc(100% / 3 - 10px);
      margin: 0 5px 10px;
    }
  }

  &[class*='-t2'] > * {
    @media (width < 768px) {
      flex: 1 1 calc(100% / 2 - 10px);
      margin: 0 5px 10px;
    }
  }

  &[class*='-m2'] > * {
    @media (width < 480px) {
      flex: 1 1 calc(100% / 2 - 10px);
    }
  }

  &[class*='-m1'] > * {
    @media (width < 480px) {
      flex: 1 1 calc(100% - 10px);
    }
  }
}
