/*
Theme Name: oty
Description: Using the parent theme Twenty Seventeen.
Author: Tommi Portti
Author URI:
Template: twentyseventeen
Version: 1
*/

.Row
{
    display: table;
    /*table-layout: fixed; Optional*/
    border-spacing: 10px; /*Optional*/
    /*width: 100%;*/
    text-decoration: none;
}
.Column
{
    display: table-cell;
    text-decoration: none !important;
    border:0px !important;
    outline:none;
    border-width: 0px;
    outline-width:0px;
    border-bottom: none;

}

.site-footer .widget-area a {
    -webkit-box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 1);
    box-shadow: inset 0 -1px 0 rgba(255, 255, 255, 1);
    text-decoration: none;
    -webkit-transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
    transition: color 80ms ease-in, -webkit-box-shadow 130ms ease-in-out;
    transition: color 80ms ease-in, box-shadow 130ms ease-in-out;
    transition: color 80ms ease-in, box-shadow 130ms ease-in-out, -webkit-box-shadow 130ms ease-in-out;
}
.has-header-image .custom-header-media img {
    position: absolute;
    width:auto;
    height:100%;
    object-fit: cover; 
    overflow: hidden;
}

.site-branding {
		margin-top: 0;
		margin-bottom: 71px !important; /* override styles added by JavaScript */
	}

.site-header {
    width: 100%;
    height: auto;
    max-height: 500px;
}
.custom-header {
    max-height: 400px;
    height: auto;
}
/*:not(.twentyseventeen-front-page):not(.home).custom-header-media {
    max-height: 100%;
	
}*/
.custom-header {
    margin-bottom: 10px! important; /* Force margin-bottom to zero*/
}

/* Front page */
.twentyseventeen-front-page.has-header-image .custom-header-media {
    max-height: inherit;
}
.has-header-image .custom-header-media img {
    position: relative;
    width:100%;
    height:100%;
    object-fit: cover;
    overflow: hidden;
    align: center;
    text-align: center;
    vertical-align: middle;
    transform: translateY(-33%);
}

/* Other pages */
.has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media {
    
    max-height: inherit;
    /*transform: translateY(-33%);*/
}
.has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media img {
    position: relative;
    width:100%;
    height:100%;
    object-fit: cover;
    overflow: hidden;
    align: center;
    text-align: center;
    vertical-align: middle;
    transform: translateY(-33%);
   
}
.has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header {
    display: block;
    height: 400px;
    width: 100%;
    max-height: inherit;
}

/* Kaikki titleen */

	.has-header-image .site-branding,
	.has-header-video .site-branding,
	.has-header-image .site-branding,
	.has-header-video .site-branding {
		bottom: 0;
		display: block;
		left: 0;
		height: auto;
		padding-top: 0;
		position: absolute;
		width: 100%;
	}
	.has-header-image .custom-header,
	.has-header-video .custom-header,
	.has-header-image .custom-header,
	.has-header-video .custom-header {
		display: block;
		height: auto;
	}

	.custom-header-media,
	.custom-header-media,
	.has-header-image .custom-header-media,
	.has-header-video .custom-header-media {
		height: 0;
		position: relative;
	}

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

.site-header
.custom-header {
    max-height: 400px;
    height: 400px;
    height: auto;
    position: relative;
    bottom: 0;
}

.site-branding {
    position: relative;
    bottom: 0;
    top: 0;
    height: 100%;

}

    .has-header-image .custom-header-media img,
    .has-header-video .custom-header-media video, 
    .has-header-video .custom-header-media iframe {
        height: 100%;
	max-height: 460px;
        left: 0;
	width: 100%;
        max-width: 770px;
        min-height: 0px;
        -o-object-fit: cover;
        object-fit: cover;
        position: fixed;
	bottom: 0;
        -ms-transform: none;
        -moz-transform: none;
        -webkit-transform: none;
        transform: none;
	overflow: hidden;
        align: center;
        text-align: center;
    }

    .has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media img,
    .has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media video,
    .has-header-image:not(.twentyseventeen-front-page):not(.home) .custom-header-media iframe {
        height: 100%;
	max-height: 460px;
        left: 0;
	width: 100%;
        max-width: 770px;
        min-height: 0px;
        -o-object-fit: cover;
        object-fit: cover;
        position: fixed;
	bottom: 0;
        -ms-transform: none;
        -moz-transform: none;
        -webkit-transform: none;
        transform: none;
	overflow: hidden;
        align: center;
        text-align: center;
    }


}
