/**
 * Theme Name: Blocksy Child
 * Description: Blocksy Child theme
 * Author: Creative Themes
 * Template: blocksy
 * Text Domain: blocksy
 */

/* Header logo (Customizer): full width, auto height, desktop header 1000px and up only. */
@media (min-width: 1000px) {
	[data-device="desktop"] [data-id="logo"],
	[data-device="desktop"] [data-id="logo"] .site-logo-container {
		width: 100%;
		height: auto;
		max-height: none;
	}

	[data-device="desktop"] [data-id="logo"] .site-logo-container img {
		width: 100%;
		max-width: 100%;
		height: auto;
		max-height: none;
		object-fit: fill; /* Blocksy's contain insets the SVG in Safari. */
		/* Slightly taller than the art (138.51 x 8.73). Safari floors the SVG's
		   height to a whole pixel, which leaves a few px empty at each side. */
		aspect-ratio: 138.51 / 9;
	}
}

/* Boxed post cards inside a Cover block: core Cover passes its white text
   down (h2:not(.has-text-color) { color: inherit }), which puts white
   titles on white cards. Restore Blocksy's normal card colors. */
.wp-block-cover .ct-posts-block [data-cards="boxed"] .entry-card {
	color: var(--theme-text-color);
}

.wp-block-cover .ct-posts-block [data-cards="boxed"] .entry-card .entry-title {
	color: var(--theme-headings-color);
}

/* Mobile and tablet header logo: Blocksy's object-fit: contain makes Safari
   shrink and centre the SVG, pushing it ~30px off the left edge. */
[data-device="mobile"] [data-id="logo"] .site-logo-container img {
	object-fit: fill;
}

/* Post navigation divider: 2px, full height (Blocksy: 1px, middle half).
   `body` outranks Blocksy's posts-nav.min.css, which loads after this file. */
body .post-navigation::after {
	top: 0;
	width: 2px;
	height: 100%;
	transform: translateX(-50%);
}
