/**
 * @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;
}

/*
 * 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;
  
}

#navigation {
}

/*
 * Containers for grid items and flow items.
 */

#header,
#main,
#footer {
  *position: relative;
  *zoom: 1;
   margin-left:30px;
   margin-right:-30px;

}
#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 (max-width: 479px) {
#header,
#main,
#footer {
   margin-left:0px;
   margin-right:0px;
   width:100%;
}

  #navigation {
    position: absolute;
    top: 0; /* Move the navbar up inside #main's padding. */
   // height: 3em;
    width: 100%;
  }

  .region-sidebar-first {
	display:none;  
  }

}


@media all and (min-width: 480px) {
  #main {
    padding-top: 3em; /* Move all the children of #main down to make room. */
    position: relative;
  }

  #navigation {
    position: absolute;
    top: 0; /* Move the navbar up inside #main's padding. */
    width: 100%;
    height:2.6em;
  }
}

/*
 * 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.
   */
   
   #header,
   #main,
   #footer {
      margin-left:0px;
      margin-right:0px;
      width:100%;
   }

  .sidebar-first #content { /* Span 2 columns, starting in 2nd column from left. */
    float: left;
    width: 100%;
    margin-right: -100%;
  }
  .sidebar-first .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
    float: left;
    width: 53px;
	height:110px;
	margin-left:-53px;
	margin-top:50px;
	overflow:hidden;
	background: url(../../images/infokasten.png) right top no-repeat;
	display:none;
  }
  

  /*
   * The layout when there is only one sidebar, the right one.
   */

  .sidebar-second #content { /* Span 2 columns, starting in 1st column from left. */
  }
  .sidebar-second .region-sidebar-second { /* Span 1 column, starting in 3rd column from left. */
  }

  /*
   * The layout when there are two sidebars.
   */
   
  #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: 890px;
  margin-left: 50px;
  margin-right:50px;
  }

  .two-sidebars #content { /* Span 2 columns, starting in 2nd column from left. */
    float: left;
    width: 100%;
    margin-left: 0px;
  }
  
  .two-sidebars .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
    float: left;
    width: 53px;
	height:110px;
	margin-left:-53px;
	margin-top:50px;
	overflow:hidden;
	background: url(../../images/infokasten.png) right top no-repeat;
	display:none;
  }
  
  .two-sidebars .region-sidebar-second { /* Start a new row and span all 3 columns. */
    float: left;
    width: 100%;
    margin-left: 0%;
    margin-right: -100%;
    *position: relative;
    *zoom: 1;
    padding-left: 0;
    padding-right: 0;
    clear: left;
	padding:0 40px 0 40px;
  }
  .two-sidebars .region-sidebar-second:before,
  .two-sidebars .region-sidebar-second:after {
    content: "";
    display: table;
  }
  .two-sidebars .region-sidebar-second:after {
    clear: both;
  }
  .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;
    _display: inline;
    _overflow: hidden;
    _overflow-y: visible;
  }
  .two-sidebars .region-sidebar-second .block:nth-child(3n+1) { /* Span 1 column, starting in the 1st column from left. */
    float: left;
    width: 100%;
    margin-left: 0%;
    margin-right: 100%;
    clear: left;
  }
  .two-sidebars .region-sidebar-second .block:nth-child(3n+2) { /* Span 1 column, starting in the 2nd column from left. */
    float: left;
	width: 100%;
  }
  .two-sidebars .region-sidebar-second .block:nth-child(3n) { /* Span 1 column, starting in the 3rd column from left. */
    float: left;
	width: 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.
   */

  .sidebar-first #content { /* Span 4 columns, starting in 2nd column from left. */
    float: left;
    width: 100%;
    margin-right: -100%;
  }
  .sidebar-first .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
    float: left;
    width: 53px;
	height:110px;
	overflow:hidden;
	margin-top:50px;
    margin-left: -53px;
    margin-right: -53px;
	background: url(../../images/infokasten.png) right top no-repeat;
  }

  /*
   * 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: 650px;
    margin-left: 0%;
    margin-right: -80%;
  }
  .sidebar-second .region-sidebar-second { /* Span 1 column, starting in 5th column from left. */
    float: left;
    width: 270px;
    margin-left: 650px;
    margin-right: -100%;
    padding-right:40px;
  }

  /*
   * The layout when there are two sidebars.
   */

  .two-sidebars #content { /* Span 3 columns, starting in 2nd column from left. */
    float: left;
    width: 650px;
    margin-left: 0px;
    margin-right: -80%;
  }
  
  .two-sidebars .region-sidebar-first { /* Span 1 column, starting in 1st column from left. */
    float: left;
    width: 53px;
	height:110px;
	overflow:hidden;
	//margin-top:50px;
    margin-left: -53px;
    margin-right: -53px;
	background: url(../../images/infokasten.png) right top no-repeat;
  }
  
  .two-sidebars .region-sidebar-second { /* Span 1 column, starting in 5th column from left. */
//    clear:both;
    width: 270px;
    margin-left: 650px;
    margin-right: -100%;
	padding-right:40px;
	padding-left:0px;
  }
  
	#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: 920px;
	}
	
	.field-name-field-nodereference-kontakt-2 {
		position:absolute;
		width:414px;
		margin-left:-40px;
		margin-top:-86px;
	}  
	
	#kontaktdaten-close {
		display:block !important;
		float:right;
		margin-right:20px;
		margin-top:-25px;
	}
	
	.field-name-field-nodereference-kontakt-2 article {
		padding-top:0px;
	}
	
}

