/*
 * Structural utilities.
 *
 * Only what the theme's own PHP templates need in order to be readable without
 * Elementor Pro. On a Theme Builder project almost none of this renders,
 * because Elementor supplies the header, the footer and the templates.
 *
 * No colours, no typography. Widths, flow and alignment only.
 */

.enmtorres-container {
	width: 100%;
	max-width: var(--enm-container-max);
	margin-inline: auto;
	padding-inline: var(--enm-gutter);
}

.enmtorres-container--wide {
	max-width: var(--enm-container-wide);
}

/* Header and footer fallbacks. */

.enmtorres-header__inner,
.enmtorres-footer__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: var(--enm-gutter);
	padding-block: var(--enm-gutter);
}

.enmtorres-nav__list,
.enmtorres-footer__list {
	display: flex;
	flex-wrap: wrap;
	gap: var(--enm-gutter);
	margin: 0;
	padding: 0;
	list-style: none;
}

/* Content flow. */

.enmtorres-main {
	display: block;
}

.enmtorres-entry + .enmtorres-entry {
	margin-block-start: calc(var(--enm-gutter) * 2);
}

.enmtorres-entry__thumbnail img {
	width: 100%;
}

/* Archive grid. Auto-fill rather than a fixed column count, so it adapts
   without the theme deciding how many columns a project wants. */
.enmtorres-archive__list {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(min(100%, 20rem), 1fr));
	gap: calc(var(--enm-gutter) * 1.5);
}

.enmtorres-archive__list .enmtorres-entry + .enmtorres-entry {
	margin-block-start: 0;
}

/* Canvas template: no chrome at all. */
.enmtorres-canvas .enmtorres-canvas__content {
	display: block;
}

/* Search form fallback. */
.enmtorres-search {
	display: flex;
	flex-wrap: wrap;
	gap: calc(var(--enm-gutter) / 2);
}

.enmtorres-search__field {
	flex: 1 1 12rem;
	min-width: 0;
}
