@media (max-width: 991px) {
  .for-mobile {
    display: flex !important;
  }

  section.article-style {
    padding: 16px;
    padding-top: 100px;
  }

  section.article-style h1 {
    font-size: 2.2rem;
  }

  section.article-style h2 {
    font-size: 1.7rem;
  }

  section.article-style .articles-mobile-pre {
    display: flex;
    flex-direction: column;

  }

  section.article-style .articles-mobile-pre img {
    width: 100%;
    padding-bottom: 8px;
    max-width: none;
    max-height: none;
  }

  section.article-style .card {
    width: 100%;
  }

  #home-content {
    margin-top: 3rem;
  }

  #home-content h1 div {
    font-size: 2em;
  }

  #home-content h1 span {
    font-size: 1.2rem;
  }

  #home-content h2 {
    text-align: center;
    margin-top: auto;
    margin-bottom: 2rem;
  }

  section:not(#education):not(.article-style) {
    padding: 16px;
  }

  section#education {
    grid-template-columns: repeat(1, 1fr);
    padding: 0;
    padding-bottom: 24px;
  }

  .cert-slider {
    padding: 80px 0;
  }

  section:not(#home) {
    flex-direction: column;
  }

  .services-grid-block, .contacts-grid-block {
    width: 100%;
    padding: 0 !important;
    margin: 0;
  }

  .contacts-grid-block:first-child {
    display: none;
  }

  .contacts-grid-block:nth-child(2n) {
    flex-direction: column;
    align-items: center;
  }

  .photo-image {
    margin-bottom: 24px;
  }

  #google-map {
    margin-top: 1rem;
  }

  /* Header */

  header:before {
    content: '';
    background-color: rgba(85, 107, 115, 0.95);
    position: absolute;
    top: 0;
    right: 0;
    width: 100%;
    transition: box-shadow 0.7s;
  }

  header.active:before {
    box-shadow: 0 0 0 100vh var(--primary-color);
  }

  .toggle {
    position: absolute;
    top: 24px;
    right: 24px;
  }

  .toggle i {
    font-size: 1.2rem;
  }

  .toggle .fa-xmark {
    display: none;
  }

  #logo { display: none; }

  header nav {
    position: fixed;
    flex-direction: column;
    top: 30%;
    text-align: center;
    visibility: hidden;
    opacity: 0;
  }

  header.active .fa-bars {
    display: none;
  }

  header.active #logo {
    display: flex;
  }

  header.active nav {
    opacity: 1;
    transition: opacity 0.5s 0.5s;
    visibility: visible;
  }

  header.active .fa-xmark {
    display: inline-block;
  }

  /* gallery */

  section#gallery.active {
    left: -16px;
    top: -16px;
  }

  #slider {
    width: 100%;
    margin: 8px 0;
  }

  .slider-item:nth-child(1),
  .slider-item:nth-child(2) {
    left: 16px;
    top: 24px;
    width: calc(100% - 32px);
    height: calc(100% - 24px);
    box-shadow: none;
  }

  .line, .circle { display: none; }



  .slider-item {
    width: 100px;
    height: 100px;
    top: calc(100% - 100px);
    opacity: 0.5;
  }

  .slider-item:nth-child(3n) { left: calc(16px); opacity: 0.6; }
  .slider-item:nth-child(4n) { left: calc(16px + 100px * 1 + 20px); }
  .slider-item:nth-child(5n) { left: calc(16px + 100px * 2 + 20px * 2); }
  .slider-item:nth-child(6n) { left: calc(16px + 100px * 3 + 20px * 3); }
  .slider-item:nth-child(7n) { left: calc(16px + 100px * 4 + 20px * 4); }
  .slider-item:nth-child(8n) { left: calc(16px + 100px * 5 + 20px * 5); }
  .slider-item:nth-child(9n) { left: calc(16px + 100px * 6 + 20px * 6); }
  .slider-item:nth-child(10n) { left: calc(16px + 100px * 7 + 20px * 7); }
  .slider-item:nth-child(11n) { left: calc(16px + 100px * 8 + 20px * 8); }
  .slider-item:nth-child(12n) { left: calc(16px + 100px * 9 + 20px * 9); }
  .slider-item:nth-child(n + 13):nth-child(-n + 40) { left: calc(16px + 100px * 10 + 20px * 10); }
}
