/*

Theme Name: Custom Picea Theme

 */

html{
    --picea-green: #99A301;
    --picea-light-green: #d5e401;
    --picea-red: #C11F28;
    --dark-gray: #5c5c5c;
    --white: #fff;
    --off-white: #FDFFE6ff;
    /*--menu-width: 10rem;*/
    /*--menu-height: 7rem;*/
    --menu-width: clamp(5rem, calc(5vw * 1.7), 10rem);
    --menu-height: clamp(3.5rem, 5vw, 7rem);
    --menu-font-size: 40px;
    scroll-behavior: smooth;
    font-family: sans-serif;
    --carousel-radius: 10px;
    --arrow-button-size: 4vw;
    --arrow-button-min-size: 50px;
    height: 100%;
    scroll-snap-type: y mandatory;
}


@media (max-width: 700px){
    html{
        --menu-width: 5rem;
        --menu-height: 3.5rem;
    }
    html.safari{
        scroll-snap-type: none;
    }
}
body{
    margin: 0;
    background-color: var(--picea-green);
    height: 100%;
    scroll-snap-type: y mandatory;
    overflow-y: scroll;
}
/* || General Styles */
section {
    /*scroll-margin-top: 2rem;*/
    height: 100vh;
    scroll-snap-align: start;
    overflow: clip;
}

section:not(#main){
    margin-top: 5rem;
    margin-left: 1rem;
    margin-right: 1rem;
}

.section-title {
    color: white;
    margin: 2rem;
    font-size: 64px;
}

section:is(#galerie){
    overflow-y: scroll;

    /* Hide scrollbar for IE, Edge and Firefox */
        -ms-overflow-style: none;  /* IE and Edge */
        scrollbar-width: none;  /* Firefox */
}
/* Hide scrollbar for Chrome, Safari and Opera */
section:is(#galerie)::-webkit-scrollbar {
    display: none;
}

#main-content{
    padding: 10% 4rem 4rem 4rem;
    height: 100%;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
}

@media (max-width: 700px){
    #main-content{
        padding: 40% 4rem 4rem 4rem;
    }
}

#main-content .wp-block-image {
    width: clamp(200px, 40vw, 1024px);
    margin: 0 auto;
}

#main-content .wp-block-image img {
    display: block;
    width: 100%;
    height: auto;
}

#contact-content{
    padding-top: 4rem;
    background-color: white;
    overflow: clip;
}

#contact-content img{
    width: 100%;
    height: calc(100vh - 4rem);
    object-fit: contain;
}

#contact{
    display: flex;
    justify-content: center;
}

.background-image{
    display: none;
}

/* || Nav Menu */

.menu-button{
    width: var(--menu-width);
    height: var(--menu-width);
    overflow-y: clip;
    position: fixed;
    top: 4rem;
    right: 2rem;
    display: inline-block;
    z-index: 100;
    ul{
        display:none;
        li{
            font-size: var(--menu-font-size);
        }
    }
}

.menu-button.active{
    height: 100%;
    width: 100%;
    top: 0;
    right: 0;
    background-color: #00000033;
    svg{
        display: none;
    }
    .menu{
        height: 100%;
        display: flex;
        align-items: flex-start;
        width: 20rem;
        align-self: end;
        position: absolute;
        background-color: white;
        top: 0;
        right: 0;
        padding-top: 0;
        padding-right: 0;
        ul{
            padding-top: 2rem;
            padding-right: 0;
            display: flex;
            flex-direction: column;
            align-items: flex-start;
        }
    }
    .menu-item{
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }
}

svg {
    width: var(--menu-width);
    height:  var(--menu-height);
    rect {
        fill: white;
        rx: 10px;
        width: var(--menu-width);
        height: var(--menu-height);
        filter: drop-shadow(-0.2rem 0.3rem 0.1rem rgba(0,0,0,0.3));
    }
    overflow: visible;
    svg{
        padding:1rem;
    }
}

.bar{
    fill: var(--picea-green);
    width: 4.4rem;
    height: 0.6rem;
    rx: 0;
}
.top{
    transform: translateY(0.4rem) translateX(calc(0.3*100/5*1%));
}
.mid{
    transform: translateY(1.5rem) translateX(calc(0.3*100/5*1%));
}
.bot{
    transform: translateY(2.5rem) translateX(calc(0.3*100/5*1%));
}

a{
    all: unset;
    padding: 1rem;
}

nav:hover{
    rect {
        fill: var(--picea-red);
    }
    .bar{
        fill: var(--picea-green);
    }
}

.menu-item {
    font-family: sans-serif;
    font-size: 1.5rem;
    font-weight: bold;
    text-overflow: ellipsis;
    text-align: right;
    color: var(--picea-green);
    padding: 1rem;
    pointer-events: none;
}

.menu-item:hover{
    color: var(--picea-red);
    cursor: pointer;
}

ul {
    list-style-type: none;
    margin-top: 0;
    padding: 0;
    border-radius: 5px;
}

p {
    font-family: sans-serif;
    color: white;
}

.title{
    font-family: sans-serif;
    color: white;

}


.overlay-text h3{
    color: var(--picea-light-green);
}



.image-container{
    height: calc(100vh * 0.8 );
    width: 100%;
    display: flex;
    position: relative;
    align-items: center;
    justify-content: center;

}

figure{
    overflow: clip;
}
figure img{
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
}

#team figure img{
    width: auto !important;
}


.arrow {
    stroke: var(--picea-green);
    stroke-width:20px;
}

#arrowRight {
    transform: rotateZ(180deg);
}

/* ---- new carousel ---- */
#angebot-content{
    height: 100%;
    display: flex;
    flex-direction: column;
}

.section-title {
    flex: 0 0 auto; /* title keeps its natural height */
}

.carousel {
    position: relative;
    /*height: 100%;*/
    flex: 1 1 auto; /* carousel takes all remaining space */
    min-height: 0;  /* prevents flex overflow bugs */
    background-color: var(--picea-green);
    padding: 0 0 2rem;
}
.carousel_viewport {
    height: 100%;
    overflow: hidden;
    border-radius: var(--carousel-radius);
    outline: none;
}

.carousel_track {
    height: 100%;
    display: flex;
    will-change: transform;
    cursor: grab;
}

.carousel_slide {
    position: relative;
    height: 100%;
    flex: 0 0 100%;
    min-width: 0;
    display: grid;
}

.carousel_slide figure {
    height: 100%;
    width: 100%;
    margin: 0;
}

.carousel_slide .overlay-text{
    z-index: 2;
    position: absolute;
    bottom: 4rem;
    left: 0;
    width: 100%;
    box-sizing: border-box;
    padding: 1rem 5rem;
    font-family: sans-serif;
}

@media (min-width:800px) {
    .carousel_slide .overlay-text{
        h3{
            font-size: clamp(1.5rem,1vw,3rem);
        }
        p{
            font-size: clamp(1rem,0.5vw,2rem);
        }
    }
}

.carousel_slide::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 1), transparent);
    z-index: 1;
}



.carousel_arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 5;
    width: var(--arrow-button-size);
    height: var(--arrow-button-size);
    min-width: var(--arrow-button-min-size);
    min-height: var(--arrow-button-min-size);
    border-radius: 10%;
    /*border: 1px solid var(--carousel-line);*/
    background: rgba(255, 255, 255, 0.8);
    /*color: var(--carousel-ink);*/
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    filter: drop-shadow(-0.2rem 0.3rem 0.1rem rgba(0, 0, 0, 0.5))

}

.carousel_arrow:hover { background: #fff; }
.carousel_arrow:active { transform: translateY(-50%) scale(0.94); }
.carousel_arrow-prev { left: 18px; }
.carousel_arrow-next { right: 18px; }
.carousel_arrow svg { width: 100%; height: 100%; }
.carousel_arrow:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}

.carousel_dots {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    bottom: 2rem;
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 16px;
    list-style: none;
    padding: 0;
}
.carousel_dot {
    width: 1rem;
    height: 1rem;
    border-radius: 50%;
    border: none;
    padding: 0;
    background: var(--white);
    cursor: pointer;
    transition: background 0.2s, transform 0.2s;
}
.carousel_dot:hover { transform: scale(1.15); }
.carousel_dot[aria-current="true"] {
    background: var(--picea-red);
    width: 20px;
    border-radius: 4px;
}
.carousel_dot:focus-visible {
    box-shadow: 0 0 0 3px var(--picea-red);
}


/* ---- team carousel ---- */
#team-content {
    height: 100%;
    display: flex;
    flex-direction: column;
}
#split-carousel .carousel_slide {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: center;
    background: var(--off-white);
    min-height: 0;
}

#split-carousel .carousel_slide figure {
    height: 100%;
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    /*background: var(--off-white);*/
    min-height: 0;
    min-width: 0;
}

#split-carousel .carousel_slide img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

#split-carousel .carousel_slide .overlay-text{
    position: static;
    z-index: auto;
    padding: 0 2rem 3rem;
    color: black;
    /*width: fit-content;*/
    width: 100%;
    max-width: 100%;
    height: 100%;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    overflow-y: auto;

}

#split-carousel .carousel_slide .overlay-text h3{
    color: var(--picea-green);
}

#split-carousel .carousel_slide .overlay-text p{
    color: inherit;
}

#split-carousel .carousel_slide::before {
    content: none;
}

/* stack instead of side-by-side on small screens */
/*@media (max-width: 700px) {*/
/*    #split-carousel .carousel_slide {*/
/*        grid-template-columns: 1fr;*/
/*        grid-template-rows: auto 1fr;*/
/*    }*/
/*}*/

/*@media (max-width: 700px) {*/
/*    #split-carousel .carousel_slide .overlay-text {*/
/*        overflow: scroll;*/
/*    }*/
/*}*/

@media (max-width: 700px) {
    #split-carousel .carousel_slide {
        display: flex;
        flex-direction: column;
    }

    /* text takes exactly the space its content needs */
    #split-carousel .carousel_slide .overlay-text {
        flex: 0 0 auto;
        max-height: 55%; /* safety cap so a very long bio can't push the image to 0 */
        overflow-y: auto; /* only kicks in if text alone exceeds the cap */
    }

    /* image gets whatever space is left, and shrinks to fit it */
    #split-carousel .carousel_slide figure {
        flex: 1 1 auto;
        min-height: 0; /* critical: without this flex children refuse to shrink below content size */
    }

    #split-carousel .carousel_slide img {
        max-width: 100%;
        max-height: 100%;
        width: auto;
        height: auto;
        object-fit: contain;
    }
}

#split-carousel .carousel_slide.regular {
    display: grid;
    grid-template-columns: 1fr; /* back to single column */
    background: none;
}

#split-carousel .carousel_slide.regular figure {
    height: 100%;
    width: 100%;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

#split-carousel .carousel_slide.regular img {
    /*object-fit: cover !important; !* crop to fill, like the regular carousel *!*/
    width: 100%;
    height: 100%;
    object-fit: contain !important;
    display: block;
}


#split-carousel .carousel_slide.regular .overlay-text {
    position: absolute;
    z-index: 2;
    bottom: 4rem;
    left: 0;
    width: 100%;
    margin: 0;
    padding: 1rem 5rem;
    text-align: left;
    color: white;
}


#split-carousel .carousel_dot {
    background: var(--dark-gray);
}

#split-carousel .carousel_dot[aria-current="true"] {
    background: var(--picea-red);
    width: 20px;
    border-radius: 4px;
}

#split-carousel .carousel_slide.regular .overlay-text p {
    color: white;
}

/* ---------------------
    gallery styling
    ------------------- */
#gallery{
    overflow: clip;
    height: 100vh;
    display: flex;
    flex-direction: column;
}


#gallery-content {
    flex: 1 1 auto;
    min-height: 0;
    height: auto;

    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-auto-rows: 60%;
    padding: 0 0 2rem 0;;
    box-sizing: border-box;
    gap: 2rem;
    overflow-y: scroll;
    overscroll-behavior: contain;
    scrollbar-width: thin;
    scrollbar-color: var(--picea-green) var(--off-white); /* thumb track */
}

@media (max-width: 700px) {
    #gallery-content {
        grid-auto-rows: 20%;
    }
}

#gallery-content .gallery-item figure.wp-block-image {
    margin: 0;
    min-width: 0;   /* prevents oversized content from stretching the grid track */
    width: 100%;
    height: 100%;
}


#gallery-content .gallery-item figure.wp-block-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border-radius: 10px;
}

#gallery-content figure.wp-block-image {
    margin: 0;
}

@media (max-width: 900px) {
    .gallery {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Mobile: 1 column */
@media (max-width: 500px) {
    .gallery {
        grid-template-columns: 1fr;
    }
}

section#gallery {
    min-height: 100vh;
    /*overflow-y: visible;*/
}


/* -------------------------
   LIGHTBOX
------------------------- */

.gallery-lightbox {
    position: fixed;
    inset: 0;
    z-index: 9999;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 3rem;

    background: rgba(0, 0, 0, 0.85);

    opacity: 0;
    visibility: hidden;
    pointer-events: none;

    transition:
            opacity 0.2s ease,
            visibility 0.2s ease;
}

.gallery-lightbox.is-open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.gallery-lightbox-image {
    max-width: 90vw;
    max-height: 90vh;

    width: auto !important;
    height: auto !important;

    object-fit: contain !important;

    border-radius: 6px;

    display: block;
}

/* Close button */

.gallery-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 2rem;

    width: 3rem;
    height: 3rem;

    border: 0;
    background: transparent;

    color: white;
    font-size: 3rem;
    line-height: 1;

    cursor: pointer;

    z-index: 2;
}

/* Navigation buttons */

.gallery-lightbox-prev,
.gallery-lightbox-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    width: 3rem;
    height: 5rem;

    border: 0;
    background: rgba(255, 255, 255, 0.15);

    color: white;
    font-size: 2rem;

    cursor: pointer;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    transition: background 0.2s ease;
}

.gallery-lightbox-prev:hover,
.gallery-lightbox-next:hover {
    background: rgba(255, 255, 255, 0.3);
}

.gallery-lightbox-prev {
    left: 2rem;
}

.gallery-lightbox-next {
    right: 2rem;
}

/* Prevent the page from scrolling while lightbox is open */

body.gallery-lightbox-open {
    overflow: hidden;
}

/* Mobile */

@media (max-width: 700px) {
    .gallery-lightbox {
        padding: 1rem;
    }

    .gallery-lightbox-image {
        max-width: 95vw;
        max-height: 85vh;
    }

    .gallery-lightbox-prev,
    .gallery-lightbox-next {
        width: 2.5rem;
        height: 3.5rem;
    }

    .gallery-lightbox-prev {
        left: 0.5rem;
    }

    .gallery-lightbox-next {
        right: 0.5rem;
    }

    .gallery-lightbox-close {
        top: 0.5rem;
        right: 0.75rem;
    }
}

/* Wordpress */
.wp-block-gallery {
    /*gap: 1rem;*/
    gap: 5rem !important;
}











