/*
Theme Name: Offentliga Affärer (Madd Magazine Child)
Template: Madd-Magazine-PremiumWP
Version: 7.0.15
Text Domain: offentliga-affarer-madd-magazine-child
*/

:root {
    --oaRed: #ab2833;
    --nativeColorLight: #eee;
    --nativeColorDark: #d2d2d2;
    --nativeColorAccent: #222222;
    --nativeColorText: #413d3a;
    --fontDefault: 'Roboto', sans-serif;
    --fontHeader: 'Oswald', sans-serif;
    --borderColor: #ccc;
}

body {
    font-family: 'Roboto', sans-serif;
}

h1,
h2 {
    font-family: 'Oswald', sans-serif;
}

a {
    color: #e32a41;
}

a:visited,
a:active,
a:hover {
    color: var(--oaRed);
}

.site-wrapper {
    /* unset parent theme px container max-width */
    max-width: 100%;
    position: relative;
}

.container {
    /* wider desktop layout */
    max-width: 1360px;
}

.main-page>.container--header {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.main-page>.container--header>.row {
    display: flex;
    align-items: flex-end;
}

#masthead {
    background: white;
    border-top: 5px solid var(--oaRed);
    position: sticky;
    container-type: scroll-state;
    top: 0px;
    z-index: 9999;
    margin-bottom: 2em;
    box-shadow: 0px 1px 8px 0px rgb(0 0 0 / 20%);
}

#masthead>.header-inner {
    padding: 0;
}

#masthead>.header-inner>.container {
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

.site-navigation {
    font-family: 'Oswald', sans-serif;
}

.site-navigation ul li,
.site-navigation ul li .sub-menu li {
    padding: 0;
}

.site-navigation .sub-menu {
    top: 100%;
    /* only for desktop - ok now because its static in mobile */
    background: #fff;
    box-shadow: 0px 1px 8px 0px rgb(0 0 0 / 20%);
}

header .site-navigation a {
    color: black;
    transition: color .2s ease;
    background-color: inherit;
}


header .site-navigation a {
    display: inline-block;
    padding: .75em 1em;
}

header .site-navigation .current-menu-item>a {
    background: #ededed;

}

header .site-navigation li:hover>a {
    background: #444;
    color: #fff !important;
}



/* Button */
.button-wrap {
    margin-bottom: 2em;
}

.button {
    display: inline-block;
    padding: .55em 1em;
    background-color: #000;
    border-radius: 3px;
    color: #fff;
    text-transform: uppercase;
    font-family: 'Roboto';
    font-weight: bold;
    letter-spacing: .05em;
}

.button:hover,
.button:focus,
.button:visited {
    color: #fff;
}





/* Front page / archive lists */
.news-post-wrap,
.advads-kolumn-1 {
    margin: 0 auto 1.5rem;
}




/* Post styles */

.news-post-wrap {
    display: flex;
    flex-direction: column;
    gap: 1em;
}

.news-post--horizontal-left {
    display: grid;
    grid-template-columns: 1fr 2fr;
    grid-template-areas: "image content";
    align-items: center;
}

.news-post--horizontal-right {
    display: grid;
    grid-template-areas: "content image";
    grid-template-columns: 3fr 1fr;
    align-items: center;
}

.news-post--horizontal-left.native {
    grid-template-areas:
        "header header"
        "image content";
    gap: unset;
}

.news-post--horizontal-right.native {
    grid-template-areas:
        "header header"
        "content image";
    gap: unset;
}

.news-post-content {
    font-family: var(--fontDefault);
    grid-area: content;
    /* for news-post-wrapper .native grid */
}

.news-post--horizontal-right:not(.native) .news-post-content {
    border-left: 3px solid #e5e5e5;
    padding-left: 1em;
}

.news-post--horizontal-left.native .news-post-content,
.news-post--horizontal-right.native .news-post-content {
    padding: 1em;
}

.news-post--large-layout.native .news-post-content {
    padding: 0 1em 1em;
}

.news-post-title {
    font-family: var(--fontHeader);
    font-size: 2rem;
    letter-spacing: .0125em;
    line-height: 1.125em;
    margin: 0 auto .35em;
}

.news-post--horizontal-left .news-post-title,
.news-post--horizontal-right .news-post-title {
    font-size: 1.25rem;
}

.news-post-wrap a {
    color: inherit !important;
    text-decoration: none !important;
    transition: opacity .3s ease;
}

.news-post-wrap a:hover {
    opacity: .9;
}

.news-post-title a:hover {
    text-decoration: underline;
    text-decoration-thickness: 3px;
}

.news-post-text {
    font-size: 16px;
    line-height: 1.5em;
}

.news-post-image {
    position: relative;
    grid-area: image;
    /* for news-post-wrapper .native grid */
}

.news-post-image img {
    display: block;
    object-fit: cover;
    object-position: top;
    width: 100%;
}

.news-post--large-layout .news-post-image img {
    max-height: 20em;
}

.categories-wrap {
    position: relative;
    display: inline-block;
    top: -1px;
}

.categories-wrap ul li {
    padding: 0;
    /* unset main theme */
}

.categories-wrap a {
    display: inline-block;
    background: #000;
    color: #fff !important;
    color: white;
    text-transform: uppercase;
    font-weight: 600;
    font-size: 12px;
    line-height: 1;
    padding: .5em .5em .45em;
    letter-spacing: .05em;
}



/* Native post */

.native {
    background: var(--nativeColorLight);
    color: var(--nativeColorText);
}

.native-header {
    background: var(--nativeColorDark);
    font-family: var(--fontDefault);
    font-size: 1rem;
    grid-area: header;
    /* for news-post-wrapper .native grid */
}

.native-header-container {}

.native-header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 13px;
    line-height: 1.1;
}

.native-header-content>span {
    padding: .75em 0 .6rem 1rem;
}

.native-header-content::after {
    content: "Redaktionell Partner";
    display: inline-block;
    background-color: var(--nativeColorAccent);
    color: white;
    text-transform: uppercase;
    padding: .5em 1.125em;
    height: stretch;
    display: flex;
    align-items: center;
    font-weight: bold;
    font-size: 12px;
    letter-spacing: .05em;
}




.wp-block-separator {
    background-color: transparent;
    border-top: 2px solid #e0e0e0;
}

.wp-block-post-date {
    color: grey;
    font-size: 14px;
}

.wp-block-post-date::before {
    content: "Publicerad: ";
}


.sidebar-wrap .rpwwt-widget li {
    border-bottom: 2px solid #e5e5e5;
    padding-bottom: 7px;
}


/* Native single */
.single-native article.native {
    padding: 2rem;
}






/* Articles */

.single-ingress {
    letter-spacing: .5px;
    font-weight: 400;
    margin: 1em 0;
    font-weight: bold;
}

.single-publish-date {
    color: grey;
    font-size: 13px;
    padding-bottom: 1em;
    border-bottom: 1px solid #e0e0e0;
}



/* Advanced Ads */
.advads-toppbanner {
    /* max-height: calc(100vh - 2rem); */
    overflow: hidden;
}

.advads-toppbanner img {
    margin: 1rem auto;
}

.advads-target:nth-child(n+2) {
    /* for multiple ads (sidebar) */
    margin-top: 1rem;
}

.advads-target img {
    display: block;
    width: 100%;
}

/* .advads-kolumn-2,
.advads-kolumn-3 {
    text-align: center;
} */
.oa-advads-custom-banner-header {
    font-size: 12px;
    line-height: 1.1;
    letter-spacing: .05em;
    background: #e4caca;
    color: #838383;
    padding: .5em;
    ;
}

.sidebar-widget .oa-advads-custom-banner-header {
    text-align: center;
}


/* Search widget - in header */
.top-ads-block .widget_search.top-ads-widget {
    display: inline-block;
    width: 100%;
    ;
}


/* Jobs */

.job-header-img {
    min-height: 300px;
    max-height: 300px;
    object-fit: cover;
    width: 100%;
    margin-bottom: 1em;
}

.job-placement-info {
    font-size: 15px;
    margin: -.5em auto 1.75em;
    font-style: italic;
}

.job-detailed-info {
    font-size: 16px;
}

.job-detailed-info p {
    margin: 0 0 0.5em 0;
}

.job-detailed-info span {
    font-weight: 600;
}

.job-contact-person p {
    margin: 0 0 0 0;
}

.job-sidebar-heading {
    margin-bottom: 1em;
    font-size: 20px;
    padding-bottom: 0.5em;
    border-bottom: 2px solid #D24F00;
}

.job-company-logo {
    margin-bottom: 1em;
}



/* Platsannonser Widget */
.oa-platsannonser-list {
    list-style: none;
    padding: 0 !important;
    margin: 0 0 .5em !important;
    font-family: 'Roboto';
    border-bottom: 2px solid #f5f5f5;
}

.oa-platsannonser-item {
    margin: 0 auto 1.25em;
    padding: 0;
    border-bottom: 1px solid #eee;
}

.oa-platsannonser-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.oa-platsannonser-link {
    padding: 0 .5em .5em;
    gap: .5em;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    outline: none !important;
    color: #222 !important;
}

.oa-platsannonser-image {
    /* width: 6rem; */
    max-width: 100%;
    padding: 0 2em;
    width: 15em;
    min-height: 4em;
    display: flex;
    align-items: center;
    justify-content: center;
}

.oa-platsannonser-image>img {
    display: block;
}

.oa-platsannonser-content {
    font-size: 16px;
    font-weight: bold;
}

.oa-platsannonser-title {
    font-size: 16px;
    font-weight: bold;
}

.oa-platsannonser-meta {
    font-size: 14px;
    color: #666;
}

.oa-platsannonser-company,
.oa-platsannonser-city {
    font-weight: normal;
}

.oa-platsannonser-more {
    text-align: center;
    margin-top: 1em;
    padding-top: 1em;
    border-top: 1px solid #e5e5e5;
}

.oa-platsannonser-more-link {
    display: inline-block;
    color: #222 !important;
    text-decoration: none;
    font-weight: 600;
    font-size: 13px;
    transition: color 0.2s ease;
    letter-spacing: .02em;
    text-transform: uppercase;
}

.oa-platsannonser-more-link:hover {
    color: #000 !important;
    text-decoration: underline;
}

/* Native Widget */
.oa-native-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.oa-native-item {
    margin-bottom: 1em;
    padding-bottom: 1em;
    border-bottom: 1px solid #e5e5e5;
}

.oa-native-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
    border-bottom: none;
}

.oa-native-link {
    display: block;
    font-weight: 600;
    color: black;
    text-decoration: none;
    margin-bottom: 0.5em;
}

.oa-native-link:hover {
    text-decoration: underline;
    text-decoration-thickness: 2px;
}

.oa-native-meta {
    font-size: 14px;
    color: #666;
}

.oa-native-company,
.oa-native-excerpt {
    font-weight: normal;
}

/* Sidebar widget news */
.sidebar-wrap .widget-title {
    margin: 0 auto .8em;
}

.sidebar-wrap .nm-nf-external-news-list,
.sidebar-wrap ul {
    padding: 0 0 0 .5em;
    margin: 0 0 1em;
    list-style: outside none none;
}

.sidebar-wrap .nm-nf-external-news-list {
    padding: 0;
}

.sidebar-wrap .nm-nf-external-news-item,
.sidebar-wrap .rpwwt-widget ul li {
    margin: .75em 0;
    padding: 0 0 .75em;
    border-bottom: 2px solid #e5e5e5;
}

.sidebar-wrap .nm-nf-external-news-title,
.sidebar-wrap .rpwwt-post-title {
    display: block;
    font-size: 14px;
    font-weight: bold;
    line-height: 1.5;
    letter-spacing: 0.5px;
    margin: 0 auto;
    text-transform: none;
}

.sidebar-wrap .nm-nf-external-news-date,
.sidebar-wrap .rpwwt-post-date {
    font-size: 13px;
    color: #ababab;
    text-transform: uppercase;
    margin: 0 auto;
}


.sidebar-wrap ul a,
.widget a {
    outline: none;
}



/* Add to any plugin */
.addtoany_list {
    margin: 2rem -4px 1rem;
    display: block !important;
}

.a2a_svg svg {
    color: #fff;
    background: var(--oaRed);
}

.native .a2a_svg svg {
    color: var(--nativeColorLight);
}

.a2a_svg svg * {
    color: currentColor !important;
    fill: currentColor !important;
}



/* Hide masthead logo on desktop (unless sticky) */
.oa-mobile-logo {
    display: none;
}

/* @container scroll-state(stuck: top) {
  .oa-mobile-logo {
    display: block;
    max-width: 10rem;
  }
} */


/* Custom Bootstrap addons
*  Like in the parent theme (they havent added the complete bootstrap grid system, so we need to do this weird fix)
*/
.col-md-push-6 {
    left: 50%;
}


.footer-bot {
    font-weight: bold;
    color: #878787;
}

.footer-rss {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: .5em;
    font-size: 18px;
}

.footer-rss a {
    color: currentColor;
    position: relative;
}

.footer-rss svg {
    color: currentColor;
    position: absolute;
    right: calc(100% + .5em);
    top: 50%;
    transform: translateY(-50%);
}

/* Sidebar + widgets */
.sidebar-wrap .sidebar-widget {
    margin-bottom: 2rem;
}

.wp-block-group__inner-container>*:not(.wp-block-image),
.wp-widget-group__inner-blocks>*:not(.wp-block-image) {
    padding-left: .5em;
    padding-right: .5em;
}

.wp-block-group__inner-container>.wp-block-image:first-child,
.wp-widget-group__inner-blocks>.wp-block-image:first-child {
    margin-top: 0;
}


/* Mobile responsive styles */
@media screen and (max-width: 992px) {

    .hidden-xs {
        display: none !important;
    }

    /* TEMP Custom Bootstrap addons - Like in the parent theme */
    .col-md-push-6 {
        left: 0;
    }

    /* Toppbanner */
    .container--ads {
        padding: 0;
    }

    .container--ads img {
        margin: 0;
    }

    /* Show masthead logo on mobile */
    .oa-mobile-logo {
        display: block;
        position: relative;
        top: 2px;
        width: 14rem;
        max-width: 100%;
    }

    #masthead,
    #masthead>.header-inner {
        padding: 0;
        padding: .5em 0;
    }

    /* Hide desktop logo */
    .logo-wrap {
        display: none;
    }

    /* Mobile menu */
    .site-navigation {
        top: 99px;
        border-top: 1px solid #eee;
    }

    #touch-menu {
        top: 35px;
    }

    #touch-menu span,
    #touch-menu span:after,
    #touch-menu span:before {
        background-color: black;
        height: 4px;
    }

    header .site-navigation li:hover>a {
        /* temp  reset */
        color: inherit !important;
    }

    .site-navigation .sub-menu {
        box-shadow: unset;
    }

    .footer-rss {
        justify-content: center;
    }

}

/* Desktop  */
@media screen and (min-width: 993px) {

    /* Hide img in sidebar only for desktop */
    .sidebar-wrap .rpwwt-widget ul li img {
        display: none;
    }

    .sidebar-widget .news-post-title {
        font-size: 1.25rem;
    }

    .sidebar-widget p,
    .sidebar-widget .news-post-text {
        font-size: 14px;
        line-height: 1.3em;
    }


    /* Custom Bootstrap addons
    *  Like in the parent theme (they havent added the complete bootstrap grid system, so we need to do this weird fix)
    */
    .col-md-12 {
        width: 100%;
    }


}