/* Recipes List — ACF block */

.ortega-recipes-list {
	--ortega-rl-blue: #0058a4;
	--ortega-rl-blue-dark: #093272;
	--ortega-rl-yellow: #ffe400;
	--ortega-rl-grey: #f7f7f8;
	--ortega-rl-cloud: var(--wp--preset--color--blue-200, #e9f2f9);
	--ortega-rl-card-radius: 8px;
	--ortega-rl-card-radius-mobile: 4px;
	--ortega-rl-tab-cap-width: 5px;
	--ortega-rl-padding-inline: clamp(1rem, 3vw, 3rem);
	box-sizing: border-box;
	color: var(--ortega-rl-blue-dark);
	max-width: 100vw;
	overflow-x: clip;
	padding: clamp(1.5rem, 4vw, 3rem) var(--ortega-rl-padding-inline) clamp(2.5rem, 6vw, 4rem);
	position: relative;
	width: 100%;
}

/* Preload tab border assets to avoid flash on first interaction. */
.ortega-recipes-list::before {
	background-image:
		url("../images/recipes-list/tab-active-left.svg"),
		url("../images/recipes-list/tab-active-right.svg"),
		url("../images/recipes-list/tab-default-left.svg"),
		url("../images/recipes-list/tab-default-right.svg");
	content: "";
	height: 0;
	overflow: hidden;
	position: absolute;
	visibility: hidden;
	width: 0;
}

.ortega-recipes-list__inner {
	box-sizing: border-box;
	display: grid;
	gap: clamp(1.5rem, 3.5vw, 2.75rem);
	margin-inline: auto;
	max-width: min(1347px, 100%);
	min-width: 0;
	width: 100%;
	padding-top:3rem;
}

/* Header */

.ortega-recipes-list__header {
	align-items: center;
	display: grid;
	gap: clamp(1.25rem, 3vw, 2rem);
	justify-items: center;
	text-align: center;
	width: 100%;
}

.ortega-recipes-list__header--filters-only {
	gap: 0;
}

.ortega-recipes-list__title-wrap {
	position: relative;
	width: min(100%, 42rem);
}

.ortega-recipes-list__eyebrow {
	align-items: center;
	color: var(--ortega-rl-blue);
	display: inline-flex;
	font-family: var(--ortega-font-display);
	font-size: clamp(1.375rem, 3.5vw, 3rem);
	font-weight: 700;
	gap: 0.35rem;
	justify-content: center;
	letter-spacing: 0.02em;
	line-height: 0.94;
	margin: 0 0 -0.35rem;
	position: relative;
	text-transform: uppercase;
	transform: rotate(-2.28deg);
	z-index: 2;
}

.ortega-recipes-list__eyebrow-text {
	display: inline-block;
}

.ortega-recipes-list__eyebrow-icon {
	display: block;
	flex: 0 0 auto;
	height: clamp(1.5rem, 3vw, 2rem);
	transform: rotate(3.38deg);
	width: clamp(1.5rem, 3vw, 2rem);
}

.ortega-recipes-list__headline {
	color: var(--ortega-rl-blue-dark);
	font-family: var(--ortega-font-display);
	font-size: clamp(4.25rem, 12vw, 9.375rem);
	font-weight: 700;
	letter-spacing: -0.01em;
	line-height: 0.87;
	margin: 0;
	text-transform: uppercase;
}

/* Filter shell — popular tabs + All filters panel */

.ortega-recipes-list__filter-shell {
	display: grid;
	gap: 1rem;
	justify-items: stretch;
	position: relative;
	width: 100%;
	z-index: 3;
}

.ortega-recipes-list__filter-popular {
	align-items: center;
	display: none;
	flex: 1 1 auto;
	flex-wrap: wrap;
	gap: clamp(0.5rem, 1.2vw, 0.9rem);
	justify-content: flex-start;
	min-width: 0;
}

.ortega-recipes-list__filter-bar {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	justify-content: center;
	width: 100%;
}

.ortega-recipes-list__filter {
	--ortega-rl-tab-border: var(--ortega-rl-grey);
	--ortega-rl-tab-cap-left: url("../images/recipes-list/tab-default-left.svg");
	--ortega-rl-tab-cap-right: url("../images/recipes-list/tab-default-right.svg");
	appearance: none;
	background: transparent;
	border: 0;
	color: var(--ortega-rl-blue);
	cursor: pointer;
	font-family: var(--ortega-font-copy);
	font-size: clamp(0.95rem, 1.3vw, 1.25rem);
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.27;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

.ortega-recipes-list__filter:focus-visible {
	outline: 2px solid var(--ortega-rl-blue-dark);
	outline-offset: 3px;
}

.ortega-recipes-list__filter-label {
	align-items: center;
	background: var(--ortega-rl-tab-border);
	color: var(--ortega-rl-blue);
	display: inline-flex;
	font-family: var(--ortega-font-copy);
	font-size: inherit;
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.27;
	padding: 4px 14px;
	position: relative;
	white-space: nowrap;
}

.ortega-recipes-list__filter-label::before,
.ortega-recipes-list__filter-label::after {
	background-position: center;
	background-repeat: no-repeat;
	background-size: 100% 100%;
	content: "";
	height: 100%;
	pointer-events: none;
	position: absolute;
	top: 0;
	width: var(--ortega-rl-tab-cap-width);
}

.ortega-recipes-list__filter-label::before {
	background-image: var(--ortega-rl-tab-cap-left);
	left: -3px;
}

.ortega-recipes-list__filter-label::after {
	background-image: var(--ortega-rl-tab-cap-right);
	right: -3px;
}

.ortega-recipes-list__filter.is-active {
	--ortega-rl-tab-border: var(--ortega-rl-yellow);
	--ortega-rl-tab-cap-left: url("../images/recipes-list/tab-active-left.svg");
	--ortega-rl-tab-cap-right: url("../images/recipes-list/tab-active-right.svg");
}

.ortega-recipes-list__filter-toggle {
	align-items: center;
	appearance: none;
	background: var(--ortega-rl-blue);
	border: 0;
	border-radius: 100px;
	box-sizing: border-box;
	color: #fff;
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	font-family: var(--ortega-font-display);
	font-size: clamp(16px, 1.8vw, 22.81px);
	font-weight: 400;
	gap: 10px;
	justify-content: center;
	letter-spacing: 0.05em;
	line-height: 0.87;
	margin-left: 0;
	min-height: 54px;
	padding: 16px 32px;
	position: relative;
	text-transform: uppercase;
	-webkit-tap-highlight-color: transparent;
	z-index: 2;
}

.ortega-recipes-list__filter-toggle:hover,
.ortega-recipes-list__filter-toggle:focus-visible {
	background: var(--ortega-rl-blue-dark);
}

.ortega-recipes-list__filter-toggle:focus-visible,
.ortega-recipes-list__pagination-arrow:focus-visible,
.ortega-recipes-list__pagination-page:focus-visible,
.ortega-recipes-list__filter-chip:focus-visible {
	outline: 2px solid var(--ortega-rl-blue-dark);
	outline-offset: 3px;
}

.ortega-recipes-list__filter-toggle-icon {
	display: block;
	flex-shrink: 0;
}

.ortega-recipes-list__filter-toggle-chevron {
	display: block;
	flex-shrink: 0;
	/* Navy source SVG → white to match blue button text. */
	filter: brightness(0) invert(1);
	height: 8px;
	transform: none;
	transform-origin: center;
	transition: transform 0.2s ease;
	width: 14px;
}

.ortega-recipes-list__filter-shell.is-open .ortega-recipes-list__filter-toggle-chevron {
	transform: rotate(180deg);
}

.ortega-recipes-list__filter-toggle-label {
	display: block;
}

.ortega-recipes-list__filter-panel {
	background: var(--ortega-rl-cloud);
	border: 1px solid rgb(9 50 114 / 18%);
	border-radius: var(--ortega-rl-card-radius-mobile);
	box-sizing: border-box;
	margin-top: 0;
	padding: clamp(1.25rem, 3vw, 2rem);
	position: relative;
	text-align: left;
	width: 100%;
	z-index: 1;
}

.ortega-recipes-list__filter-panel[hidden] {
	display: none;
}

.ortega-recipes-list__filter-columns {
	display: grid;
	gap: 48px;
	grid-template-columns: 1fr;
	width: 100%;
}

.ortega-recipes-list__filter-column {
	min-width: 0;
	text-align: left;
}

.ortega-recipes-list__filter-column-title {
	color: var(--ortega-rl-blue-dark);
	font-family: var(--ortega-font-copy);
	font-size: clamp(1rem, 1.4vw, 1.25rem);
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.2;
	margin: 0 0 0.75rem;
	text-align: left;
}

.ortega-recipes-list__filter-column-list {
	align-items: flex-start;
	display: flex;
	flex-wrap: wrap;
	gap: 0.55rem;
}

.ortega-recipes-list__filter-chip {
	align-items: center;
	appearance: none;
	background: #fff;
	border: 1px solid transparent;
	border-radius: 999px;
	color: var(--ortega-rl-blue);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	font-family: var(--ortega-font-copy);
	font-size: clamp(0.9rem, 1.2vw, 1.05rem);
	font-weight: 400;
	gap: 0.45rem;
	justify-content: flex-start;
	letter-spacing: 0.01em;
	line-height: 1.25;
	max-width: 100%;
	padding: 0.55rem 0.95rem;
	text-align: left;
	-webkit-tap-highlight-color: transparent;
	transition: border-color 0.15s ease;
	width: max-content;
}

.ortega-recipes-list__filter-chip:hover {
	background: #fff;
	border-color: var(--ortega-rl-blue);
}

.ortega-recipes-list__filter-chip.is-active {
	background: var(--ortega-rl-yellow);
	border-color: transparent;
	color: var(--ortega-rl-blue-dark);
	padding-right: 0.75rem;
}

.ortega-recipes-list__filter-chip.is-active:hover {
	background: var(--ortega-rl-yellow);
	border-color: var(--ortega-rl-blue);
}

.ortega-recipes-list__filter-chip-close {
	align-items: center;
	display: none;
	flex-shrink: 0;
	height: 12px;
	justify-content: center;
	line-height: 0;
	width: 12px;
}

.ortega-recipes-list__filter-chip.is-active .ortega-recipes-list__filter-chip-close {
	display: inline-flex;
}

.ortega-recipes-list__filter-chip-close svg {
	display: block;
}

/* Grid */

.ortega-recipes-list__results.is-loading,
.ortega-recipes-list__results.is-transitioning {
	pointer-events: none;
}

.ortega-recipes-list.is-cards-entrance-pending .ortega-recipes-list__card,
.ortega-recipes-list.is-cards-entrance-pending .ortega-recipes-list__empty {
	opacity: 0;
	visibility: hidden;
}

.ortega-recipes-list__grid {
	display: grid;
	gap: clamp(1.5rem, 3vw, 3rem) clamp(1rem, 2vw, 1.375rem);
	grid-template-columns: repeat(2, minmax(0, 1fr));
	width: 100%;
}

.ortega-recipes-list__card {
	min-width: 0;
}

.ortega-recipes-list__card-link {
	color: inherit;
	display: grid;
	gap: 0.625rem;
	text-decoration: none;
}

.ortega-recipes-list__card-media {
	aspect-ratio: 167 / 177;
	border-radius: var(--ortega-rl-card-radius-mobile);
	overflow: hidden;
	position: relative;
	width: 100%;
}

.ortega-recipes-list__card-image {
	display: block;
	height: 100%;
	object-fit: cover;
	width: 100%;
}

.ortega-recipes-list__card-title {
	color: var(--ortega-rl-blue);
	font-family: var(--ortega-font-display);
	font-size: 1rem;
	font-weight: 400;
	letter-spacing: 0.02em;
	line-height: 0.98;
	margin: 0;
	text-transform: uppercase;
}

.ortega-recipes-list__empty {
	color: var(--ortega-rl-blue);
	font-family: var(--ortega-font-copy);
	font-size: var(--ortega-type-body-lg);
	margin: 0;
	text-align: center;
	width: 100%;
}

/* Pagination */

.ortega-recipes-list__pagination-wrap:empty {
	display: none;
}

.ortega-recipes-list__pagination {
	align-items: center;
	display: flex;
	gap: clamp(1.25rem, 3vw, 2.75rem);
	justify-content: center;
	width: 100%;
}

.ortega-recipes-list__pagination-arrow {
	align-items: center;
	background: var(--ortega-rl-cloud);
	border: 0;
	border-radius: 50%;
	box-sizing: border-box;
	color: var(--ortega-rl-blue);
	cursor: pointer;
	display: inline-flex;
	flex: 0 0 auto;
	height: 48px;
	justify-content: center;
	padding: 0;
	width: 48px;
}

.ortega-recipes-list__pagination-arrow:disabled {
	cursor: not-allowed;
	opacity: 0.45;
}

.ortega-recipes-list__pagination-arrow-icon {
	display: block;
	flex: 0 0 auto;
	height: 32px;
	width: 32px;
}

.ortega-recipes-list__pagination-arrow-icon--prev {
	transform: scaleX(-1);
}

.ortega-recipes-list__pagination-list {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: clamp(1.25rem, 2.5vw, 2.2rem);
	justify-content: center;
	list-style: none;
	margin: 0;
	padding: 0;
}

.ortega-recipes-list__pagination-item {
	margin: 0;
}

.ortega-recipes-list__pagination-page {
	--ortega-rl-tab-border: transparent;
	appearance: none;
	background: transparent;
	border: 0;
	color: var(--ortega-rl-blue-dark);
	cursor: pointer;
	display: inline-flex;
	padding: 0;
	-webkit-tap-highlight-color: transparent;
}

.ortega-recipes-list__pagination-page-label {
	align-items: center;
	background: var(--ortega-rl-tab-border);
	color: var(--ortega-rl-blue-dark);
	display: inline-flex;
	font-family: var(--ortega-font-copy);
	font-size: clamp(1.125rem, 1.5vw, 1.375rem);
	font-weight: 700;
	letter-spacing: 0.01em;
	line-height: 1.27;
	padding: 4px 14px;
	position: relative;
	white-space: nowrap;
}

.ortega-recipes-list__pagination-page-label::before,
.ortega-recipes-list__pagination-page-label::after {
	background-color: var(--ortega-rl-tab-border);
	content: "";
	height: 100%;
	mask-position: center;
	mask-repeat: no-repeat;
	mask-size: 100% 100%;
	pointer-events: none;
	position: absolute;
	top: 0;
	width: var(--ortega-rl-tab-cap-width);
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
}

.ortega-recipes-list__pagination-page-label::before {
	left: -3px;
	mask-image: url("../images/recipes-list/tab-default-left.svg");
	-webkit-mask-image: url("../images/recipes-list/tab-default-left.svg");
}

.ortega-recipes-list__pagination-page-label::after {
	right: -3px;
	mask-image: url("../images/recipes-list/tab-default-right.svg");
	-webkit-mask-image: url("../images/recipes-list/tab-default-right.svg");
}

.ortega-recipes-list__pagination-page:not(:hover):not(.is-active) .ortega-recipes-list__pagination-page-label::before,
.ortega-recipes-list__pagination-page:not(:hover):not(.is-active) .ortega-recipes-list__pagination-page-label::after {
	content: none;
}

@media (hover: hover) {
	.ortega-recipes-list__pagination-page:hover:not(.is-active) {
		--ortega-rl-tab-border: var(--ortega-rl-cloud);
	}
}

.ortega-recipes-list__pagination-page.is-active {
	--ortega-rl-tab-border: var(--ortega-rl-yellow);
}

.ortega-recipes-list__pagination-ellipsis {
	color: var(--ortega-rl-blue-dark);
	font-family: var(--ortega-font-copy);
	font-size: clamp(1.125rem, 1.5vw, 1.375rem);
	font-weight: 700;
	line-height: 1.27;
}

/* Editor placeholder */

.ortega-recipes-list-placeholder {
	font-family: var(--ortega-font-body);
	font-size: var(--ortega-type-body);
}

/* Tablet */

@media (min-width: 782px) {
	.ortega-recipes-list__filter-bar {
		justify-content: space-between;
	}

	.ortega-recipes-list__filter-popular {
		display: flex;
	}

	.ortega-recipes-list__filter-toggle {
		margin-left: auto;
	}

	.ortega-recipes-list__filter-panel {
		border-radius: var(--ortega-rl-card-radius);
	}

	.ortega-recipes-list__filter-columns {
		gap: clamp(1.25rem, 3vw, 2rem);
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}

	.ortega-recipes-list__grid {
		gap: clamp(2rem, 3vw, 3rem) clamp(1rem, 1.5vw, 1.375rem);
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

	.ortega-recipes-list__card-media {
		aspect-ratio: 312 / 328;
		border-radius: var(--ortega-rl-card-radius);
	}

	.ortega-recipes-list__card-title {
		font-size: clamp(1.125rem, 1.5vw, 1.625rem);
		line-height: 1.12;
	}
}

/* Desktop */

@media (min-width: 1100px) {
	.ortega-recipes-list__filter-columns {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}
}

@media (min-width: 1200px) {
	.ortega-recipes-list__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

	.ortega-recipes-list__pagination-arrow {
		height: 60px;
		width: 60px;
	}

	.ortega-recipes-list__pagination-arrow-icon {
		height: 42px;
		width: 42px;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ortega-recipes-list__filter-toggle-chevron {
		transition: none;
	}

	.ortega-recipes-list.is-cards-entrance-pending .ortega-recipes-list__card,
	.ortega-recipes-list.is-cards-entrance-pending .ortega-recipes-list__empty {
		opacity: 1;
		visibility: visible;
	}
}

