*,
*::before,
*::after {
	box-sizing: border-box;
}

:focus-visible {
	outline: var(--wp--custom--focus--width, 2px) solid var(--wp--custom--focus--color, currentColor);
	outline-offset: var(--wp--custom--focus--offset, 2px);
}

.wp-element-button {
	transition: background-color var(--wp--custom--transition-duration, 200ms) ease;
}

.skip-link {
	position: absolute;
	top: -100%;
	left: var(--wp--preset--spacing--sm, 0.75rem);
	z-index: 100000;
	padding: var(--wp--preset--spacing--sm, 0.75rem) var(--wp--preset--spacing--md, 1.5rem);
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--contrast, #221d00);
	border-radius: 6px;
	box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.skip-link:focus-visible {
	top: var(--wp--preset--spacing--sm, 0.75rem);
}

/* Kill the root-level block-gap WP core adds between the header template
   part and #main (:where(.wp-site-blocks) > *) — header/hero should be flush. */
:where(.wp-site-blocks) > #main {
	margin-block-start: 0;
}

.lm-check-list {
	list-style: none;
	padding-left: 0;
	display: flex;
	flex-direction: column;
	gap: var(--wp--preset--spacing--xs, 0.5rem);
}

.lm-check-list li {
	padding-left: 1.75rem;
	position: relative;
}

.lm-check-list li::before {
	content: '';
	position: absolute;
	left: 0;
	top: 0.35em;
	width: 1.1rem;
	height: 1.1rem;
	border-radius: 50%;
	background: var(--wp--preset--color--primary, #009752);
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.2 11.3 3 8.1l1.1-1.1 2.1 2.1 4.7-4.7 1.1 1.1z'/%3E%3C/svg%3E") center / 65% no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath fill='%23fff' d='M6.2 11.3 3 8.1l1.1-1.1 2.1 2.1 4.7-4.7 1.1 1.1z'/%3E%3C/svg%3E") center / 65% no-repeat;
}

.lm-icon-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3.5rem;
	height: 3.5rem;
	border-radius: 50%;
}

.lm-icon-badge--primary { background: rgba(0, 151, 82, 0.12); }
.lm-icon-badge--accent { background: rgba(255, 215, 0, 0.22); }
.lm-icon-badge--secondary { background: rgba(50, 200, 75, 0.2); }
.lm-icon-badge--tertiary { background: rgba(71, 20, 50, 0.1); }

.lm-card {
	border-radius: 14px;
	padding: var(--wp--preset--spacing--md, 1.5rem);
	transition: transform var(--wp--custom--transition-duration, 200ms) ease, box-shadow var(--wp--custom--transition-duration, 200ms) ease;
	box-shadow: 0 1px 2px rgba(34, 29, 0, 0.04), 0 8px 24px rgba(34, 29, 0, 0.07);
}

.lm-avatar-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.75rem;
	height: 2.75rem;
	flex: 0 0 auto;
	border-radius: 50%;
	background: var(--wp--preset--color--accent, #ffd700);
	color: var(--wp--preset--color--contrast, #221d00);
	font-weight: 700;
}

.lm-card:hover {
	transform: translateY(-4px);
	box-shadow: 0 4px 8px rgba(34, 29, 0, 0.06), 0 16px 32px rgba(34, 29, 0, 0.1);
}

/* Header: a thin top bar (opening-status badge, right-aligned) above the
   main row (logo, nav, CTA). Sticky lives on the <header> template-part
   wrapper (child of .wp-site-blocks), not on .lm-header itself — .lm-header
   is that wrapper's only child, so its own box is exactly as tall as the
   header, leaving no room to stick against. */

.wp-site-blocks > header {
	position: sticky;
	top: var(--wp-admin--admin-bar--height, 0px);
	z-index: 30;
}

.lm-header-top {
	padding-top: 0.4rem;
	padding-bottom: 0.3rem;
	border-bottom: 1px solid var(--wp--preset--color--primary-hover, #007828);
}

.lm-header-row {
	padding-top: var(--wp--preset--spacing--sm, 0.75rem);
	padding-bottom: var(--wp--preset--spacing--sm, 0.75rem);
}

.lm-header-actions {
	gap: var(--wp--preset--spacing--sm, 0.75rem);
}

.lm-logo-mark {
	display: inline-flex;
	flex-direction: column;
	align-items: center;
	gap: 0.15rem;
	text-decoration: none;
	color: inherit;
}

.lm-logo-image {
	height: 2.8rem;
	width: auto;
}

.lm-logo-text__tagline {
	font-size: 0.7rem;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--wp--preset--color--primary-dark, #005c32);
}

.lm-header-address {
	font-style: normal;
	font-size: 0.8rem;
}

/* Open status: the badge itself is a solid-colored pill by state (see
   open-status-frontend.css) and links to the opening-hours section —
   scroll-padding-top (below) keeps the sticky header from covering the
   section once it's scrolled into view. */

.lm-open-status__next {
	padding-left: 0.5rem;
	/* currentColor, not a fixed color: text is dark on the green/orange
	   states but white on the red one, so the divider must follow suit. */
	border-left: 1px solid color-mix(in srgb, currentColor 35%, transparent);
}

@media (max-width: 600px) {
	.lm-open-status {
		font-size: 0.8rem;
	}

	/* No room for "Chiude alle 19:00" next to the address on a phone-width
	   row: swap it for a compact "?" hint. The pill still links to the
	   hours section either way, and the full label ("Aperto ora") plus the
	   screen-reader-only description stay intact for assistive tech. */
	.lm-open-status__next {
		display: none;
	}

	.lm-open-status::after {
		content: "?";
		display: inline-flex;
		align-items: center;
		justify-content: center;
		flex: 0 0 auto;
		width: 1.1rem;
		height: 1.1rem;
		border-radius: 50%;
		background: rgba(0, 0, 0, 0.15);
		font-size: 0.7rem;
		font-weight: 700;
	}

	/* Header: force the address+status row and the logo/nav/CTA row to
	   stay on one line each instead of wrapping, shrinking whatever needs
	   to shrink to make room. */
	.lm-header-top-row,
	.lm-header-main-row {
		flex-wrap: nowrap;
		gap: var(--wp--preset--spacing--sm, 0.75rem);
	}

	.lm-header-address {
		flex: 1 1 auto;
		min-width: 0;
		overflow: hidden;
		text-overflow: ellipsis;
		white-space: nowrap;
	}

	.lm-status-pill {
		flex: 0 0 auto;
	}

	.lm-logo-image {
		height: 2rem;
	}

	.lm-logo-text__tagline {
		font-size: 0.55rem;
	}

	.lm-header-actions .wp-block-button__link {
		padding-left: var(--wp--preset--spacing--sm, 0.75rem);
		padding-right: var(--wp--preset--spacing--sm, 0.75rem);
		font-size: 0.85rem;
	}
}

html {
	scroll-padding-top: 7.5rem;
}

.screen-reader-text {
	position: absolute;
	width: 1px;
	height: 1px;
	overflow: hidden;
	clip-path: inset(50%);
	white-space: nowrap;
}

/* Hero */

.lm-hero {
	position: relative;
	padding-top: var(--wp--preset--spacing--xl);
	padding-bottom: 5.5rem !important;
	overflow: hidden;
}

/* Full-height photo on the right edge of the hero, behind the boxed text
   column (which gets position/z-index below to sit in front of it). A real
   Image block (figure > img), so the photo is replaceable from the editor
   like any other image. */
.lm-hero-bg-image {
	position: absolute !important;
	top: 0;
	right: 0;
	height: 100%;
	width: 50%;
	z-index: 0;
	overflow: hidden;
	margin: 0 !important;
}

.lm-hero-bg-image img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: left center;
}

.lm-hero .lm-boxed {
	position: relative;
	z-index: 1;
	display: flex;
	align-items: center;
	min-height: 36rem;
}

/* Compact variant (hero-ridotto pattern, internal pages): same look, half
   the height — top padding is left as-is (still needs to clear the header),
   only the bottom padding and the boxed content's min-height are halved.
   Declared before the mobile media query below so its own min-height:0
   reset (which also matches .lm-hero-compact, since it's a .lm-hero too)
   still wins on small screens. */
.lm-hero-compact {
	padding-bottom: 2.75rem !important;
}

.lm-hero-compact .lm-boxed {
	min-height: 18rem;
}

@media (max-width: 781px) {
	.lm-hero-bg-image {
		display: none;
	}

	.lm-hero .lm-boxed {
		min-height: 0;
	}
}

/* Secondary CTA style: green fill, accent (yellow) border — used alongside
   the default solid-accent button where a lower-emphasis action is needed. */
.lm-btn-outline-accent .wp-block-button__link {
	background-color: var(--wp--preset--color--primary-dark, #007828);
	color: var(--wp--preset--color--base, #fff);
	box-shadow: inset 0 0 0 2px var(--wp--preset--color--base, #ffd700);
}

.lm-btn-outline-accent .wp-block-button__link:hover {
	background-color: var(--wp--preset--color--primary, #005c32);
}

/* Reusable decorative photo frame (hero, chi-siamo, spotlight, ...) */

.lm-photo-frame {
	position: relative;
	padding: 1.5rem;
}

.lm-photo-placeholder {
	position: relative;
	z-index: 1;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	aspect-ratio: 4 / 5;
	background: var(--wp--preset--color--base, #fff);
	color: var(--wp--preset--color--tertiary, #471432);
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
	animation: lm-blob-morph 10s linear infinite alternate forwards;
}

@keyframes lm-blob-morph {
	0%, 100% { border-radius: 63% 37% 54% 46% / 55% 48% 52% 45%; }
	14% { border-radius: 40% 60% 54% 46% / 49% 60% 40% 51%; }
	28% { border-radius: 54% 46% 38% 62% / 49% 70% 30% 51%; }
	42% { border-radius: 61% 39% 55% 45% / 61% 38% 62% 39%; }
	56% { border-radius: 61% 39% 67% 33% / 70% 50% 50% 30%; }
	70% { border-radius: 50% 50% 34% 66% / 56% 68% 32% 44%; }
	84% { border-radius: 46% 54% 50% 50% / 35% 61% 39% 65%; }
}

.lm-photo-placeholder span {
	font-size: 0.75rem;
	font-weight: 600;
	opacity: 0.7;
}

/* Same organic "blob" shape as .lm-photo-placeholder, but sized to hold a
   real photo (clipped + filled) instead of an icon + caption. */
.lm-photo-blob {
	position: relative;
	z-index: 1;
	overflow: hidden;
	aspect-ratio: 4 / 5;
	box-shadow: 0 20px 48px rgba(0, 0, 0, 0.25);
	animation: lm-blob-morph 10s linear infinite alternate forwards;
}

.lm-photo-blob img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

/* Smaller photo overlapping the main one, bottom-right (chi-siamo "duo"
   treatment) — same idea as .lm-photo-placeholder--secondary. */
.lm-photo-blob--secondary {
	position: absolute !important;
	z-index: 2;
	width: 55%;
	aspect-ratio: 1;
	right: -1rem;
	bottom: -2rem;
	animation-delay: -3s;
	border: 6px solid var(--wp--preset--color--base, #fff);
}

.lm-highlight {
	color: var(--wp--preset--color--accent, #ffd700);
}

/* Checklist grid (2 columns on wider screens) */

.lm-check-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 0.5rem 1.5rem;
}

@media (max-width: 600px) {
	.lm-check-grid {
		grid-template-columns: 1fr;
	}
}

/* Book-stack illustration + badge (spotlight section) */

.lm-book-stack-frame {
	position: relative;
	padding: 1.5rem;
}

.lm-book-stack-badge {
	position: absolute;
	top: 0;
	right: 0.5rem;
	z-index: 2;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 4.5rem;
	height: 4.5rem;
	border-radius: 50%;
	background: var(--wp--preset--color--accent, #ffd700);
	color: var(--wp--preset--color--contrast, #221d00);
	font-size: 0.7rem;
	font-weight: 700;
	text-align: center;
	line-height: 1.15;
	box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
}

/* Card row overlapping the hero's bottom edge */

.lm-overlap-cards {
	margin-top: -4.5rem !important;
	padding-bottom: var(--wp--preset--spacing--xl);
	position: relative;
	z-index: 2;
}

/* Overrides .lm-boxed's horizontal padding (shared utility, used elsewhere
   too) — the compound selector keeps this scoped to this one pattern. */
.lm-overlap-cards.lm-boxed {
	padding-left: 0;
	padding-right: 0;
}

/* Layout utilities — replace ad-hoc inline block styles so all values live here */

.lm-section-y {
	padding-top: var(--wp--preset--spacing--xl);
	padding-bottom: var(--wp--preset--spacing--xl);
}

.lm-boxed {
	padding-right: var(--wp--preset--spacing--md);
	padding-left: var(--wp--preset--spacing--md);
}

.lm-eyebrow {
	text-transform: uppercase;
	letter-spacing: 0.08em;
	font-weight: 700;
}

.lm-icon-title {
	margin-top: var(--wp--preset--spacing--sm);
	margin-bottom: var(--wp--preset--spacing--2xs);
}

.lm-inline-cta {
	margin-top: var(--wp--preset--spacing--sm);
	font-weight: 700;
}

.lm-testimonial-author {
	font-weight: 700;
}

.lm-mt-sm {
	margin-top: var(--wp--preset--spacing--sm);
}

.lm-mt-md {
	margin-top: var(--wp--preset--spacing--md);
}

.lm-col-38 { flex-basis: 38%; }
.lm-col-42 { flex-basis: 42%; }
.lm-col-45 { flex-basis: 45%; }
.lm-col-55 { flex-basis: 55%; }
.lm-col-58 { flex-basis: 58%; }
.lm-col-62 { flex-basis: 62%; }

/* Two overlapping photo placeholders (chi-siamo "duo" treatment) */

.lm-photo-frame--duo {
	padding-bottom: 3rem;
	padding-right: 1.5rem;
}

.lm-photo-placeholder--secondary {
	position: absolute !important;
	z-index: 2;
	width: 55%;
	aspect-ratio: 1;
	right: -1rem;
	bottom: -2rem;
	animation-delay: -3s;
	border: 6px solid var(--wp--preset--color--base, #fff);
}

/* Card colour variants: coloured border always, coloured tint fill on hover.
   Text stays the default dark colour throughout — a tint (not a solid fill)
   keeps every variant comfortably accessible without per-colour text swaps. */

.lm-card--variant {
	border: 2px solid transparent;
	transition: background-color var(--wp--custom--transition-duration, 200ms) ease, border-color var(--wp--custom--transition-duration, 200ms) ease, transform var(--wp--custom--transition-duration, 200ms) ease;
}

.lm-card--variant.lm-card:hover {
	transform: none;
}

.lm-card--primary { border-color: var(--wp--preset--color--primary, #009752); }
.lm-card--accent { border-color: var(--wp--preset--color--accent, #ffd700); }
.lm-card--secondary { border-color: var(--wp--preset--color--secondary, #32c84b); }
.lm-card--tertiary { border-color: var(--wp--preset--color--tertiary, #471432); }

.lm-card--primary:hover { background: rgba(0, 151, 82, 0.1); }
.lm-card--accent:hover { background: rgba(255, 215, 0, 0.16); }
.lm-card--secondary:hover { background: rgba(50, 200, 75, 0.14); }
.lm-card--tertiary:hover { background: rgba(71, 20, 50, 0.08); }

/* Footer */

.lm-footer-heading {
	position: relative;
	padding-bottom: 0.65rem;
	margin-bottom: 1rem;
	font-weight: 700;
}

.lm-footer-heading::after {
	content: '';
	position: absolute;
	left: 0;
	bottom: 0;
	width: 40px;
	height: 2px;
	background: var(--wp--preset--color--accent, #ffd700);
}

.lm-footer-links {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	flex-direction: column;
	gap: 0.6rem;
}

/* The theme's global link color is tertiary (plum) — same as this footer's
   own background, so links need an explicit color here or they vanish. */
.lm-footer-links a {
	color: var(--wp--preset--color--base, #fff);
}

.lm-social-row {
	list-style: none;
	margin: 0;
	padding: 0;
	display: flex;
	gap: 0.5rem;
}

.lm-social-row a {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.12);
	color: var(--wp--preset--color--base, #fff);
	transition: background-color var(--wp--custom--transition-duration, 200ms) ease;
}

.lm-social-row a:hover {
	background: var(--wp--preset--color--accent, #ffd700);
	color: var(--wp--preset--color--contrast, #221d00);
}

.lm-copyright-bar {
	margin-top: 3rem;
	border-top: 1px solid rgba(255, 255, 255, 0.14);
	text-align: center;
	padding-top: 1.5rem;
}

/* Contatti rapidi (telefono + email, ciascuno con icona) */

.lm-contact-row {
	column-gap: var(--wp--preset--spacing--lg, 2.5rem);
	row-gap: var(--wp--preset--spacing--sm, 0.75rem);
}

.lm-contact-item {
	align-items: center;
	gap: 0.6rem;
}

.lm-contact-icon {
	display: inline-flex;
	flex: 0 0 auto;
}

/* Blog / Novità cards */

.lm-blog-card {
	overflow: hidden;
}

.lm-blog-card__image {
	display: block;
	width: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	border-radius: 10px;
	margin-bottom: var(--wp--preset--spacing--sm, 0.75rem);
}

.lm-blog-card__meta {
	font-size: 0.8rem;
	color: var(--wp--preset--color--tertiary, #471432);
	margin-bottom: var(--wp--preset--spacing--2xs, 0.25rem);
}

/* Opening hours homepage section */

.lm-hours-panel {
	background: var(--wp--preset--color--base, #fff);
	border-radius: 14px;
	box-shadow: 0 1px 2px rgba(34, 29, 0, 0.04), 0 8px 24px rgba(34, 29, 0, 0.07);
	padding: var(--wp--preset--spacing--md, 1.5rem);
}

@media (prefers-reduced-motion: reduce) {
	:root {
		--wp--custom--transition-duration: 0ms;
	}

	*,
	*::before,
	*::after {
		animation-duration: 0.001ms !important;
		animation-iteration-count: 1 !important;
		transition-duration: 0.001ms !important;
		scroll-behavior: auto !important;
	}
}
