/**
 * @file
 * Positioning for a responsive layout.
 *
 * Define CSS classes to create a fluid grid layout with optional sidebars
 * depending on whether blocks are placed in the left or right sidebars.
 *
 * This layout uses the Zen Grids plugin for Compass: http://zengrids.com
 */

/**
 * Center the page.
 *
 * For screen sizes larger than 1200px, prevent excessively long lines of text
 * by setting a max-width.
 */
.header__region, #footer, .region-footer-bottom, .region-bottom, #navigation, #main-inside{
	margin-left: auto;
  	margin-right: auto;
  	max-width: 1200px;
}
#content{
	margin: 0;
	padding: 0 10px;
  	max-width: 900px;
}
/* Apply the shared properties of grid items in a single, efficient ruleset. */
#header,
#content,
#main-inside,
#navigation_wrap,
.region-sidebar-first,
.region-sidebar-second,
#footer_wrap
{
  padding-left: 10px;
  padding-right: 10px;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  -ms-box-sizing: border-box;
  box-sizing: border-box;
  word-wrap: break-word;
  *behavior: url("/path/to/boxsizing.htc");
  _display: inline;
  _overflow: hidden;
  _overflow-y: visible;
}
#navigation, #content, #main-inside{
	padding: 0;
}
/* Containers for grid items and flow items. */
#header,
#main,
#footer_wrap
{
  *position: relative;
  *zoom: 1;
}
#header:before,
#header:after,
#main:before,
#main:after,
#main-inside:after,
#footer_wrap:before,
#footer_wrap:after
{
  content: "";
  display: table;
}
#header:after,
#main:after,
#main-inside:after,
#footer_wrap
{
  clear: both;
}
/* Navigation bar */
#main {
    /* Move all the children of #main down to make room. */
    position: relative;
	padding-top: 6em;
	padding-bottom: 3em;
}
#navigation_wrap{
    /* Move the navbar up inside #main's padding. */
    position: absolute;
    top: 0;
    width: 100%;
	padding: 10px 0;
	margin: 0;
	z-index: 20;
}
#navigation{
	width: 100%;
	padding: 0;
}

/**
 * Use 3 grid columns for smaller screens.
 */
@media all and (min-width: 480px) and (max-width: 959px) {

  /**
   * The layout when there is only one sidebar
   */
  .sidebar-first #content, .sidebar-second #content {
    float: left;
    width: 65%;
    margin: 0;
  }
  .sidebars{
	float: right;
    width: 33%;
    margin: 0;
  }
  .sidebar-first .region-sidebar-first, .sidebar-second .region-sidebar-second {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

 /**
 * The layout when there are two sidebars. 
 Span 2 columns, starting in 2nd column from left. 
  .two-sidebars #content {
    float: left;
    width: 66.66667%;
    margin: 0;
  }
  Span 1 column, starting in 1st column from left.
  .two-sidebars .region-sidebar-first {
    float: left;
    width: 33.33333%;
    margin: 0;
  }
  Start a new row and span all 3 columns. 
  .two-sidebars .region-sidebar-second {
    float: left;
    width: 100%;
    margin-left: 0%;
    margin-right: -100%;
    padding-left: 0;
    padding-right: 0;
    clear: left;
  }
   Apply the shared properties of grid items in a single, efficient ruleset.
  .two-sidebars .region-sidebar-second .block {
    padding-left: 10px;
    padding-right: 10px;
    -moz-box-sizing: border-box;
    -webkit-box-sizing: border-box;
    -ms-box-sizing: border-box;
    box-sizing: border-box;
    word-wrap: break-word;
    *behavior: url("/path/to/boxsizing.htc");
    _display: inline;
    _overflow: hidden;
    _overflow-y: visible;
  }
  Span 1 column, starting in the 1st column from left. 
  .two-sidebars .region-sidebar-second .block:nth-child(3n+1) {
    float: left;
    width: 33.33333%;
    margin-left: 0%;
    margin-right: -33.33333%;
    clear: left;
  }
  Span 1 column, starting in the 2nd column from left. 
  .two-sidebars .region-sidebar-second .block:nth-child(3n+2) {
    float: left;
    width: 33.33333%;
    margin-left: 33.33333%;
    margin-right: -66.66667%;
  }
  /* Span 1 column, starting in the 3rd column from left.
  .two-sidebars .region-sidebar-second .block:nth-child(3n) {
    float: left;
    width: 33.33333%;
    margin-left: 66.66667%;
    margin-right: -100%;
  }
  */
}

/**
 * Use 5 grid columns for larger screens.
 */
@media all and (min-width: 960px) {

  /**
   * The layout when there is only one sidebar
   */
  .sidebar-first #content, .sidebar-second #content{
    float: left;
    width: 68%;
    margin: 0;
  }
  .sidebars{
	float: right;
    width: 30%;
    margin: 0;
  }
  .sidebar-first .region-sidebar-first, .sidebar-second .region-sidebar-second {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }

  /* The layout when there are two sidebars.
  Span 3 columns, starting in 2nd column from left. 
  .two-sidebars #content {
    float: left;
    width: 60%;
    margin-left: 20%;
    margin-right: -80%;
  }
  Span 1 column, starting in 1st column from left.
  .two-sidebars .region-sidebar-first {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  Span 1 column, starting in 5th column from left.
  .two-sidebars .region-sidebar-second {
    float: none;
    width: 100%;
    margin-left: 0;
    margin-right: 0;
  }
  .two-sidebars .sidebars{
	float: right;
    width: 40%;
    margin-left: 0;
    margin-right: 0;
  }
  */
  
}

