/**
 * Single recipe template.
 *
 * Colors and fonts come from Elementor Site Settings (global kit variables),
 * so changes there carry through. Hex values are fallbacks only.
 *
 * Every selector is scoped under .hc-recipe on purpose: Elementor's kit styles
 * (.elementor-kit-N h1, .elementor-kit-N a) and the Hello theme reset
 * (table, button) would otherwise override these rules.
 */

.hc-recipe {
	/* Brand tokens (Elementor globals) */
	--hc-red: var(--e-global-color-primary, #ED2226);
	--hc-text: var(--e-global-color-text, #202020);
	--hc-teal: var(--e-global-color-accent, #81EAE7);
	--hc-blue: var(--e-global-color-70e690e, #003049);
	--hc-font: var(--e-global-typography-text-font-family, "canada-type-gibson"), "Helvetica Neue", Arial, sans-serif;

	/* Layout */
	--hc-gutter: 24px;
	--hc-col: 810px;          /* recipe text column, measured from the Elementor page */
	--hc-container: 1200px;   /* Elementor container width */
	--hc-fyi-wide: 1200px;    /* Option 1 expanded width */
	--hc-radius: 24px;
	--hc-ease: cubic-bezier(.2, .7, .2, 1);

	/* Type */
	--hc-title-size: var(--e-global-typography-secondary-font-size, 70px);
	--hc-title-lh: var(--e-global-typography-secondary-line-height, 80px);
	--hc-section-size: var(--e-global-typography-67ad9a5-font-size, 35px);   /* "Heading" global */
	--hc-section-lh: var(--e-global-typography-67ad9a5-line-height, 40px);
	--hc-small: 15px;         /* body text; 18px on desktop */
	--hc-nutrition: 16px;     /* nutrition table; 20px on desktop */
	--hc-ui: 16px;            /* buttons, servings row; 18px on desktop */

	color: var(--hc-text);
	font-family: var(--hc-font);
	font-weight: 300;
	padding-bottom: 120px;
	overflow-x: clip; /* the full-bleed callout never causes sideways scrolling */
}

@media (min-width: 768px) {
	.hc-recipe { --hc-gutter: 40px; }
}

/* Desktop: 18px minimum text size, 20px nutrition table. */
@media (min-width: 1025px) {
	.hc-recipe {
		--hc-small: 18px;
		--hc-nutrition: 20px;
		--hc-ui: 18px;
	}
}

@media (min-width: 1920px) {
	.hc-recipe { --hc-container: 1640px; }
}

@media (max-width: 767px) {
	.hc-recipe {
		--hc-title-size: 30px;
		--hc-title-lh: 33px;
		padding-bottom: 80px;
	}
}

/* ---------- Hero ---------- */

.hc-recipe .hc-recipe__hero {
	margin: 0;
	height: clamp(200px, 31vw, 500px);
	overflow: hidden;
}

.hc-recipe .hc-recipe__hero-img {
	display: block;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
}

/* ---------- Column ---------- */

.hc-recipe .hc-recipe__col {
	box-sizing: content-box;
	max-width: var(--hc-col);
	margin-inline: auto;
	padding-inline: var(--hc-gutter);
}

/* ---------- Header ---------- */

.hc-recipe .hc-recipe__header {
	padding-top: clamp(40px, 6vw, 100px);
}

.hc-recipe .hc-recipe__cuisine {
	margin: 0 0 12px;
	color: var(--hc-red);
	font-size: var(--hc-small);
	font-weight: 500;
	line-height: 1.4;
}

.hc-recipe .hc-recipe__title {
	margin: 0 0 clamp(32px, 4.5vw, 72px);
	color: var(--hc-text);
	font-family: var(--hc-font);
	font-size: var(--hc-title-size);
	font-weight: 700;
	line-height: var(--hc-title-lh);
}

.hc-recipe .hc-recipe__intro {
	font-size: var(--hc-small);
	line-height: 1.5;
}

.hc-recipe .hc-recipe__intro p { margin: 0 0 12px; }
.hc-recipe .hc-recipe__intro p:last-child { margin-bottom: 0; }

.hc-recipe .hc-recipe__meta {
	display: grid;
	grid-template-columns: 124px 1fr;
	align-items: baseline;
	margin: 20px 0 0;
	padding: 36px 0;
	border-top: 1px solid var(--hc-text);
	border-bottom: 2px solid var(--hc-text);
	font-size: var(--hc-ui);
	line-height: 1.3;
}

.hc-recipe .hc-recipe__meta dt {
	color: var(--hc-red);
	font-weight: 500;
}

.hc-recipe .hc-recipe__meta dd {
	margin: 0;
	font-weight: 500;
}

@media (max-width: 767px) {
	.hc-recipe .hc-recipe__meta {
		grid-template-columns: 90px 1fr;
		padding: 24px 0;
		font-size: 15px;
	}
}

/* ---------- Body: ingredients, callout, directions ---------- */

.hc-recipe .hc-recipe__body {
	display: flex;
	flex-direction: column;
	align-items: stretch;
}

.hc-recipe .hc-recipe__section-title {
	margin: 0 0 40px;
	color: var(--hc-text);
	font-family: var(--hc-font);
	font-size: var(--hc-section-size);
	font-weight: 600;
	line-height: var(--hc-section-lh);
}

.hc-recipe .hc-recipe__panel {
	padding-top: 56px;
}

.hc-recipe .hc-recipe__richtext {
	font-size: var(--hc-small);
	line-height: 1.5;
}

/* h3 sizes come from Site Settings (h3); only spacing is set here. */
.hc-recipe .hc-recipe__richtext h3 {
	margin: 32px 0 20px;
}

.hc-recipe .hc-recipe__richtext > :first-child { margin-top: 0; }

.hc-recipe .hc-recipe__richtext p { margin: 0 0 16px; }

.hc-recipe .hc-recipe__directions ol { padding-left: 1.25em; }

.hc-recipe .hc-recipe__directions li { margin-bottom: 8px; }

/* Tabs: mobile only */
.hc-recipe .hc-recipe__tabs { display: none; }

@media (max-width: 767px) {
	.hc-recipe .hc-recipe__tabs {
		display: flex;
		justify-content: center;
		gap: 24px;
		order: 0;
		padding-top: 32px;
	}

	/* Resets the Hello theme button styles (pink border/background). */
	.hc-recipe .hc-recipe__tabs [role="tab"],
	.hc-recipe .hc-recipe__tabs [role="tab"]:hover,
	.hc-recipe .hc-recipe__tabs [role="tab"]:focus {
		padding: 8px 4px;
		border: 0;
		border-bottom: 2px solid transparent;
		border-radius: 0;
		background: none;
		color: var(--hc-text);
		opacity: .55;
		font-family: var(--hc-font);
		font-size: 14px;
		font-weight: 500;
		cursor: pointer;
	}

	.hc-recipe .hc-recipe__tabs [aria-selected="true"],
	.hc-recipe .hc-recipe__tabs [aria-selected="true"]:hover,
	.hc-recipe .hc-recipe__tabs [aria-selected="true"]:focus {
		border-bottom-color: var(--hc-red);
		opacity: 1;
	}

	.hc-recipe .hc-recipe__panel { padding-top: 24px; }
	.hc-recipe .hc-recipe__panel--ingredients { order: 1; }
	.hc-recipe .hc-recipe__panel--directions { order: 2; }
	.hc-recipe .hc-recipe__panel:not(.is-active) { display: none; }

	/* Callout sits after the tabs, visible on both. */
	.hc-recipe .hc-recipe__body .hc-fyi { order: 3; }
}

/* ---------- Did you know callout ---------- */

.hc-recipe .hc-fyi {
	--hc-fyi-pad: clamp(24px, 4vw, 40px);

	box-sizing: border-box;
	align-self: center;
	width: 100%;
	margin-top: 64px;
	padding: var(--hc-fyi-pad);
	border-radius: var(--hc-radius);
	background: var(--hc-teal);
	color: var(--hc-blue);
	transition: width .7s var(--hc-ease);
}

.hc-recipe .hc-fyi__head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
	margin-bottom: 20px;
}

.hc-recipe .hc-fyi__title {
	margin: 0;
	color: var(--hc-blue);
	font-family: var(--hc-font);
	font-size: clamp(28px, 1.5rem + 1.4vw, 48px);
	font-weight: 700;
	line-height: 1.1;
}

.hc-recipe .hc-fyi__icon {
	flex: none;
	width: 48px;
	height: 48px;
}

@media (min-width: 768px) {
	.hc-recipe .hc-fyi__icon { width: 64px; height: 64px; }
}

@media (min-width: 1025px) {
	.hc-recipe .hc-fyi__icon { width: 80px; height: 80px; }
}

/* The fact reads as the lead; the extended copy sits one step below it. */
.hc-recipe .hc-fyi__fact {
	margin: 0;
	font-size: calc(var(--e-global-typography-99a5d3f-font-size, 22px) * 1.2);
	font-weight: 600;
	line-height: 1.3;
}

.hc-recipe .hc-fyi__extended {
	font-size: var(--e-global-typography-99a5d3f-font-size, 22px);
	font-weight: 500;
	line-height: 1.45;
}

.hc-recipe .hc-fyi__extended p { margin: 0 0 1em; }

.hc-recipe .hc-fyi__extended ul,
.hc-recipe .hc-fyi__extended ol {
	margin: 0 0 1em;
	padding: 0 0 0 1.2em;
}

.hc-recipe .hc-fyi__extended li { margin-bottom: .4em; }

.hc-recipe .hc-fyi__extended strong { font-weight: 700; }

.hc-recipe .hc-fyi__extended > :last-child { margin-bottom: 0; }

.hc-recipe .hc-fyi__more-inner {
	overflow: hidden;
	padding-top: 20px;
}

.hc-recipe .hc-fyi__link {
	display: inline-block;
	color: var(--hc-blue);
	font-size: max(18px, var(--hc-ui));
	font-weight: 500;
	line-height: 1.4;
	text-decoration: underline;
	text-underline-offset: 3px;
}

.hc-recipe .hc-fyi__link:hover { text-decoration-thickness: 2px; }

.hc-recipe .hc-fyi__extended + .hc-fyi__link { margin-top: 24px; }

.hc-recipe .hc-fyi a:focus-visible,
.hc-recipe .hc-fyi__toggle:focus-visible,
.hc-recipe .hc-recipe__tabs [role="tab"]:focus-visible {
	outline: 2px solid var(--hc-blue);
	outline-offset: 3px;
}

/* Collapsing only happens once JS is running (.is-enhanced). */
.hc-recipe .hc-fyi.is-enhanced .hc-fyi__more {
	display: grid;
	grid-template-rows: 0fr;
	visibility: hidden;
	transition: grid-template-rows .6s var(--hc-ease), visibility 0s linear .6s;
}

.hc-recipe .hc-fyi.is-enhanced.is-expanded .hc-fyi__more {
	grid-template-rows: 1fr;
	visibility: visible;
	transition: grid-template-rows .6s var(--hc-ease), visibility 0s linear 0s;
}

.hc-recipe .hc-fyi.is-enhanced .hc-fyi__more-inner { min-height: 0; }

/* Option 1: widens on desktop as it expands. */
@media (min-width: 1025px) {
	.hc-recipe .hc-fyi--option-1.is-expanded {
		width: min(var(--hc-fyi-wide), 100vw - 2 * var(--hc-gutter) - 32px);
	}
}

/*
 * Option 1 on mobile and tablet: grows edge to edge and loses its corners.
 * Side padding grows by the gutter so the text stays where it was.
 */
@media (max-width: 1024px) {
	.hc-recipe .hc-fyi--option-1 {
		transition:
			width .7s var(--hc-ease),
			border-radius .7s var(--hc-ease),
			padding .7s var(--hc-ease);
	}

	.hc-recipe .hc-fyi--option-1.is-expanded {
		width: 100vw;
		border-radius: 0;
		padding-inline: calc(var(--hc-fyi-pad) + var(--hc-gutter));
	}
}

/* Option 2: illustration + button, same width, grows taller. */
.hc-recipe .hc-fyi__illustration {
	flex: none;
	width: clamp(72px, 8vw, 96px);
	height: auto;
	transform-origin: 50% 90%;
}

/* Resets the Hello theme button styles. */
.hc-recipe .hc-fyi__toggle,
.hc-recipe .hc-fyi__toggle:focus {
	display: inline-block;
	margin-top: 24px;
	padding: 12px 24px;
	border: 0;
	border-radius: 999px;
	background: var(--hc-blue);
	color: #fff;
	font-family: var(--hc-font);
	font-size: var(--hc-ui);
	font-weight: 500;
	cursor: pointer;
}

.hc-recipe .hc-fyi__toggle:hover {
	background: var(--hc-text);
	color: #fff;
}

.hc-recipe .hc-fyi:not(.is-enhanced) .hc-fyi__toggle { display: none; }

@media (prefers-reduced-motion: no-preference) {
	.hc-recipe .hc-fyi--option-2.hc-fyi--has-more.is-enhanced:not(.has-interacted) .hc-fyi__illustration {
		animation: hc-wiggle 3s ease-in-out infinite;
	}
}

/* A short wiggle, then a rest, so it draws the eye without buzzing. */
@keyframes hc-wiggle {
	0%, 60%, 100% { transform: rotate(0); }
	66% { transform: rotate(-8deg); }
	72% { transform: rotate(7deg); }
	78% { transform: rotate(-5deg); }
	84% { transform: rotate(3deg); }
	90% { transform: rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
	.hc-recipe .hc-fyi,
	.hc-recipe .hc-fyi.is-enhanced .hc-fyi__more { transition: none; }
}

/* ---------- Nutrition ---------- */

.hc-recipe .hc-recipe__nutrition { padding-top: 96px; }

/* Resets the Hello theme table styles (cell borders, striped rows). */
.hc-recipe .hc-nutrition {
	width: 100%;
	margin: 0;
	border: 0;
	border-top: 1px solid var(--hc-text);
	border-collapse: collapse;
	font-size: var(--hc-nutrition);
}

.hc-recipe .hc-nutrition tr,
.hc-recipe .hc-nutrition tr:hover > td,
.hc-recipe .hc-nutrition tr:hover > th,
.hc-recipe .hc-nutrition th,
.hc-recipe .hc-nutrition td {
	background: transparent;
}

.hc-recipe .hc-nutrition th,
.hc-recipe .hc-nutrition td {
	width: 50%;
	padding: 28px 0;
	border: 0;
	border-bottom: 1px solid var(--hc-text);
	color: var(--hc-text);
	font-size: var(--hc-nutrition);
	text-align: left;
	vertical-align: middle;
	font-weight: 500;
	line-height: 1.3;
}

.hc-recipe .hc-nutrition__row--calories th { color: var(--hc-red); }

.hc-recipe .hc-nutrition__row--calories th,
.hc-recipe .hc-nutrition__row--calories td {
	padding: 38px 0;
	border-bottom-width: 2px;
}

@media (max-width: 767px) {
	.hc-recipe .hc-recipe__nutrition { padding-top: 64px; }

	.hc-recipe .hc-nutrition th,
	.hc-recipe .hc-nutrition td { padding: 20px 0; font-size: 15px; }

	.hc-recipe .hc-nutrition__row--calories th,
	.hc-recipe .hc-nutrition__row--calories td { padding: 26px 0; }
}

/* ---------- Related recipes ---------- */

.hc-recipe .hc-related {
	box-sizing: content-box;
	max-width: var(--hc-container);
	margin: 120px auto 0;
	padding-inline: var(--hc-gutter);
}

.hc-recipe .hc-related__title {
	margin: 0 0 64px;
	color: var(--hc-red);
	font-family: var(--hc-font);
	font-size: var(--e-global-typography-secondary-font-size, 70px);
	font-weight: 700;
	line-height: 1.15;
}

.hc-recipe .hc-related__grid {
	display: grid;
	gap: 48px 24px;
	margin: 0;
	padding: 0;
	list-style: none;
}

@media (min-width: 768px) {
	.hc-recipe .hc-related__grid { grid-template-columns: repeat(3, 1fr); }
}

.hc-recipe .hc-related__link,
.hc-recipe .hc-related__link:hover,
.hc-recipe .hc-related__link:focus {
	display: block;
	color: var(--hc-text);
	text-decoration: none;
}

.hc-recipe .hc-related__img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 5 / 4;
	object-fit: cover;
	border-radius: 20px;
}

.hc-recipe .hc-related__cuisine {
	display: block;
	margin: 28px 0 12px;
	color: var(--hc-red);
	font-size: var(--e-global-typography-accent-font-size, 18px);
	font-weight: 500;
	line-height: 1.3;
}

/* No underline on hover, per the Elementor original. */
.hc-recipe .hc-related__name {
	display: block;
	color: var(--hc-text);
	font-size: 30px;
	font-weight: 600;
	line-height: 1.25;
	text-decoration: none;
}

.hc-recipe .hc-related__link:focus-visible {
	outline: 2px solid var(--hc-red);
	outline-offset: 4px;
	border-radius: 20px;
}

@media (max-width: 767px) {
	.hc-recipe .hc-related { margin-top: 80px; }
	.hc-recipe .hc-related__title { font-size: 28px; margin-bottom: 32px; }
	.hc-recipe .hc-related__cuisine { margin-top: 16px; font-size: 15px; }
	.hc-recipe .hc-related__name { font-size: 22px; }
}
/* ---------- P2a: summary, facts, updated date, lists, notes ---------- */

.hc-recipe .hc-recipe__summary {
	margin: calc(clamp(32px, 4.5vw, 72px) * -0.5) 0 24px;
	font-size: calc(var(--hc-small) + 2px);
	font-weight: 500;
	line-height: 1.45;
}

/* Each fact is a <div> wrapping dt/dd; let them sit in the dl's grid. */
.hc-recipe .hc-recipe__fact { display: contents; }

.hc-recipe .hc-recipe__meta dd + div dt,
.hc-recipe .hc-recipe__meta dd + div dd { padding-top: 12px; }

.hc-recipe .hc-recipe__updated {
	margin: 16px 0 0;
	font-size: 14px;
	line-height: 1.4;
	opacity: .75;
}

.hc-recipe .hc-recipe__richtext .hc-recipe__group-title:first-child { margin-top: 0; }

.hc-recipe .hc-ingredients {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

.hc-recipe .hc-ingredients li { margin: 0 0 8px; }

.hc-recipe .hc-ingredients:last-child { margin-bottom: 0; }

.hc-recipe .hc-steps {
	margin: 0 0 24px;
	padding-left: 1.25em;
}

.hc-recipe .hc-steps li { margin-bottom: 8px; }

.hc-recipe .hc-recipe__note { margin: 0 0 16px; }

.hc-recipe .hc-nutrition caption {
	caption-side: top;
	padding: 0 0 16px;
	font-size: var(--hc-small);
	text-align: left;
}

/* Related card titles are now h3 (were spans); reset heading margins. */
.hc-recipe h3.hc-related__name { margin: 0; font-family: var(--hc-font); }

/* ---------- Breadcrumbs (Rank Math) ---------- */

.hc-recipe .rank-math-breadcrumb {
	padding-top: 24px;
	font-size: 14px;
	line-height: 1.4;
}

.hc-recipe .rank-math-breadcrumb p { margin: 0; }

.hc-recipe .rank-math-breadcrumb a {
	color: var(--hc-text);
	text-decoration: underline;
	text-underline-offset: 2px;
}

.hc-recipe .rank-math-breadcrumb .separator { margin: 0 6px; opacity: .6; }

.hc-recipe .rank-math-breadcrumb .last { opacity: .75; }
