/* ==========================================================
   Pàgina d'un article (single-article.php): foto 3:2 centrada, títol i text en 2 columnes
   ========================================================== */

.article {
	padding: clamp(56px, 8vw, 104px) 0 clamp(80px, 11vw, 140px);
}

/* Foto gran i centrada, amb el marc desplaçat del hero però rectangular. Es desplaça mig
   marc a la dreta perquè el conjunt foto + marc quedi centrat. */
.article__media {
	position: relative;
	width: min(880px, 100% - 18px);
	margin: 18px auto 0;
	transform: translateX(9px);
}

.article__media::before {
	content: "";
	position: absolute;
	inset: -18px 18px 18px -18px;
	border: 1px solid var(--bronze);
}

.article__media img {
	position: relative;
	width: 100%;
	height: auto;
	aspect-ratio: 3 / 2;
	object-fit: cover;
}

@media (max-width: 600px) {
	.article__media::before {
		inset: -10px 10px 10px -10px;
	}
}

.article__head {
	text-align: center;
	margin: clamp(48px, 6vw, 72px) auto clamp(48px, 6vw, 72px);
	max-width: 880px; /* el mateix ample que la foto */
}

.article__head .label {
	margin-bottom: 1.25rem;
}

.article__title {
	font-size: clamp(2rem, 4vw, 3.2rem);
}

/* Text en columnes: 2 a l'escriptori i la tauleta, 1 al mòbil */
.article__text {
	columns: 2;
	column-gap: 64px;
	padding-top: 40px;
	border-top: 1px solid var(--linia);
	font-size: 1rem;
	line-height: 1.75;
}

/* Caplletra: la primera lletra de l'article, gran i en terracota, ocupa unes tres línies */
.article__text > p:first-child::first-letter {
	float: left;
	font-family: var(--font-titol);
	font-weight: 500;
	font-size: 4.6em;
	line-height: .8;
	margin: .08em .12em 0 0;
	color: var(--terracota);
}

.article__text > * {
	margin: 0 0 1.25em;
}

.article__text h2,
.article__text h3,
.article__text h4 {
	font-family: var(--font-titol);
	font-weight: 500;
	text-transform: none;
	letter-spacing: 0;
	line-height: 1.25;
	color: var(--terracota);
	margin-top: .5em;
	break-after: avoid;
}

.article__text h2 {
	font-size: 1.6rem;
}

.article__text h3 {
	font-size: 1.3rem;
}

.article__text h4 {
	font-size: 1.1rem;
}

.article__text ul,
.article__text ol {
	padding-left: 1.2em;
}

.article__text ul {
	list-style: disc;
}

.article__text li + li {
	margin-top: .35em;
}

.article__text a {
	color: var(--terracota);
}

.article__text blockquote {
	margin-left: 0;
	padding-left: 18px;
	border-left: 2px solid var(--bronze);
	font-family: var(--font-titol);
	font-size: 1.2rem;
	line-height: 1.45;
	break-inside: avoid;
}

/* Les imatges del text no es parteixen entre columnes */
.article__text img,
.article__text figure {
	max-width: 100%;
	height: auto;
	break-inside: avoid;
}

/* ---------- Navegació: anterior · tots els articles · següent ---------- */
.article__nav {
	display: grid;
	grid-template-columns: 1fr auto 1fr;
	align-items: center;
	gap: 32px;
	margin-top: clamp(48px, 6vw, 72px);
	padding-top: 32px;
	border-top: 1px solid var(--linia);
}

.article__nav-side--next {
	text-align: right;
}

.article__nav-link {
	display: inline-flex;
	flex-direction: column;
	gap: 8px;
	max-width: 36ch;
	text-decoration: none;
}

.article__nav-dir {
	font-size: .78rem;
	font-weight: 700;
	letter-spacing: .18em;
	text-transform: uppercase;
	color: var(--bronze);
}

.article__nav-title {
	font-family: var(--font-titol);
	font-size: 1.2rem;
	line-height: 1.3;
	color: var(--terracota);
	transition: color .2s;
}

.article__nav-link:hover .article__nav-title {
	color: var(--bronze);
}

/* Botó rodó central, com les fletxes dels carrusels */
.article__nav-all {
	display: grid;
	place-items: center;
	width: 52px;
	height: 52px;
	border: 1px solid var(--linia);
	border-radius: 50%;
	color: var(--terracota);
	transition: background .2s, color .2s, border-color .2s;
}

.article__nav-all svg {
	width: 20px;
	height: 20px;
}

.article__nav-all:hover {
	background: var(--terracota);
	border-color: var(--terracota);
	color: var(--ivori);
}

@media (max-width: 1100px) {
	.article__text {
		column-gap: 40px;
	}
}

@media (max-width: 700px) {
	.article__text {
		columns: 1;
	}

	/* En mòbil només es veu «anterior / següent», sense el títol */
	.article__nav {
		gap: 16px;
	}

	.article__nav-title {
		display: none;
	}
}
