/*
 * Devices with max-width 719px
 */

@media only screen and (max-width: 719px) {
  body {
    overflow-x: hidden !important;
    max-width: 720px;
    margin: 0 auto;
  }

  #wrapper #container {
    width: 100%;
  }

  #main {
    width: 96%;
    float: none;
    clear: both;
    margin: 0 auto;
  }
  /*#header-region {
    float: none;
    width: auto;
  }*/
  .region-header {
    padding: 0;
  }
  #nav-first ul.menu li {
    margin: .5em .5em 0 0;
    padding: .4em;
    font-size: .95em;
  }

  #main .views_slideshow_ddblock_main .custom-pager {
    display: none;
  }

  #main-wrapper {
    margin: 0 auto;
    /*padding-top: 60px;*/
  }

  #page-title {
    margin-left: 3px;
  }

  .breadcrumb {
    margin-left: 5px;
  }

  .tabs-wrapper {
    margin-left: 5px;
  }


  .view-hw2012-taxonomy-term .node .field-name-field-perex,
  .view-series-node .node .field-name-field-perex {
    /*max-width: 510px;*/
    width: 100%;
  }

  .node .field-name-field-picture {
    position: static;
    float: left;
  }

  #main .view-hw2012-taxonomy-term footer {
    position: static;
    margin-top: 25px;
    float: left;
  }

  .view-hw2012-taxonomy-term .node .meta, .view-series-node .node .meta  {
    float: left;
    position: static;
    width: auto;
  }

  .view-hw2012-taxonomy-term .node .meta .comment-add,
  .view-series-node .node .meta .comment-add,
  .view-hw2012-taxonomy-term .node .meta .statistics_counter,
  .view-series-node .node .meta .statistics_counter {
    margin-right: 2em;
  }

  .view-hw2012-taxonomy-term .views-row,
  .view-series-node .views-row {
    margin: 0 5px;
  }

  #sidebar {
    clear: both;
    float: none;
    margin: 0 auto;
    width: 96%;

    display: grid;
    grid-template-columns: 1fr 1fr;
    /*grid-auto-rows: minmax(300px, auto);*/
    grid-column-gap: 10px;
    grid-row-gap: 10px;
  }

  #user-login-form label {
    display: block;
  }

  html.js #user-login-form li.openid-link, html.js #user-login li.openid-link {
    display: inline-block;
  }

  /*
  div.node .content ul li, #block-user-0 ul li, .block div.item-list ul li {
    display: inline;
  }*/

  .form-item, .form-actions {
    /*width: 155px;*/
    margin: 1em auto;
    font-size: 1.2em;
  }

  #user-login-form #edit-actions--2 {
    text-align: center;
  }

  #user-login-form .item-list {
    text-align: center;
  }

  #block-search-form {
    text-align: center;
  }

  #sidebar .block-search input.form-text {
    margin-left: 0;
  }

  #sidebar .block-series-related h3 {
    padding-left: 0 !important;
    text-align: center !important;
  }

  .node .block-series-related h3 {
    padding-left: 0;
    text-align: center;
  }

  .node .meta {
    text-align: center;
    margin-top: 5px;
  }

  .view-shop-block tr, .view-shop-block td {
      display: block;
      margin-bottom: 2.5em;
  }
  .view-shop-block .views-field-text-2 img {
    max-width: 135px;
  }

  #footer, #footer * {
    float: none !important;
    clear: both;
    text-align: center;
  }


  /* HIDDEN */

  /*
   * HIDE HEADER
   */

  #nav-first, #nav-second, #nav-third, #nav-fourth {
    /*display: none;*/
  }

  /*
   * JOBS hide
   */

  #block-views-hw2012-fp-jobs-block-1,
  #block-views-hw2012-fp-dir-block-2 {
    display: none;
  }

  /* HIDDEN */

  /* ADs */

  #sidebar-second, #sidebar-fourth, #sidebar-sixth, #sidebar-eighth,
  #sidebar-second .promo-bg, #sidebar-fourth .promo-bg, #sidebar-sixth .promo-bg, #sidebar-eighth .promo-bg,
  #sidebar-fourth .promo-top, #sidebar-sixth .promo-top, #sidebar-eighth .promo-top {
    background-position: 50% 100%;
  }

  #sidebar-second .promo-top, #sidebar-fourth .promo-top, #sidebar-sixth .promo-top, #sidebar-eighth .promo-top {
    background-position: 25% 0%;
  }
  /* FIX ADD BLOCk*/
  #block-block-77 table {
    margin: 0 auto !important;
  }


  .view-dir-categories .view-display-id-attachment_2,
  .view-dir-categories .view-content {
    float: none !important;
    width: 100% !important;
  }
  /* categorie see /seznam.php */
  .views-view-grid tr, .views-view-grid td {
    display: block;
  }
  .views-view-grid tr {
    display: flex;
    flex-wrap: wrap;
  }
  .views-view-grid td {
    flex-basis: 48%;
  }
  div.views-slideshow-ddblock-cycle-vsdupright30p div.slide-text,
  div.views-slideshow-ddblock-cycle-vsdupright30p div.slide-inner img {
    max-width: calc(100vw - 55px) !important;
  }


  .html .hp-domain-block {
    float: none;
    width: 100%;
    clear: both;
  }
  .html .hp-domain-block .block-content > .view {
    min-height: unset;
  }
  .html .hp-domain-block .view-footer {
    position: static;
  }

}


@media only screen and (max-width: 480px) {
  .views-view-grid tr,
  #sidebar {
    display: block;
  }
  .html #sidebar .block-search .form-type-textfield {
    min-width: unset;
  }
  /*#main .view-hw2012-taxonomy-term footer li {
    float: none;
    display: inline-block;
    width: auto;
    margin-right: 1em;
  }*/
}
