/* LBS Jóladagatal: the Christmas calendar banner under the front page's signature picture.
   Two pictures cut from the banner artwork: the decoration (fir branches, calendar doors, apple; its
   right edge fades out) fitted to the banner's height on the left, over the ornamental texture, which
   covers the rest. The colours belong to the artwork, not to the LBS palette. Below 576px the
   decoration gives way and the text takes the whole width. */

.lbs-jol {
	--lbs-jol-cream: #fffaf0;
	--lbs-jol-red: #b51f28;
	--lbs-jol-red-dark: #941820;
	--lbs-jol-green: #0f4a2f;
	--lbs-jol-deco: min(10rem, 28vw);          /* the decoration's height = the banner's least height; in vw too, so
	                                              enlarged text does not push the text and button off the banner */
	position: relative;
	display: flex;
	align-items: center;
	min-height: var(--lbs-jol-deco);
	padding-block: 1.5rem;
	overflow: hidden;
	color: var(--lbs-jol-cream);
	font-family: Georgia, "Times New Roman", Times, serif;
	background:
		url("jol-decoration.webp") left center / auto var(--lbs-jol-deco) no-repeat,
		linear-gradient(90deg, rgb(0 55 36 / .15), rgb(0 55 36 / .25)),
		url("jol-texture.webp") right center / cover no-repeat,
		var(--lbs-jol-green);
}

/* Flush against the picture above and the section below (beats the theme's ".entry-content > *" spacing). */
.entry-content > .lbs-jol { margin-block: 0; }

.lbs-jol__inner {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	align-items: center;
	gap: 1.75rem;
	width: 100%;
	/* The text lines up with the wide column, but never over the calendar doors. */
	padding-inline-start: max(var(--lbs-gutter, 1.5rem), calc((100% - var(--lbs-wide, 71.25rem)) / 2), calc(var(--lbs-jol-deco) * 1.25));
	padding-inline-end: max(var(--lbs-gutter, 1.5rem), calc((100% - var(--lbs-wide, 71.25rem)) / 2));
}

.lbs-jol__kicker {
	margin: 0 0 .3rem;
	font-size: 1rem;
	line-height: 1.2;
}

.lbs-jol__title {
	margin: 0;
	color: inherit;
	font-family: inherit;
	font-size: clamp(1.5rem, 1rem + 1.6vw, 2.375rem);
	font-weight: 700;
	line-height: 1.1;
}

.lbs-jol__cta {
	display: inline-flex;
	align-items: center;
	gap: .6rem;
	min-height: 2.75rem;
	padding: .85rem 1.4rem;
	border: 1px solid var(--lbs-jol-cream);
	background: var(--lbs-jol-red);
	color: #fff;
	font-size: 1.125rem;
	line-height: 1.2;
	text-decoration: none;
	white-space: nowrap;
	box-shadow: 0 1px 3px rgb(0 0 0 / .3);
	transition: background-color .15s ease, transform .15s ease;
}
.lbs-jol__cta:hover,
.lbs-jol__cta:focus-visible {
	background: var(--lbs-jol-red-dark);
	color: #fff;
}
.lbs-jol__cta:focus-visible {
	outline: var(--lbs-focus-ring, 3px) solid #fff;
	outline-offset: 3px;
}
@media (prefers-reduced-motion: no-preference) {
	.lbs-jol__cta:hover { transform: translateY(-1px); }
}
/* The site's own link arrow (the theme's --lbs-icon-link, as on link cards): the button leads to a page of ours.
   A browser without masks gets the text arrow instead of a white square. */
.lbs-jol__arrow::before { content: '\2192'; }
@supports (mask-image: none) {
	.lbs-jol__arrow {
		flex: none;
		width: 1.2em;
		height: 1.2em;
		margin-top: 0.12em;
		background-color: currentColor;
		mask: var(--lbs-icon-link) center / contain no-repeat;
	}
	.lbs-jol__arrow::before { content: none; }
}

/* Narrower: the button goes under the text. */
@media (max-width: 991.98px) {
	.lbs-jol__inner { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
	.lbs-jol__cta { justify-self: start; max-width: 100%; white-space: normal; }
}

/* Phones: no decoration, the texture alone behind the text. */
@media (max-width: 575.98px) {
	.lbs-jol {
		background:
			linear-gradient(90deg, rgb(0 55 36 / .35), rgb(0 55 36 / .35)),
			url("jol-texture-600.webp") center / cover no-repeat,
			var(--lbs-jol-green);
	}
	.lbs-jol__inner { padding-inline: var(--lbs-gutter-compact, 1rem); }
	.lbs-jol__kicker { font-size: .875rem; }
	.lbs-jol__cta { max-width: 100%; white-space: normal; }
}

/* Backgrounds are not printed: cream text on white paper. */
@media print {
	.lbs-jol { display: none; }
}
