/**
 * @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;
  min-width:240px;  /*BJF*/
  background-color:#FFEBF5; /*BJF*/
/*  padding-left: 1em;  /*BJF*/
}

.header {
  background-color:#FFEBF5; /*BJF*/
}

.region-footer {
  background-color:#FFEBF5; /*BJF*/
}

.column {
  background-color:#FFFFFF; /*BJF*/

}

.region-sidebar-first {	
  background-color:#FFFFFF; /*BJF*/
}

.region-sidebar-second {
  background-color:#FFFFFF; /*BJF*/
}

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

#block-feedback-form {
display: none;
position: fixed;
bottom: 0px;
right: 0px;
overflow: hidden;
z-index: 10;
}



/* Navigation bar */
@media all and (min-width: 480px) {
  #main {
    /* Move all the children of #main down to make room. */
    padding-top: 0; /* BJF Was 3em - Reduce space above content, and below site name*/
    position: relative;
	background-color: #FFFFFF;
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	-ms-border-radius: 10px;
	-o-border-radius: 10px;
	border-radius: 10px;

  }

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


/* BJF */
@media all and (max-width: 480px) {
img.photo_float_right_or_centered,
.affiliates img,
img.photoborder,
.photoborder img,
.photo_float_right_or_centered img,
.photo_no_size_limit img,
.photo_no_float img,
.photo_centered_page img,
.photoblock img,
.lowdesirephoto img,
.bluephoto img {
	max-width: 100%;
}

/* BJF */
.mobile_off {
	display: none;
  }

/* BJF */  
.mobile_on {
  	display: block;
  }

/* BJF */  
#block-poll-recent {
	display: none;
}

#block-feedback-form {
display: none;
position: fixed;
bottom: -50px;
right: -50px;
overflow: hidden;
z-index: 10;
}


}

/**
 * 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.
   */
   /* BJF */
 img.photo_float_right_or_centered,
.affiliates img,
img.photoborder,
.photoborder img,
.photo_float_right_or_centered img,
.photo_no_size_limit img,
.photo_no_float img,
.photo_centered_page img,
.photoblock img,
.bluephoto img {
	max-width: 100%;
}

/* BJF */
.mobile_off {
	display: none;
  }

/* BJF */  
.mobile_on {
  	display: block;
  }
  
  /* 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("/Scripts/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%;
  }
  
    /* BJF  */
   #affiliates {
    float: left;
    width: 45%;
    margin-left: 10px;
    margin-top: 0px;
	margin-bottom: 10px;
	margin-right: 2.5%;
	padding-top:10px;
	padding-bottom:20px;
	padding-left:10px;
	padding-right:10px;    
    text-align: center;
   }
   
   /* BJF  */
   #sharedcontent  {
    float: left;
    clear: left;
    width: 45%;
    margin-top: 24px; 
	margin-bottom: 10px;
	margin-left: 2.5%;
	padding-top:10px;
	padding-bottom:20px;
	padding-left:10px;
	padding-right:10px;    
    text-align: left;
 }
 

}

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

 /* BJF */  
 #block-feedback-form {
    display: none;
    position: fixed;
    bottom: -20px;
    right: 5px;
    overflow: hidden;
    z-index: 10;
}
}

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

 /* BJF */  
 #block-feedback-form {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 25px;
    overflow: hidden;
    z-index: 10;
}

}


@media all and (max-width: 1200px) {

 /* BJF */  
section.region-sidebar-second {
	display: none;
}

}

/**
 * Use 5 grid columns for larger screens.
 */
@media all and (min-width: 960px) {

  /**
   * The layout when there is only one sidebar, the left one.
   */
   
   /* BJF */
   .mobile_on {
  	display: none;
  }

  /* Span 4 columns, starting in 2nd column from left. */
  .sidebar-first #content {
    float: left;
 	width: 56%;
    margin-left: 25%;
    margin-right: -100%;
	margin-bottom:20px; /* BJF */
	padding-left: 2em;  /* BJF */
	padding-right: 2em;  /* BJF */
	}
  
  /* Span 1 column, starting in 1st column from left. */
  .sidebar-first .region-sidebar-first {
    float: left;
    width: 25%;
    margin-left: 0%;
    margin-right: -25%;
}
  /**
   * 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: 20%;
    margin-left: 0%;
    margin-right: -80%; 
}
  /* Span 1 column, starting in 5th column from left. */
  .sidebar-second .region-sidebar-second {
    float: left;
    width: 19%;
    margin-left: 81%;
    margin-right: -100%;
  }

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

  /* Span 3 columns, starting in 2nd column from left. */
  .two-sidebars #content {
    width: 56%;
	float: left;
    margin-left: 25%;
    margin-right: -100%;
	margin-bottom:20px; /* BJF */
	padding-left: 2em;  /* BJF */
	padding-right: 2em;  /* BJF */
	-webkit-border-radius: 10px;
	-moz-border-radius: 10px;
	-ms-border-radius: 10px;
	-o-border-radius: 10px;
	border-radius: 10px;

}

  /* Span 1 column, starting in 1st column from left. */
  .two-sidebars .region-sidebar-first {
    float: left; /* BJF */
    width: 25%; /* BJF */
    margin-left: 0%; /* BJF */
    margin-right: -25%; /* BJF */
	-webkit-border-top-left-radius: 10px;
	-moz-border-top-left-radius: 10px;
	-ms-border-top-left-radius: 10px;
	-o-border-top-left-radius: 10px;
	border-top-left-radius: 10px;
	-webkit-border-bottom-left-radius: 10px;
	-moz-border-bottom-left-radius: 10px;
	-ms-border-bottom-left-radius: 10px;
	-o-border-bottom-left-radius: 10px;
	border-bottom-left-radius: 10px;

  }

  /* Span 1 column, starting in 5th column from left. */
  .two-sidebars .region-sidebar-second {
    float: left;
	width: 19%; /* BJF */
	margin-left: 81%; /* BJF */
    margin-right: -110%; /* BJF */
	-webkit-border-top-right-radius: 10px;
	-moz-border-top-right-radius: 10px;
	-ms-border-top-right-radius: 10px;
	-o-border-top-right-radius: 10px;
	border-top-right-radius: 10px;
	-webkit-border-bottom-right-radius: 10px;
	-moz-border-bottom-right-radius: 10px;
	-ms-border-bottom-right-radius: 10px;
	-o-border-bottom-right-radius: 10px;
	border-bottom-right-radius: 10px;

  }
  
  
    /* BJF  */
   #affiliates {
    float: left;
    width: 45%;
    margin-left: 10px;
    margin-top: 0px;
	margin-bottom: 10px;
	padding-top:10px;
	padding-bottom:20px;
	padding-left:10px;
	padding-right:10px;    
    text-align: center;
   }
   
   /* BJF  */
   #sharedcontent  {
    float: left;
    clear: left;
    width: 45%;
    margin-top: 24px; 
	margin-bottom: 10px;
	padding-top:10px;
	padding-bottom:20px;
	padding-left:10px;
	padding-right:10px;    
    text-align: left;
 }
 
 }
