/*
        Theme Name: Jäsenedut.fi
        Author: Simonj.fi
        Author URI: https://simonj.fi
        Version: 1.1
        Text Domain: edut
*/

* {
    box-sizing: border-box;
}

html {
    --accent-font: "Poppins", "Roboto", sans-serif;
    --basic-font: "Roboto", sans-serif;
    --text-color: #757575;
    --text-color-dark: #222;
    --text-color-accent: #3F5495;
    --text-color-highlight: #6EC1E4;
    --border-color: #ccc;
}

body {
    font-family: var(--accent-font);
    color: var(--text-color);
    line-height: 1.8em;
    margin: 0;
}

main {
    padding: 1rem;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: var(--text-color-accent);
}

a:hover {
    color: var(--text-color-highlight);
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--accent-font);
    font-weight: 400;
    color: var(--text-color-dark);
}

h1.not-found {
    color: var(--text-color-accent);
    font-size: 200px;
    font-weight: 700;
}

label {
    display: block;
    font-weight: 700;
    color: var(--text-color-accent);
    font-family: var(--accent-font);
}

input {
    padding: 0.5rem 1rem;
    width: 100%;
    margin-bottom: 1rem;
}

button, .button {
    background-color: var(--text-color-accent);
    color: #fff;
    padding: 1rem;
    font-size: 1.25rem;
    border: 0;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
}

button:hover, .button:hover {
    background-color: var(--text-color-highlight);
    color: #fff;
    text-decoration: none;
}

.error {
    background-color: #ffe5e5;
    color: #c52d2d;
    border: 1px solid;
    padding: 1rem;
    margin-bottom: 1rem;
}

.success {
    background-color: #97ffb7;
    color: #00a232;
    border: 1px solid;
    padding: 1rem;
    margin-bottom: 1rem;
}

.form-error {
    padding: 0;
    background: none;
    border: none;
    margin-top: -1rem;
}

.form-error.done {
    color: green;
}

.text-centered, .text-center, .center, .centered {
    text-align: center;
}

.wrapper {
    max-width: 1280px;
    margin: 0 auto;
}

.custom-logo {
    height: 65px;
    width: auto;
}

header {
    border-bottom: 1px solid var(--border-color);
}

#toggler-primary {
    display: none;
}

header nav ul {
    list-style: none;
    padding: 0;
}

header > .wrapper {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
}

header > .wrapper > a {
    flex-grow: 1;
}

header nav {
    flex-grow: 9;
    font-family: var(--accent-font);
}

header nav a {
    color: var(--text-color-dark);
    text-decoration: none;
}

header nav a:hover {
    color: var(--text-color-accent);
}

header nav ul {
    display: flex;
    justify-content: flex-end;
}

header nav > ul > li {
    padding: 0 0.5rem;
}

#edut-filter,
#edut-list {
    list-style: none;
    padding: 0;
}

#edut-filter li {
    display: inline-block;
}

.placeholder {
    background-color: #e5e5e5;
    display: block;
    background-image: linear-gradient(90deg, #eee 0px, #f5f5f5 40px, #eee 80px);
    animation: shine-lines 1.6s infinite linear;
    min-height: 1.5rem;
}

#edut-filter li input {
    display: none;
}

#edut-filter label.placeholder {
    min-width: 100px;
    height: 1.5rem;
}

#edut-filter  {
    margin-bottom: 1rem;
}

#edut-filter label:not(.placeholder) {
    cursor: pointer;
    font-family: "Poppins", "Roboto", sans-serif;
    padding: 0.75rem 1rem;
    border-radius: 5px;
    display: block;
}

#edut-filter label:not(.placeholder):hover {
    text-decoration: underline;
}

#edut-filter :checked + label:not(.placeholder) {
    background-color: var(--text-color-accent);
    color: #fff;
}

#edut-list {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    column-gap: 1rem;
    row-gap: 1rem;
}

#edut-list .placeholder {
    margin-bottom: 0.5rem;
}

#edut-list .img.placeholder {
    height: 150px;
    width: 100%;
    border: 0px;

}

#edut-list li {
    position: relative;
}

#edut-list .overlay {
    position: absolute;
    height: 100%;
    width: 100%;
    top: 0;
    left: 0;
}

#edut-list .title {
    font-weight: bold;
}

#edut-list .description {
    font-size: small;
}

#edut-list .img {
    position: relative;
    box-shadow: 0 5px 14px -7px rgba(0, 0, 0, 0.4);
    border-radius: 25px;
    overflow: hidden;
    margin-bottom: 1rem;
    transition: transform 0.2s linear;
}

#edut-list .img::before {
    width: 100%;
    content: '';
    display: block;
    padding-top: 75%;
}

#edut-list img {
    position: absolute;
    top: 0;
    left: 0;
    display: block;
    height: 100%;
    width: 100%;
    object-fit: cover;
    object-position: center center;
}

#edut-list li:hover .img {
    transform: translateY(-5px);
}

.frontend-login {
    margin: 0 auto;
    max-width: 500px;
    padding: 2rem 0;
}

.single-etu main {
    display: flex;
    justify-content: space-between;
}

.single-etu main > * {
    flex: calc(50% - 1rem) 0 0;
}

.single-etu .etu-thumbnail {
    text-align: center;
}

#primary label {
    display: none;
}

h2 + datetime {
    font-size: small;
    font-weight: bold;
    margin-top: -1.5em;
    display: block;
}

@keyframes shine-lines {
    0% {
        background-position: -100px;
    }
    40%, 100% {
        background-position: 140px;
    }
}

@media (max-width:1024px){
    #edut-list {
        grid-template-columns: repeat(4, 1fr);
    }
}

@media (max-width:767px){
    #edut-list {
        grid-template-columns: repeat(3, 1fr);
    }

    #primary {
        flex: 0 0 100%;
    }

    #menu-main {
        flex-direction: column;
        padding: 0;
        margin: 0;
        max-height: 0;
        overflow: hidden;
        transition: all 250ms ease-in-out;
    }

    #menu-main li {
        padding: 0;
    }

    #menu-main a {
        display: block;
        padding: 0.5rem 1rem;
        background-color: var(--text-color-accent);
        color: #fff;
        border-top: 1px solid #FFFFFF33;
    }

    #menu-main a:hover {
        background-color: #23397d;
    }

    #toggler-primary:checked ~ .menu {
        max-height: 100vh;
        height: auto;
    }

    #primary label {
        display: initial;
        position: absolute;
        top: 1.5rem;
        right: 2rem;
        cursor: pointer;
    }
}

@media (max-width:480px){
    #edut-list {
        grid-template-columns: repeat(2, 1fr);
    }
}