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

	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

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

/* Generel styling */

body *:is(strong),
body *:is(strong) a {
	font-weight: bold;
}

.entry-content {
    margin-top: -102px;
}

.entry-content .wp-block-column:not(:has(.wd-sticky)) .wp-block-image img {
    width: 100%;
}

/* Header */

body:not(:is(.is-scrolled)) header.wd-header,
body:not(:is(.is-scrolled)) .header-topper {
    background: transparent;
    box-shadow: none;
}

header.wd-header,
.header-topper {
    transition: var(--standard-transition);
}

.header-topper .header-topper-item a:hover {
    text-decoration: underline;
}

.main-header-logo-link img {
    max-height: 68px;
    padding: 10px 0;
}

body.sometimes-burger .main-header-menu>.menu-item:is(.menu-item-type-custom)>a:before {
    display: none;
}

@media screen and (min-width: 1190px) and (hover: hover) {

    .main-header-menu .menu-item.menu-item-type-custom {
        display: flex;
        align-items: center;
    }

    header.wd-header .main-header .main-header-menu .menu-item.menu-item-type-custom a {
        max-height: 80%;
        background: transparent;
        border: 3px solid var(--light);
        padding: 0 20px;
    }

    header.wd-header .main-header .main-header-menu .menu-item.menu-item-type-custom:hover a {
        background: white;
        color: var(--dark);
    }

    body.sometimes-burger .main-header-menu li.menu-item:not(.menu-item-type-custom) a:hover {
        color: var(--secondary-color);
    }

    body.sometimes-burger .main-header-menu ul.sub-menu {
        background: var(--header-bg-color);
    }

    body.sometimes-burger .main-header-menu ul.sub-menu li a {
        color: var(--light);
    }

    body.sometimes-burger .main-header-menu ul.sub-menu li a:hover {
        background: transparent;
    }
}

/* Mobil menu */

.main-header-nav .nav-drawer-header {
    background-color: var(--header-bg-color);
    color: var(--light);
}

.main-header-menu:not(:has(a:focus, a:active)) .menu-item.current_page_item > a {
    background-color: color-mix(in srgb, var(--accent-color), var(--dark) 10%);
    color: var(--light);
}

body.sometimes-burger .main-header-menu > .menu-item:is(.menu-item-type-custom) > a:focus {
    background: var(--light) !important;
}

@media screen and (max-width: 1190px) {

    .main-header-nav {
        border: none;
    }

    .main-header-menu {
        padding-top: 20px;
    }

    .main-header-menu .menu-item-type-custom {
        border-top: 2px solid var(--accent-color);
        margin-top: 10px;
    }

    /*
    .main-header-menu .menu-item.menu-item-type-custom>a {
        background: var(--light);
        color: var(--dark);
    }
    */

    .main-header-menu .menu-item:not(.menu-item-type-custom) > a:focus,
    .main-header-menu .menu-item:not(.menu-item-type-custom) > a:active {
        background-color: color-mix(in srgb, var(--accent-color), var(--dark) 10%);
        color: var(--light);
    }
}

/* Topsektion */

.wd-topsektion > .wp-block-cover__inner-container {
    margin-top: auto;
}

.entry-content > :is(.wd-topsektion) > *:not(.wp-block-cover__background, .wp-block-cover__image-background, .wp-block-cover__inner-container) {
    max-width: 100%;
}

.wd-topsektion .wd-usp-container {
    display: flex;
    justify-content: space-around;
    align-items: center;
}

.wd-topsektion .wd-usp {
    flex-direction: row;
    max-width: fit-content;
}

.wd-topsektion .wd-usp__title {
    font-size: calc(var(--standard-text-font-size) * 0.8);
}

.wd-topsektion .wd-usp-container .wd-usp .wd-usp__title:before,
.wd-topsektion .wd-usp-container .wd-usp .wd-usp__title:after {
    content: ".";
    display: inline-block;
    transform: translateY(-20%);
    padding: 0 2px;
    line-height: 1;
}

@media screen and (max-width: 767px) {

    .wd-topsektion .wp-block-group .wp-block-group__inner-container:has(.wd-usp-container) {
        padding: 20px;
    }

    .wd-topsektion .wd-usp-container {
        display: none;
    }
}

@media screen and (min-width: 768px) and (max-width: 1199px) {

    .wd-topsektion .wd-usp-container {
        display: grid;
        grid-template-columns: 1fr 1fr;
        justify-items: center;
    }
}

/* WD Cards */

.wd-cards:not(.wd-cards--employees) .wd-card {
    display: block;
    transition: var(--slow-transition);
}

.wd-cards:not(.wd-cards--employees) a.wd-card:hover {
    bottom: 0;
}

.wd-cards:not(.wd-cards--employees) .wd-card,
.wd-cards:not(.wd-cards--employees) .wd-card * {
    border-radius: 0;
}

.wd-cards:not(.wd-cards--employees) .wd-card * {
    transition: inherit;
}

.wd-cards:not(.wd-cards--employees) .wd-card .wd-card-image-wrapper {
    height: 100%;
}

.wd-cards:not(.wd-cards--employees) .wd-card:hover .wd-card-image-wrapper img {
    transform: scale(1.1);
}

.wd-cards:not(.wd-cards--employees) .wd-card .wd-card-content-wrapper {
    justify-content: center;
    position: relative;
    top: -80px;
}

.wd-cards:not(.wd-cards--employees) .wd-card .wd-card-content-wrapper .wd-card-title {
    background: transparent;
    border: 3px solid var(--light);
    border-radius: 0;
    padding: 10px 20px;
    color: var(--light);
    font-weight: var(--bold);
    font-size: var(--standard-text-font-size);
}

.wd-cards:not(.wd-cards--employees) .wd-card:hover > .wd-card-content-wrapper .wd-card-title {
    background: var(--light);
    color: var(--dark);
}

.wd-cards.wd-cards--employees * {
    border-radius: 0;
}

.wd-cards.wd-cards--employees .wd-card-content-wrapper {
    background: var(--background-color);
    padding: 30px;
    grid-template-rows: auto 1fr minmax(120px , auto);
}

.wd-cards.wd-cards--employees .wd-card-content-wrapper p.wd-card-job-title {
    color: var(--dark);
    font-weight: bold;
}

@media screen and (min-width: 1000px) and (max-width: 1199px) {

    .wd-cards.wd-cards--employees .wd-card-content-wrapper {
        grid-template-rows: auto 1fr minmax(200px , auto);
    }
}

@media screen and (max-width: 1000px) {

    .wd-cards.wd-cards--employees .wd-card-content-wrapper {
        grid-template-rows: auto 1fr minmax(80px , auto);
    }
}

/* Kontakt liste */

ul.firmainfo li {
    margin-bottom: 8px;
}

.wp-block-list.firmainfo a {
    color: var(--text-color);
    text-decoration: none;
}

.wp-block-list.firmainfo a:hover {
    color: var(--secondary-color);
    text-decoration: underline;
}

/* Højreside elementer */

.wp-block-columns .wp-block-column .wd-sticky {
    border-radius: 20px;
    box-shadow: 0 0 10px rgba(0, 0, 0, 0.15);
}

.wd-sticky h2 {
    text-wrap: balance;
    text-align: center;
}

.wp-block-columns .wp-block-column .wd-sticky .wp-block-group > .wp-block-group__inner-container:has(.opening-hours-row) {
    width: 100%;
}

.wp-block-columns .wp-block-column .wp-block-group.wd-sticky .wp-block-group__inner-container .wp-block-group,
.wp-block-columns .wp-block-column .wp-block-group.wd-sticky .wp-block-group__inner-container .wp-block-group .wp-block-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Cookie indstillinger */

.cky-btn-revisit-wrapper {
    display: flex !important;
}

/* Mobil menu ekstra knapper */

@media screen and (max-width: 768px) {
    
    .bottom-nav {
        background: color-mix(in srgb, var(--primary-color) 90%, transparent);
    }

    span.bottom-nav-label {
        color: var(--light);
        font-weight: bold;
    }
}