/**
 * @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;*/
  max-width: 1060px;
  max-width: 1018px;
}

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

/*#header,*/
/*#content,*/
/*#navigation,*/
/*.region-sidebar-first,*/
/*.region-sidebar-second,*/
#footer {
  padding-left: 12px;
  padding-right: 12px;
  padding-left: 1.2474012%;  /* 12 / 962 */
  padding-right: 1.2474012%;
  padding-left: 1.3752455%;  /* 14 / 1018 */
  padding-right: 1.3752455%;
}

.region-navigation,
.breadcrumb {
  padding-left: 12px;
  padding-right: 12px;
  padding-left: 1.2474012%;  /* 12 / 962 */
  padding-right: 1.2474012%;
  padding-left: 0.6%;
  padding-right: 0.6%;
}

.region-navigation {
	position: relative;
	height: 3.45em;
	/*border: 1px solid #000;
	border-width: 1px 0;*/
	border: none;
}

#header,
#content,
#navigation,
.region-sidebar-first,
.region-sidebar-second,
#footer {
  -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,
#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;
}

/*
 * Header
 */

#header {
	width: 100%;
	height: auto;
	padding: 27px 2.455796% 20px 2.455796%; /* 25/1018 */
}

/*
 * Navigation bar
 */

/*@media all and (min-width: 480px) {*/
@media all {
  #main {
    position: relative;
    padding-top: 35px; /* Move all the children of #main down to make room. */
  }
  .embed #main {
    padding-top: 20px;
  }

  #navigation {
    position: absolute;
    top: 0; /* Move the navbar up inside #main's padding. */
    width: 100%;
/*    height: 3em;*/
    /*height: 34px;*/
    padding: 0 2.455796%;
  }

  .region-navigation {
  	/*height: 34px;*/
  }
  .breadcrumb {
  	margin: 8px 0 0 0;
  }
}




/*
 * Use 5 grid columns for larger screens.
 */

/*@media all and (min-width: 960px) {*/
/*@media all and (min-width: 480px) {*/
/*@media all and (min-width: 601px) {*/

  /*
   * The layout when there is only one sidebar, the left one.
   */
  .sidebar-first #content { /* Span 4 columns, starting in 2nd column from left. */
    float: left;
    width: 80%;
    margin-left: 20%;
    margin-right: -100%;
  }
  .sidebar-first .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
    float: left;
    width: 20%;
    margin-left: 0%;
    margin-right: -20%;
  }

  /*
   * The layout when there is only one sidebar, the right one.
   */
  .sidebar-second #content { /* Span 4 columns, starting in 1st column from left. */
    float: left;
    width: 77.7546777%;  /* 748/962 */
    margin-left: 1.2474012%; /* 12/962 */
    margin-right: -77.7546777%;
  }
  .sidebar-second .region-sidebar-second { /* Span 1 column, starting in 5th column from left. */
    float: left;
    width: 18.5031185%;  /* 178/962 */
    margin-left: 79.002079%;  /* 748+12/962 */
    margin-right: -100%;
  }

  /*
   * The layout when there are two sidebars.
   */
  .two-sidebars #content { /* Span 3 columns, starting in 2nd column from left. */
    float: left;
    width: 58.004158%;         /* 558 / 962 */
    margin-left: 20.997921%;   /* 178 + 12 + 12 / 962 */
    margin-right: -79.002079%;
  }
  .two-sidebars .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
    float: left;
    width: 18.503119%;       /* 178 / 962 */
    margin-left: 1.2474012%;
    margin-right: -18.503119%;


  }
  .two-sidebars .region-sidebar-second { /* Span 1 column, starting in 5th column from left. */
    float: left;
    width: 18.503119%;       /* 178 / 962 */
/*    margin-left: 80.2494802%;*/ /* 748 + 12 + 12 / 962 */
    margin-left: 79.002079%; /* 748 + 12 /962 */
    margin-right: -100%;
  }
/*}*/


#content,
section.sidebar {
	margin-top: 2.5em;
}
.embed #content,
.embed section.sidebar {
	margin-top: 0;
}


/*
 * 1 column
 */
.no-sidebars.page-node #content,
.no-sidebars.page-taxonomy-term #content,
.no-sidebars.section-news #content,
.no-sidebars.section-safer-drug-use-guides #content,
.no-sidebars.section-user #content,
.no-sidebars.section-drug-decriminalisation #content {
	padding: 0 2.4557956%; /* 25/1018 width:968px #page max-width=1018 */
}
.no-sidebars.node-type-portal #content {
	padding: 0;
}


/*
 * Use 1 grid column for small screens.
 */

/*@media all and (min-width: 480px) and (max-width: 959px) {*/
/*@media all and (min-width: 480px) and (max-width: 750px) {*/
/*@media all and (max-width: 479px) {*/
@media all and (max-width: 670px) {

	#page {
		/*width: 98%;*/
	}

	#header {
		/*height: 3.5em;*/
		padding: 14px 2.455796%;
	}

	#site-name {
		font-size: 2.5em !important;
		letter-spacing: -0.03em !important;
	}

	#content {
		/*margin-top: 24px;*/
		margin-top: 0;
	}

	.region-navigation {
		/*height: 0 !important;*/
		height: auto !important;
	}

	.breadcrumb {
		margin-top: 0;
		padding-top: 8px;
	}

  #menu-icon {
		margin-bottom: 12px;
  }

	.sidebars {
		clear: both;
	}

	section.sidebar {
		clear: both;
		margin-top: 12px;
	}

  /*
   * The layout when there is only one sidebar, the right one.
   */

  .sidebar-second #content { /* Span 2 columns, starting in 1st column from left. */
    float: left;

    width: 79.744414%;      /* 748/938 */
    margin-left: 0%;
    margin-right: -79.744414%;

		float: none;
		width: 100%;
		width: 97.5051976%;
		margin-left: 1.2474012%;
		margin-right: 1.2474012%;
  }
  .sidebar-second .region-sidebar-second { /* Span 1 column, starting in 3rd column from left. */
    float: left;

    width: 18.976546%;       /* 178/938 */
/*    margin-left: 79.744414%;*/
    margin-left: 81.023454%; /* 760/938 */
    margin-right: -100%;

		float: none;
		width: 100%;
		margin-left: 0;
		margin-right: 0;
  }

  .region-sidebar-second .block {
		padding-left: 1.2474012% !important;
		padding-right: 1.2474012% !important;
  }


  /*
   * The layout when there are two sidebars.
   */

  .two-sidebars #content { /* Span 2 columns, starting in 2nd column from left. */
		float: none;
		width: 97.5051976%;
		margin-left: 1.2474012%;
		margin-right: 1.2474012%;
  }
  .two-sidebars .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
		float: none;
		width: 100%;
		margin-left: 0;
		margin-right: 0;
  }
  .two-sidebars .region-sidebar-second { /* Start a new row and span all 3 columns. */
		float: none;
		width: 100%;
		margin-left: 0;
		margin-right: 0;
  }

  .region-sidebar-first .block {
		float: left;
		width: 30% !important;
		margin-right: 2% !important;
		margin-left: 1% !important;
	}


  /*#menu-icon {
		margin: 0 1.2474012% 12px 1.2474012%;
  }*/


	article.node-teaser {
		height: auto !important;
	}
	.views-row-odd article.node-teaser {
		clear: left;
	}

	article.node-teaser header,
	article.node-teaser .field-name-field-teaser-short,
	article.node-teaser ul.links.inline {
		width: 68.3695652% !important;  /* 178/368 */
	}

	article.node-teaser .field-name-field-images,
	article.node-teaser .field-name-field-image-thumbnail {
/*	height: 178px;*/
		width: 28.3695652% !important;  /* 178/368 */
/*	margin-right: 3.2608695%;*/  /* 12/368 */
	}

}
