/*!
Theme Name: ÅA Theme
Theme URI: https://www.kadencewp.com/kadence-theme/
Template: kadence
Author: KMG Turku
Author URI: https://kmgturku.fi/
Description: A child theme build as a starter template for Centre of Excellence. 
Version: 1.0.9
License: GNU General Public License v3.0 (or later)
License URI: https://www.gnu.org/licenses/gpl-3.0.html
Text Domain: aa-theme
*/

/* Theme customization starts here 
-------------------------------------------------------------- */

@import url("https://use.typekit.net/dmx5dwp.css");

/* Regular:
font-family: "canada-type-gibson", sans-serif;
font-weight: 400;
font-style: normal; */

/* Medium:
font-family: "canada-type-gibson", sans-serif;
font-weight: 500;
font-style: normal; */

/* SemiBold:
font-family: "canada-type-gibson", sans-serif;
font-weight: 600;
font-style: normal; */

/* Gibson Bold:
font-family: "canada-type-gibson", sans-serif;
font-weight: 700;
font-style: normal; */

/* Gibson Bold Italic:
font-family: "canada-type-gibson", sans-serif;
font-weight: 700;
font-style: italic; */

*,
html,
body :is(input, select, optgroup, textarea) {
    font-family: "canada-type-gibson", sans-serif;
    font-weight: 400;
    font-style: normal;   
}

.sr-only {
    position:absolute;
    left:-10000px;
    top:auto;
    width:1px;
    height:1px;
    overflow:hidden;
}

.aa-date {
    position: relative;
    color: #666666;
    font-size: 14px;
    line-height: 1.4;
    padding-left: 20px;
}

.aa-date svg {
    display: inline-block;
    width: 14px;
    fill: #666666;
    margin-right: 10px;
    position: absolute;
    left: 0;
    top: 2px;
}

.aa-date span {
    white-space: nowrap;
}

/* :is(.single-news, .single-page) .entry-content.single-content > *:first-child:not(.kb-row-layout-wrap) {
    margin-top: var(--global-md-spacing);
} */

:is(.single-news, .single-page, .single-events) #wrapper:has( > .kb-row-layout-wrap ) .entry-content.single-content > *:last-child:not(.kb-row-layout-wrap)  {
    margin-bottom: var(--global-md-spacing);
}

/* Slogan */
#masthead .site-branding .site-title {
    font-size: 18px;
}

@media (min-width: 767px) {
    #masthead .site-branding .site-title {
        font-size: 20px;
    }
}

/* Sidebar */
.entry-content-wrap:not(:has( > .entry-header)) .entry-content.single-content:not(:has( > .kb-row-layout-wrap )),
.entry-content-wrap .entry-header,
#secondary {
    padding-top: var( --global-kb-row-default-top, var(--global-kb-spacing-sm, 1.5rem) );
}

/* Custom hero */
#wrapper:has( > #custom-hero) .entry-content-wrap .entry-header {
    padding-top: 0;
    margin: 0;
}

#wrapper:has( > #custom-hero) .entry-content-wrap .entry-content {
    padding-top: var( --global-kb-row-default-top, var(--global-kb-spacing-sm, 1.5rem) );
    margin-top: 0;
}


/* Main menu */
.main-navigation .primary-menu-container > ul > li.menu-item:first-child > a {
    padding-left: 0;
}

#primary-menu > li:is(.current-menu-item, .current-menu-ancestor, .current-menu-parent) > a {
    text-decoration: underline;
    color: var(--global-palette1);
}

.nav-drop-title-wrap {
    font-weight: inherit;
}

#primary-menu .kadence-svg-icon {
    fill: var(--global-palette1);
}

/* Language switch */
.secondary-menu-container > #primary-menu {
    display: none;
}

#secondary-menu > li > a {
    padding: 0;
    padding-right: 50px;
    font-size: 16px;
    font-weight: 600;
    color: black;
}

#secondary-menu > li:after {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    height: 100%;
    width: 35px;
    -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><path style="fill: currentColor" d="M57.7 193l9.4 16.4c8.3 14.5 21.9 25.2 38 29.8L163 255.7c17.2 4.9 29 20.6 29 38.5v39.9c0 11 6.2 21 16 25.9s16 14.9 16 25.9v39c0 15.6 14.9 26.9 29.9 22.6c16.1-4.6 28.6-17.5 32.7-33.8l2.8-11.2c4.2-16.9 15.2-31.4 30.3-40l8.1-4.6c15-8.5 24.2-24.5 24.2-41.7v-8.3c0-12.7-5.1-24.9-14.1-33.9l-3.9-3.9c-9-9-21.2-14.1-33.9-14.1H257c-11.1 0-22.1-2.9-31.8-8.4l-34.5-19.7c-4.3-2.5-7.6-6.5-9.2-11.2c-3.2-9.6 1.1-20 10.2-24.5l5.9-3c6.6-3.3 14.3-3.9 21.3-1.5l23.2 7.7c8.2 2.7 17.2-.4 21.9-7.5c4.7-7 4.2-16.3-1.2-22.8l-13.6-16.3c-10-12-9.9-29.5 .3-41.3l15.7-18.3c8.8-10.3 10.2-25 3.5-36.7l-2.4-4.2c-3.5-.2-6.9-.3-10.4-.3C163.1 48 84.4 108.9 57.7 193zM464 256c0-36.8-9.6-71.4-26.4-101.5L412 164.8c-15.7 6.3-23.8 23.8-18.5 39.8l16.9 50.7c3.5 10.4 12 18.3 22.6 20.9l29.1 7.3c1.2-9 1.8-18.2 1.8-27.5zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"/></svg>') no-repeat center center;
    mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M57.7 193l9.4 16.4c8.3 14.5 21.9 25.2 38 29.8L163 255.7c17.2 4.9 29 20.6 29 38.5v39.9c0 11 6.2 21 16 25.9s16 14.9 16 25.9v39c0 15.6 14.9 26.9 29.9 22.6c16.1-4.6 28.6-17.5 32.7-33.8l2.8-11.2c4.2-16.9 15.2-31.4 30.3-40l8.1-4.6c15-8.5 24.2-24.5 24.2-41.7v-8.3c0-12.7-5.1-24.9-14.1-33.9l-3.9-3.9c-9-9-21.2-14.1-33.9-14.1H257c-11.1 0-22.1-2.9-31.8-8.4l-34.5-19.7c-4.3-2.5-7.6-6.5-9.2-11.2c-3.2-9.6 1.1-20 10.2-24.5l5.9-3c6.6-3.3 14.3-3.9 21.3-1.5l23.2 7.7c8.2 2.7 17.2-.4 21.9-7.5c4.7-7 4.2-16.3-1.2-22.8l-13.6-16.3c-10-12-9.9-29.5 .3-41.3l15.7-18.3c8.8-10.3 10.2-25 3.5-36.7l-2.4-4.2c-3.5-.2-6.9-.3-10.4-.3C163.1 48 84.4 108.9 57.7 193zM464 256c0-36.8-9.6-71.4-26.4-101.5L412 164.8c-15.7 6.3-23.8 23.8-18.5 39.8l16.9 50.7c3.5 10.4 12 18.3 22.6 20.9l29.1 7.3c1.2-9 1.8-18.2 1.8-27.5zM0 256a256 256 0 1 1 512 0A256 256 0 1 1 0 256z"/></svg>'); no-repeat center center !important;
    background-size: contain;
    background: var(--global-palette-btn-bg, #000082);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center right;
}

#secondary-menu .nav-drop-title-wrap {
    padding-right: 0;
}

#secondary-menu .kadence-svg-iconset svg {
    visibility: hidden;
    width: 1px;
    height: 1px;
}

/* Mobile navigation */
#mobile-menu > li {
    border-bottom: 1px solid black;
}

#mobile-menu > li > a,
#mobile-menu > li > .drawer-nav-drop-wrap a {
    font-weight: 600;
}

.mobile-navigation .sub-menu li {
    font-weight: normal;
}

/* Language switch, mobile */

#mobile-secondary-menu {
    display: flex;
    justify-content: flex-end;
}

/* Search bar */

:is(#wrapper, #mobile-drawer) .search-form {
    width: 175px;
    margin-right: 20px;
}

:is(#wrapper, #mobile-drawer) .search-form .search-field {
    border: 2px solid transparent;
    border-width: 0 0 2px 0;
    font-size: 16px;
    font-weight: 600;
    padding: 0;
    padding-right: 35px;
}

:is(#wrapper, #mobile-drawer) .search-form .search-field:focus {
    border: 2px solid var(--global-palette1, black);
    border-width: 0 0 2px 0;
    color: var(--global-palette1, black);
}

:is(#wrapper, #mobile-drawer) .search-form .search-field::placeholder {
    color: black;
    opacity: 1;
}

:is(#wrapper, #mobile-drawer) .search-form .search-field:focus::placeholder {
    opacity: 0.5;
}

:is(#wrapper, #mobile-drawer) .search-form .kadence-search-icon-wrap {
    -webkit-mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>') no-repeat center center;
    mask: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512"><!--!Font Awesome Free 6.5.2 by @fontawesome - https://fontawesome.com License - https://fontawesome.com/license/free Copyright 2024 Fonticons, Inc.--><path d="M416 208c0 45.9-14.9 88.3-40 122.7L502.6 457.4c12.5 12.5 12.5 32.8 0 45.3s-32.8 12.5-45.3 0L330.7 376c-34.4 25.2-76.8 40-122.7 40C93.1 416 0 322.9 0 208S93.1 0 208 0S416 93.1 416 208zM208 352a144 144 0 1 0 0-288 144 144 0 1 0 0 288z"/></svg>') no-repeat center center !important;
    background-size: contain;
    background: var(--global-palette-btn-bg, #000082);
    mask-size: contain;
    mask-repeat: no-repeat;
    mask-position: center right;
    width: 35px;
}

:is(#wrapper, #mobile-drawer) .search-form .search-submit[type="submit"] {
    width: 35px;
}

.kadence-search-icon-wrap > span {
    visibility: hidden;
}


/* Slider */
#main .kb-splide .splide__arrow {
    background: var(--global-palette-btn-bg, #000082);
    opacity: 1;
    height: 45px;
    width: 45px;
    border-radius: 50%;
}

#main .kb-splide .splide__arrow:hover {
    background: black;
}

#main .kb-splide .splide__arrow--prev {
    left: calc(-45px / 2);
}

#main .kb-splide .splide__arrow--next {
    right: calc(-45px / 2);
}

#main .kb-splide .splide__arrow svg {
    fill: white;
}

@media (max-width: 767px) {
    .wp-block-kadence-slider.is-style-mobile-grid .kb-splide .splide__list {
        display: grid;
        grid-template-columns: 1fr;
        row-gap: 20px;
        overflow: visible;
        transform: translateX(0) !important;
    }

    .wp-block-kadence-slider.is-style-mobile-grid .kb-splide :is(.splide__slide--clone, .splide__arrows) {
        display: none !important;
    }
}

/* Sidebar */
#secondary .widget {
    margin-bottom: 40px;
}


/* News */
/* .fwp-latest-news {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
} */

.fwp-latest-news {
    display: block;
}

.fwp-latest-news > * {
    width: 100%;
    padding: 20px;
    border-radius: 10px;
    background: #EDEEF0;
    color: black;
    margin-bottom: 20px;
}

@media (min-width: 767px) {
    .fwp-latest-news > * {
        width: calc(50% - 20px);
        padding: 20px;
    }
}

.facetwp-facet-news_categories {
    display: flex;
    gap: 30px;
}

.facetwp-facet-news_categories .facetwp-radio,
.facetwp-facet-news_categories .facetwp-radio.checked {
    background: transparent;
    padding-left: 0;
}

.facetwp-facet-news_categories .facetwp-radio:is(:hover, .checked) {
    text-decoration: underline;
}

.facetwp-facet-news_categories .facetwp-counter {
    display: none;
}

#wrapper blockquote {
    border-left: 4px solid var(--global-palette1, #000082);
}

/* Search results */
.search-results .entry-header {
    padding-top: 10px;
}

.search-results #archive-container {
    padding-bottom: 30px;
}

.search-results .entry a:hover {
    text-decoration: underline;
}

/* Footer */
#static-footer {
    color: rgba(255, 255, 255, 0.65);
}

#static-footer a {
    color: white;
    text-decoration: none;
    font-weight: 500;
}

#static-footer a:hover {
    text-decoration: underline;
}

/* MISC OVERRIDES */
body.page .entry-content > *:last-child:not(.wp-block-kadence-rowlayout) {
    margin-bottom: 30px;
}

#archive-container {
    margin-bottom: 2rem;
}