.menu-primary {
    background-color: white;
    display: flex;
    list-style-type: none;
    padding: 0px;
    margin: 0px;
}

.menu-primary a {
    padding: 32px 16px;
    font-size: 1.35em;
    position: relative;
    color: #350122;
    text-transform: uppercase;
    display: inline-block;
    vertical-align: middle;
    -webkit-transform: perspective(1px) translateZ(0);
    transform: perspective(1px) translateZ(0);
    box-shadow: 0 0 1px transparent;
    position: relative;
    -webkit-transition-property: color;
    transition-property: color;
    -webkit-transition-duration: 0.5s;
    transition-duration: 0.5s;
    text-decoration: none;
}

.menu-primary a:hover {
    text-decoration: none;
        position: static;
    color: white;
}

.menu-primary .menu-item a:hover:before {
    -webkit-transform: scaleY(1);
    transform: scaleY(1);
    -webkit-transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);
    transition-timing-function: cubic-bezier(0.52, 1.64, 0.37, 0.66);
}

.menu-primary a:before {
    content: "";
    position: absolute;
    z-index: -1;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: #a70e13;
    -webkit-transform: scaleY(0);
    transform: scaleY(0);
    -webkit-transform-origin: 50% 0;
    transform-origin: 50% 0;
    -webkit-transition-property: transform;
    transition-property: transform;
    -webkit-transition-duration: 0.5s;
    transition-duration: 0.5s;
    -webkit-transition-timing-function: ease-out;
    transition-timing-function: ease-out;
}

@media screen and (max-width: 1200px) {
	
	.nav-primary {
		display: flex;
		justify-content: center;
        background-color: #a70e13;
        position: relative;
	}
	
	.wrap:has(>.menu-primary):before {
		font-family: dashicons;
		content: '\f333';
		cursor: pointer;
		position: relative;
		/* margin-left: 50%; */
		display: flex;
		font-size: 1.5em;
		padding-top: 10px;
		padding-bottom: 10px;
		justify-content: center;
	}
	
    .menu-primary {
        flex-direction: column;
		position: relative;
		display: none;
		background-color: white;
		width: 100%;
		/*left: 50%;
		transform: translate(-50%);*/
    }
	
	.nav-primary .wrap,
	.nav-primary .menu-primary span,
	.nav-primary .menu-primary .sub-menu,
	.nav-primary .menu-primary .sub-menu li,
	.nav-primary .menu-primary ul.sub-menu .sub-menu	{
		width: 100%;
	}

    .nav-primary .wrap {
        padding: 0px;
        display: flex;
        justify-content: center;
        background-color: #a70e13;
        min-width: 40px;
        position: relative;
        height: 0px;
        top: -20px;
    }
    
    .nav-primary .wrap:before {
        background-color: #a70e13;
        color: white;
        height: 40px;
        padding: 0px;
        margin: 0px;
        line-height: 40px;
        border: 0px;
        width: 100%;
    }

    #menu-paavalikko {
        background-color: #a70e13;
        font-family: Roboto, serif;
        position: relative;
        z-index: 5000;
        width: 100%;
    }
    
    .menu-primary li {
        border-bottom: 1px solid #7a0004;
    }
    
    .menu-primary li a {
        padding: 0px;
        text-decoration: none;
        color: white;
        text-transform: none;
        font-size: 16px;
        padding: 16px;
    }
}

@media screen and (max-width: 800px) {

    .site-header .wrap {
        display: grid;
        row-gap: 20px;
        grid-template-columns: 100%;
    }
    
    .title-area {
        left: 0px;
    }
    
    .header-nav-row {
        grid-row: 2;
        flex-direction: column-reverse;
        margin-right: auto;
        margin-left: auto;
        height: auto;
        width: 90%;
    }
    
    .nav-primary {
        width: 100%;
        background-color: transparent;
    }
    
    .nav-primary .wrap {
        top: 0px;
        height: auto;
        background-color: #a70e13;
        background-color: white;
        width: 100%;
    }
    
    .menu-primary {
        top: -20px;
    }
    
    .nav-primary .wrap:before {
        
        // margin-bottom: 20px;
        // width: 100%;
    }
    
    .nav-primary li {
        
    }

    
    .header-contact-info {
        width: 100%;
        justify-content: center;
        display: flex;
        margin-bottom: 20px;
        font-size: 21px;
    }
    
    .header-contact-info a {
        margin-left: 0px;
        display: block;
        text-align: center;
        width: 100%;
        color: #350122;
    }
  
}