/**
 * @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: 700px;
}

#page {
	margin-top: 15px;
	margin-bottom: 15px;
	background-color: #FFF;
	padding-bottom: 10px;
	border: 2px solid #CCC;
}

body {
  background-color: #616161;
}

#main {
	margin-top:-10px;
}

#content {
	margin-top: -10px;
	padding-bottom: 30px;
	min-height: 300px;
}

/* 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-img {
	/*margin-top: 12px;
	border: 0px solid red;
	max-width: 650px;
	max-height: 139px;
	margin-left: 50px;*/

}

#header {
	margin-bottom: -25px;
}

#header #logo{
	margin-top: 10px;
	margin-left: 10px;
}

#header  

#header:before,
#header:after,
#main:before,
#main:after,
#footer:before,
#footer:after {
  content: "";
  display: table;
}
#header:after,
#main:after,
#footer:after {
  clear: both;
}

  #content h1{
	  font-size: 20px;
	  font-weight: 100;
  }
  
  #content h2{
	  font-size: 17px;
	  font-weight: 100;
	  margin-bottom: -10px;
  }
  
  #content h3{
	  font-size: 15px;
	  font-weight: 100;
  }
  
  #content p{
	  font-size: 13px;
	  margin-bottom: -8px;
  }

  #content .file-icon{
	  display: none;
  }
  
  #content .field-name-body li{
	  font-size: 13px;
  }
  
  #content .field-name-body ul{
	  font-size: 13px;
  }
  
  #content .field-name-body a{
	  text-decoration: none;
	  color: #009;
  }
  
  
  /* Menun muotoilu */
  #block-menu-block-2 {
	font-size: 12px;
	margin-top: -25px;
	border: 0px solid red;
  }
  
  #block-menu-block-2 a {
	text-decoration: none;
	color: #009;
  }
  
  #block-menu-block-2 .active a {
	color: #000;
	font-weight: bold;
  }
  
  #block-menu-block-2 ul{
	margin-left: -17px;  
  }
  
  #block-menu-block-2 li{
	list-style: none;
	margin-top: 3px;
  }
  
  .node-kuvagalleria .field-name-field-kuva .field-item {
	width: 150px;
	height: 150px;  
	float: left;
	margin-right: 20px;
	margin-bottom: 15px;
	text-align: center;
  }
  
  .node-kuvagalleria .field-name-field-kuva .field-item img{
	border: 3px solid #616161;
	border-radius: 2px;
  }
  
  .node-kuvagalleria .field-name-field-kuva .field-item img:hover{
	opacity: 0.6;
    filter: alpha(opacity=40);
  }
  
  /* Etusivun ajankohtaista-blocki */
 
  #block-views-etusivu-ajankohtainen-block,
  #block-views-galleria-block {
	margin-top: 20px;  
  }
  
  #block-views-etusivu-ajankohtainen-block .views-field-title a,
  #block-views-galleria-block .views-field-title a{
    font-size: 17px;
	text-decoration: none;
	font-weight: bold;
	color: #000;
  }
  
  #block-views-etusivu-ajankohtainen-block .views-field-body,
  #block-views-galleria-block .views-field-body {
    margin-top: -15px;
  }
  
  #block-views-etusivu-ajankohtainen-block .views-field-body li,
  #block-views-galleria-block .views-field-body li{
    font-size: 13px;
  }
  
  #block-views-etusivu-ajankohtainen-block .views-field-body a,
  #block-views-galleria-block .views-field-body a{
    text-decoration: none;
  }
  
  #block-views-etusivu-ajankohtainen-block .views-field-title-1,
  #block-views-galleria-block .views-field-title-1 {
	margin-top: 10px;
	margin-bottom: 15px;
  }
  
  #block-views-etusivu-ajankohtainen-block .views-field-title-1 a,
  #block-views-galleria-block .views-field-title-1 a{
    text-decoration: none;
	color: #009;
	font-size: 13px;
  }
  
  /* Etusivun ajankohtaista-blocki loppuu*/
  
  #main #content .pager a {
	 text-decoration: none;
	color: #009;
	font-size: 13px; 
  }

/* 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%;
  }
  
}

@media all and (max-width: 480px) {
  #content {
	margin-top: 0px;
  }
  
  .sidebar-first #content {
    float: left;
	width: 100%;
	position: relative;
	margin-top: 35px;
  }

  .sidebar-first .region-sidebar-first {
    float: left;
	width: 100%;
	position: absolute;
  }
  
  .paataso {
  background-color: #616161; 
  }
  
  .menu-block-1 ul {
  background-color: #616161;
  font-size: 12px;
  }
  
}

@media all and (max-width: 700px) {

  #header-img {
	border: 0px solid red;
	margin-left: 3px;
  }

}

/**
 * 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%;
  }
}
