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

/* ------------------------- BEGIN: BASE STYLING OF SWEET THEME ------------------------- */

/* Get rid of box outline on focused items */
*:focus { outline: none; }

/* Responsively resize logo */
#header { display: flex; }

#logo {
	max-width: 100%;
	height: auto;

    -webkit-flex: 1; /* Safari 6.1 */
    -ms-flex: 1; /* IE 10 */ 
	flex: 1;
}

#header-container {	
	background: rgb(56,56,56); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(56,56,56,1) 1%, rgba(45,45,45,1) 24%, rgba(15,15,15,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,rgba(56,56,56,1)), color-stop(24%,rgba(45,45,45,1)), color-stop(100%,rgba(15,15,15,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(56,56,56,1) 1%,rgba(45,45,45,1) 24%,rgba(15,15,15,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(56,56,56,1) 1%,rgba(45,45,45,1) 24%,rgba(15,15,15,1) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top, rgba(56,56,56,1) 1%,rgba(45,45,45,1) 24%,rgba(15,15,15,1) 100%); /* IE10+ */
	background: linear-gradient(to bottom, rgba(56,56,56,1) 1%,rgba(45,45,45,1) 24%,rgba(15,15,15,1) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#383838', endColorstr='#0f0f0f',GradientType=0 ); /* IE6-9 */
}

/* Navigation styling */
#navigation {
	text-align: center;
	max-width: 1200px;
	
	/* Set background:none to get rid of the slight top-border distinction between the container and navigation bar */
	
	background: rgb(25,25,25); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(25,25,25,1) 0%, rgba(15,15,15,1) 30%, rgba(15,15,15,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(25,25,25,1)), color-stop(30%,rgba(15,15,15,1)), color-stop(100%,rgba(15,15,15,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(25,25,25,1) 0%,rgba(15,15,15,1) 30%,rgba(15,15,15,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(25,25,25,1) 0%,rgba(15,15,15,1) 30%,rgba(15,15,15,1) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top, rgba(25,25,25,1) 0%,rgba(15,15,15,1) 30%,rgba(15,15,15,1) 100%); /* IE10+ */
	background: linear-gradient(to bottom, rgba(25,25,25,1) 0%,rgba(15,15,15,1) 30%,rgba(15,15,15,1) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#191919', endColorstr='#0f0f0f',GradientType=0 ); /* IE6-9 */: progid:DXImageTransform.Microsoft.gradient( startColorstr='#191919', endColorstr='#0f0f0f',GradientType=0 ); /* IE6-9 */
}

#navigation #main-menu {
	display: inline-block;
	float: none;
}

#navigation ul li a {
	display: block;
	color: #BBBBBB;
	text-decoration: none;
	font-size: 14px;
	padding: 10px 20px 10px 20px;
}

/* Currently-active tab appears the same as mouseover tab */
#navigation ul li.active {
	background: rgb(71,71,71); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(71,71,71,1) 0%, rgba(33,33,33,1) 30%, rgba(28,28,28,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(71,71,71,1)), color-stop(30%,rgba(33,33,33,1)), color-stop(100%,rgba(28,28,28,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(71,71,71,1) 0%,rgba(33,33,33,1) 30%,rgba(28,28,28,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(71,71,71,1) 0%,rgba(33,33,33,1) 30%,rgba(28,28,28,1) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top, rgba(71,71,71,1) 0%,rgba(33,33,33,1) 30%,rgba(28,28,28,1) 100%); /* IE10+ */
	background: linear-gradient(to bottom, rgba(71,71,71,1) 0%,rgba(33,33,33,1) 30%,rgba(28,28,28,1) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#474747', endColorstr='#1c1c1c',GradientType=0 ); /* IE6-9 */
}

/* Mouseover/hovered tab */
#navigation li:hover {
	background: rgb(71,71,71); /* Old browsers */
	background: -moz-linear-gradient(top, rgba(71,71,71,1) 0%, rgba(33,33,33,1) 30%, rgba(28,28,28,1) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(0%,rgba(71,71,71,1)), color-stop(30%,rgba(33,33,33,1)), color-stop(100%,rgba(28,28,28,1))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top, rgba(71,71,71,1) 0%,rgba(33,33,33,1) 30%,rgba(28,28,28,1) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top, rgba(71,71,71,1) 0%,rgba(33,33,33,1) 30%,rgba(28,28,28,1) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top, rgba(71,71,71,1) 0%,rgba(33,33,33,1) 30%,rgba(28,28,28,1) 100%); /* IE10+ */
	background: linear-gradient(to bottom, rgba(71,71,71,1) 0%,rgba(33,33,33,1) 30%,rgba(28,28,28,1) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#474747', endColorstr='#1c1c1c',GradientType=0 ); /* IE6-9 */
}

/* Mouseover/hovered tab changes text color (unlike currently-active tab) */
#navigation li:hover a { color: white; }


/* Other styling (spacing, responsively width, text properties, etc.) */

#content,
.sidebars {	padding-top: 20px; }

#page { width: 100%; }

#header {
	margin-left: auto;
	margin-right: auto;
	max-width: 75%;
	padding: 2px;
	overflow: hidden;
}

#header #logo img { min-width: 200px; }

#rightheader {
	max-width: 25%;
	float: right;
	padding-top: 40px;
}

#bottom-container {
	background: #2D2D2D;
	min-height: 40px;
	padding: 1px;
}

#aboveheader,
#header,
#navigation,
#main,
#footer,
.region-bottom {
  margin-left: auto;
  margin-right: auto;
  max-width: 1200px;
}

#header-container { color: #BBBBBB; }

#bottom-container {
  color: #BBBBBB;
  text-align: center;
}

.region-bottom a {
	color: #BBBBBB;
	text-decoration: none
}

.region-bottom a:hover { color: white; }

/* Right-justify search form block inside header */
#block-search-form { float: right; }

/* Style testing below */
html { background: white; }

body { background: white; }

/* ------------------------- END: BASE STYLING OF SWEET THEME ------------------------- */



/* 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;
  *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;
}

/* Navigation bar */
@media all and (min-width: 480px) {
  #main {
    /* Move all the children of #main down to make room. */
    padding-top: 2em;
    padding-bottom: 3em;
    position: relative;
  }
  #navigation {
    /* Move the navbar up inside #main's padding. */
    /* position: absolute; */
    top: 0;
    height: 3em;
    width: 100%;
  }
}

/**
 * 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, the left one.
   */

  /* Span 2 columns, starting in 2nd column from left. */
  .sidebar-first #content {
    float: left;
    width: 66.66667%;
    margin-left: 33.33333%;
    margin-right: -100%;
  }

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

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

  /* Span 2 columns, starting in 1st column from left. */
  .sidebar-second #content {
    float: left;
    width: 66.66667%;
    margin-left: 0%;
    margin-right: -66.66667%;
  }

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

  /**
   * 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-left: 33.33333%;
    margin-right: -100%;
  }

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

  /* 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, the left one.
   */

  /* Span 4 columns, starting in 2nd column from left. */
  .sidebar-first #content {
    float: left;
    width: 80%;
    margin-left: 20%;
    margin-right: -100%;
  }

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

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

  /* Span 4 columns, starting in 1st column from left. */
  .sidebar-second #content {
    float: left;
    width: 80%;
    margin-left: 0%;
    margin-right: -80%;
  }

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

  /**
   * 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%;
  }
}
