/* ==========================================================================
   Lee's page blocks — 3.2.0
   Loaded on the site and in the editor. Mobile first.
   Every color/size comes from a variable set in
   Customizer → Page Blocks (see lsc_pb_style_css()); the values after the
   commas are the defaults.
   ========================================================================== */

:root {
	--lsc-pb-teal: #064750;
	--lsc-pb-pink: #bb4c7f;
	--lsc-pb-ink: #1a1a1a;
}

/* --- Shared ------------------------------------------------------------ */
.lsc-monthly,
.lsc-cards,
.lsc-circles {
	box-sizing: border-box;
	padding: 2rem 1rem;
	scroll-margin-top: 90px; /* clears the sticky header when jumping */
}

.lsc-cards,
.lsc-circles {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
}

.lsc-pb-heading {
	margin: 0 0 0.5rem;
	text-align: center;
	font-size: 1.6rem;
	line-height: 1.2;
	color: var(--lsc-heading-color, var(--lsc-pb-ink));
}

.lsc-pb-text {
	max-width: 36rem;
	margin: 0 auto 1.25rem;
	text-align: center;
}

.lsc-pb-eyebrow,
.lsc-hero-eyebrow {
	margin: 0;
	font-size: 0.8rem;
	font-weight: 600;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--lsc-eyebrow-color, var(--lsc-pb-pink));
}

.lsc-pb-button {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-height: 48px;
	padding: 0 1.6rem;
	border-radius: var(--lsc-button-radius, 999px);
	background: var(--lsc-button-bg, var(--lsc-pb-pink));
	color: var(--lsc-button-text, #fff);
	font-weight: 600;
	text-decoration: none;
}

.lsc-pb-button:hover,
.lsc-pb-button:focus-visible {
	background: var(--lsc-button-hover-bg, var(--lsc-pb-teal));
	color: var(--lsc-button-text, #fff);
}

.lsc-pb-hint {
	padding: 1rem;
	border: 1px dashed #8c8f94;
	color: #646970;
	text-align: center;
}

.lsc-pb-noimg {
	display: block;
	width: 100%;
	aspect-ratio: 4 / 3;
	background: #ece6dc;
}

/* Background choice made per block in the editor; colors set in the Customizer. */
.lsc-bg--cream {
	background: var(--lsc-bg-cream, #f7f2ea);
}

.lsc-bg--teal {
	background: var(--lsc-bg-teal, var(--lsc-pb-teal));
	color: var(--lsc-bg-teal-text, #fff);
}

.lsc-bg--teal .lsc-pb-heading,
.lsc-bg--teal .lsc-monthly__title {
	color: var(--lsc-bg-teal-text, #fff);
}

/* Full-width blocks with a background keep their content centered. */
.lsc-monthly.alignfull,
.lsc-cards.alignfull,
.lsc-circles.alignfull {
	max-width: none;
	padding-left: max(1rem, calc((100% - 1200px) / 2));
	padding-right: max(1rem, calc((100% - 1200px) / 2));
}

/* --- Hero (core Cover, "Supper Club hero" style) ------------------------ */
/* Phones: photo on top, white card below overlapping it. */
.wp-block-cover.is-style-lsc-hero {
	display: block;
	min-height: 0 !important;
	padding: 0 0 1rem;
	background: var(--lsc-bg-cream, #f7f2ea);
}

.wp-block-cover.is-style-lsc-hero .wp-block-cover__image-background {
	position: relative;
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.wp-block-cover.is-style-lsc-hero .wp-block-cover__background {
	display: none;
}

.wp-block-cover.is-style-lsc-hero.is-style-lsc-hero .wp-block-cover__inner-container {
	position: relative;
	z-index: 1;
	width: auto;
	/* !important: core's "content position" rule otherwise resets this margin. */
	margin: -2.5rem 1rem 0 !important;
	padding: 1.5rem 1.25rem 1.75rem;
	background: var(--lsc-hero-card-bg, #fff);
	color: var(--lsc-pb-ink);
	text-align: center;
	box-shadow: 0 6px 24px rgba(6, 71, 80, 0.12);
}

.wp-block-cover.is-style-lsc-hero.is-style-lsc-hero:not(:has(.wp-block-cover__image-background)) .wp-block-cover__inner-container {
	margin-top: 0 !important;
}

.wp-block-cover.is-style-lsc-hero h1 {
	margin: 0.25rem 0 0.5rem;
	font-size: 2.1rem;
	line-height: 1.1;
	color: var(--lsc-hero-title, var(--lsc-pb-teal));
}

.wp-block-cover.is-style-lsc-hero p {
	margin: 0;
}

/* Intro text under the hero. */
.lsc-intro {
	max-width: 42rem;
	margin: 0 auto;
	padding: 1.5rem 1rem 0.5rem;
	font-size: 1.1rem;
	line-height: 1.7;
}

/* --- Jump links: one swipeable row on phones ----------------------------- */
.lsc-jump ul {
	display: flex;
	gap: 0.5rem;
	margin: 0;
	padding: 1rem;
	list-style: none;
	overflow-x: auto;
	scrollbar-width: none;
}

.lsc-jump ul::-webkit-scrollbar {
	display: none;
}

.lsc-jump a {
	display: inline-flex;
	align-items: center;
	min-height: 44px;
	padding: 0 1.1rem;
	white-space: nowrap;
	border: 1.5px solid var(--lsc-jump-color, var(--lsc-pb-teal));
	border-radius: 999px;
	color: var(--lsc-jump-color, var(--lsc-pb-teal));
	text-decoration: none;
	font-weight: 500;
}

.lsc-jump a:hover,
.lsc-jump a:focus-visible {
	background: var(--lsc-jump-color, var(--lsc-pb-teal));
	color: #fff;
}

/* --- This month's supper club ------------------------------------------- */
.lsc-monthly {
	text-align: center;
}

.lsc-monthly__inner {
	max-width: 1200px;
	margin: 0 auto;
}

.lsc-monthly__title {
	margin: 0.35rem 0 0.5rem;
	font-size: 1.7rem;
	line-height: 1.15;
	color: var(--lsc-monthly-title, var(--lsc-pb-teal));
}

.lsc-monthly__text {
	max-width: 36rem;
	margin: 0 auto 1.25rem;
}

/* 2 across on phones, 4 across on desktop; numbered like a menu. */
.lsc-monthly__courses {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1rem;
	margin: 0;
	padding: 0;
	list-style: none;
	counter-reset: course;
}

.lsc-monthly__course {
	counter-increment: course;
	margin: 0;
}

.lsc-monthly__course a {
	display: block;
	height: 100%;
	overflow: hidden;
	border-radius: var(--lsc-card-radius, 8px);
	background: #fff;
	box-shadow: var(--lsc-card-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
	color: var(--lsc-card-title, var(--lsc-pb-ink));
	text-align: left;
	text-decoration: none;
}

.lsc-monthly__img {
	position: relative;
	display: block;
}

.lsc-monthly__img::after {
	content: counter(course);
	position: absolute;
	top: 0.5rem;
	left: 0.5rem;
	width: 1.9rem;
	height: 1.9rem;
	border-radius: 50%;
	background: var(--lsc-monthly-number-bg, var(--lsc-pb-teal));
	color: #fff;
	font-weight: 600;
	line-height: 1.9rem;
	text-align: center;
}

.lsc-monthly__img img,
.lsc-monthly__img .lsc-pb-noimg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 1 / 1;
	object-fit: cover;
}

.lsc-monthly__name {
	display: block;
	padding: 0.6rem 0.75rem 0.8rem;
	font-family: var(--font-cards, Georgia, serif);
	font-size: 1.1rem;
	line-height: 1.3;
}

.lsc-monthly__cta {
	margin: 1.5rem 0 0;
}

/* --- Cards ------------------------------------------------------------- */
.lsc-cards__list {
	display: grid;
	gap: 1rem;
}

.lsc-cards--grid .lsc-cards__list {
	grid-template-columns: repeat(2, 1fr);
}

.lsc-cards--menu .lsc-cards__list {
	grid-template-columns: 1fr;
	gap: 1.5rem;
}

.lsc-card {
	display: block;
	overflow: hidden;
	border-radius: var(--lsc-card-radius, 8px);
	background: #fff;
	box-shadow: var(--lsc-card-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
	color: var(--lsc-card-title, var(--lsc-pb-ink));
	text-decoration: none;
	transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.lsc-card:hover,
.lsc-card:focus-visible {
	transform: translateY(-3px);
}

.lsc-card__img {
	display: block;
}

.lsc-card__img img,
.lsc-card__img .lsc-pb-noimg {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 4 / 3;
	object-fit: cover;
}

.lsc-cards--menu .lsc-card__img img,
.lsc-cards--menu .lsc-card__img .lsc-pb-noimg {
	aspect-ratio: 16 / 10;
}

.lsc-card__body {
	display: block;
	padding: 0.75rem 0.85rem 0.9rem;
}

.lsc-card__cat {
	display: block;
	margin-bottom: 0.25rem;
	font-size: 0.72rem;
	font-weight: 600;
	letter-spacing: 0.05em;
	text-transform: uppercase;
	color: var(--lsc-card-cat, var(--lsc-pb-teal));
}

.lsc-card__title {
	display: block;
	font-size: 1rem;
	font-weight: 500;
	line-height: 1.35;
}

.lsc-cards--menu .lsc-card__title {
	font-family: var(--font-cards, Georgia, serif);
	font-size: 1.4rem;
	line-height: 1.25;
	color: var(--lsc-menu-title, var(--lsc-pb-teal));
}

.lsc-card__more {
	display: inline-block;
	margin-top: 0.35rem;
	font-weight: 600;
	color: var(--lsc-menu-more, var(--lsc-pb-pink));
}

/* --- Category circles: one swipeable row on phones ---------------------- */
/* Phones: compact rows so recipes appear sooner. */
.lsc-circles {
	padding-top: 1.25rem;
	padding-bottom: 0.75rem;
}

.lsc-circles .lsc-pb-heading {
	font-size: 1.35rem;
	margin-bottom: 0.75rem;
}

.lsc-circles__list {
	display: flex;
	gap: 1rem;
	margin: 0 -1rem;
	padding: 0.25rem 1rem 0.5rem;
	overflow-x: auto;
	scroll-snap-type: x proximity;
	scroll-padding-inline: 1rem; /* snap to the padding, not the screen edge */
	scrollbar-width: none;
}

.lsc-circles__list::-webkit-scrollbar {
	display: none;
}

.lsc-circle {
	flex: none;
	width: var(--lsc-circle-size-mobile, 96px);
	color: var(--lsc-circle-label, var(--lsc-pb-ink));
	text-align: center;
	text-decoration: none;
	scroll-snap-align: start;
}

.lsc-circle__img {
	display: flex;
	align-items: center;
	justify-content: center;
	width: var(--lsc-circle-size-mobile, 96px);
	height: var(--lsc-circle-size-mobile, 96px);
	margin: 0 auto 0.5rem;
	overflow: hidden;
	border-radius: 50%;
	background: #ece6dc;
	transition: transform 0.2s ease;
}

.lsc-circle__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.lsc-circle__letter {
	font-size: 2rem;
	color: #767676;
}

.lsc-circle__name {
	display: block;
	font-size: 0.9rem;
	font-weight: 500;
	line-height: 1.25;
}

.lsc-circle:hover .lsc-circle__img,
.lsc-circle:focus-visible .lsc-circle__img {
	transform: scale(1.06);
}

.lsc-circle:hover .lsc-circle__name,
.lsc-circle:focus-visible .lsc-circle__name {
	color: var(--lsc-circle-label-hover, #bbbb01);
}

/* ==========================================================================
   Tablet and up
   ========================================================================== */
@media (min-width: 700px) {
	.lsc-circles {
		padding-top: 2rem;
		padding-bottom: 1.5rem;
	}

	.lsc-circles .lsc-pb-heading {
		font-size: 1.6rem;
	}

	.lsc-cards--menu .lsc-cards__list {
		grid-template-columns: repeat(2, 1fr);
	}

	.lsc-circles__list {
		flex-wrap: wrap;
		justify-content: center;
		margin: 0;
		padding: 0.25rem 0;
		overflow: visible;
	}

	.lsc-circle,
	.lsc-circle__img {
		width: var(--lsc-circle-size, 140px);
	}

	.lsc-circle__img {
		height: var(--lsc-circle-size, 140px);
	}

	.lsc-jump ul {
		justify-content: center;
	}
}

/* ==========================================================================
   Desktop
   ========================================================================== */
@media (min-width: 1000px) {
	.lsc-monthly,
	.lsc-cards,
	.lsc-circles {
		padding-top: 3.5rem;
		padding-bottom: 3.5rem;
	}

	.lsc-pb-heading {
		font-size: 1.9rem;
	}

	.lsc-monthly__title {
		font-size: 2.3rem;
	}

	.lsc-monthly__courses {
		grid-template-columns: repeat(4, 1fr);
		gap: 1.5rem;
	}

	/* Up to 4 across; fewer cards stay centered instead of hugging the left. */
	.lsc-cards--grid .lsc-cards__list {
		grid-template-columns: repeat(auto-fit, minmax(220px, 272px));
		justify-content: center;
		gap: 1.5rem;
	}

	.lsc-cards--menu .lsc-cards__list {
		grid-template-columns: repeat(3, 1fr);
	}

	/* Hero: photo fills; white box over it, lower left. */
	.wp-block-cover.is-style-lsc-hero {
		display: flex;
		align-items: flex-end;
		min-height: 520px !important;
		padding: 0;
	}

	.wp-block-cover.is-style-lsc-hero .wp-block-cover__image-background {
		position: absolute;
		inset: 0;
		height: 100%;
		aspect-ratio: auto;
	}

	.wp-block-cover.is-style-lsc-hero.is-style-lsc-hero .wp-block-cover__inner-container {
		width: min(34rem, 90%);
		margin: 0 0 3rem max(3rem, calc((100% - 1200px) / 2)) !important;
		padding: 2rem 2.5rem;
		text-align: left;
	}

	.wp-block-cover.is-style-lsc-hero h1 {
		font-size: 3rem;
	}
}

/* --- Landing Page templates ---------------------------------------------- */
/* Plain WordPress content (text, images, groups…) is centered with side
   padding. Theme sections (newsletter, page blocks, homepage sections) set
   their own width, so they're left alone and full-width ones stay full width. */
.lsc-landing > :where(p, h1, h2, h3, h4, h5, h6, ul, ol, blockquote, pre, table,
	.wp-block-group, .wp-block-columns, .wp-block-buttons, .wp-block-image,
	.wp-block-gallery, .wp-block-embed, .wp-block-video, .wp-block-table,
	.wp-block-separator, .wp-block-quote, .wp-block-media-text, .wp-block-search):not(.alignfull):not(.lsc-intro) {
	max-width: 1200px;
	margin-left: auto;
	margin-right: auto;
	padding-left: 1rem;
	padding-right: 1rem;
}

.lsc-landing .lsc-intro p {
	margin: 0;
}

.lsc-landing .lsc-intro p + p {
	margin-top: 1em !important;
}

/* --- All Recipes (search & list) ----------------------------------------- */
.lsc-index {
	box-sizing: border-box;
	max-width: 1200px;
	margin: 0 auto;
	padding: 1.5rem 1rem 2.5rem;
	scroll-margin-top: 90px;
}

.lsc-index__toolbar {
	display: grid;
	grid-template-columns: 1fr auto;
	gap: 0.5rem;
	margin: 0 0 1.25rem;
}

.lsc-index__search {
	grid-column: 1 / -1;
	min-height: 48px;
	padding: 0 1rem;
	border: 1.5px solid #cfc6bb;
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 1rem; /* 16px+ stops iPhones zooming in */
}

.lsc-index__sort {
	min-height: 44px;
	padding: 0 0.75rem;
	border: 1.5px solid #cfc6bb;
	border-radius: 999px;
	background: #fff;
	font: inherit;
	font-size: 1rem;
}

.lsc-index__submit {
	min-height: 44px;
	border: 0;
	cursor: pointer;
}

.lsc-index__status {
	margin: -0.5rem 0 1rem;
	font-size: 0.95rem;
}

.lsc-index__status a {
	margin-left: 0.5rem;
	color: var(--lsc-menu-more, var(--lsc-pb-pink));
}

/* The grid reuses the recipe cards; no extra box around it. */
.lsc-index__grid.lsc-cards {
	padding: 0;
	max-width: none;
}

.lsc-index__pages {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 0.4rem;
	margin-top: 2rem;
}

.lsc-index__pages .page-numbers {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 44px;
	min-height: 44px;
	padding: 0 0.75rem;
	border-radius: 999px;
	background: #fff;
	color: var(--lsc-pb-ink);
	text-decoration: none;
	box-shadow: var(--lsc-card-shadow, 0 2px 8px rgba(0, 0, 0, 0.08));
}

.lsc-index__pages .page-numbers.current,
.lsc-index__pages a.page-numbers:hover,
.lsc-index__pages a.page-numbers:focus-visible {
	background: var(--lsc-button-bg, var(--lsc-pb-pink));
	color: var(--lsc-button-text, #fff);
}

.lsc-index__pages .dots {
	background: none;
	box-shadow: none;
}

@media (min-width: 700px) {
	.lsc-index__toolbar {
		grid-template-columns: 1fr auto auto;
	}

	.lsc-index__search {
		grid-column: auto;
	}
}
