
/* START COMPONENT: hero */
main div.hero-img {
    background-image: linear-gradient(45deg, rgba(0, 0, 0, 0.85), rgba(0, 0, 0, 0.2)), url("../media/hero.webp") !important;
    height: 85vh;
    width: 100%;
    background-position: center;
    background-repeat: no-repeat;
    background-size: cover;
    position: fixed;
    z-index: -10;
    animation-name: scale-in;
    animation-duration: 20s;
}

@keyframes scale-in {
    0% { transform: scale(1.1, 1.1); }
    100% { transform: scale(1, 1); }
}

main div.hero-img-placeholder {
    height: 85vh;
    position: relative;
}

main div.hero-text {
    position: absolute;
    bottom: 10%;
    left: 10%;
    color: var(--primary-background-color);
    width: 40vw;

    h1 {
        font-size: 2rem;
    }

    p {
        padding-top: 0.5rem;
        font-size: 1.45rem;
    }
}

/* Below 930px */
@media only screen and (max-width: 58.12em) {
    main div.hero-text {
        width: 80vw;

        h1 {
            font-size: 1.75rem;
        }

        p {
            font-size: 1.3rem;
        }
    }
}

/* Below 600px */
@media only screen and (max-width: 37.5em) {
    /* Resizes the hero img to be "fullscreen" */
    /*main div.hero-img {
        background-image: linear-gradient(rgba(0, 0, 0, 0.3), rgba(0, 0, 0, 0.55)), url("../media/hero.webp") !important;
        height: 100vh;
    }
    main div.hero-img-placeholder {
        height: 100vh;
    }*/
    main div.hero-text {
        h1 {
            font-size: 1.5rem;
        }

        p {
            font-size: 1.15rem;
        }
    }
}

/* Below 370px */
@media only screen and (max-width: 23.13em) {
    main div.hero-text {
        h1 {
            font-size: 1.2rem;
        }

        p {
            font-size: 1rem;
        }
    }
}

/* Horizontal below 400px */
@media only screen and (max-height: 25em) {
    main div.hero-text {
        h1 {
            font-size: 1.5rem;
        }

        p {
            font-size: 1.1rem;
        }
    }
}

/* END COMPONENT: hero */

/* START COMPONENT: info-card */
div.info-card-wrapper {
    display: flex;
    position: relative;
    overflow: hidden;

    background-clip: border-box; /* Fix for small gap in border corners */

    div.info-card-bg {
        position: absolute;
        left: 0;
        right: 0;
        top: 0;
        bottom: 0;

        background-image: url("../media/footer.webp");
        background-position: center;
        background-repeat: no-repeat;
        background-size: cover;

        filter: blur(0.25rem);

        margin: -0.5rem;
        z-index: 0;
    }

    div.info-card {
        z-index: 1;

        margin: 2rem;
        padding: 2rem;
        background-color: var(--primary-background-color);

        svg {
            margin: auto;
            width: 100%;
            height: 5.5rem;
            margin-bottom: 1.5rem;
        }

        h3 {
            margin-bottom: 0.5rem;
        }
    }
}

/* Below 1200px */
@media only screen and (max-width: 75em) {
    div.info-card-wrapper {
        padding: 1rem 1rem 1rem 1rem;

        div.info-card {
            margin: 1rem 1rem 1rem 1rem;
            padding: 1rem;
        }
    }
}

/* Below 900px */
@media only screen and (max-width: 56.25em) {
    div.info-card-wrapper {
        padding: 0.5rem 1rem 0.5rem 1rem;

        div.info-card {
            margin: 0.5rem 0.5rem 0.5rem 0.5rem;
            padding: 1rem;
        }
    }
}

/* Smaller than 800px */
@media only screen and (max-width: 50em) {
    div.info-card-wrapper {
        flex-wrap: wrap;
        flex-direction: column;

        /* Overrides .box, TODO: Check if this can be a general .box media query */
        padding: 0.5rem 1rem 0.5rem 1rem;

        div.info-card {
            margin: 0.5rem 0 0.5rem 0;
            padding: 1rem;
        }
    }
}

/* Between 480px and 600px */
@media only screen and (min-width: 30em) and (max-width: 50em) {
    div.info-card-wrapper {
        /* Overrides .box, TODO: Check if this can be a general .box media query */
        padding: 1rem 2rem 1rem 2rem;

        div.info-card {
            margin: 1rem 0 1rem 0;
            padding: 1.5rem;
        }
    }
}

/* Below 480px */
@media only screen and (max-width: 29.95em) {
    div.info-card-wrapper {
        div.info-card {
            a {
                svg {
                    height: 4rem;
                }
                span {
                    font-size: 1rem;
                    line-height: 1.3rem;
                    display: block;
                }
            }
        }
    }
}
/* END COMPONENT: info-card */

/* START COMPONENT: grid */
div.grid-wrapper {
    display: grid;
    grid-gap: 1rem;
    grid-template-columns: repeat(auto-fill, minmax(25rem,2fr));
    column-count: 3;
}
div.grid-card {
    position: relative;

    background-clip: border-box; /* Fix for small gap in border corners */

    padding: 0; /* Override .box */
    height: 23.75rem;

    a {
        position: absolute;
        width: 100%;
        height: 100%;
        top: 0;
        left: 0;

        border-radius: inherit;
        background-clip: border-box; /* Fix for small gap in border corners */
        color: var(--primary-text-color);
        text-decoration: none;

        transition: all 0.5s ease-out;

        overflow: hidden;

        h3, span {
            opacity: 0;
            transition: inherit;
        }
        h3 {
            margin-top: 40%;
            margin-bottom: 0.375rem;
        }
        h3, span:not(.grid-card-year) {
            margin-left: 1.5rem;
            margin-right: 1.5rem;
        }
        span {
            color: var(--primary-text-color--alt);
        }
        span.grid-card-year {
            margin: 0 1.5rem 0 1.5rem;
            font-weight: 300;
        }

        div.card-corner {
            display: flex;
            align-items: center;
            justify-content: center;
            position: absolute;
            width: 3rem;
            height: 3rem;
            overflow: hidden;
            top: 0;
            right: 0;
            margin-right: -3rem;
            background-color: var(--secondary-background-color);
            border-radius: 0 8px 0 32px;
            opacity: 0.0;

            transition: inherit;
        }
    }

    img {
        width: 100%;
        height: 100%;
        object-fit: cover; 

        border-radius: 7px; /* Fixes the rought edges on the border */
    }
}

div.grid-card a:hover {
    background-color: rgb(from var(--primary-background-color) r g b / 0.75);

    h3, span {
        opacity: 1.0;
    }

    div.card-corner {
        margin-right: 0;
        opacity: 0.8;
    }
}

/* Smaller than 600px */
@media only screen and (max-width: 37.5em) {
    div.grid-wrapper {
        grid-template-columns: none;
        column-count: 1;
    }
    div.grid-card {
        height: 25rem;
    }
}

/* Below 480px */
@media only screen and (max-width: 29.95em) {
    div.grid-card {
        height: 15.75rem;
    }
}
/* END COMPONENT: grid */
