/**
 * @file
 * Positioning for responsive layout .
 *
 * Define CSS classes to create a table-free, 3-column, 2-column, or single
 * column layout depending on whether blocks are enabled in the left or right
 * columns.
 *
 * This layout uses the Zen Grids plugin for Compass: http://zengrids.com
 */
/*
 * Center the page.
 */
.page,
.region-bottom {
  /* For screen sizes larger than 1200px, prevent excessively long lines of text
     by setting a max-width. */
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
}

/*
 * Apply the shared properties of grid items in a single, efficient ruleset.
 */
#content,
#navigation,
.region-sidebar-first,
.region-sidebar-second,
#footer {
  padding-left: 0;
  padding-right: 0;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  word-wrap: break-word;
}

/*
 * Containers for grid items and flow items.
 */
#header:before, #header:after,
#main:before,
#main:after,
#footer:before,
#footer:after {
  content: "";
  display: table;
}
#header:after,
#main:after,
#footer:after {
  clear: both;
}

/*
 * Navigation bar
 */
@media all and (min-width: 480px) {
  #main {
    position: relative;
  }
}
@media all and (min-width: 480px) and (max-width: 959px) {
  /*
   * Use 3 grid columns for smaller screens.
   */
  /*
   * The layout when there is only one sidebar, the left one.
   */
  #content {
    /* Span 2 columns, starting in 2nd column from left. */
    float: left;
    width: 60%;
    margin-left: 0%;
    margin-right: -60%;
  }

  .region-sidebar-first {
    /* Span 1 column, starting in 1st column from left. */
    float: right;
    width: 40%;
    margin-right: 0%;
    margin-left: -40%;
  }

  .region-sidebar-second {
    /* Start a new row and span all 3 columns. */
    float: right;
    width: 40%;
    margin-right: 0%;
    margin-left: -40%;
    clear: right;
  }
}
@media all and (min-width: 960px) {
  /*
   * Use 5 grid columns for larger screens.
   */
  /*
   * The layout when there is only one sidebar, the left one.
   */
  #content {
    /* Span 3 columns, starting in 2nd column from left. */
    float: left;
    width: 60%;
    margin-left: 0%;
    margin-right: -60%;
  }

  .region-sidebar-first {
    /* Span 1 column, starting in 1st column from left. */
    float: right;
    width: 40%;
    margin-right: 0%;
    margin-left: -40%;
    clear: right;
  }

  .region-sidebar-second {
    /* Span 1 column, starting in 5th column from left. */
    float: right;
    width: 40%;
    margin-right: 0%;
    margin-left: -40%;
    clear: right;
  }
}
