* {
    box-sizing: border-box;
}

html, body {
    padding: 0;
    margin: 0;
}

.no-select {
    -khtml-user-select: none;
    -o-user-select: none;
    -moz-user-select: none;
    -webkit-user-select: none;
    user-select: none;
}

body {
    font-size: 18px;
    font-family: 'Montserrat', sans-serif;
}

img {
    height: auto;
    max-width: 100%;
    vertical-align: middle;
}


img.armas {
    width: 150%;
    margin-left: -37%;
    margin-top: -50%;
    pointer-events: none;
    z-index: -2;
    max-width: none;
}

.text-center {
    text-align: center;
}

.wrapper {
    margin: 0 auto;
    overflow: hidden;
    max-width: 1180px;
    padding: 0 20px;
}

.wrapper.no-padding {
    padding: 0;
}

.wrapper.overflowing {
    overflow: visible;
}

.wrapper.narrow {
    max-width: 1000px;
}

.content-area {
    margin-top: 25px;
}

.content-area .content {
    margin-bottom: 60px;
}

h1,h2,h3,h4,h5,h6 {
    margin-top: 0;
}

h1 {
    color: #8a0b17;
    font-weight: 400;
    font-size: 30px;
}

h1.big {
    font-size: 50px;
}

h1.bg {
    background-color: #8a0b17;
    padding: 10px;
    color: #ffffff;
}

p + h1, p + h2, p + h3, p + h4, p + h5, p + h6 {
    margin-top: 1.3em;
}


p {
    margin-top: 0;
}


.image-border {
    border: 3px solid #8a0b17;
}

.grid {
    display: grid;
}

.grid.gap-20 {
    grid-gap: 20px;
}

.grid.etusivu {
    grid-template-columns: 1fr 1fr;
}

.grid.fiftyfifty {
    grid-template-columns: 1fr 1fr;
}

.relative {
    position: relative;
}

.yhteystiedot {
    margin-bottom: 100px;
    border-bottom: 8px solid #8a0b17;
    border-right: 8px solid #8a0b17;
    grid-template-columns: 1fr auto;
    align-items: end;
}


@media screen and (max-width: 810px) {
    .yhteystiedot img {
        display: none;
    }
}



@media screen and (max-width: 660px) {
    .ohjaajat {
        display: block;
    }
}

.ohjaajat {
    margin-bottom: 60px;
}

.ohjaajat-teksti {
    padding: 0 20px;
}


header#header {
    height: 260px;
}

#logo {
    display: block;
    margin: 0 auto;
}

header#header .wrapper {
    height: 100%;
    background-color: rgba(198, 198, 197, 0.6);
    border-bottom: 10px solid #8a0b17;
    display: flex;
    align-items: center;
}

nav#menu {
    background-color: #8a0b17;
    padding: 15px 20px;
    position: absolute;
    top: 0;
    right: 0;
}

nav#menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
}

nav#menu ul li {
    display: inline;
    margin-right: 1em;
}

nav#menu ul li.active {
    position: relative;
}

nav#menu ul li.active::after {
    content: "";
    width: 100%;
    position: absolute;
    bottom: -15px;
    left: 0;
    border-bottom: 6px solid #ffffff;
}

nav#menu ul li:last-child {
    margin-right: 0;
}

nav#menu ul li a {
    color: #ffffff;
    text-decoration: none;
    font-weight: 600;
}

footer#footer {
    background-color: #8a0b17;
    padding: 50px 0;
    color: #ffffff;
}

footer#footer p {
    margin: 0;
}


.alpakat {
    margin-bottom: 100px;
}

.alpakat .alpakka {
    min-height: 480px;
    border-bottom: 10px solid #8a0b17;
    display: flex;
}

.alpakat .alpakka + .alpakka .perustiedot {
    margin-top: -10px;
}

.alpakat .alpakka:nth-child(even) {
    flex-direction: row-reverse;
}


.alpakat .alpakka .alpakka-kuva {
    object-fit: cover;
}

.alpakat .alpakka > .alpakka-kuva,.alpakka-tiedot {
    width: 50%;
}

.alpakat .alpakka .alpakka-tiedot .perustiedot {
    background-color: #8a0b17;
    color: #ffffff;
    padding: 20px;
}

.alpakat .alpakka .alpakka-tiedot .perustiedot span {
    display: block;
}

.alpakat .alpakka .nimi {
    margin-bottom: 0;
}

.alpakat .alpakka .syntymaaika {
    margin-bottom: 1em;
}



.alpakat .alpakka .alpakka-tiedot .kuvaus {
    padding: 20px;
}




@media screen and (max-width: 1180px) {
    img.armas {
        height: auto;
        max-width: 100%;
        margin-left: 0;
        margin-top: 0;;
        pointer-events: none;
        z-index: -2;
    }
}


@media screen and (max-width: 840px) {

    .alpakat .alpakka {
        flex-direction: column;
        max-width: 580px;
        margin: 0 auto;
    }

    .alpakat .alpakka:nth-child(even) {
        flex-direction: column;
    }

    .alpakat .alpakka > .alpakka-kuva,.alpakka-tiedot {
        width: unset;
    }

}

@media screen and (max-width: 800px) {
    img.armas {
        display: none;
    }

    .grid.etusivu {
        display: block;
    }
}

@media screen and (max-width: 650px) {
    nav#menu {
        position: static;
        padding: 20px 25px;
        margin: 0 -20px;
        margin-bottom: 20px;
        text-align: center;
    }
    nav#menu ul li.active::after {
        bottom: -20px; 
    }

    header#header .wrapper {
        display: block;
    }
}


#close-menu {
    display: none;
    background-color: #ffffff;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    margin: 15px 15px 15px auto;
    padding: 10px;
    box-sizing: content-box;
    cursor: pointer;
    position: relative;
}

#close-menu::before,#close-menu::after  {
    display: block;
    background-color: #8a0b17;
    content: "";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translateX(-50%) translateY(-50%) rotate(45deg);
}


#close-menu::before {
    width: 2px;
    height: 60%;
}

#close-menu::after {
    width: 60%;
    height: 2px;
}

#open-menu {
    display: none;
    position: absolute;
    top: 25px;
    right: 15px;
    width: 25px;
    margin-left: auto;
    padding: 10px;
    box-sizing: content-box;
    cursor: pointer;
}

#open-menu span.line {
    width: 100%;
    height: 3px;
    margin-bottom: 4px;
    background-color: #8a0b17;
    display: block;
}

@media screen and (max-width: 480px) {
    nav#menu {
        position: fixed;
        z-index: 10;
        top: 0;
        bottom: 0;
        left: 0;
        right: 0;
        transform:translateX(100%);
        text-align: left;
        padding: 0;
        margin: 0;
        transition: transform 0.2s ease-in-out, opacity 0.2s ease-in-out;
        opacity: 0;
    }

    nav#menu.open {
        transform: translateX(0);
        opacity: 1;
    }

    img#logo {
        margin-top: 30px;
    }

    header#header {
        height: 180px;
    }

    #open-menu {
        display: block;
    }

    #close-menu {
        display: block;
    }


    nav#menu ul li {
        display: block;
        border-bottom: 1px solid #8a0b17;
        margin-right: 0;
        background-color: #ffffff;
        color: #8a0b17;
    }

    nav#menu ul li.active {
        background-color: #dddddc;
    }

    nav#menu ul li a {
        color: inherit;
        display: block;
        padding: 1em 0 1em 1em;
    }

    nav#menu ul li.active::after {
        display: none;
    }

    
}





