/**
 * @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.
 */
#page,
.region-bottom {
  margin-left: auto;
  margin-right: auto;
  /*max-width: 1200px;*/
}

/* Apply the shared properties of grid items in a single, efficient ruleset. */
#header,
#content,
#navigation,
.region-sidebar-first,
.region-sidebar-second,
#footer {
  padding-left: 0px;
  padding-right: 0px;
  -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;
}

/* Containers for grid items and flow items. */
#header,
#main,
#footer {
  *position: relative;
  *zoom: 1;
}
#header:before,
#header:after,
#main:before,
#main:after,
#footer:before,
#footer:after {
  content: "";
  display: table;
}
#header:after,
#main:after,
#footer:after {
  clear: both;
}

.sidebar-first #content-wrapper{
  float: left;
  width: 100%;
  height: 100vh;
}

/* Navigation bar up*/
@media all and (max-width: 768px) {
  #main {
    /* Move all the children of #main down to make room. */
    /*padding-top: 3em;*/
    position: relative;
  }
  #navigation {
    /* Move the navbar up inside #main's padding. */
    position: absolute;
    top: 0;
    height: 3em;
    width: 100%;
  }
}

/**
 * Use 5 grid columns for larger screens.
 * nav right - content 4 col
 */
@media all and (min-width: 769px) {

  /**
   * The layout when there is only one sidebar, the left one.
   */

  /* Span 4 columns, starting in 2nd column from left. */

  .sidebar-first #content {
    margin-left: 300px;
    margin-right: 0%;
  }

  /* Span 1 column, starting in 1st column from left. */
  .sidebar-first .region-sidebar-first {
    float: left;
    width: 300px !important;
    margin-left: 0;
  }

  #footer{
    float: right;
    margin-left: 300px;
  }


  /**
   * 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: left;
    width: 20%;
    margin-left: 0%;
    margin-right: -20%;
  }

  /* Span 1 column, starting in 5th column from left. */
  .two-sidebars .region-sidebar-second {
    float: left;
    width: 20%;
    margin-left: 80%;
    margin-right: -100%;
  }
}
