/* ============================================================
   Blog (2026-10)
   Estils de l'índex del blog i de la plantilla d'article.
   Mateix llenguatge visual que celebracions.css: targetes arrodonides,
   botons en píndola, Fraunces als títols i Nunito al text.
   ============================================================ */

.vl-blog { --blog-wrap: 1180px; --blog-read: 68ch; color: var(--vl-ink); background: var(--vl-cream); }
.vl-blog *, .vl-blog *::before, .vl-blog *::after { box-sizing: border-box; }
.vl-blog__wrap { max-width: var(--blog-wrap); margin: 0 auto; padding: 0 1.5rem; }
.vl-blog h1, .vl-blog h2, .vl-blog h3 { margin: 0; color: var(--vl-ink); }
.vl-blog a:focus-visible, .vl-blog summary:focus-visible { outline: 2px solid var(--vl-terra); outline-offset: 3px; }
.vl-blog img { max-width: 100%; height: auto; }

/* Etiquetes i molles de pa */
.vl-blog__eyebrow {
	display: inline-block; margin: 0;
	text-transform: uppercase; letter-spacing: 0.24em; font-size: 0.72rem; font-weight: 700;
	color: var(--vl-terra-dark);
}
.vl-blog__tag {
	display: inline-flex; align-items: center; min-height: 28px;
	padding: 0.3rem 0.85rem; border-radius: 999px; margin: 0;
	background: rgba(113,120,90,0.14); color: var(--vl-sage-dark);
	font-size: 0.66rem; letter-spacing: 0.16em; text-transform: uppercase; font-weight: 800;
}
.vl-blog-card__body .vl-blog__tag { align-self: flex-start; }
.vl-blog__tag--terra { background: rgba(169,95,56,0.12); color: var(--vl-terra-dark); }
.vl-blog-crumbs { font-size: 0.85rem; color: rgba(29,30,28,0.7); }
.vl-blog-crumbs ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 0.15rem 0.5rem; }
.vl-blog-crumbs li { display: inline-flex; align-items: center; gap: 0.5rem; }
.vl-blog-crumbs li + li::before { content: "/"; color: var(--vl-hair); }
.vl-blog-crumbs a { color: var(--vl-sage-dark); text-decoration: none; display: inline-flex; align-items: center; min-height: 44px; }
.vl-blog-crumbs a:hover { text-decoration: underline; text-underline-offset: 3px; }
.vl-blog-crumbs [aria-current] { color: rgba(29,30,28,0.6); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 22ch; display: inline-block; }

/* ---------- Índex del blog ---------- */
.vl-blog-hero { background: var(--vl-cream-soft); padding: 1.25rem 0 3rem; border-bottom: 1px solid rgba(197,189,168,0.5); }
.vl-blog-hero__inner { max-width: 52rem; }
.vl-blog-hero .vl-blog__eyebrow { margin-top: 1rem; }
.vl-blog-hero h1 { margin-top: 0.75rem; line-height: 1.08; font-weight: 300; }
.vl-blog-hero h1 em { color: var(--vl-sage-dark); }
.vl-blog-hero__lead { margin: 1.1rem 0 0; max-width: 40rem; font-size: 1.075rem; line-height: 1.7; color: rgba(29,30,28,0.78); }

.vl-blog-section { padding: 3.5rem 0 1rem; }
.vl-blog-section:last-of-type { padding-bottom: 4rem; }
.vl-blog-section__head { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 0.75rem 2rem; margin-bottom: 1.75rem; }
.vl-blog-section__head h2 { font-weight: 300; line-height: 1.12; }
.vl-blog-section__head p { margin: 0.5rem 0 0; max-width: 36rem; color: rgba(29,30,28,0.72); line-height: 1.6; }

.vl-blog-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.vl-blog-grid--two { grid-template-columns: repeat(2, 1fr); }
.vl-blog-card {
	position: relative; display: flex; flex-direction: column; height: 100%;
	background: #fffdf9; border-radius: 24px; overflow: hidden;
	box-shadow: 0 1px 0 rgba(29,30,28,0.04), 0 14px 34px -22px rgba(29,30,28,0.35);
	transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.vl-blog-card:hover { transform: translateY(-4px); box-shadow: 0 1px 0 rgba(29,30,28,0.04), 0 24px 44px -22px rgba(29,30,28,0.45); }
.vl-blog-card__img { margin: 0; aspect-ratio: 16 / 10; overflow: hidden; background: var(--vl-cream-soft); }
.vl-blog-card__img img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
.vl-blog-card:hover .vl-blog-card__img img { transform: scale(1.04); }
.vl-blog-card__body { display: flex; flex-direction: column; flex: 1; padding: 1.4rem 1.5rem 1.6rem; }
.vl-blog-card h3 { margin-top: 0.85rem; font-weight: 500; line-height: 1.2; }
.vl-blog-card h3 a { color: var(--vl-sage-dark); text-decoration: none; }
.vl-blog-card h3 a::after { content: ""; position: absolute; inset: 0; z-index: 1; border-radius: inherit; }
.vl-blog-card h3 a:hover { color: var(--vl-ink); }
.vl-blog-card__excerpt { margin: 0.6rem 0 0; font-size: 0.97rem; line-height: 1.6; color: rgba(29,30,28,0.75); }
.vl-blog-card__foot { margin-top: auto; padding-top: 1.25rem; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; }
.vl-blog-card__date { font-size: 0.8rem; color: rgba(29,30,28,0.6); }
.vl-blog-card__more {
	position: relative; z-index: 2;
	display: inline-flex; align-items: center; gap: 0.45rem; min-height: 44px;
	padding: 0.55rem 1.1rem; border-radius: 999px; border: 1.5px solid var(--vl-sage);
	color: var(--vl-sage-dark); text-decoration: none;
	font-size: 0.7rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800;
	transition: background 0.2s, color 0.2s;
}
.vl-blog-card__more::after { content: "→"; letter-spacing: 0; transition: transform 0.2s; }
.vl-blog-card:hover .vl-blog-card__more, .vl-blog-card__more:hover { background: var(--vl-sage); color: var(--vl-cream); }
.vl-blog-card:hover .vl-blog-card__more::after { transform: translateX(3px); }

/* Targeta destacada (primer article) */
.vl-blog-card--feature { grid-column: span 2; flex-direction: row; }
.vl-blog-card--feature .vl-blog-card__img { flex: 1.15; aspect-ratio: auto; min-height: 20rem; }
.vl-blog-card--feature .vl-blog-card__body { flex: 1; padding: 2rem 2.25rem; justify-content: center; }
.vl-blog-card--feature .vl-blog-card__foot { margin-top: 1.5rem; }

/* ---------- Article ---------- */
.vl-post-head { background: var(--vl-cream-soft); padding: 1rem 0 0; }
.vl-post-head__inner { max-width: 56rem; margin: 0 auto; }
.vl-post-head__tags { margin-top: 0.75rem; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.vl-post-head h1 { margin-top: 1rem; line-height: 1.1; font-weight: 300; }
.vl-post-head__lead { margin: 1.1rem 0 0; font-size: 1.125rem; line-height: 1.7; color: rgba(29,30,28,0.8); max-width: 44rem; }
.vl-post-meta { margin: 1.1rem 0 0; font-size: 0.85rem; line-height: 1.6; color: rgba(29,30,28,0.65); }
.vl-post-hero { margin: 2rem auto 0; max-width: 64rem; transform: translateY(2.5rem); margin-bottom: 0; }
.vl-post-hero img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 26px; box-shadow: 0 24px 50px -30px rgba(29,30,28,0.55); }
.vl-post-hero figcaption, .vl-post-fig figcaption { margin-top: 0.6rem; font-size: 0.82rem; color: rgba(29,30,28,0.6); text-align: center; }
.vl-post-head--nohero { padding-bottom: 2.5rem; }

.vl-post { padding: 4.75rem 0 3rem; }
.vl-post__body { max-width: var(--blog-read); margin: 0 auto; font-size: 1.0625rem; line-height: 1.75; color: rgba(29,30,28,0.88); }
.vl-post__body > * + * { margin-top: 1.15rem; }
.vl-post__body p { margin-bottom: 0; }
.vl-post__body h2 { margin-top: 3rem; padding-top: 0.25rem; font-weight: 400; line-height: 1.15; scroll-margin-top: 6rem; }
.vl-post__body h3 { margin-top: 2rem; font-weight: 500; line-height: 1.25; color: var(--vl-sage-dark); scroll-margin-top: 6rem; }
.vl-post__body h2 + *, .vl-post__body h3 + * { margin-top: 0.75rem; }
.vl-post__body a { color: var(--vl-terra-dark); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.vl-post__body a:hover { color: var(--vl-terra); }
.vl-post__body strong { color: var(--vl-ink); }
.vl-post__body ul, .vl-post__body ol { padding-left: 1.3rem; }
.vl-post__body li + li { margin-top: 0.45rem; }
.vl-post__body li::marker { color: var(--vl-terra); }

/* Índex de continguts */
.vl-post__body .vl-post-toc { margin: 1.75rem 0 2rem; }
.vl-post-toc { padding: 1.25rem 1.5rem; border-radius: 20px; background: var(--vl-cream-soft); border: 1px solid rgba(197,189,168,0.6); }
.vl-post-toc__title { margin: 0; font-size: 0.72rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 800; color: var(--vl-sage-dark); }
.vl-post-toc ol { margin: 0.6rem 0 0; padding-left: 1.25rem; }
.vl-post-toc li { margin: 0; line-height: 1.5; }
.vl-post-toc li + li { margin-top: 0.15rem; }
.vl-post-toc a { display: inline-block; padding: 0.35rem 0; color: var(--vl-ink); text-decoration: none; font-size: 0.97rem; }
.vl-post-toc a:hover { color: var(--vl-terra-dark); text-decoration: underline; text-underline-offset: 3px; }

/* Imatges dins l'article */
.vl-post-fig { margin: 2rem 0 0; }
.vl-post-fig img { display: block; width: 100%; aspect-ratio: 3 / 2; object-fit: cover; border-radius: 20px; }

/* Caixa de consell */
.vl-post-note { margin-top: 1.75rem; padding: 1.25rem 1.4rem; border-radius: 18px; background: rgba(113,120,90,0.1); border-left: 4px solid var(--vl-sage); }
.vl-post-note p { margin: 0; }
.vl-post-note p + p { margin-top: 0.5rem; }
.vl-post-note__label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; font-weight: 800; color: var(--vl-sage-dark); }

/* Llista de comprovació */
.vl-blog .vl-post-check { list-style: none; padding: 1.25rem 1.4rem; border-radius: 20px; background: #fffdf9; box-shadow: 0 14px 34px -26px rgba(29,30,28,0.45); }
.vl-post-check li { position: relative; padding-left: 2.1rem; }
.vl-post-check li + li { margin-top: 0.65rem; }
.vl-post-check li::before {
	content: ""; position: absolute; left: 0; top: 0.2rem; width: 1.35rem; height: 1.35rem; border-radius: 999px;
	background: var(--vl-sage) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23FAF3E9' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 0.8rem no-repeat;
}

/* Taules: es poden desplaçar en horitzontal al mòbil */
.vl-post-table { margin-top: 1.5rem; overflow-x: auto; -webkit-overflow-scrolling: touch; border-radius: 18px; border: 1px solid rgba(197,189,168,0.7); background: #fffdf9; }
.vl-post-table:focus-visible { outline: 2px solid var(--vl-terra); outline-offset: 3px; }
.vl-post-table table { width: 100%; min-width: 34rem; border-collapse: collapse; font-size: 0.93rem; line-height: 1.5; }
.vl-post-table--fit table { min-width: 0; }
.vl-post-table caption { caption-side: top; text-align: left; padding: 0.9rem 1.1rem 0; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; font-weight: 800; color: var(--vl-sage-dark); }
.vl-post-table th, .vl-post-table td { padding: 0.8rem 1.1rem; text-align: left; vertical-align: top; border-bottom: 1px solid rgba(197,189,168,0.5); }
.vl-post-table thead th { background: var(--vl-sage-dark); color: var(--vl-cream); font-weight: 700; font-size: 0.78rem; letter-spacing: 0.06em; }
.vl-post-table caption + thead th { border-top: 0; }
.vl-post-table tbody th { font-weight: 800; color: var(--vl-sage-dark); white-space: nowrap; }
.vl-post-table tbody tr:nth-child(even) { background: rgba(242,235,220,0.55); }
.vl-post-table tbody tr:last-child th, .vl-post-table tbody tr:last-child td { border-bottom: 0; }
.vl-post-table__hint { margin: 0.4rem 0 0 !important; font-size: 0.78rem; color: rgba(29,30,28,0.55); display: none; }

/* Preguntes freqüents */
.vl-post-faq { border-top: 1px solid var(--vl-hair); }
.vl-post-faq details { border-bottom: 1px solid var(--vl-hair); }
.vl-post-faq summary {
	list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 1rem;
	min-height: 44px; padding: 1.05rem 0; font-family: 'Fraunces', Georgia, serif; font-size: 1.2rem; font-weight: 500; line-height: 1.3; color: var(--vl-ink);
}
.vl-post-faq summary::-webkit-details-marker { display: none; }
.vl-post-faq summary::after {
	content: "+"; flex: none; width: 2rem; height: 2rem; border-radius: 999px; display: grid; place-items: center;
	background: var(--vl-cream-soft); color: var(--vl-sage-dark); font-family: 'Nunito', sans-serif; font-size: 1.2rem; line-height: 1;
	transition: transform 0.25s, background 0.25s;
}
.vl-post-faq details[open] summary::after { transform: rotate(45deg); background: var(--vl-sage); color: var(--vl-cream); }
.vl-post-faq details p { margin: 0 0 1.2rem; }

/* Caixa final de contacte */
.vl-post-cta {
	margin: 3rem auto 0; max-width: 56rem; padding: 2.5rem 2rem; border-radius: 28px; text-align: center;
	background: var(--vl-sage-dark); color: var(--vl-cream);
	box-shadow: 0 30px 60px -36px rgba(29,30,28,0.7);
}
.vl-post-cta .vl-blog__eyebrow { color: #F0C9AE; }
.vl-blog .vl-post-cta h2 { margin-top: 0.75rem; color: var(--vl-cream); font-weight: 300; line-height: 1.12; }
.vl-post-cta p { margin: 0.9rem auto 0; max-width: 36rem; line-height: 1.65; color: rgba(250,243,233,0.86); }
.vl-post-cta__btns { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.75rem; margin-top: 1.75rem; }
.vl-post-cta__btns svg { width: 1.1rem; height: 1.1rem; flex: none; }
.vl-post-cta__note { font-size: 0.88rem; }
.vl-blog .vl-post-cta__note a { color: var(--vl-cream); text-decoration: underline; text-underline-offset: 3px; }

/* Articles relacionats i tornar al blog */
.vl-post-related { padding: 3.5rem 0 4rem; background: var(--vl-cream-soft); }
.vl-post-related h2 { font-weight: 300; line-height: 1.12; margin-bottom: 1.5rem; }
.vl-post-back { margin: 2rem 0 0; text-align: center; }
.vl-post-back a {
	display: inline-flex; align-items: center; gap: 0.5rem; min-height: 44px;
	padding: 0.55rem 1.25rem; border-radius: 999px; border: 1.5px solid var(--vl-sage);
	color: var(--vl-sage-dark); text-decoration: none; font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; font-weight: 800;
}
.vl-post-back a:hover { background: var(--vl-sage); color: var(--vl-cream); }

/* Nota d'article en preparació (posts del diari) */
.vl-post-soon { margin-top: 2rem; padding: 1.5rem; border-radius: 20px; background: #fffdf9; border: 1px dashed var(--vl-hair); text-align: center; }
.vl-post-soon p { margin: 0; }
.vl-post-soon p + p { margin-top: 0.6rem; }

/* ---------- Mòbil ---------- */
@media (max-width: 1000px) {
	.vl-blog-grid { grid-template-columns: repeat(2, 1fr); }
	.vl-blog-card--feature { grid-column: span 2; }
}
@media (max-width: 680px) {
	.vl-blog__wrap { padding: 0 1rem; }
	.vl-blog-hero { padding: 0.5rem 0 2.25rem; }
	.vl-blog-hero__lead { font-size: 1rem; }
	.vl-blog-section { padding: 2.5rem 0 0.5rem; }
	.vl-blog-section:last-of-type { padding-bottom: 3rem; }
	.vl-blog-grid, .vl-blog-grid--two { grid-template-columns: 1fr; gap: 1.1rem; }
	.vl-blog-card--feature { grid-column: auto; flex-direction: column; }
	.vl-blog-card--feature .vl-blog-card__img { min-height: 0; aspect-ratio: 16 / 10; flex: none; }
	.vl-blog-card--feature .vl-blog-card__body, .vl-blog-card__body { padding: 1.2rem 1.25rem 1.35rem; }
	.vl-blog-card { border-radius: 20px; }

	.vl-post-head { padding-top: 0.25rem; }
	.vl-post-head__lead { font-size: 1.02rem; }
	.vl-post-hero { margin-top: 1.5rem; transform: translateY(1.5rem); }
	.vl-post-hero img { border-radius: 18px; aspect-ratio: 4 / 3; }
	.vl-post { padding: 3.25rem 0 2.25rem; }
	.vl-post__body { font-size: 1rem; }
	.vl-post__body h2 { margin-top: 2.4rem; }
	.vl-post__body h3 { margin-top: 1.6rem; }
	.vl-post-fig img { border-radius: 16px; }
	.vl-post-table__hint { display: block; }
	.vl-post-cta { padding: 2rem 1.25rem; border-radius: 22px; margin-top: 2.25rem; }
	.vl-post-cta__btns .vl-btn { width: 100%; }
	.vl-post-related { padding: 2.5rem 0 3rem; }
	/* Relacionats: targetes compactes en horitzontal */
	.vl-post-related .vl-blog-card { flex-direction: row; border-radius: 18px; }
	.vl-post-related .vl-blog-card__img { flex: 0 0 34%; aspect-ratio: auto; }
	.vl-post-related .vl-blog-card__body { padding: 0.9rem 1rem 1rem; }
	.vl-post-related .vl-blog-card h3 { margin-top: 0.5rem; font-size: 1.1rem !important; }
	.vl-post-related .vl-blog-card__excerpt, .vl-post-related .vl-blog-card__more { display: none; }
	.vl-post-related .vl-blog-card__foot { padding-top: 0.5rem; }
}

@media (prefers-reduced-motion: reduce) {
	.vl-blog *, .vl-blog *::before, .vl-blog *::after { transition: none !important; }
	.vl-blog-card:hover, .vl-blog-card:hover .vl-blog-card__img img { transform: none; }
}
