/**
 * Homepage hero — grafico animato SVG.
 *
 * @package GDS-Fullcreative
 */

.gds-home-section--hero {
	overflow: visible;
}

.gds-home-section--hero .gds-hero__graphic {
	justify-content: flex-end;
}

.gds-home-section--hero .gds-hero__graphic-image,
.gds-home-section--hero .gds-hero__graphic-svg-wrap {
	display: block;
	width: min(100%, 712px);
	height: auto;
	aspect-ratio: 550 / 377;
	max-height: none;
	margin-right: 0;
	margin-bottom: 48px;
	border: none;
	outline: none;
	background: transparent;
}

.gds-home-section--hero .gds-hero__graphic-image {
	object-fit: contain;
}

.gds-home-section--hero .gds-hero__graphic-svg-wrap svg {
	display: block;
	width: 100%;
	height: auto;
	overflow: visible;
}

/* Niente flash del placeholder img / bounding box al reload. */
html.gds-anim-js .gds-home-section--hero .gds-hero__graphic-image:not(.gds-svg-ready),
html.gds-anim-js .gds-home-section--hero .gds-hero__graphic-svg-wrap:not(.gds-svg-ready) {
	opacity: 0;
	visibility: hidden;
}

/* Da 1280px in giù la hero è impilata: grafico full-width container, allineato a sinistra. */
@media (max-width: 1280px) {
	.gds-home-section--hero .gds-hero__graphic {
		justify-content: flex-start;
	}

	.gds-home-section--hero .gds-hero__graphic-image,
	.gds-home-section--hero .gds-hero__graphic-svg-wrap {
		width: 100%;
		max-width: none;
		margin-right: 0;
		margin-bottom: 0;
	}
}

@media (prefers-reduced-motion: reduce) {
	.gds-home-section--hero .gds-hero__graphic-image,
	.gds-home-section--hero .gds-hero__graphic-svg-wrap {
		opacity: 1 !important;
		visibility: visible !important;
		transform: none !important;
	}
}
