#support-box {
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2rem;
}
#gallery-page {
  width: 100vw;
  min-height: 100vh;
  display: none;
}
@supports (display: grid) {
  #support-box {display: none;}
  #gallery-page {display: grid;}
}

@media screen and (min-width: 1100px) {
  #gallery-page {
    grid-template-areas:
      "... ... ... ... ..."
      "... ttl ttl ttl ..."
      "... new new hot ..."
      "... img img img ..."
      "... fut fut fut ..."
      "... ... ... ... ..."
    ;
    /*ttl - title, mew - to news, hot - hot keys, img - gallery, fut - footer */
    grid-template-rows: 1.5fr 4rem 12rem 61rem 2rem 1fr;
    grid-template-columns: 1fr repeat(3, 34rem) 1fr;
    grid-gap: 1rem;
  }
  .not-read::before {margin-left: 67rem;}
  #hot-keys {
    display: flex;
    flex-direction: column;
  }
  #gallery-place {
    position: absolute;
    display: flex;
    width: 104rem; height: 51rem;
    overflow: scroll hidden;
    scroll-snap-type: x mandatory;
    scrollbar-width: none;
  }
  #gallery-place::-webkit-scrollbar {width: 0;}
  img {
    width: 68rem; height: 51rem;
    scroll-snap-align: start;
    padding: 0 3rem;
    scroll-margin-left: 15rem;
  }
  #prev-field, #next-field {
    width: 12rem; height: 51rem;
    position: absolute;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: rgba(11, 14, 23, 0.75);
  }
  #next-field {margin-left: 92rem;}
  #prev-icon, #next-icon {
    border-style: solid;
    border-width: 1rem;
    border-color: #fff #fff transparent transparent;
  }
  #prev-icon {transform: rotateZ(-135deg);}
  #next-icon {transform: rotateZ(45deg);}
  #back-button {display: none;}
}
@media screen and (max-width: 1099px) {
  #gallery-page {
    grid-template-areas:
      "... ... ..."
      "... ttl ..."
      "... new ..."
      "... img ..."
      "... fly ..."
      "... fut ..."
      "... ... ..."
    ;
    /*ttl - title, new - to news, img - gallery, fly - back to fly, fut - footer */
    grid-template-rows: 1.5rem 4rem 13rem 1fr 5rem 2rem 0;
    grid-template-columns: 1fr minmax(auto, 55rem) 1fr;
    grid-gap: 1.5rem;
  }
  @media screen and (max-width: 58rem) { .not-read::before {margin-left: calc(100vw - 5rem);} }
  @media screen and (min-width: 58.1rem) { .not-read::before {margin-left: 53rem;} }
  #hot-keys, #gallery-control, #prev-field, #next-field, #prev-icon, #next-icon {display: none;}
  #gallery-block {filter: drop-shadow(0 -2rem 3rem #2b4282);}
  img {
    width: calc(100vw - 3rem);
    height: calc(calc(100vw - 3rem) / 4 * 3);
    max-width: 55rem;
    max-height: 41.25rem;
    padding-bottom: 1.5rem;
  }
  #back-button {display: flex;}
}

#gallery-block, #to-news, #hot-keys, #back-button {
  background-color: #1f2740; border-radius: 1.5rem; z-index: 5;
}
#to-news {
  background-size: cover; background-position: center center; background-repeat: no-repeat;
}
#to-news {
  grid-area: new;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  transition: box-shadow 0.5s, transform 0.5s;
  background-image: -webkit-linear-gradient(top, rgba(11, 14, 23, 0.5), var(--primary-blue)),
  url(/images/autumn.jpg);
}
#to-news:hover, #to-news:focus {
  background-image: -webkit-linear-gradient(top, rgba(21, 35, 79, 0.8), var(--primary-blue)),
  url(/images/autumn.jpg);
}
#back-button:hover, #back-button:focus {box-shadow: 0 0 1.7rem #0b0e17;}
#to-news:focus {
  transform: scale(0.975);
}
.not-read::before {
  content: '';
  display: block;
  width: 2rem;
  height: 2rem;
  background-color: brown;
  border-radius: 50%;
}
#gallery-block {
  grid-area: img;
  transition: filter 0.5s;
  z-index: 4;
  background-color: var(--primary-blue);
}
#gallery-place:focus {border: 0;}
