/* AS Merate Atletica: the few rules theme.json cannot express. */

:root {
	--asm-radius: 6px;
	--asm-lane-line: rgba(255, 255, 255, 0.45);
}

/* Header ---------------------------------------------------------------- */
.asm-header {
	border-bottom: 1px solid var(--wp--preset--color--linea);
	background: var(--wp--preset--color--bianco);
}
.asm-brand {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	text-decoration: none;
	color: var(--wp--preset--color--blu);
	font-family: var(--wp--preset--font-family--saira);
	font-weight: 800;
	font-size: 1.625rem;
	line-height: 1;
}
.asm-brand img {
	width: 52px;
	height: 52px;
}
.asm-brand:hover {
	color: var(--wp--preset--color--inchiostro);
}
.asm-header .wp-block-navigation a {
	text-decoration: none;
}
.asm-header .wp-block-navigation .current-menu-item > a,
.asm-header .wp-block-navigation a[aria-current="page"] {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--giallo);
	text-decoration-thickness: 3px;
	text-underline-offset: 8px;
}
/* Only the look: WordPress decides when the menu button is shown. */
.asm-header .wp-block-navigation__responsive-container-open,
.asm-header .wp-block-navigation__responsive-container-close {
	width: 48px;
	height: 48px;
	border: 2px solid var(--wp--preset--color--blu);
	border-radius: 999px;
	color: var(--wp--preset--color--blu);
	justify-content: center;
	align-items: center;
}
.asm-header .wp-block-navigation__responsive-container.is-menu-open {
	padding: 1.5rem;
	font-size: 1.375rem;
}

/* Lanes: a running track behind a blue section ---------------------------- */
.is-style-corsie {
	background-color: var(--wp--preset--color--blu);
	background-image: repeating-linear-gradient(
		to bottom,
		transparent 0,
		transparent 86px,
		rgba(255, 255, 255, 0.14) 86px,
		rgba(255, 255, 255, 0.14) 88px
	);
	color: var(--wp--preset--color--bianco);
}
.is-style-corsie :where(h1, h2, h3, p, a:not(.wp-element-button)) {
	color: inherit;
}
.is-style-corsie .asm-muted {
	color: var(--wp--preset--color--chiaro);
}

/* Buttons --------------------------------------------------------------- */
.wp-block-button.is-style-bordo .wp-block-button__link {
	background: transparent;
	color: currentColor;
	border: 2px solid currentColor;
}
.wp-block-button.is-style-bordo .wp-block-button__link:hover {
	background: var(--wp--preset--color--nebbia);
	color: var(--wp--preset--color--blu);
}
.is-style-corsie .wp-block-button.is-style-bordo .wp-block-button__link {
	color: var(--wp--preset--color--bianco);
}
.is-style-corsie .wp-block-button.is-style-bordo .wp-block-button__link:hover {
	background: rgba(255, 255, 255, 0.12);
	color: var(--wp--preset--color--bianco);
}
.wp-element-button {
	min-height: 48px;
}

/* Category chips -------------------------------------------------------- */
.wp-block-post-terms.is-style-chips,
.wp-block-categories.is-style-chips {
	display: flex;
	flex-wrap: wrap;
	gap: 0.5rem;
	list-style: none;
	padding: 0;
	margin: 0;
	font-size: 0.9375rem;
	font-weight: 700;
}
.wp-block-post-terms.is-style-chips .wp-block-post-terms__separator {
	display: none;
}
.wp-block-post-terms.is-style-chips a,
.wp-block-categories.is-style-chips a {
	display: inline-block;
	padding: 0.25rem 0.8rem;
	border-radius: 999px;
	background: var(--wp--preset--color--nebbia);
	color: var(--wp--preset--color--blu);
	text-decoration: none;
}
.has-nebbia-background-color .wp-block-post-terms.is-style-chips a {
	background: var(--wp--preset--color--bianco);
}
.wp-block-categories.is-style-chips a {
	min-height: 44px;
	display: inline-flex;
	align-items: center;
	padding: 0.25rem 1rem;
}
.wp-block-categories.is-style-chips .current-cat a,
.wp-block-post-terms.is-style-chips a:hover,
.wp-block-categories.is-style-chips a:hover {
	background: var(--wp--preset--color--blu);
	color: var(--wp--preset--color--bianco);
}

/* Headings -------------------------------------------------------------- */
/* A short yellow bar under the heading; the heading stays a normal block so it lines up with the text. */
.wp-block-heading.is-style-sottolineato::after {
	content: "";
	display: block;
	width: 3.5rem;
	height: 4px;
	margin-top: 0.5rem;
	background: var(--wp--preset--color--giallo);
}
.entry-content h2.wp-block-heading {
	font-size: clamp(2rem, 4vw, 2.5rem);
}

/* News cards ------------------------------------------------------------ */
.asm-card .wp-block-post-featured-image {
	width: 100%;
	margin: 0;
}
/* Many covers are flyers: keep their headline (the top) in the crop. */
.asm-card .wp-block-post-featured-image img {
	background: var(--wp--preset--color--bianco);
	object-position: top;
}
.asm-card > * + * {
	margin-top: 0.875rem;
}
.asm-card .wp-block-post-title a:hover {
	text-decoration: underline;
	text-decoration-color: var(--wp--preset--color--giallo);
	text-decoration-thickness: 3px;
}
.asm-card .wp-block-post-excerpt {
	color: var(--wp--preset--color--ardesia);
}
.asm-card .wp-block-post-excerpt__more-text {
	display: none;
}

/* Article body ---------------------------------------------------------- */
/* Article lists only; the club blocks (asm-*) lay out their own lists. */
.entry-content :where(ul, ol):not([class*="asm-"]) {
	padding-left: 1.4rem;
}
.entry-content :where(ul, ol):not([class*="asm-"]) > li + li {
	margin-top: 0.6rem;
}
.entry-content li ul {
	margin-top: 0.6rem;
}

/* Tall photos (old portraits, flyers) must not fill a whole screen. */
.entry-content .wp-block-image:not(.alignwide):not(.alignfull) img {
	max-height: min(75vh, 640px);
	width: auto !important; /* the lightbox wrapper forces 100% and would stretch portraits */
	max-width: 100%;
	object-fit: contain;
}

/* Previous / next ------------------------------------------------------- */
.asm-postnav .wp-block-post-navigation-link a {
	font-family: var(--wp--preset--font-family--saira);
	font-weight: 700;
	font-size: 1.75rem;
	line-height: 1.1;
	text-decoration: none;
}
.asm-postnav .post-navigation-link__label {
	display: block;
	font-family: var(--wp--preset--font-family--atkinson);
	font-weight: 400;
	font-size: 1rem;
	color: var(--wp--preset--color--ardesia);
}

/* Footer ---------------------------------------------------------------- */
.asm-footer a {
	color: var(--wp--preset--color--bianco);
}
.asm-footer a:hover {
	color: var(--wp--preset--color--giallo);
}
.asm-footer .asm-footer-legal a {
	color: var(--wp--preset--color--chiaro);
}

/* Utilities ------------------------------------------------------------- */
.asm-muted {
	color: var(--wp--preset--color--ardesia);
}
.wp-block-image figcaption,
.wp-element-caption {
	text-align: left;
}
img {
	height: auto;
}

@media (prefers-reduced-motion: reduce) {
	* {
		scroll-behavior: auto !important;
		transition: none !important;
		animation: none !important;
	}
}
