/*
Theme Name: Hivos Block Child — Gender Energy Compact
Theme URI: https://genderenergycompact.org
Author: Tatemae
Author URI: https://tatemae
Description: Child theme for genderenergycompact.org, extending Hivos Block Theme with GEC brand colors.
Requires at least: 6.1
Tested up to: 6.1
Requires PHP: 5.6
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: https://www.gnu.org/licenses/old-licenses/gpl-2.0.html
Template: hivos-block-theme
Text Domain: hivos-block-child-gec
Tags: hivos, child-theme, one-column, custom-colors, custom-menu, custom-logo, editor-style, featured-images, full-site-editing, block-patterns, rtl-language-support, sticky-post, threaded-comments, translation-ready, wide-blocks, block-styles, accessibility-ready
*/

/* Logo out of flow so header height follows nav row, not padded image size */
.c-hivos-site-header .wp-block-columns > .wp-block-column:first-child {
	position: relative;
}

.c-hivos-site-header .wp-block-site-logo {
	position: absolute;
	top: 0;
	inset-inline-start: 0;
	z-index: 2;
	margin: 0;
}

.wp-block-site-logo img {
	background-color: var(--wp--preset--color--base);
	padding: 1rem;
}

/* Desktop dropdown: white panel, primary (blue) links — overrides red-header submenu */
.c-hivos-site-header--red
	.wp-block-navigation
	.wp-block-navigation__submenu-container {
	background-color: var(--wp--preset--color--base);
	border: 1px solid var(--wp--preset--color--secondary);
	border-radius: 4px;
	box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
	color: var(--wp--preset--color--primary);
}

.c-hivos-site-header--red
	.wp-block-navigation
	.wp-block-navigation__submenu-container
	.wp-block-navigation-item__content {
	color: var(--wp--preset--color--primary);
	opacity: 1;
}

.c-hivos-site-header--red
	.wp-block-navigation
	.wp-block-navigation__submenu-container
	a.wp-block-navigation-item__content:hover,
.c-hivos-site-header--red
	.wp-block-navigation
	.wp-block-navigation__submenu-container
	a.wp-block-navigation-item__content:focus,
.c-hivos-site-header--red
	.wp-block-navigation
	.wp-block-navigation__submenu-container
	a.wp-block-navigation-item__content:focus-visible {
	/* Beat parent red-header + core nav hover (primary-dark background) */
	background-color: var(--wp--preset--color--gray-light) !important;
	color: var(--wp--preset--color--primary) !important;
	opacity: 1 !important;
}
/* Gallery columns fix */
.wp-block-gallery.has-nested-images.columns-3.wp-block-gallery-is-layout-flex {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 1em;
}

.wp-block-gallery.has-nested-images.columns-3 > figure.wp-block-image {
	width: calc(33.333% - 0.7em) !important;
	flex: 0 0 calc(33.333% - 0.7em) !important;
	max-width: calc(33.333% - 0.7em) !important;
}

.wp-block-gallery.has-nested-images.columns-3 > figure.wp-block-image {
	aspect-ratio: auto !important;
}

.wp-block-gallery.has-nested-images.columns-3 > figure.wp-block-image img {
	width: 100%;
	height: auto !important;
	object-fit: contain !important;
	padding: 1rem;
}

/* Gallery 4 columns */
.wp-block-gallery.has-nested-images.columns-4 {
	display: flex !important;
	flex-wrap: wrap !important;
	gap: 1em;
}

.wp-block-gallery.has-nested-images.columns-4 > figure.wp-block-image {
	width: calc(25% - 0.75em) !important;
	flex: 0 0 calc(25% - 0.75em) !important;
	max-width: calc(25% - 0.75em) !important;
	aspect-ratio: auto !important;
}

.wp-block-gallery.has-nested-images.columns-4 > figure.wp-block-image img {
	width: 100%;
	height: auto !important;
	object-fit: contain !important;
	padding: 2rem;
	border: 1px solid #e6e6e6;
}
