/* Home Page Image */

#homepage-image {
    background-image: url("../media/bar_1.jpg");
    background-position: center;
    background-size: cover;
    background-repeat: no-repeat;
    position: relative;
    min-height: calc(100vh - 5em) !important;
    height: calc(100vh - 5em) !important;
    z-index: 997;
}

#homepage-image .content {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    width: 100%;
    background-color: rgba(248, 248, 248, 0.7);
}

#homepage-image h1 {
    animation: title 1.2s forwards ease;
}

#homepage-image a {
    animation: register 1.2s forwards ease;
}

/* Teaser cardsbelow homepage image */

.teaser-card-frame {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.teaser-card {
    width: calc(33.3% - 1em);
    box-sizing: border-box;
    padding: 1em;
    display: flex;
    flex-direction: column;
    background-color: var(--light-gray);
    margin-bottom: 2em;
    justify-content: space-between;
    gap: 1.5em;
}

.teaser-card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.teaser-card-content img {
    width: 100%;
    border-radius: .8rem;
    aspect-ratio: 10/6;
    object-fit: cover;
}

.teaser-card-content h3 {
    width: 100%;
}

.teaser-card-content p {
    margin: 0;
    font-weight: 300;
    font-size: 1rem;
    line-height: 1.6rem;
}

/* Descriptive cards */

#descriptive-cards {
    padding: 0;
    overflow-x: hidden;
}

.descriptive-cards-frame {
    display: flex;
    flex-direction: column;
}

.descriptive-card {
    display: flex;
    flex: 1;
    width: 100%;
    justify-content: space-between;
    background-color: var(--light-gray);
    opacity: 0;
    transform: translateX(20%);
    transition: transform 0.6s ease-out, opacity 0.2s ease-out;
}

.descriptive-card:nth-child(even) {
    background-color: var(--light);
    flex-direction: row-reverse;
    transform: translateX(-20%);
}

.descriptive-card img {
    width: 40%;
    aspect-ratio: 1;
    object-fit: cover;
}

.descriptive-card .content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 40%;
    margin: 0 5% 0 0;
}

.descriptive-card .content p {
    margin: 0;
}

.descriptive-card .content p.paragraph-with-margin {
    margin-top: 1em;
}

.descriptive-card:nth-child(even) .content {
    margin: 0 0 0 5%;
}

.descriptive-card.in-view {
    transform: translateX(0);
    opacity: 1;
}

.descriptive-card .content p {
    margin: 0;
}

/* Location showcasing images */

#location {
    background-color: var(--light-gray);
    min-height: fit-content;
    padding-bottom: calc(5vw - 1em);
}

#location h2 {
    text-align: center;
}

.location-cards-frame {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
}

.location-card {
    width: calc(25% - .75em);
    aspect-ratio: 1;
    margin-bottom: 1em;
    border-radius: .75em;
    overflow: hidden;
    transition: transform .4s cubic-bezier(0.175, 0.885, 0.32, 1.275), opacity .2s;
    transform: scale(0);
    opacity: 0;
}

.location-card.in-view {
    transform: scale(1);
    opacity: 1;
}

.location-card img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* FAQ cards */

#faq {
    background-color: var(--primary);
    color: var(--light);
}

#faq h2 {
    text-align: center;
}

.faq-cards-frame {
    display: flex;
    flex-direction: column;
}

.faq-card {
    display: flex;
    flex-direction: column;
}

.faq-card .faq-q {
    display: flex;
    gap: 1em;
    align-items: center;
    border: 1px solid var(--light);
    cursor: pointer;
    padding: 1em;
}

.faq-card .faq-q div {
    font-size: 1.6em;
    margin-left: .5em;
    font-weight: 300;
}

.faq-card .faq-q h3 {
    margin: 0;
}

.faq-card .faq-a {
    border: 1px solid var(--light);
    height: 0;
    transform: rotateX(90deg);
    transform-origin: top;
    transition: .2s;
    visibility: collapse;
    overflow: hidden;
}

.faq-card .faq-a.opened {
    height: auto;
    visibility: visible;
    opacity: 1;
    padding: 1em;
    transform: rotateX(0deg);
}

/* Story Cards */

#stories {
    min-height: fit-content;
}

.story-cards-frame {
    overflow-y: hidden;
    width: 100%;
}

.story-cards-inner {
    overflow-y: scroll;
    width: fit-content;
    display: flex;
    gap: 3em;
    min-width: 100%;
}

.story-card {
    width: calc(33vw - 5em);
}

.story-card h3 {
    color: var(--primary);
}

/* Contact Linker */

#contact {
    background-color: var(--light-gray);
    text-align: center;
    display: flex;
    flex-direction: column;
    gap: 2em;
    align-items: center;
    min-height: fit-content;
}

#contact h2 {
    margin: 0;
}

#contact p {
    margin: 0;
}

/* Contact info cards */

.contact-info-cards {
    display: flex;
    justify-content: space-around;
}

.contact-info-card {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: .5em .9em;
    background-color: var(--primary);
    width: fit-content;
    border-radius: .5em;
    color: var(--light);
}

.contact-info-card a {
    color: var(--light-gray);
}

@media screen and (max-width: 1000px) {
    .teaser-card {
        width: calc(50% - 1em);
    }

    .teaser-card h3 {
        margin-top: 1em;
    }

    /* Descriptive cards */
    
    .descriptive-card img {
        width: 40%;
        aspect-ratio: 1;
        object-fit: cover;
    }

    .descriptive-card .content {
        padding: 1em 0;
        width: 50%;
    }

    .descriptive-card .content p {
        font-size: .9rem;
    }

    /* Location showcasing images */

    .location-card {
        width: calc(33.3% - .75em);
    }

    /* Story Cards */

    .story-card {
        width: calc(45vw - 5em);
    }
}

@media screen and (max-width: 700px) {
    /* Story Cards */

    .story-card {
        width: calc(80vw - 5em);
    }

    /* Heading elements */

    #location h2 {
        text-align: center;
    }

    #faq h2 {
        text-align: center;
    }

    #contact h2 {
        margin: 0;
    }
}

@media screen and (max-width: 650px) {
    /* Home Page Image */

    #homepage-image .content {
        padding: 0 1em;
        max-width: 92% !important;
        gap: 5vh;
    }

    #homepage-image h1 {
        text-align: center;
        font-size: 1.5rem;
    }

    .teaser-card {
        width: 100%;
    }

    .teaser-card-content h3 {
        margin-bottom: 0;
    }

    .teaser-card-content p {
        display: none;
    }

    .teaser-card a {
        text-align: right;
    }

    /* Descriptive cards */

    .descriptive-card,
    .descriptive-card:nth-child(even) {
        flex-direction: column;
        min-height: calc(100vh - 2em);
    }

    .descriptive-card img {
        width: 100%;
        aspect-ratio: 3/2;
        object-fit: cover;
        object-position: top;
    }

    .descriptive-card .content {
        padding: 1em 1em 2em 1em;
        box-sizing: border-box;
        width: 100%;
        margin: 0;
    }

    .descriptive-card .content p,
    .descriptive-card:nth-child(even) .content {
        margin: 0;
    }

    /* Location showcasing images */

    .location-card {
        width: calc(50% - .75em);
    }

    /* FAQ cards */

    .faq-card .faq-q {
        padding: .5em;
    }

    .faq-card .faq-a.opened {
        padding: .5em 2em;
    }

    /* Story Cards */
    
    .story-card {
        width: 70vw;
    }

    .story-card h3 {
        color: var(--primary);
    }
}

@media screen and (max-width: 340px) {
    /* Location showcasing images */

    .location-card {
        width: 100%;
    }
}

@keyframes title {
    0% {
        transform: translateY(2em) scale(97%);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(100%);
        opacity: 1;
    }
}

@keyframes register {
    0% {
        transform: translateY(2em) scale(97%);
        opacity: 0;
    }
    100% {
        transform: translateY(0) scale(100%);
        opacity: 1;
    }
}