/** ----------------------------------------------------------
 *
 * Contains the main layout of the page and the individual styles.
 * Acts as the main stylesheet for theme.
 *
 *		Include your notes or table of contents below....
 *		Include color hex's or values of your grid
 *
 *		1. OOCSS GRID
 *		2. MAIN LAYOUT
 *		3. HEADER
 *			- Brand
 *			- Search Form
 *		4. Navigation
 *			- Primary Navigation
 *			- tablet Navigation
 *			- Secondary Navigation
 *			- Secondary Nav 2-5 Levels deep
 *		5. Mixed
 *		6. Footer
 *		7. Page Specific Layout
 *			- Homepage
 *			- Search Results
 *		8. Device and Responsive Layout
 *			- Breakpoint 960px
 *			- Breakpoint 640px
 *				- Search Form
 *				- Main Content
 *		9. Print Styles
 *			- Simple Theme custom print styles
 *
 * @author Your Name <email@silverstripe.com>
 * ------------------------------------------------------- */

/* OOCSS Grid
* https://github.com/stubbornella/oocss/wiki/grids
*/

.line, /* line - Groups units on one horizontal line. Note: for mobile layout units may be stacked to avoid horizontal scrolling. */
.lastUnit {
	overflow:hidden;
	*overflow:visible;
	*zoom:1;
	padding:0 10px;
}
.unit { /* unit - Base class which divides a line into sections (columns). */
	float:left;
	padding:0 10px;
	-moz-box-sizing:border-box;
	-webkit-box-sizing:border-box;
	box-sizing:border-box; /* box-sizing:border-box; creates a box-model where 
	padding and border are NOT added onto the width - they are included in the width, 
	so a 200px wide element with 20px padding will be 200px, NOT 240px wide */
}
.osa {
	float:left;
	padding:0;
	-moz-box-sizing:border-box;
	-webkit-box-sizing:border-box;
	box-sizing:border-box;
}
.osa2 {
	float:left;
	padding:0 10px;
	-moz-box-sizing:border-box;
	-webkit-box-sizing:border-box;
	box-sizing:border-box;
}
.google-maps {
    margin-top: 30px;
		border: 1px solid #ccc;
}
.google-map-dynamic {
    margin: 0px !important;
}
.unitRightv { /* Use this class if you want to offset a column eg: |--content(.unit)--|--content(.unit)--|--no-content--|--no-content--|--content(.unitRighttv)--| */
	float:right;
}

/* sizeXofY - Extends unit. Indicates the fractional width of the unit, for example size3of4 would take up three quarters, or 75%, of the horizontal space. 
The following fractions are supported: 1, 1/2, 1/3, 2/3, 1/4, 3/4, 1/5, 2/5, 3/5, 4/5 */
/* It is possible to add more columns if you wish you will just have to add the fractions that are missing eg: .size1of6 {width:16.66666%;} */

.size1of1 {
	float:none;
}
.size1of2 {
	width:50%;
}
.size1of3 {
	width:33.33333%;
}
.size2of3 {
	width:66.66666%;
}
.size1of4 {
	width:25%;
}
.size3of4 {
	width:75%;
}
.size1of5 {
	width:20%;
}
.size2of5 {
	width:40%;
}
.size3of5 {
	width:60%;
}
.size4of5 {
	width:80%;
}
.lastUnit { /* lastUnit - Extends unit. Applied to the last child of every line. */
	float:none;
	width:auto;
	_position:relative; /* Bug fix for IE6 - Internet Explorer 6 and below wouldn't fail on properties that were prefixed with non-alphanumeric characters. 
	meaning that anything prefixed with _ wouldn't be picked up by any other browsers */
	_left:-3px;
	_margin-right:-3px;
}

/* MAIN LAYOUT */
body {
    margin: 0;
    background: #333;
    min-width: 240px; 
    -webkit-text-size-adjust: none; /* The text size is not adjusted for Safari on iPhone */
}
	.ie7 body,
	.ie8 body {
	    min-width: 860px; /* media queries are not supported in ie7/8 without a polyfill */
	}
	.main {
	    background:transparent;
	    min-height: 300px;
	    position:relative;
	}
	.main .inner {
	    background: #fff;
		padding: 40px 30px 60px 30px;
	    max-width: 1040px;
		margin: 0 auto;
		min-height:400px;
	}
	.inner {
	    max-width: 1100px;
	    margin: 0 auto;
	}
	.avaleht {
	    box-shadow: 0px 6px 8px #000;
	    background: #ff0000;
	    margin-bottom:30px;
	    padding-top:15px;
	}
	.flexslider ul.slides {
        margin:0 !important;
    }
    div#carousel {
    margin-top: -60px;
    margin-bottom: 20px;
    }
    #carousel {
    background: #dedede;
    }
	.ie6 .inner {
	    width: 960px;
	}
	.no-sidebar .content-container {
	    float: left;
	    width:100%; /* makes content container full width when there is no sidebar */
	}
	.sidebar { /* this is the sidebar element */
	    margin-top: 12px;
	}
	.no-sidebar .sidebar {
		display: none;
	}


/* HEADER */
.header {
    background: #ff0000;
}
#muutuja {
	background:#FF0000;
	position:relative;
	min-height:0px;
	padding:5px 0;
	-moz-box-shadow: 0px 6px 8px #000;
	-webkit-box-shadow: 0px 6px 8px #000;
	box-shadow: 0px 6px 8px #000;
	margin:0;
	overflow-x:hidden;
}
	.header .inner {
	    padding-top: 20px;
	    position: relative;
			padding-bottom:20px;
	}

	/* Brand */
	header .brand, header .brand:hover {
	    float: left;
	    color: #fff;
	    display: inline-block;
	}
		.brand h1 {
		line-height: 1em;
		text-shadow: 1px 1px 1px #333333;
		font-size: 3.2em;
		font-family: 'Asap', sans-serif;
		text-decoration: none;
		color: #FFF;
		text-transform: uppercase;
		letter-spacing:0;
		font-weight:700;
		}
		.brand p {
		text-align:left;
		color:#FFF;
		font-weight:700;
		font-size:1.1em;
		line-height:0.9em;
		text-transform:uppercase;
		font-family:Arial, Helvetica, sans-serif;
		}

	/* Search form */

	.search-bar {
		position: absolute;
		right: 13px;
		top: 12px;
	}
		.search-bar .field {
			margin: 0;
			padding: 0;
		}
		.search-bar form input.text {
		    width: 155px;
		    padding: 5px 34px 5px 15px;
		    color: #888;
		    margin: 0;
		    border: none;
		    -moz-border-radius: 14px;
		    border-radius: 14px;
		    background: #fff;
		}

		.search-bar form input.action { /* positions the search button icon over the top of the search input */
		    font-size: 14px;
		    position: absolute;
		    right: 5px;
		    top: 0;
		    cursor: pointer;
		    border: none;
		    padding: 5px;
		    background: none;
		    font-family: 'WebSymbolsRegular';
		    color: #848484;
			border-radius: 0;
			margin: 0;
		}
		.search-bar form input.active,
		.search-bar form input.action:hover {
		    color: #000;
		}
		.search-bar form input:focus,
		.header textarea:focus {
		    outline: none; /* removes default browser outlining on focus */
		}
		.search-dropdown-icon {
		    display: none; /* hides search-dropdown-icon when site is at full width - media queries set it to display:block when at mobile/tablet width */
		}



/* NAVIGATION */
nav.headmenu {
  position: relative;
background: rgb(255,255,255);
background: -moz-linear-gradient(top, rgba(255,255,255,1) 0%, rgba(250,250,250,1) 17%, rgba(236,236,236,1) 47%, rgba(219,219,219,1) 77%, rgba(212,212,212,1) 96%, rgba(214,214,214,1) 98%, rgba(187,187,187,1) 100%);
background: -webkit-linear-gradient(top, rgba(255,255,255,1) 0%,rgba(250,250,250,1) 17%,rgba(236,236,236,1) 47%,rgba(219,219,219,1) 77%,rgba(212,212,212,1) 96%,rgba(214,214,214,1) 98%,rgba(187,187,187,1) 100%);
background: linear-gradient(to bottom, rgba(255,255,255,1) 0%,rgba(250,250,250,1) 17%,rgba(236,236,236,1) 47%,rgba(219,219,219,1) 77%,rgba(212,212,212,1) 96%,rgba(214,214,214,1) 98%,rgba(187,187,187,1) 100%);
filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#ffffff', endColorstr='#bbbbbb',GradientType=0 );
  text-align: center;
  letter-spacing: 0px;
    text-transform: uppercase;
  -webkit-box-shadow: 2px 2px 3px rgba(0,0,0,0.5);
  -moz-box-shadow: 2px 2px 3px rgba(0,0,0,0.5);
  box-shadow: 2px 2px 3px rgba(0,0,0,0.5);
  margin-bottom: 3px;
}
nav.headmenu .inner{
	padding:0;
}
/* prime */
ul.primary:before,
ul.primary:after {
    content: " ";
    display: table;
}

ul.primary li{
  float:left;
}
ul.primary li a {
    display: block;
    color: #000;
    font-size: 14px;
    font-family: Arial,Helvetica;
    font-weight: 700;
    text-decoration: none;
    padding: 16px 15px;
}

ul.primary li:last-child a {
  border-right: none;
}

ul.primary li.link:hover a, ul.primary li.current a, ul.primary li.section a {
  color: #DA2031;
}

/* subs */
ul.sub {
  position: absolute;
  z-index: 200;
  max-width:220px;
  display:none;
}

ul.sub li {
    float: left;
    margin: 0;
    width: 100%;
    text-align: left;
}

ul.sub li a {
  border-bottom: 1px dotted #666;
  border-right: none;
  color: #FFF !important;
  font-size: 13px;
  padding: 5px 10px;
}

ul.sub li:last-child a {
  border-bottom: none;
}

ul.sub li a:hover {
  color: #DA2031 !important;
  background: #666;
}

/* sub display*/
ul.primary li:hover ul {
  display: block;
  background: #000;
}

/* keeps the tab background white */
ul.primary li:hover a {
  text-shadow: none;
}

ul.primary li:hover > a{
  color: #000;
} 

@media only screen and (max-width: 600px) {
ul.primary li {
    float: none;
min-width:100%;
}
ul.primary li a {
  padding:10px 0;
}
ul.sub {
  position: absolute;
  z-index: 200;
  max-width:100%;
  min-width:100%;
  display:none;
}
div.toodereas {
    width: 94% !important;
}
.size1of3 {
    width: 100%;
}
  ul.primary li:hover a {
    background: none;
    color: #8B8B8B;
  }

  ul.primary li:hover ul {
    display: block;
    background: #272727;
    color: #fff;
  }
  
  ul.sub {
    display: block;  
    position: static;
    box-shadow: none;
    width: 100%;
  }
ul.primary li.link ul.sub {
 display:none;
}
ul.primary li.section ul.sub {
 display:block;
}
  ul.sub li a {
    background: #272727;
    border: none;
    color: #8B8B8B;
  }
  
  ul.sub li a:hover {
    color: #ccc;
    background: none;
  }
ul.sub li.current a {
    color: #DA2031 !important;
  }
}
/* MIXED */
header:after,
.main:after,
#Root:after,
.search-bar:after,
header .inner:after,
footer:after { /* clearfix */
    height: 0;
    content: ".";
    display: block;
    clear: both;
    visibility: hidden;
}
.search-bar form input.action,
.header .primary li a,
.footer a { /* adds color transition when links/inputs on hover */
    -moz-transition: color 0.2s;
    -webkit-transition: color 0.2s;
    transition: color 0.2s;
}
.footer a.brand { color: #333; margin-left: 0; }
.footer a.brand:hover { color: #B80000; }
body h1 span.amp {
    font-family: Baskerville,"Goudy Old Style","Palatino","Book Antiqua",Georgia;
    font-style: italic;
}


/* FOOTER */
.footer {
    color: #FFF;
    background: #000;
    padding: 20px 0;
    font-size: 12px;
    line-height: 18px;
    text-align:center;
}
	.footer a {
	    color: #FFF;
	}
	.footer a:hover {
	    color: #FFF;
	}
	.footer span {
	    padding: 0 3px;
	    color: #FFF;
	}

/* PAGE SPECIFIC LAYOUT */

	/* Homepage */
		/* currently no Hompage specific styles - feel free to add your own */

	/* Search Results */
	.typography .searchResults h1 {
		margin-bottom: 0;
		padding-bottom: 0;
		border-bottom: none;
	}
	.searchResults p.searchQuery {
	    margin-bottom: 10px;
	    font-size: 15px;
	    font-weight: bold;
	}
	.searchResults ul#SearchResults {
	    padding: 0;
	    border-bottom: 1px solid #e5e5e5;
	    margin:0;
	}
		.searchResults ul#SearchResults li {
		    border-top: 1px solid #e5e5e5;
		    padding: 20px 0;
		    list-style-type: none;
		}
		.searchResults ul#SearchResults p {
		    margin-bottom: 10px;
		}
		.searchResults #PageNumbers a {
		    padding: 0 5px;
		}
		.searchResults #PageNumbers .pagination {
		   	border-bottom: 1px solid #e5e5e5;
		    padding: 20px 0;
		    display:table; /* displays the pagination as a table so that elements stay inline and the middle column adjusts its size to accomodate and the right arrow stays to the right */
		    width:100%;
		}
		.searchResults #PageNumbers .pagination span{
			display:table-cell; /* each element in the pagination div displays as a table cell */
		}
		.searchResults #PageNumbers p {
		    text-align: center;
		    padding:20px 0;
		}
		.searchResults #PageNumbers .next,
		.searchResults #PageNumbers .prev {
		    font-size: 14px;
		    padding: 0 20px;
		    display:table-cell; /* each element in the pagination div displays as a table cell */
		    vertical-align: middle;
		    border-bottom:0 !important;
		}
		.searchResults #PageNumbers .next {
		    margin-left: 15px;
		}
		.searchResults #PageNumbers .prev {
		    margin-right: 15px;
		}

/* DEVICE & RESPONSIVE LAYOUT */
.header .nav-open-button {
    display: none; /* removes the nav toggle button for desktop site */
}
#media-query-trigger {
    /* instead of detecting the width of the window in simple/javascript/script.js it detects the visibility of this element (which is set using media queries) 
    instead to trigger the hiding/showing of nav and search in mobile mode */
    display: none;
    visibility: hidden;
}

/* BREAKPOINT 960px */

@media only screen and (max-width: 960px) {
	.content img {
	    max-width: 97%;
	    height: auto;
	}
	.header .primary ul {
	    -webkit-padding-start: 0px; /* removes default webkit padding on ul items */
	}
}

/* BREAKPOINT 640px */

/* when changing the breakpoint below, change it ito the same value in the script.js file as well */
@media only screen and (max-width: 640px) { 
	body {
	    max-width: 640px;
	}
	#media-query-trigger {
	    visibility: visible;
	}

	/* Navigation*/

	.tablet-nav .header .brand {
	    float: none;
	    display: inline-block;
	    margin-left: 22px;
	    margin-bottom: 22px;
	}
		.brand h1 {
		    font-size: 40px;
		}
		.brand h1 {
		    padding-right: 100px; /* padding stops .brand text from overlapping the search and nav buttons */
		}
	.tablet-nav .header {
	    padding: 0px;
	}
		.tablet-nav .header .inner {
		    padding: 20px 0 0 0;
		    min-height: 0;
		}
		.tablet-nav .header .primary .nav-open-button { /* styling and positioning of the nav toggle button */
		    z-index: 100;
		    width: 20px;
		    height: 20px;
		    position: absolute;
		    right: 20px;
		    top: 35px;
		    display: block;
		    cursor: pointer;
		    font-family: 'WebSymbolsRegular';
		    font-size: 20px;
		    color: #ededed;
		}
		.tablet-nav .header .primary ul {
		    z-index: 10;
		    position: relative;
		    display: none; /* initially hiding the navigation */
		    float: left;
		    margin: 0;
		    padding: 0;
		    white-space: normal;
		    width: 100%;
		}
			.tablet-nav .header .primary ul li {
			    width: 100%;
			    margin: 0;
			    padding: 0;
			    float: none; /* displays list items vertically */
			    background: none;
			    position: relative;
			    text-shadow: 0 1px #fff;
			}
			.tablet-nav .header .primary ul li:after { /* creates the arrow for the primary nav links */
			    content: '\003e';
			    display: block;
			    position: absolute;
			    right: 20px;
			    top: 0px;
			    font-family: 'WebSymbolsRegular';
			    font-size: 14px;
			    color: #999;
			    text-align: center;
			    vertical-align: middle;
			    line-height: 38px;
			}
			.tablet-nav .header .primary ul li a,
			.tablet-nav .header .primary ul li.current a,
			.tablet-nav .header .primary ul li.section a { /* styling the  top level nav links */
			    padding: 10px 0 10px 22px;
			    font-weight: bold;
			    border-bottom: 1px solid #bbb;
			    color: #434343;
			    background: #e7e7e7;
			}
			.tablet-nav .header .primary ul li.current a,
			.tablet-nav .header .primary ul li.section a {
				background: #CCCCCC; /* makes background on current top level page slightly darker */
			}
			.tablet-nav .header .primary ul li a:hover {
			    color: inherit;
			}
			.tablet-nav .header .primary li.section:after,
			.tablet-nav .header .primary li.current:after {
			    display: none; /* hides the link arrow on current top level page */
			}
			.tablet-nav .tablet-nav .header nav.primary ul li {
				padding: 0;
			}

	/* Search Form */
	.search-bar { /* adds new styling to mobile search bar */
	    width: 100%;
	    position: relative;
	    top: 0;
	    right: 0;
	    display: none; /* hides searchbar initially */
	    padding: 20px 0;
	    margin: 0;
	    background-color: #E7E7E7;
	}
	.search-dropdown-icon { /* styling for search toggle button */
	    display: block;
	    cursor: pointer;
	    width: 20px;
	    height: 20px;
	    position: absolute;
	    right: 60px;
	    top: 34px;
	    font-family: 'WebSymbolsRegular';
	    font-size: 20px;
	    color: #ededed;
	    text-align: center;
	    line-height: 20px;
	}
	.search-bar form {
	    margin: 0;
	    width: 100%;
	}
		.search-bar form fieldset {
		    padding: 0 18px;
		    left: 0;
		    right: 0;
		    position: relative;
		}
	.search-bar div.field {
	    margin-bottom: 0;
	}
	.search-bar form input.text {
	    width: 89%; /* makes search input full width - allowing for space either side */
	    max-width: 89%;
	    padding: 8px 10% 8px 1%;
	    text-indent: 15px;
	    position: relative;
	    display: block;
	    right: 0;
	    left: 0;
	    border: 1px solid #e5e5e5;
	    background: #fff;
	    font-size: 17px;
	    -moz-border-radius: 20px; /* increase border radius due to increased padding */
		border-radius: 20px;
	}
	.search-bar form input.action {
	    right: 5%;
	    top: 2px;
	    font-size: 18px;
	}

	/* Main Content */
	.main {
	    padding: 20px 0 45px; /* decrease padding so that more content can fit on screen */
	}
	.content-container,
	.sidebar {
	    width: 100%; /* sidenav is now shown above the page content */
	    margin-bottom: 30px;
	}
		.typography h1 { /* decrease size of page heading due to smaller screen */
		    font-size: 30px;
			line-height:35px;
		    margin-bottom: 15px;
		    padding-bottom: 10px;
		}
		.typography p {
		    font-size: 14px;
		    line-height: 23px;
		}
	p.intro {
	    font-size: 19px;
	    line-height: 27px;
	}
	.main .inner {
	    padding: 0 22px;
	}
	/* Secondry Nav */
	.secondary li a {
	    line-height: 24px;
	}
	.secondary li .arrow {
	    line-height: 26px;
	}
	/* Footer */
	.footer .right {
	    float: left;
	    width: 100%;
	}
}

/* Print Styles */

/* Based on HTML5 boilerplate print styles */
@media print {
	* {
	    background: transparent !important;
	    color: black !important;
	    box-shadow: none !important;
	    text-shadow: none !important;
	    filter: none !important;
	    -ms-filter: none !important;
	}
	a,
	a:visited {
	    text-decoration: underline
	}
	a[href]:after {
        content: " (" attr(href) ")";
    }
    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

	thead {
	    display: table-header-group
	}
	tr,
	img {
	    page-break-inside: avoid
	}
	img {
	    max-width: 100% !important
	}
	pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }
    @page {
        margin: 0.5cm;
    }
    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }

    /* Simple theme custom print styles */
	.header,
	.footer,
    .nav-open-button,
    .search-bar,
    .search-dropdown-icon,
    nav.primary {
	    display: none;
	}
}
#srcset a{
	float:left;
	list-style:none;
	max-width:50%;
}
#srcset a img{
	max-width:100%;
}
div.toodereas {
width:calc(25% - 34px);
	height: expression( this.scrollHeight < 191 ? "190px" : "auto" );
	min-height:240px;
	padding:5px 5px 5px 5px;
	margin:5px 10px 5px 0;
	float:left;
	-moz-border-radius: 10px; /* Firefox */
  -webkit-border-radius: 10px; /* Safari, Chrome */
  border-radius: 10px; /* CSS3 */
	border:1px #EEEEEE solid;
	background:#FFF;
	padding:5px 10px;
	text-align:center;
}
a.nimi {
    color: #000 !important;
    font-family: 'Montserrat', sans-serif;
    text-decoration: none;
    font-size: 14px;
    line-height: 14px;
    font-weight: bold;
}
a.nimi:hover {
	color: #DA2031 !important;
  font-family: 'Montserrat', sans-serif;
	text-decoration:none;
  font-size: 14px;
	line-height:14px;
	font-weight:bold;
}
p.nimi {
	height:55px;
	text-align:center;
	margin:0 !important;
}
span.helipea{
	color:#FF0000;
	font-size:13px;
	font-weight:700;
}
p#heli{
	text-align:center;
	color:#000;
	font-size:13px;
	line-height:18px;
	height:18px;
	padding:0;
	margin:0;
	font-weight:700;
}
span.hind {
	font-size:14px;
	text-align:center;
	margin:auto;
	padding:3px 0;
	line-height:normal;
	color:#343434;
	font-weight:700;
}
.typography h6.helipea {
    font-size: 16px;
    color: #CC0000;
    background: #f4f4f4;
    padding: 5px 0 5px 15px;
    line-height: 1.4em;
    margin: 16px 0 16px 0;
    border-radius: 6px;
}
#tootepilt img {
    max-width: 221px;
    max-height: 144px;
}