/* Publicaciones — centred gradient title band + sort control + 3-col card grid
   with client-side pagination. Figma node 2792:4468. */

.pub { padding-bottom: 60px; }

.pub__band {
	margin: 0 var(--space-2);
	border-radius: 16px;
	background: linear-gradient(180deg, rgba(28, 59, 91, 0.08), rgba(28, 59, 91, 0));
	padding-block: clamp(56px, 8vw, 112px) clamp(48px, 6vw, 80px);
	text-align: center;
}
.pub__title {
	margin: 0;
	text-align: center;
	font-size: var(--fs-h1);
	line-height: 50px;
	font-weight: var(--fw-medium);
	letter-spacing: -0.84px;
	color: var(--bida-blue);
}

.pub__inner { margin-top: clamp(32px, 5vw, 56px); }
/* Figma rail shared by every card listing: 3 × 363px cards + 2 × 20px gaps =
   1129px (2792:4468, 5515:8959). Keeps the 363×240 thumbs, so the covers
   VICTION re-cut for that frame are not cropped. */
.pub__inner.container { max-width: calc(1129px + 2 * var(--container-pad)); }
/* Krea Bidasoa hub (ES #1378 / EU #2116): title band full width and flush under
   the header, like the other Krea pages (no gutters or rounded corners). */
:is(.page-id-1378, .page-id-2116) .pub__band { margin: 0; border-radius: 0; }
/* No sort control (Krea editions hub): Figma leaves 80px under the band. */
.pub--no-sort .pub__inner { margin-top: clamp(40px, 6vw, 80px); }

.project-archive__group + .project-archive__group {
	margin-top: clamp(64px, 9vw, 112px);
}
.project-archive__period {
	margin: 0 0 clamp(28px, 4vw, 48px);
	font-size: clamp(28px, 3vw, 40px);
	line-height: 1.15;
	font-weight: var(--fw-medium);
	letter-spacing: -0.02em;
	color: var(--bida-blue);
}

.pub__bar { display: flex; justify-content: flex-end; margin-bottom: var(--space-10); }
.pub__sort { display: inline-flex; align-items: center; gap: var(--space-4); }
.pub__sort-label { font-size: var(--fs-body); color: var(--neutral-700); }
.pub__sort-control {
	position: relative;
	display: inline-flex;
	align-items: center;
	background: #f7f8db;
	border-radius: 100px;
	padding: 4px 30px 4px 14px;
}
.pub__sort-select {
	appearance: none;
	-webkit-appearance: none;
	border: 0;
	background: transparent;
	font-family: inherit;
	font-size: var(--fs-body-s);
	font-weight: var(--fw-medium);
	line-height: 22px;
	color: #747916;
	cursor: pointer;
}
.pub__sort-icon { position: absolute; right: 10px; width: 14px; height: 14px; pointer-events: none; color: #747916; }

.pub__grid {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	column-gap: var(--space-5);
	row-gap: var(--space-10);
}
.pub__card { display: flex; flex-direction: column; gap: var(--space-6); text-decoration: none; }
.pub__thumb {
	display: block;
	height: 240px;
	border-radius: 8px;
	overflow: hidden;
	background: #9bd4dd; /* teal placeholder shown when a cover is missing */
}
.pub__thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.pub--contain-images .pub__thumb,
.rel--contain-images .pub__thumb { background: var(--white); }
.pub--contain-images .pub__thumb img,
.rel--contain-images .pub__thumb img { object-fit: contain; }
.pub__body { display: flex; flex-direction: column; gap: var(--space-2); }
.pub__card-title { font-size: var(--fs-sub2); line-height: 26px; font-weight: var(--fw-medium); color: var(--bida-blue); }
.pub__card-sub {
	font-size: var(--fs-body);
	line-height: var(--lh-body);
	color: var(--neutral-500);
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.pub__pagination[hidden] { display: none; } /* JS hides the pager on single-page lists */
.pub__pagination {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: var(--space-4);
	margin-top: clamp(40px, 6vw, 64px);
}
.pub__pages { display: inline-flex; gap: var(--space-2); }
.pub__page,
.pub__page-prev,
.pub__page-next {
	font-family: inherit;
	font-size: var(--fs-body-s);
	font-weight: var(--fw-medium);
	line-height: 22px;
	padding: 4px 16px;
	border-radius: 100px;
	border: 1px solid var(--bida-blue);
	background: transparent;
	color: var(--bida-blue);
	cursor: pointer;
}
.pub__page.is-current { background: var(--bida-blue); color: var(--white); }
.pub__page-prev[disabled],
.pub__page-next[disabled] { border-color: var(--neutral-200); color: var(--neutral-200); cursor: default; }

@media (max-width: 900px) { .pub__grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) {
	.pub__grid { grid-template-columns: 1fr; }
	.pub__pagination { justify-content: center; flex-wrap: wrap; }
	.pub__pages { justify-content: center; flex-wrap: wrap; max-width: 100%; }
}
