/**
 * SFD 2015
 *
 * LICENSE
 *
 * This software and its source code is protected by copyright law (Sec. 69a ff. UrhG).
 * It is not allowed to make any kinds of modifications, nor must it be copied,
 * or published without explicit permission. Misuse will lead to persecution.
 *
 * @copyright  2015 infomax websolutions GmbH
 * @link       http://www.infomax-it.de
 * @package    css
 * @subpackage tabel-grid
 * @author     degener
 * based on:	 table-grid (http://mdo.github.io/table-grid)
 * 						 Released under MIT, (c) 2014 Mark Otto
 * @since      29.09.2015
 * @version    $Id: grid.css 495 2016-05-02 16:13:20Z kracke $
 **/


/*  =========================================================
 1. base styles
 2. grid-rows
 3. column width
 4. grid-gutter
 5. offsets
 6. layout
========================================================== */


/*  =========================================================
    1. base styles
========================================================== */
@media screen {

  /* Container
   * holds and centers the site content
   */
  .grid-wrapper {
    width: 100%;
    max-width: 1400px;
    position: relative;
    margin: 0 auto;
    /* overflow: hidden;  why??? */
  }

  /*
  * Vertically center grid content
  * Requires content within the column to be inline or inline-block.
  */
  .grid-align-middle .col {
    vertical-align: middle;
  }
  .grid-align-bottom .col {
    vertical-align: bottom;
  }

}


@media only screen and (max-width: 800px) {
  .grid-wrapper {
    width: 96%;
    margin: 0 2%;
  }
}


/*  =========================================================
    2. grid-rows
========================================================== */
@media screen {

  /* Add `.grid` for the table */
  .grid-row {
    display: table;
    width: 100%;
    table-layout: fixed;
    margin-bottom: 24px;
  }

  .grid-row .center {
    margin: 0 auto;
  }

}


@media only screen and (max-width: 1024px) {
  .grid-row {
    margin-bottom: 12px;
  }
}


@media only screen and (max-width: 800px) {
  .grid-row {
    display: inline-block;
    margin: 0;
  }
}


/*  =========================================================
    3. column width
========================================================== */
@media screen {

  /* Add `.col` for the table cells/columns */
  .col {
    display: table-cell;
  }
  .col.weatherTeaser{
    display: inline-block;
    text-align: center;
    float:left;
    padding:1%;
  }

  /* Set the widths */
  .col-1 { width: 10%; }
  .col-2 { width: 20%; }
  .col-3 { width: 30%; }
  .col-4 { width: 40%; }
  .col-5 { width: 50%; }
  .col-6 { width: 60%; }
  .col-7 { width: 70%; }
  .col-8 { width: 80%; }
  .col-9 { width: 90%; }
  .col-10 { width: 100%; }

  /* workarounds for rubric teasers */
  .col.rubricTeaser{
    display: inline-block;
    text-align: center;
    float: left;
    margin: 0 12px;
  }
  .col-3.rubricTeaser { width: calc(30% - 24px); }
  .col-4.rubricTeaser { width: calc(40% - 24px); }
  .col-5.rubricTeaser { width: calc(50% - 24px); }

}


@media only screen and (max-width: 1024px) {
  .col.rubricTeaser{
    margin: 0 6px;
  }
  .col-3.rubricTeaser { width: calc(30% - 12px); }
  .col-4.rubricTeaser { width: calc(40% - 12px); }
  .col-5.rubricTeaser { width: calc(50% - 12px); }
}


@media only screen and (max-width: 800px) {
  .col {
    display: inline-block;
  }
  [class*='col-'] {
    width: 98%!important;
    margin: 5px 1%;
  }
  .col.rubricTeaser{
    margin: 5px 1%;
  }
}

@media only screen and (max-width: 500px) {
  [class*='col-'] {
    margin: 2px 1%;
  }
}


/*  =========================================================
    4. grid-gutter
========================================================== */
@media screen {

  /* grid with gutter
   * The wrapping .grid-gutter applies negative horizontal margins to account for the gutters.
   * Tables that are 100% wide cannot have negative horizontal margins directly applied to them,
   * so we must use a wrapper
  */
  .grid-gutter {
    margin: 0 -12px;
  }
  .grid-gutter .grid-row {
    border-spacing: 24px 0;
  }

}


@media only screen and (max-width: 1024px) {
  .grid-gutter {
    margin: 0 -7px;
  }
  .grid-gutter .grid-row {
    border-spacing: 14px 0;
  }
}


@media only screen and (max-width: 800px) {
  .grid-gutter {
    margin: 0 -6px;
  }
  .grid-gutter .grid-row {
    border-spacing: 12px 0;
  }
}


@media only screen and (max-width: 800px) {
  .grid-gutter {
    margin: 0;
  }
  .grid-gutter .grid-row {
    border-spacing: 0;
  }
}


/*  =========================================================
    5. offsets
========================================================== */
@media screen {

  .col-5.offset {
    width: calc(50% - 1px);
  }
  /* positions column to the left or right */
  .offset-left {
    float: left;
  }
  .offset-right {
    float: right;
  }

}

@media only screen and (max-width: 800px) {
  .col-5.offset,
  .offset-left,
  .offset-right {
    width: 100%;
  }
}


/*  =========================================================
    6. layout
========================================================== */
@media screen {

  .col {
    vertical-align: top;
  }
  .col.border  {
    border: 1px solid #d6d6d6;
    padding: 24px;
  }
  .col.shadow {
    background-color: #fff;
    padding: 10px;
    box-shadow: 0 0 4px 0px rgba(0,0,0,0.1);
    overflow: hidden;
  }

}

@media only screen and (max-width: 600px) {

  .col.shadow {
    padding: 0 10px;
    box-shadow: none;
  }

}