/*
Theme Name: 	Boagworld
Description: 	Boagworld 2024
Version: 		1.0
Author: 		Ben Eelen <ben@thinc.be>
*/

/* Remove the grey border from images unless they have a caption to the right */

body.page-template-single-single-column .edit-post-visual-editor__content-area .wp-block-image, body.page-template-single-single-column .wp-site-blocks .entry-content .wp-block-image, body.single .edit-post-visual-editor__content-area .wp-block-image, body.single .wp-site-blocks .entry-content .wp-block-image {
	border-top:none;
}

body.page-template-single-single-column .edit-post-visual-editor__content-area .wp-block-image, body.page-template-single-single-column .wp-site-blocks .entry-content .has-right-caption-position, body.single .edit-post-visual-editor__content-area .wp-block-image, body.single .wp-site-blocks .entry-content .has-right-caption-position {
	border-top:1px solid var(--wp--preset--color--greygreen);
}

/* Forces the announcement box to be full width on smaller screen sizes */

@media (max-width:1239px) {
body.page-template-single-single-column main>.wp-block-group-is-layout-constrained>.wp-block-columns .wp-block-boagworld-global-announcement, body.single main>.wp-block-group-is-layout-constrained>.wp-block-columns .wp-block-boagworld-global-announcement {
	max-width:100% !important;
}
	}


/* Corrects an alignment issue on the subscribe button. For some reason it is set to -10px by default. */

@media (max-width:1239px) {
	header .wp-block-navigation .wp-block-navigation__container .wp-block-navigation-item.link-cta {
		margin-left:0;
	}
}

/* Increased the size of captions for better legibility */

body.page-template-single-single-column .edit-post-visual-editor__content-area .wp-block-image figcaption, body.page-template-single-single-column .wp-site-blocks .entry-content .wp-block-image figcaption, body.single .edit-post-visual-editor__content-area .wp-block-image figcaption, body.single .wp-site-blocks .entry-content .wp-block-image figcaption {
	font-size: calc(var(--wp--preset--font-size--small)*1.1);
	font-family:var(--wp--preset--font-family--default);
	font-weight:300;
}

/* Forces an image to fill the entire width when embedded within a link */


body.page-template-single-single-column .edit-post-visual-editor__content-area .wp-block-image.has-right-caption-position:not(.is-wide) a img, body.page-template-single-single-column .edit-post-visual-editor__content-area .wp-block-image.medium a img, body.page-template-single-single-column .wp-site-blocks .entry-content .wp-block-image.has-right-caption-position:not(.is-wide) a img, body.page-template-single-single-column .wp-site-blocks .entry-content .wp-block-image.medium a img, body.single:not(.post-template-single-wide) .edit-post-visual-editor__content-area .wp-block-image.has-right-caption-position:not(.is-wide) a img, body.single:not(.post-template-single-wide) .edit-post-visual-editor__content-area .wp-block-image.medium a img, body.single:not(.post-template-single-wide) .wp-site-blocks .entry-content .wp-block-image.has-right-caption-position:not(.is-wide) a img, body.single:not(.post-template-single-wide) .wp-site-blocks .entry-content .wp-block-image.medium a img
	{
		max-width:100%
	}

/* Stops my profile picture disappearing before reaching mobile sizing */
@media (min-width:968px) {
body.page-template-single-single-column main .wp-block-boagworld-post-image, body.single main .wp-block-boagworld-post-image
	{
		display:block;
	}
	
}

/* Ensures correct font is used in footer across all posts as well as pages. */
body .has-caps-xl-title-font-size {
	font-family:var(--wp--preset--font-family--heading) !important;
}

/* Correct the positioning of the logos in Header. */ 
body header figure.image--boagworld, body header figure.image--boagworks {
	width:auto;
}
body header figure.image--boagworks {
	padding-right:10px;
}
body header figure.image--boagworld {
	padding-left:10px;
}

/* Stopping the strong wrapping */ 
.wp-block-list li {
	display:block !important;
}

/* Forces related reading full width */ 
.wp-block-boagworld-related-reading {
	width:100% !important;
}

/* Hide reading time from podcast episode listings */

.card--post-type--episodes .author__reading_time {
	display:none !important;
}

/* Make h1 and h2 bold on articles */

body.page-template-single-single-column main>.wp-block-group-is-layout-constrained .wp-block-post-title, body.single:not(.post-template-single-wide) main>.wp-block-group-is-layout-constrained .wp-block-post-title, body.page-template-single-single-column .edit-post-visual-editor__content-area h2, body.page-template-single-single-column .wp-site-blocks h2, body.single .edit-post-visual-editor__content-area h2, body.single .wp-site-blocks h2, .wp-site-blocks h1 a:link, .wp-site-blocks h1 a:visited, .wp-site-blocks h2 a:link, .wp-site-blocks h2 a:visited, .wp-site-blocks h3 a:link, .wp-site-blocks h3 a:visited, .wp-site-blocks h4 a:link, .wp-site-blocks h4 a:visited, .wp-site-blocks h5 a:link, .wp-site-blocks h5 a:visited, .wp-site-blocks h6 a:link, .wp-site-blocks h6 a:visited {
	font-weight:bold;
}

/* Added spacing around podcast player */

.powerpress_player .mejs-container {
	margin:1em 0;
}

/* Force full width on post without side column */
.content-no-side {
	max-width: 100% !important;
	width: 100% !important;
}
