/*	–––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––
	CORE/HERO-BANNER/CLASSES.CSS
	––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––––– */

/**
 * VISIOFRAMEWORK
 * This file is part of VISIOFRAMEWORK.
 * @package		visioframework
 * @author		Agência Visio <contato@agenciavisio.com.br>
 * @copyright	Copyright (c) 2023-present. M. Souza & Souza LTDA. (CNPJ: 21.284.748/0001-33). All rights reserved.
 * @license		Proprietary
 * @link		https://www.agenciavisio.com.br
 */

/* CLS-baseline for the topbar/navbar overlay trick: the script draw() writes before the
   banner puts the measured topbar + navbar height in these vars, so the wrapper's margin and
   the container's padding are right from the first frame. Tablet: 0 until measured. */

.hero-banner--wrapper.platform-mobile {
	margin-top: var(--hero-overlay-offset-mobile);
}

.hero-banner--wrapper.platform-mobile .hero-banner--container {
	padding-top: calc(-1 * var(--hero-overlay-offset-mobile));
}

.hero-banner--wrapper.platform-tablet {
	margin-top: var(--hero-overlay-offset-tablet);
}

.hero-banner--wrapper.platform-tablet .hero-banner--container {
	padding-top: calc(-1 * var(--hero-overlay-offset-tablet));
}

.hero-banner--wrapper.platform-desktop {
	margin-top: var(--hero-overlay-offset-desktop);
}

.hero-banner--wrapper.platform-desktop .hero-banner--container {
	padding-top: calc(-1 * var(--hero-overlay-offset-desktop));
}

/*	The image is height-driven (h-100 w-auto), so its rendered width is
	`banner height × image aspect`. Art narrower than that leaves the box
	uncovered at the sides: a 1:1 mobile banner at 40vh would need a phone
	taller than 2.5× its width to ever reach full width. min-width sets a
	floor without touching the height-driven sizing, and object-fit: cover,
	already on the element, does the cropping. */
.hero-banner--image {
	min-width: 100%;
}

/*	Only the height-driven default (w-auto) wants that floor: min-width beats width,
	so it would silently override a declared width___image. */
.hero-banner--image:not(.w-auto) {
	min-width: 0;
}

/*	The glow trade in style/classes.css uncrops any .box holding one — and this box
	holds the banner art, whose fractional last row then escapes as a hairline under
	it. Cropping the art layer restores that crop and leaves the glow uncropped. */
.hero-banner--images {
	border-radius	: inherit;		/* an uncropped box no longer rounds the corners */
	overflow		: hidden;
}
