.photogalleryFrame { width: 100%; float: left; }
  .photogalleryFrame a { outline: 0; }
    .photogalleryFrame img { width: 100%; }

@media screen and (min-width: 1001px)
{
  .photogalleryFrame a { -webkit-flex-basis: 23.125%; }
  .photogalleryFrame a { width: 23.125%; flex-basis: 23.125%; }
  .photogalleryFrame a:not(:nth-child(-n + 4)) { margin-top: 25px; }  
  .photogalleryFrame a:not(:nth-child(4n)) { margin-right: 2.5%; }
}

@media screen
and (max-width: 1001px)
and (min-width: 701px)
{
  .photogalleryFrame a { -webkit-flex-basis: 31.66%; }
  .photogalleryFrame a { width: 31.66%; flex-basis: 31.66%; }
  .photogalleryFrame a:not(:nth-child(-n + 3)) { margin-top: 20px; }
  .photogalleryFrame a:not(:nth-child(3n)) { margin-right: 2.5%; }
}

@media screen
and (max-width: 700px)
and (min-width: 481px)
{
  .photogalleryFrame a { -webkit-flex-basis: 48.75%; }
  .photogalleryFrame a { width: 48.75%; flex-basis: 48.75%; }
  .photogalleryFrame a:not(:nth-child(-n + 2)) { margin-top: 15px; }
  .photogalleryFrame a:not(:nth-child(2n)) { margin-right: 2.5%; }

  #realizace .item .photos .photogalleryItem {width: calc(50% - 5px) !important; margin: 5px 10px 5px 0 !important;}
  #realizace .item .photos .photogalleryItem:nth-child(2n) {margin-right: 0 !important;}
}

@media screen and (min-width: 481px)
{
  .photogalleryFrame { display: flex; flex-wrap: wrap; justify-content: flex-start; }
}

@media screen and (max-width: 480px)
{
  .photogalleryFrame a { width: 100%; float: left; }
  .photogalleryFrame a:not(:last-child) { margin-bottom: 15px; }

  #news .inner .item {flex-direction: column;}
  #news .inner .item .photo {width: 100% !important;}
  #news .inner .item .text {width: 100%; padding: 10px !important;}


  #realizace .item .photos .photogalleryItem {width: calc(25% - (30px / 4)) !important; margin: 5px 10px 5px 0 !important;}
  #realizace .item .photos .photogalleryItem:nth-child(4n) {margin-right: 0 !important;}
}
