/*
Theme Name: Hideo Child
Template: hideo
Description: Child theme of Hideo for luigipinedo.com.
Version: 1.0.10
Text Domain: hideo-child
License: GNU General Public License version 2.0
License URI: http://www.gnu.org/licenses/gpl-2.0.html
*/

/* Artwork stays in full colour; Hideo's rounded corners are kept. */
.wp-block-post-content img,
.wp-block-post-content .gallery img {
	border-radius: var(--wp--custom--border--radius--large, 16px);
}

/* Classic [caption] and [gallery] content from the Baskerville era. */
.wp-caption {
	max-width: 100%;
}
.wp-caption img {
	display: block;
	height: auto;
	max-width: 100%;
}
.wp-caption.aligncenter,
.wp-block-post-content .aligncenter {
	margin-left: auto;
	margin-right: auto;
}
.wp-caption-text,
.gallery-caption {
	color: var(--wp--preset--color--70);
	font-size: var(--wp--preset--font-size--small);
	margin-top: .5em;
}
.wp-block-post-content .alignleft {
	float: left;
	margin: 0 1.5em 1em 0;
}
.wp-block-post-content .alignright {
	float: right;
	margin: 0 0 1em 1.5em;
}
/* Block themes don't print the legacy [gallery] inline CSS, so lay it out as a grid. */
.wp-block-post-content .gallery {
	display: grid;
	gap: 1rem;
	grid-template-columns: repeat(auto-fill, minmax(min(200px, calc(50% - .5rem)), 1fr));
	margin-bottom: 1.5em;
	max-width: none;
}
.wp-block-post-content .gallery .gallery-item {
	margin: 0;
	width: auto;
}
.wp-block-post-content .gallery .gallery-icon img {
	aspect-ratio: 1;
	display: block;
	height: auto;
	object-fit: cover;
	width: 100%;
}
.wp-block-post-content .gallery br {
	display: none;
}

/* Footer contact details. */
.site-footer .footer-contact a {
	color: inherit;
}

/* Grid tiles: fill the column even when the source image is smaller than it. */
.wp-block-post-template .wp-block-post-featured-image {
	align-self: stretch;
	width: 100%;
}

/* Mobile menu overlay: keep the links off the screen edge. */
.wp-block-navigation .wp-block-navigation__responsive-container.is-menu-open:not(.disable-default-overlay) {
	padding: var(--wp--preset--spacing--body-margin, 24px);
}

/* Desktop sidebar: show the Gallery series as an always-open, indented list instead of a flyout. */
.site-sidebar .wp-block-navigation .wp-block-navigation-item.has-child {
	align-items: flex-start;
	flex-direction: column;
}
.site-sidebar .wp-block-navigation .has-child .wp-block-navigation__submenu-container {
	background: transparent;
	border: 0;
	height: auto;
	min-width: 0;
	opacity: 1;
	overflow: visible;
	padding: 0 0 0 1em;
	position: static;
	visibility: visible;
	width: auto;
}
.site-sidebar .wp-block-navigation .has-child .wp-block-navigation__submenu-container .wp-block-navigation-item .wp-block-navigation-item__content {
	padding: 0;
}
.site-sidebar .wp-block-navigation .wp-block-navigation__submenu-icon {
	display: none;
}

/* Gallery blocks: keep an incomplete last row the same tile size instead of stretching it. */
.wp-block-gallery.has-nested-images figure.wp-block-image:not(#individual-image) {
	flex-grow: 0;
}
