/* Articles List — ACF block */

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

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

.ortega-articles-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-articles-list__header {
	align-items: center;
	display: grid;
	gap: clamp(1.25rem, 3vw, 2rem);
	justify-items: center;
	text-align: center;
	width: 100%;
}

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

.ortega-articles-list__eyebrow {
	align-items: center;
	color: var(--ortega-al-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-articles-list__eyebrow-text {
	display: inline-block;
}

.ortega-articles-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-articles-list__headline {
	color: var(--ortega-al-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 chips */

.ortega-articles-list__filters {
	align-items: center;
	display: flex;
	flex-wrap: wrap;
	gap: clamp(0.65rem, 1.5vw, 1.125rem);
	justify-content: center;
	max-width: 100%;
	width: 100%;
}

.ortega-articles-list__filters--mobile {
	display: none;
}

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

.ortega-articles-list__filter:focus-visible,
.ortega-articles-list__filter-toggle:focus-visible,
.ortega-articles-list__pagination-arrow:focus-visible,
.ortega-articles-list__pagination-page:focus-visible,
.ortega-articles-list__drawer-filter:focus-visible,
.ortega-articles-list__drawer-close:focus-visible {
	outline: 2px solid var(--ortega-al-blue-dark);
	outline-offset: 3px;
}

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

.ortega-articles-list__filter-label::before,
.ortega-articles-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-al-tab-cap-width);
}

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

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

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

/* Grid */

.ortega-articles-list__results.is-loading {
	opacity: 0.55;
	pointer-events: none;
}

.ortega-articles-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-articles-list__card {
	min-width: 0;
}

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

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

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

.ortega-articles-list__card-title {
	color: var(--ortega-al-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-articles-list__empty {
	color: var(--ortega-al-blue);
	font-family: var(--ortega-font-copy);
	font-size: var(--ortega-type-body-lg);
	margin: 0;
	text-align: center;
	width: 100%;
}

/* Pagination */

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

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

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

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

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

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

.ortega-articles-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-articles-list__pagination-item {
	margin: 0;
}

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

.ortega-articles-list__pagination-page-label {
	align-items: center;
	background: var(--ortega-al-tab-border);
	color: var(--ortega-al-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-articles-list__pagination-page-label::before,
.ortega-articles-list__pagination-page-label::after {
	background-color: var(--ortega-al-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-al-tab-cap-width);
	-webkit-mask-position: center;
	-webkit-mask-repeat: no-repeat;
	-webkit-mask-size: 100% 100%;
}

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

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

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

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

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

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

/* Mobile filter drawer */

.ortega-articles-list__drawer {
	inset: 0;
	position: fixed;
	z-index: 120;
}

.ortega-articles-list__drawer[hidden] {
	display: none;
}

.ortega-articles-list__drawer-backdrop {
	background: rgb(9 50 114 / 45%);
	inset: 0;
	position: absolute;
}

.ortega-articles-list__drawer-panel {
	background: #fff;
	border-radius: 1rem 1rem 0 0;
	bottom: 0;
	box-shadow: 0 -12px 40px rgb(9 50 114 / 12%);
	display: grid;
	gap: 1rem;
	left: 0;
	max-height: min(78vh, 32rem);
	overflow: auto;
	padding: 1.25rem 1rem 1.75rem;
	position: absolute;
	right: 0;
}

.ortega-articles-list__drawer-header {
	align-items: center;
	display: flex;
	justify-content: space-between;
}

.ortega-articles-list__drawer-title {
	color: var(--ortega-al-blue-dark);
	font-family: var(--ortega-font-copy);
	font-size: 1.25rem;
	font-weight: 700;
	margin: 0;
}

.ortega-articles-list__drawer-close {
	align-items: center;
	background: transparent;
	border: 0;
	color: var(--ortega-al-blue-dark);
	cursor: pointer;
	display: inline-flex;
	font-size: 2rem;
	height: 2.5rem;
	justify-content: center;
	line-height: 1;
	padding: 0;
	width: 2.5rem;
}

.ortega-articles-list__drawer-filters {
	display: grid;
	gap: 0.65rem;
}

.ortega-articles-list__drawer-filter {
	background: var(--ortega-al-grey);
	border: 0;
	border-radius: 0.35rem;
	color: var(--ortega-al-blue);
	cursor: pointer;
	font-family: var(--ortega-font-copy);
	font-size: 1.125rem;
	font-weight: 700;
	padding: 0.85rem 1rem;
	text-align: left;
}

.ortega-articles-list__drawer-filter.is-active {
	background: var(--ortega-al-yellow);
}

/* Editor placeholder */

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

/* Tablet */

@media (min-width: 782px) {
	.ortega-articles-list__grid {
		gap: clamp(2rem, 3vw, 3rem) clamp(1rem, 1.5vw, 1.375rem);
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}

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

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

/* Desktop */

@media (min-width: 1200px) {
	.ortega-articles-list__filters--desktop {
		display: flex;
	}

	.ortega-articles-list__filters--mobile {
		display: none;
	}

	.ortega-articles-list__grid {
		grid-template-columns: repeat(4, minmax(0, 1fr));
	}

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

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

/* Mobile */

@media (max-width: 1199px) {
	.ortega-articles-list__filters--desktop {
		display: none;
	}

	.ortega-articles-list__filters--mobile {
		display: flex;
	}
}

@media (prefers-reduced-motion: reduce) {
	.ortega-articles-list__results {
		transition: none;
	}
}

@media (prefers-reduced-motion: no-preference) {
	.ortega-articles-list__results {
		transition: opacity 0.2s ease;
	}
}
