@import "common.css";

.scroll-container {
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
    overflow-x: hidden;
    height: 100vh;
    width: 100vw;
}

@-moz-document url-prefix() {
    html {
        scroll-snap-type: none;
    }
}

section {
    height: 100vh;
    width: 100vw;
    scroll-snap-align: start;
    scroll-behavior: smooth;
}

/*------------------------------------------------------------------------------------------------------*/
/*- Section 1 - Hauptseite -*/
/*------------------------------------------------------------------------------------------------------*/
.logo {
    position: relative;
    text-align: center;
    top: 20vh;
}
.logo img {
    width: 40vw;
    height: auto;
    position: absolute;
    transform: translateX(-75%);
}
.image-container {
    position: relative;
    text-align: center;
    top: 50vh;
}
.image-container img {
    width: 95vw;
    height: auto;
}

@media only screen and (max-width: 768px) {
    .logo {
        top: 30vh;
    }
    .logo img {
        width: 80vw;
        transform: translateX(-50%);
    }
    .image-container img {
        width: 100vw;
        top: 40vh;
    }
}

/*------------------------------------------------------------------------------------------------------*/
/*- Section 2 - Das sind wir -*/
/*------------------------------------------------------------------------------------------------------*/
#introduction {
    position: relative;
    width: 80vw;
    border-radius: 8px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
#introduction img {
    width: 100%;
    height: auto;
    border-radius: 8px;
    object-fit: cover;
}
#introduction div {
    position: absolute;
    top: 22%;
    left: 60%;
    width: 34vw;
    text-align: left;
    font-family: Calibri;
    box-sizing: border-box;
    padding: 20px; /* Optional: Padding für besseren Textabstand */
}
#introduction h2 {
    font-size: 3.5vw;
    font-weight: bolder;
    margin-bottom: 15px;
}
#introduction p {
    font-size: 1.3vw;
    margin-bottom: 20px;
}
#introduction button {
    padding: 1vh 3vw;
    font-size: 1.5vw;
}

@media only screen and (max-width: 768px) {
    #introduction div {
        position: static;
        width: inherit;
    }
    #introduction h2 {
        font-size: 4vh;
        font-weight: bolder;
    }
    #introduction p {
        font-size: 2vh;
    }
    #introduction button {
        padding: 10px 60px;
        font-size: 2.4vh;
    }
    #introduction img {
        border-radius: 30px;
        transition: transform 0.2s ease-in-out;
    }
    #introduction img:hover {
        transform: scale(1.4);
    }
}

@media only screen and (max-width: 450px) {
    #introduction p {
        font-size: 1.6vh;
    }
}

/*------------------------------------------------------------------------------------------------------*/
/*- Section 3 - Geschichte -*/
/*------------------------------------------------------------------------------------------------------*/
.geschichte {
    width: 100%;
    height: 100%;
    position: relative;
    /*Hintergrund*/
    .background-container_1 {
        .image-container_1 {
            position: relative;
            width: 100vw;
            height: 100vh;
            z-index: 1;
        }
        .image-container_1 img {
            position: absolute;
        }
        /*Wellenlinie*/
        .bg1 {
            position: absolute;
            width: 100%;
            height: 130%;
            transform: translateY(-5%);
        }
        /*Zeitstrahl*/
        .bg2 {
            position: absolute;
            width: 100%;
            height: 39%;
            transform: translateY(70%);
        }
        /*Bär*/
        .scaling-box {
            position: relative;
            width: auto;
            height: 35vh;
            top: 32%;
            right: -38%;
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .bg3 {
            position: absolute;
            width: 13%;
            height: 40%;
            transform: rotate(20deg);
            object-fit: contain;
        }
        .bg2_mobile {
            display: none;
        }
    }
    /*Buttons*/
    .button-container {
        position: absolute;
        width: 100%;
        height: 100%;
        z-index: 3;
        .fg-btn {
            position: absolute;
            width: 22%;
            height: 25%;
            border-radius: 50px;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .button1 {
            transform: translateY(70%);
            left: 7vw;
        }
        .button2 {
            transform: translateY(205%);
            left: 29vw;
        }
        .button3 {
            transform: translateY(70%);
            left: 51vw;
        }
        .button4 {
            transform: translateY(205%);
            left: 73vw;
        }
        .button1 p,
        .button2 p,
        .button3 p,
        .button4 p {
            font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
            font-weight: bolder;
            color: var(--fg-color-light-beige);
            font-size: 1.5vw;
            padding-left: 5vw;
            padding-right: 5vw;
            text-align: center;
        }
    }
}

@media only screen and (max-width: 768px) {
    .geschichte {
        .background-container_1 {
            .bg2 {
                height: 19%;
                top: 23%;
            }
            .scaling-box {
                .bg3 {
                    width: 15%;
                    height: 24%;
                    top: 28%;
                    right: 44%;
                }
            }
        }
        .button-container {
            flex-direction: column;
            .fg-btn {
                top: 10%;
                height: 20vh;
            }
            .button1 {
                transform: translateY(60%);
                left: 7vw;
            }
            .button2 {
                transform: translateY(190%);
                left: 29vw;
            }
            .button3 {
                transform: translateY(60%);
                left: 51vw;
            }
            .button4 {
                transform: translateY(190%);
                left: 73vw;
            }
            .button1 p,
            .button2 p,
            .button3 p,
            .button4 p {
                font-size: 15px;
                padding-left: 2vw;
                padding-right: 2vw;
            }
        }
    }
}

@media only screen and (max-width: 450px) {
    .geschichte {
        .background-container_1 {
            .bg2 {
                display: none;
            }
            .bg2_mobile {
                display: block;
                top: 50%;
                left: 50%;
                transform: translate(-50%, -50%);
                width: 100%;
            }
            .scaling-box {
                .bg3 {
                    width: 15%;
                    height: 24%;
                    top: 95%;
                    right: 50%;
                }
            }
        }
        .button-container {
            flex-direction: column;
            .fg-btn {
                top: 10%;
                height: 20vh;
                width: 35vw;
            }
            .button1 {
                transform: translateY(35%);
                left: 9vw;
            }
            .button2 {
                transform: translateY(125%);
                left: 57vw;
            }
            .button3 {
                transform: translateY(210%);
                left: 9vw;
            }
            .button4 {
                transform: translateY(300%);
                left: 57vw;
            }
            .button1 p,
            .button2 p,
            .button3 p,
            .button4 p {
                font-size: 12px;
                padding-left: 2vw;
                padding-right: 2vw;
            }
        }
    }
}

/*------------------------------------------------------------------------------------------------------*/
/*- Section 4 - Über Uns -*/
/*------------------------------------------------------------------------------------------------------*/
.ueber_uns {
    position: relative;
}

.ueber_uns > .row {
    position: relative;
    height: 100%;
    padding: 10vh 5vw 5vh;
}

.ueber_uns > .row > .col {
    height: 100%;
}

.background-container_2 {
    position: absolute;
    top: 60%;
    left: 50%;
    width: 100%;
    height: 100%;
}

.background-container_2 img {
    width: 60%;
    height: auto;
    transform: rotate(15deg);
}

.text-container {
    max-width: 700px;
    min-height: 500px;
    margin: 7vh auto 0;
    font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
    font-size: calc(0.6em + 1vw);
}

.text-container .fg-btn {
    margin-top: 20px;
    padding: 10px 60px;
    font-size: 1.2em;
}

.header-ueber-uns {
    font-size: calc(1.2em + 2vw);
    font-weight: bolder;
    line-height: 1.6;
}

/* Bilder-part */
#portraitCarousel {
    height: 100%;
    width: 100%;
}

.carousel .carousel-inner,
.carousel .carousel-item {
    height: 100%;
}

.portrait-grid {
    height: 100%;
    width: fit-content;
    /* Carousel controls are 15% wide, stay out of that space */
    padding: 0 15%;
    margin: auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: repeat(2, calc(50% - 10px));
    gap: 20px;
    z-index: 3;
}

/* Carousel-buttons*/
#portraitCarousel .carousel-control-prev-icon,
#portraitCarousel .carousel-control-next-icon {
    border-radius: 50%;
    background-color: var(--fg-color-yellow);
}

#portraitCarousel .carousel-control-prev:hover .carousel-control-prev-icon,
#portraitCarousel .carousel-control-next:hover .carousel-control-next-icon {
    background-color: #d87c12;
}

.flipy {
    width: fit-content;
    height: 100%;
    transition: transform 1s;
    transform-style: preserve-3d;
}
.flipy:hover {
    transform: rotateY(180deg);
}
.face {
    width: fit-content;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: end;
    justify-content: end;
}

/* Align everything to the center of the grid */
.flipy:nth-of-type(n + 3) .face {
    align-items: start;
}

.flipy:nth-of-type(even) .face {
    justify-content: start;
}

.face.front {
    z-index: 2;
    transform: rotateY(0deg);
}
.face.back {
    transform: rotateY(180deg);
    /* Take out of layout flow and place behind portrait */
    position: absolute;
    top: 0;
}
.face img {
    max-width: 100%;
    max-height: 100%;
    border-radius: 49px;
}

@media screen and (max-width: 768px) {
    /* Enlargen background image a bit */
    .background-container_2 {
        left: 30%;
    }

    .background-container_2 img {
        width: 80%;
    }

    /* Don't reserve space for controls */
    .portrait-grid {
        padding: unset;
        grid-template-rows: repeat(2, calc(50% - 25px));
        row-gap: 50px;
    }
}

/*------------------------------------------------------------------------------------------------------*/
/*- Section 5 - Bildergalerie -*/
/*------------------------------------------------------------------------------------------------------*/
#section5 {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

#galleryCarousel {
    /* Enforce 3:2 aspect ratio */
    width: min(90vw, calc(90vh * 3 / 2));
    height: min(90vh, calc(90vw * 2 / 3));
    z-index: 2;
}

#galleryCarousel .carousel-inner,
#galleryCarousel .carousel-item {
    height: 100%;
}

#galleryCarousel .carousel-inner > .carousel-item > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    border-radius: 20px;
}

#galleryCarousel .carousel-control-prev,
#galleryCarousel .carousel-control-next {
    border-radius: 20px;
    z-index: 3;
}
.image-container_3 {
    position: absolute;
    width: 100%;
    height: 100vh;
}
.image-container_3 img {
    position: absolute;
    width: 100%;
    height: 130%;
    transform: translateY(-5%);
    z-index: 1;
}
.text-mobile {
    display: none;
}

@media only screen and (max-width: 768px) {
    .text-mobile {
        display: block;
        margin: 8vh 8% 0 8%;
        text-align: left;
        font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
        z-index: 5;
    }

    .header-ueber-uns2 {
        font-size: 4vh;
        font-weight: bolder;
        line-height: 1.6;
    }

    .text-start2 {
        font-size: 2vh;
        line-height: 1.5;
    }
}

/*------------------------------------------------------------------------------------------------------*/
/*- Section 6 - Calendar -*/
/*------------------------------------------------------------------------------------------------------*/
#section6 {
    display: flex;
    flex-direction: column;
    align-items: center;
}

#calendar-app {
    flex: 1; /* Take all free space, pushing footer to bottom */
    position: relative;
    width: min(800px, 80vw);
    z-index: 10;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow: auto;
}

#month-controls {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    margin-bottom: 1vh;
}

#month-name,
#prev-month,
#next-month,
.calendar-header,
.events-header,
label,
#monthly-events p,
#calendar,
#events,
#new-event {
    font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
    font-size: 1vw;
    font-weight: bold;
}

#prev-month,
#next-month {
    width: 2.5em;
    height: 2.5em;
    padding: 0;
    margin: 0 1vw;
}

.calendar-header {
    font-size: 3.5vw;
    font-weight: bolder;
    margin-bottom: 2vh;
}
#month-name,
.events-header {
    font-size: 2vw;
    font-weight: bolder;
    margin-bottom: 30px;
}
#month-name {
    margin: 0 2vw;
}
#calendar {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 5px;
    margin-bottom: 20px;
}

#calendar .day {
    border: 1px solid #ccc;
    text-align: center;
}
.day,
.day-header {
    padding: 2vh;
    border: 1px solid #ddd;
    text-align: center;
    border-radius: 10px;
}
.day.empty {
    background-color: var(--fg-color-light-beige);
    border: hidden;
}
.day:hover {
    background-color: var(--fg-color-beige);
}
.day-header {
    color: #000;
}

#events {
    margin-bottom: 20px;
}
.event {
    display: flex;
    justify-content: space-between;
    margin-bottom: 10px;
    padding: 20px;
    border: 1px solid #ccc;
}
#month-select {
    margin-left: 20px;
    background-color: inherit;
    border: 2px solid var(--fg-color-blue);
    border-radius: 10px;
    font-family: Calibri, Candara, Segoe, "Segoe UI", Optima, Arial, sans-serif;
    font-size: 1vw;
    padding: 0.5vw;
    width: 7vw;
    height: 2vh;
}

.event button {
    background-color: red;
    color: white;
    border: none;
    padding: 5%;
    cursor: pointer;
}
.event-button {
    background-color: green;
    color: white;
    border: none;
    padding: 5px;
    cursor: pointer;
}
.day-header {
    font-weight: bold;
    background-color: var(--fg-color-beige);
}

/* Style for event days */
.day.event-day {
    background-color: rgb(180, 205, 248);
    color: black;
    font-weight: bold;
}

@media only screen and (max-width: 768px) {
    #calendar-app {
        width: 85vw;
    }
    #month-name,
    #prev-month,
    #next-month,
    .calendar-header,
    .events-header,
    label,
    #monthly-events p,
    #calendar,
    #events,
    #new-event {
        font-size: 1vh;
    }
    .calendar-header {
        font-size: 3.5vh;
    }
    #month-name,
    .events-header {
        font-size: 2vh;
    }
    #month-select {
        width: 30vw;
        height: 2vh;
        transform: translateY(-4px);
        font-size: 1vh;
    }
}
@media only screen and (max-width: 450px) {
    .day,
    .day-header {
        padding: 1vh;
        border: 1px solid #ddd;
        text-align: center;
        border-radius: 10px;
    }
}

#section6 {
    position: relative;
}

footer {
    width: 100vw;
    background-color: var(--fg-color-red);
    padding: 2vh;
    column-gap: 1.5vh;
    row-gap: 1vh;
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    color: #fff;

    scroll-snap-align: start;
    scroll-behavior: smooth;
}

#footing a,
#footing h2 {
    font-size: calc(0.6em + 0.7vw);
}

#footing a i {
    font-size: 1.5em;
    transform: translate(0, 0.1em);
    display: inline-block;
}

#footing h2 {
    margin: unset;
    border: 1px solid var(--fg-color-beige);
    padding: 0.5em;
}

/*------------------------------------------------------------------------------------------------------*/
/*- Section Impressum -*/
/*------------------------------------------------------------------------------------------------------*/

.impressum {
    display: none;
    height: auto;
    background-color: var(--fg-color-red);
    padding: 30px;
    font-size: 75%;
    flex-direction: column;
    align-items: center;
}

.impressum-content {
    max-width: 800px;
    color: #fff;
}
