/**
 * @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.
 */

#header-wrap,
#navigation-wrap,
#page-wrap,
#footer-wrap,
#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;*/
  max-width: 960px;
}

/*
 * Apply the shared properties of grid items in a single, efficient ruleset.
 */

#header,
#content,
#navigation,
.region-sidebar-first,
.region-sidebar-second,
#footer {
  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;
  _display: inline;
  _overflow: hidden;
  _overflow-y: visible;
}

/*
 * Containers for grid items and flow items.
 */

#header-stripe,
#navigation-stripe,
#page-stripe,
#footer-stripe,
#header,
#main,
#footer {
  *position: relative;
  *zoom: 1;
}
#header-stripe:before, #header-stripe:after,
#navigation-stripe:before, #navigation-stripe:after,
#page-stripe:before, #page-stripe:after,
#footer-stripe:before, #footer-stripe:after,
#header:before, #header:after,
#main:before, #main:after,
#footer:before, #footer:after {
  content: "";
  display: table;
}
#header-stripe:after,
#navigation-stripe:after,
#page-stripe:after,
#footer-stripe:after,
#header:after,
#main:after,
#footer:after {
  clear: both;
}

/*
 * Navigation bar
 */

@media all and (min-width: 480px) {
  #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%;
  }
  /*
   * Header boxes.
   */

  #header-left {
    float: left;
    width: 25%;
    margin-left: 0%;
    margin-right: -25%;
  }
  #header-middle {
    float: left;
    width: 50%;
    margin-left: 25%;
    margin-right: -75%;
  }
  #header-right {
    float: left;
    width: 25%;
    margin-left: 75%;
    margin-right: -100%;
  }

}

/*
 * Use 3 grid columns for smaller screens.
 */

@media all and (min-width: 480px) and (max-width: 959px) {

	/* let's drop the font size of the menu a bit if the screen is smaller */
	#navigation .block-superfish ul.sf-menu li a {
		font-size:1em!important;
	}


  .sidebar-second #content {
    float: left;
    width: 66.667%;
    margin-left: 0%;
    margin-right: -66.667%;
  }
  .sidebar-second .region-sidebar-second {
    float: left;
    width: 33.333%;
    margin-left: 66.667%;
    margin-right: -100%;
  }


  /*
   * Header boxes.
   */

  #header-left {
    float: left;
    width: 33.333%;
    margin-left: 0%;
    margin-right: -33.333%;
  }
  #header-middle {
    float: left;
    width: 66.667%;
    margin-left: 33.333%;
    margin-right: -100%;
    *position: relative;
    *zoom: 1;
    padding-left: 0;
    padding-right: 0;
    clear: right;
  }
  #header-middle:before,
  #header-middle:after {
    content: "";
    display: table;
  }
  #header-middle:after {
    clear: both;
  }
  #header-right {
    float: left;
    width: 100%;
    margin-left: 0%;
    margin-right: -100%;
	clear: both;
  }


}
@media all and (min-width: 480px) and (max-width: 820px) {
	#navigation .block-superfish ul.sf-menu li a {
		font-size:0.9em!important;
	}
}
/*
 * Use 5 grid columns for larger screens.
 */

@media all and (min-width: 960px) {

  .sidebar-second #content {
    float: left;
    width: 66.667%;
    margin-left: 0%;
    margin-right: -66.667%;
  }
  .sidebar-second .region-sidebar-second {
    float: left;
    width: 33.333%;
    margin-left: 66.667%;
    margin-right: -100%;
  }

}
