/**
Theme Name: Story House Egmont Theme
Author: Story House Egmont
Author URI: https://storyhouseegmont.se
Description: This theme requires Advanced Custom Fields PRO.
Version: 1.2.8
License:
License URI:
Text Domain: she-theme
Template: astra
*/
/* --- VARIABLES --- */

:root {
    --margin: 20px;
}

:root {
    --half-margin: 10px;
}

:root {
    --neg-margin: -20px;
}

:root {
    --image-ratio: 16 / 9
}

/* Override WP */
body {
    --wp--style--block-gap: var(--margin);
}

/* --- HELPERS --- */
/* Standard padding */
.standard-padding {
    padding: var(--margin) !important;
}

/* Hide in mobile (standard breakpoint) */
@media (min-width: 545px) {
    .mobile-hidden {
        display: none !important;
    }
}

/* --- GENERAL --- */

/* Body */
body {
    -moz-osx-font-smoothing: grayscale !important;
    text-rendering: optimizeLegibility !important;
    -webkit-font-smoothing: antialiased !important;
    background-color: #fff;
}

/* Heading link color */
h1 a,
h2 a,
h3 a,
h4 a,
h5 a,
h6 a {
    color: black;
    text-decoration: none;
}

/* No post image heading margin */
.entry-header.ast-no-thumbnail {
    margin-top: 4em;
}

/* Header */
.ast-builder-grid-row.ast-grid-center-col-layout {
    grid-template-columns: 120px auto 215px;
    grid-column-gap: 0;
}

/* Primary, secondary desktop */
#primary {
    background-color: white;
    padding-top: 0 !important;
}

/* Astra container padding */
.ast-container {
    padding-left: var(--margin) !important;
    padding-right: var(--margin) !important;
}

#primary {
    margin: 0;
    padding: 0;
}

body.single #primary {
    padding: 0;
    margin-inline: auto;
}

body.ast-right-sidebar.single #primary,
body.ast-right-sidebar.archive #primary,
body.ast-right-sidebar.search #primary {
    width: min(100%, 980px);
    margin-inline: auto;
}

@media (min-width: 922px) {

    body.ast-right-sidebar #primary {
        width: calc(100% - 320px);
    }

    #primary {
        padding: 0 var(--margin);
        border-right: 0 !important;
    }

    body.single #primary {
        padding: 0;
    }

    #secondary {
        margin: 0 !important;
        padding: var(--margin) 0 var(--margin) var(--margin)!important;
        width: 320px;
        line-height: 1;
    }
}

@media (min-width: 993px) {
    .ast-right-sidebar #primary {
        padding-right: var(--margin);
    }
}

/* Single post thumbs */
body.single .post-thumb {
    margin: 0;
}

body.single .post-thumb img {
    width: 100%;
    object-fit: cover;
}

/* Image captions */
figcaption {
    font-size: .8em;
    margin-bottom: 1.6em;
}

/* Single, figure/figcaption */
body.single figure {
    margin: 0 0 1em;
}

body.single figure figcaption {
    background: none;
    margin-block-start: 4px;
    padding: 0;
    color: #717171;
    font-size: 12px;
    line-height: 1.5;
}

body.single figure figcaption p:empty {
    display: none;
}

body.single article {
    padding-block-start: clamp(var(--margin), 5vw, 64px);
    max-width: 840px;
    margin-inline: auto;
}

body.single article .panorama-container {
    margin-inline: calc((840px - 980px) / 2);
}

@media (max-width: 921px) {
    body.single figure figcaption {
        padding-left: var(--margin)
    }
}

/* Remove borders in archive/search */
body.archive article, body.search article {
    border: none !important;
}

/* Secondary - sticky widget group */
#secondary .wp-block-group.sticky {
    height: 1400px; /* Fallback */
    height: 200vh;
    position: relative;
}

#secondary .wp-block-group.sticky > div {
    position: sticky;
    top: 0;
}

/* --- WP QUERY --- */

/* Featured */
.wp-block-query.featured {
    margin: 0 var(--neg-margin) var(--margin);
}

.wp-block-query.featured a {
    width: 100%;
}

.wp-block-query.featured img {
    width: 100%;
    object-fit: cover;
    aspect-ratio: var(--image-ratio) !important;
}

.wp-block-query.featured .wp-block-post-template li {
    position: relative;
}

.wp-block-query.featured .wp-block-group {
    position: absolute;
    width: 100%;
    bottom: 0;
    background: rgba(0, 0, 0, .3);
    color: white !important;
    padding: var(--margin);
}

.wp-block-query.featured .wp-block-group h2 {
    margin: 0;
}

.wp-block-query.featured .wp-block-group h2 a {
    color: white;
}

.wp-block-group.featured p {
    margin-top: .5em;
}

@media (max-width: 599px) {
    .wp-block-group.featured p {
        display: none;
    }

    .wp-block-group.featured h2 {
        margin-bottom: 0;
    }
}

/* WP Block query */

.wp-block-group {
    padding: 0;
    position: relative;
}

/* Image */
.wp-block-query .wp-block-post-featured-image a {
    width: 100%;
}

.wp-block-query .wp-block-post-featured-image img {
    object-fit: cover;
    aspect-ratio: var(--image-ratio);
}

/* Kategori */
/*
.wp-block-query .wp-block-post-template .wp-block-post-terms a {
    position: absolute;
    bottom: 10px;
    left: 10px;
    display: block;
    padding: 2px 6px 0;
    background: var(--wp--preset--color--ast-global-color-0);
    font-weight: 700;
    letter-spacing: 1px;
    text-transform: uppercase;
    color: white;
}
*/

/* Rub */
.wp-block-query .wp-block-post-template h2 {
    margin: .5em 0 .3em;
}

.wp-block-query ul {
    margin: 0;
}

.wp-block-query p.read-more {
    display: none;
}

/*---  ARCHIVE/SEARCH PAGES --- */

/* Archive title/description */
.ast-archive-description {
    margin: 0 !important;
    padding: var(--margin) !important;
    text-align: center;
}

/* Archive image sizes */
.ast-row .post-thumb-img-content.post-thumb img {
    aspect-ratio: var(--image-ratio);
    object-fit: cover;
}

.ast-post-format-.blog-layout-1 {
    padding: 0 !important;
}

@media (min-width: 768px) {
    body.archive .ast-row,
    body.search .ast-row {
        column-gap: var(--margin);
        row-gap: var(--margin);
    }

    body.archive .ast-width-md-6,
    body.search .ast-width-md-6,
    body.archive .ast-col-md-6,
    body.search .ast-col-md-6 {
        width: calc(50% - var(--half-margin));
    }
}

/* --- PARTNER/NATIVE --- */

/* Ad merkers for partner category */
body.single article.category-partner div.post-thumb > figure:before,
li.category-partner figure:before {
    content: 'Annons';
    font-size: .8em;
    position: relative;
    display: block;
    margin: 0.5em 0.5em -3em 0.5em !important;
    float: right;
    margin-right: 0.5em;
    background-color: white;
    padding: 0 0.5em;
}

body.single-partner article {
    max-width: calc(840px + 2rem);
    padding-inline: 1rem;
    padding-block-end: 2rem;
}

/* --- ADS --- */

/* Header */
.header-widget-area .widget {
    margin: 0 0 1.5em 0;
}

/* Placements */
.ad iframe,
.ad > div {
    display: block !important;
    margin: 0 auto !important;
}

.ad.panorama {
    width: 980px;
    margin: 0 auto;
}

/* Ad marker */
.admarker,
[class$="-adlabel"] {
    font-size: .6em;
    height: 20px;
    text-transform: uppercase;
    line-height: 2em;
    text-align: center;
}

/* Incosecvent hyphen (see above) */
.no-ad-marker {
    display: none !important;
}

/* ENTERPRISE */

/* No clearing in articles */
.entry-content > h1,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.entry-content > h5 {
    clear: none;
}

/* Enterprise sidebar info */
.generic-text-wrapper.right {
    float: right;
    background: #ffffd9;
    width: 200px;
    max-width: 50%;
    padding: var(--margin) var(--margin) 0;
    margin: 0 0 var(--margin) var(--margin);
}

.single .entry-header .post-thumb {
    margin-block: 40px 64px;
}

.ast-single-post-featured-section + article {
    margin-top: 0.5em;
}

.featured-image-caption p {
    background: #fafafa;
    border-bottom: 1px solid #efefef;
    color: #212b36;
    font-size: 12px;
    font-weight: normal;
    text-align: left;
    margin-bottom: 0;
    padding: 10px 15px;
}

.article-title {
    font-family: 'Playfair Display',serif;
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.3em;
    color: #2e2e2e;
    text-decoration: none !important;
    border: none !important
}

.small-articles .article-title {
    font-size: 1.2em;
    line-height: calc(1ex/0.4)
}

.cat-slider-title {
    font-family: 'Playfair Display',serif;
    position: relative;
    font-weight: 600;
    margin-left: 10px;
    display: block;
    padding-top: 20px;
    padding-bottom: 10px
}

.post-slide .featured-image-caption {
    display: none;
}

.entry-meta :not(a) {
    color: #000;
}

body.single figure.post-thumb figcaption {
    background: none;
    margin-block-start: 4px;
    padding: 0;
    color: #717171;
    font-size: 12px;
    line-height: 1.5;
}


/* EXTRA CSS FROM CUSTOMIZER */
:root { --margin: 20px; }

/* partner */
.partnerLabel {
    position: absolute !important;
    left: 0px !important;
    top: 0px !important;
    z-index: 2 !important;
    background: #fff !important;
    color: #000 !important;
    padding: 5px !important;
    text-transform: uppercase !important;
	font-size: .8em;
}
.partnerCard .cardAuthor { display: none; }

/* Content container */
#primary { background: #ffffff; }

/* Site content */
/*
.site-content {
    max-width: 1300px;
    margin: 0 auto;

}
*/

/* Article image, flow image */
/*
.ast-container .entry-header,
.ast-container .entry-content {
	margin: 0;
	padding: 0;
}
*/

/* Flow headers */
.articleCard h2 a {
	color: #212b36!important;
	text-decoration: none!important;
	font-size: .8em;
}
.articleCard h2 a:hover { color: #ec008c!important; }

/* Tag/category/archive */

body.archive {
    background-color: #fff;
}

body.archive .content-area {
    max-width: 980px;
    margin-inline: auto;
}

/* Single */

.entry-header { 
	font-weight: bold;
	font-size: 115%; 
	padding-bottom: 0px;
}

.entry-header > * + * {
    margin-block-start: 1em;
}

.entry-meta {
	font-size: 85%;
	font-weight: normal;
}

body.single .entry-content {
    max-width: 640px;
    margin-inline: auto;
}
/*
body.single.ast-page-builder-template .entry-header { padding: 0; }
body.single.ast-page-builder-template .entry-title,
body.single.ast-page-builder-template .entry-meta { padding: 0 var(--margin); }
body.single.ast-page-builder-template .entry-content { padding: var(--margin); }
*/

/* Page only? */
/*
header.ast-no-thumbnail { padding-top: var(--margin)!important; }
*/

/* Page */
/*
body.page header h1,
body.page .entry-content { padding: 0 var(--margin); }
*/

/* Startpage */
/*
body.home .entry-content { padding: 0; }
*/

/* Right column in Gutenberg (manually set) */
/*
.wp-block-column.right-column {
	margin: 0 10px;	
}
@media (max-width: 1300px) {
	.wp-block-column.right-column { display: none; }
}
*/

/* Secondary */
/*
#secondary {
	min-width: 320px;
	box-sizing: border-box;
	padding: 10px!important;
	margin: 0!important;
	border: 0!important;
}
@media (max-width: 921px) {
	#secondary { display: none; }
}
*/

/* Aside */

aside.widget { height: 2000px; }


/* aside.widget:last-child { height: 4000px; } */

aside.widget .ad { position: sticky; top: 10px; }


/* Heading */
.ast-builder-grid-row.ast-grid-center-col-layout {
    grid-template-columns: 140px auto 195px;
}

/* Startpage Flow cover image text background override (custom blocks for gutenberg plugin) */
/*
.egmontFeaturedWrapper h1 span {
	display: inline;
	background: rgba(0, 174, 188, 0.7);
	box-shadow: 10px 0 0 rgba(0, 174, 188, 0.7), -10px 0 0 rgba(0, 174, 188, 0.7);
	padding-bottom: 5px;
}
*/

/* Flow columns */
/*
@media (min-width: 545px) {
	.wp-block-acf-flow .row {
		display: flex;
		flex-flow: wrap;
	}
	.wp-block-acf-flow .row .articleCard.col-6 { width: 50%; }
}
*/

/* Enterprise sidebar info */
.generic-text-wrapper.right {
	float: right;
	background: #ffffd9;
	width: 200px;
	max-width: 50%;
	padding: 20px 20px 0;
	margin: 0 0 20px 20px;
}

/* Image captions */
figcaption {
	font-size: .8em;
	margin-bottom: 1.6em;
}

/* No clearing in articles */
.entry-content > h1,
.entry-content > h2,
.entry-content > h3,
.entry-content > h4,
.entry-content > h5 {
	clear: none;
}

/* Ads */
.ad iframe,
.ad > div {
	display: block!important;
	margin: 0 auto!important;
}

.ad.panorama {
	width: 980px;
	margin: 0 auto;
}
.admarker {
	font-size: .8em;
	text-align: center;
	text-transform: capitalize;
}

.egm_ad_outsidesticky {
	position: sticky;
	top: 5px;
}

/* Main menu */
.ast-grid-section-center { 
    justify-content: center; 
}

.ast-builder-menu .main-navigation > ul { 
    justify-content: flex-end; 
}

.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item,
.ast-header-break-point .main-navigation .stack-on-mobile li {
	line-height: 2em;
	margin: 1px 0 1px 2px;
    border-block-end: 2px solid transparent;
}

/* background on desktop & mobile */
.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item:hover,
.ast-header-break-point .main-navigation .stack-on-mobile li:hover { 
    border-color: #ec008c; 
}

.ast-desktop .ast-primary-header-bar .main-header-menu > .menu-item a,
.ast-header-break-point .main-navigation .stack-on-mobile li a {
	color: #000;
    padding-inline: 12px;
    transition: none;
}

/* Bold text in Astra-buttons (prenumerera) */
.ast-custom-button { 
    font-weight: bold; 
}

/* Flow container */
.flowContainer { 
    padding-top: var(--margin)!important; 
}

/* Column fix */
@media (max-width: 781px) {
	.wp-block-column:not(:only-child) {
		flex-basis: 100%!important;
	    flex-grow: 1!important;
	}
}

.entry-title.ast-blog-single-element {
	font-size: 30px; 
	text-transform: none !important;
}

.articleSingleContent h1, .entry-title {
	font-size: 44px; 
	text-transform: none !important;
}

/* New archive styling */
.halsa-archive-title {
    color: #E90081;
    font-size: calc(44/16 * 1rem);
    margin-block-end: 1rem;
}

.halsa-archive-list {
    --min-width: 320px;
	--max-columns: 3;
	--width: minmax(
		min(100%, max(var(--min-width), calc(101% / (var(--max-columns) + 1)))),
		1fr
	);

    display: grid;
    margin-block: 2rem;
    grid-template-columns: repeat(auto-fill, var(--width));
    column-gap: 1.25rem;
    row-gap: calc(40/16 * 1rem);
}

.halsa-archive-post {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: calc(25/16 * 1rem);
    line-height: calc(33/25);
}

.halsa-archive-description p {
    font-size: calc(24/16 * 1rem);
    line-height: calc(34/24);
    margin-block-end: 0;
}

@media (min-width: 1080px) {
    .halsa-archive-list {
        --min-width: 300px;
    }
}

article.halsa-archive-post h2 {
    font-size: 26px;
    font-size: calc(26/16 * 1rem);
    hyphenate-limit-chars: 10 4;
    hyphens: auto;
}