/* ---------------------------------------------------------------------------------------------

	Theme Name: WorkDigital Foundation Child
	Version: 0.1
	Description: Child theme for WorkDigital Foundation theme
	Author: WorkDigital
	Author URI: https://workdigital.dk
    Template: wd-foundation

/* --------------------------------------------------------------------------------------------- */

:root{
	--body-font-size: 16px;
}

:root :where(.wp-element-button, .wp-block-button__link){
	padding: 15px 30px;
}

.topsektion{
	position: relative;

	&:after{
        content: "";
        display: block;
        position: absolute;
        width: 520px;
        height: 520px;
        border-radius: 55% 45% 60% 40% / 45% 55% 40% 60%;
        background: var(--separator);
        top: -140px;
        right: calc((50vw - (var(--standard-width) / 2)) + 10px);
        z-index: -1;
	}
}

figure.organic img{
	border-radius: 38% 62% 60% 40% / 50% 42% 58% 50%;
}

h6.wp-block-heading{
	text-transform: uppercase;
	font-weight: bold;
	letter-spacing: 0.06em;
	font-size: 13.5px;
    font-weight: 600;
    margin-bottom: 18px;
}

.wp-block-button .wp-block-button__link,
.btn,
.wd-contact-form .wd-form-actions .wd-submit-btn,
.button,
button{
	border-width: 1px;
}

.wd-usp__title {
    font-family: var(--big-headline-font-family);
    font-size: 34px;
    color: var(--accent-color);
    font-weight: 600;
}

.entry-content h6.wp-block-heading + h2.wp-block-heading {
    margin-top: 10px;
}

.wd-cards-wrapper.circle{
    .wd-card {
        background-color: transparent;
        border-radius: 0;
        box-shadow: none;
        
        .wd-card-image-wrapper {
            max-width: 102px;
            border-radius: 999px;
            border: 3px solid var(--light);
            box-shadow: rgba(0, 0, 0, 0.08) 0px 2px 8px;
            margin-bottom: 22px;
        }

        .wd-card-content-wrapper{
            padding: 0;
            max-width: 420px;

            .wd-card-title:is(h1,h2,h3,h4,h5,h6,p) {
                font-size: var(--small-headline-font-size);
                font-weight: var(--small-headline-font-weight);
                line-height: var(--small-headline-line-height);
                color: var(--primary-color);
            }

            .wd-card-content{
                margin-top: 12px;
            }

            .wd-card-button {
                flex-direction: row;

                a.wp-block-button__link {
                    --current-background-color: transparent;
                    --current-border-color: transparent;
                    --current-text-color: var(--primary-color);
                    font-weight: normal;
                    flex-direction: row-reverse;
                    padding: 0 0 2px;
                    border-bottom: 1px solid var(--primary-color);
                    border-radius: 0;

                    &:hover{
                        background-color: var(--current-background-color);
                    }
                }
            }
        }
    }
}

.wd-cards-wrapper.default{
    --wd-card-border-radius: 24px; 
    --wd-card-bg: var(--surface-color);

    .wd-card {
        box-shadow: none;
        
        &:not(:has(.wd-card-image-wrapper)) {
            .wd-card-content-wrapper{
                &:before{
                    content: "";
                    display: block;
                    position: relative;
                    width: 44px;
                    height: 44px;
                    border-radius: 50% 50% 50% 8%;
                    background: rgb(174, 153, 98);
                    margin-bottom: 22px;
                }
            }
        }

        .wd-card-content-wrapper{
            padding: 36px 30px;

            .wd-card-title:is(h1,h2,h3,h4,h5,h6,p) {
                font-size: var(--extra-small-headline-font-size);
                font-weight: var(--extra-small-headline-font-weight);
                line-height: var(--extra-small-headline-line-height);
                color: var(--primary-color);
            }

            .wd-card-content{
                margin-top: 12px;
            }

            .wd-card-button {
                flex-direction: row;

                a.wp-block-button__link {
                    --current-background-color: transparent;
                    --current-border-color: transparent;
                    --current-text-color: var(--primary-color);
                    font-weight: normal;
                    flex-direction: row-reverse;
                    padding: 0 0 2px;
                    border-bottom: 1px solid var(--primary-color);
                    border-radius: 0;

                    &:hover{
                        background-color: var(--current-background-color);
                    }
                }
            }
        }
    }
}

.wd-cards-wrapper.no-icon{
    --wd-card-border-radius: 24px; 
    --wd-card-bg: var(--background-color);

    .wd-card {
        box-shadow: none;

        .wd-card-content-wrapper{
            padding: 36px 30px;

            .wd-card-title:is(h1,h2,h3,h4,h5,h6,p) {
                font-size: var(--extra-small-headline-font-size);
                font-weight: var(--extra-small-headline-font-weight);
                line-height: var(--extra-small-headline-line-height);
                color: var(--primary-color);
            }

            .wd-card-content{
                margin-top: 12px;
            }

            .wd-card-button {
                flex-direction: row;

                a.wp-block-button__link {
                    --current-background-color: transparent;
                    --current-border-color: transparent;
                    --current-text-color: var(--primary-color);
                    font-weight: normal;
                    flex-direction: row-reverse;
                    padding: 0 0 2px;
                    border-bottom: 1px solid var(--primary-color);
                    border-radius: 0;

                    &:hover{
                        background-color: var(--current-background-color);
                    }
                }
            }
        }
    }
}

.wd-cards-wrapper.blog{
    --wd-card-border-radius: 24px; 
    --wd-card-bg: var(--background-color);

    a.wd-card:hover {
        bottom: initial;
    }

    .wd-card {
        background-color: transparent;
        box-shadow: none;

        .wd-card-content-wrapper{
            grid-template-rows: auto;
            padding: 18px 0 0;

            .wd-card-title:is(h1,h2,h3,h4,h5,h6,p) {
                font-size: var(--extra-small-headline-font-size);
                font-weight: var(--extra-small-headline-font-weight);
                line-height: var(--extra-small-headline-line-height);
                color: var(--text-color);
                margin: 8px 0 10px;
            }

            .wd-card-content{
                margin-top: 12px;
            }

            .wd-card-author{
                margin: 0;
            }

            .wd-card-category{
                text-transform: uppercase;
                font-weight: bold;
                letter-spacing: 0.06em;
                font-size: 13.5px;
                font-weight: 600;
                margin: 0;
                color: var(--accent-color);
            }

            .wd-card-button {
                flex-direction: row;

                a.wp-block-button__link {
                    --current-background-color: transparent;
                    --current-border-color: transparent;
                    --current-text-color: var(--primary-color);
                    font-weight: normal;
                    flex-direction: row-reverse;
                    padding: 0 0 2px;
                    border-bottom: 1px solid var(--primary-color);
                    border-radius: 0;

                    &:hover{
                        background-color: var(--current-background-color);
                    }
                }
            }
        }
    }
}

.employees--teaser .wd-cards.wd-cards--employees{
    --wd-card-border-radius: 24px; 
    --wd-card-bg: var(--secondary-color);

    .wd-card{
        border-radius: var(--wd-card-border-radius);
        background-color: var(--wd-card-bg);
        padding: 24px;

        .wd-card-image-wrapper, .wd-card-image {
            border-radius: calc(var(--wd-card-border-radius) - 10px);
        }

        .wd-card-content-wrapper{
            padding: 15px 0 0;
            grid-template-rows: auto;
            gap: 0;

            .wd-card-title {
                font-size: var(--extra-small-headline-font-size);
                font-weight: var(--extra-small-headline-font-weight);
                line-height: var(--extra-small-headline-line-height);
                font-family: var(--small-headline-font-family);
                margin: 0;
            }

            .wd-card-job-title{
                color: var(--accent-color);
            }
        }
    }
}

.wd-cards-wrapper:not(.employees--teaser) .wd-cards.wd-cards--employees{
    .wd-card {
        position: relative;
        border-radius: 25px;
        overflow: hidden;
    }
    p.wd-card-description {
        order: 999;
    }
    .wd-card-content-wrapper {
        grid-template-rows: auto auto auto auto 1fr;
    }

    .wd-card-image-wrapper {
        overflow: visible;
    }

    .wd-card-content-wrapper {
        padding: 20px;
        gap: 4px;
        position: absolute;
        bottom: 0;
        background: linear-gradient(0deg, color-mix(var(--primary-color-surface), transparent 5%) -20%, color-mix(var(--primary-color-surface), transparent 20%), color-mix(var(--primary-color-surface), transparent 100%));
        width: 100%;
        color: var(--light);
        height: 50%;
        display: flex;
        flex-direction: column;

        .wd-card-title{
            margin-top: auto;
            font-size: var(--small-headline-font-size);
        }

        p.wd-card-job-title {
            margin: 0 0 16px;
            color: var(--accent-color);
        }
    }
}

.wp-block-group.logo-galleri{
    .wp-block-gallery{
        gap: 20px;
        flex-wrap: nowrap;
        align-items: center;

        > figure{
            filter: grayscale(1);
            animation: greyscaleGlow 8s ease-in-out infinite;

            &:nth-child(1){ animation-delay: 1s; }
            &:nth-child(2){ animation-delay: 2s; }
            &:nth-child(3){ animation-delay: 3s; }
            &:nth-child(4){ animation-delay: 4s; }
            &:nth-child(5){ animation-delay: 5s; }
            &:nth-child(6){ animation-delay: 6s; }
            &:nth-child(7){ animation-delay: 7s; }
            &:nth-child(8){ animation-delay: 8s; }

            &:hover{
                filter: grayscale(0);
                animation: none;
            }
        }

        .wp-block-image{
            align-items: center;
            margin: 0 !important;
        }


    }
}

@keyframes greyscaleGlow {
    0%   {
        filter: grayscale(1);
    }
    20%   {
        filter: grayscale(0);
    }
    40%   {
        filter: grayscale(1);
    }
    100%   {
        filter: grayscale(1);
    }
}

body.sometimes-burger{
    --header-height: 90px;
}

body.sometimes-burger .main-header-inner {
    max-width: var(--standard-width);
    margin-left: auto;
    margin-right: auto;
    padding: 11px 0;

    .main-header-logo-link{
        margin-right: initial;
    }
}

.header-buttons {
    display: flex;
    flex-direction: row;
    gap: 14px;

    .header-btn.button{
        --current-background-color: var(--primary-color);
        --current-text-color: var(--light);
        --current-border-color: var(--primary-color);
        padding: 0.667em 1.33em;
        text-decoration: none;

        &:hover{
            --current-background-color: var(--primary-color-hover);
            --current-text-color: var(--light);
            --current-border-color: var(--primary-color-hover);
        }

        &.header-btn--primary{
            --current-background-color: var(--primary-color-surface);
            --current-text-color: var(--light);
            --current-border-color: var(--primary-color-surface);

            &:hover{
                --current-background-color: var(--primary-color-surface-hover);
                --current-text-color: var(--light);
                --current-border-color: var(--primary-color-surface-hover);
            }
        }

        &.header-btn--secondary{
            --current-background-color: var(--secondary-color);
            --current-text-color: var(--light);
            --current-border-color: var(--secondary-color);

            &:hover{
                --current-background-color: var(--secondary-color-hover);
                --current-text-color: var(--light);
                --current-border-color: var(--secondary-color-hover);
            }
        }

        &.header-btn--accent{
            --current-background-color: var(--accent-color);
            --current-text-color: var(--light);
            --current-border-color: var(--accent-color);

            &:hover{
                --current-background-color: var(--accent-color-hover);
                --current-text-color: var(--light);
                --current-border-color: var(--accent-color-hover);
            }
        }

        &.header-btn--transparent{
            --current-background-color: transparent;
            --current-text-color: var(--primary-color);
            --current-border-color: var(--primary-color);
            border-width: 1px;
            border-style: solid;

            &:hover{
                --current-background-color: var(--primary-color-surface-faded);
                --current-text-color: var(--primary-color);
                --current-border-color: var(--primary-color);
            }
        }
    }
}

.wd-cards-filters {
    padding: calc(var(--wd-cards-space));
    background-color: var(--surface-color);
}

.wd-cards-filter-wrapper > label,
.wd-cards-sort select,
input[type="search"].wd-cards-filter-input{
    background-color: var(--background-color);
    color: var(--text-color)
}

@media screen and (min-width: 980px) {
    .wd-cards-filters {
        gap: calc(var(--wd-cards-space));
    }
}

iframe[src*="formtitan.com"] {
    width: 100%;
}

.wp-block-group.has-primary-color-surface-background-color p a {
    color: inherit;
}

.dark-mode main a:not([class]),
.dark-mode a.breadcrumbs__item{
    color: var(--primary-color);
}

.wp-block-button .wp-block-button__link.has-light-color.has-primary-color-background-color {
    --btn-color: var(--secondary-color);
    --btn-color-hover: var(--secondary-color-hover);
}

.logo-banner.wp-block-gallery {
    display: flex;
    gap: 20px;
    flex-wrap: nowrap;
    align-items: center;
}

@media screen and (max-width: 1200px) {
    .logo-banner.wp-block-gallery {
        flex-wrap: wrap !important;
        justify-content: center;
    }

    .logo-banner.wp-block-gallery > figure.wp-block-image {
        flex: 0 0 calc((100% - 80px) / 5);
        width: auto !important;
        margin: 0 !important;
    }
}