/* =========================================================================
   BLOG DE TERRAN — índice, archivos y entradas (home.php, archive.php,
   single.php y template-parts/tr-blog-*.php del hijo). Medidas del sitio
   anterior: columna de 1022 px + barra lateral negra de 280 px.
   La fecha y la categoría van en #b8361a: el naranja #e74520 sobre blanco
   da 3,98:1 y no llega a 4,5 en texto pequeño.
   ========================================================================= */
.tr-blog {
	box-sizing: border-box;
	width: 100%;
	max-width: 1400px;
	margin: 0 auto;
	padding: 32px 16px 64px;
}
html body .tr-blog .woocommerce-breadcrumb {
	margin: 0 0 40px;
	padding: 0;
	color: #6b6b6b;
	font-family: 'Unbounded', sans-serif;
	font-size: 13px;
	line-height: 1.5;
	text-transform: uppercase;
}
html body .tr-blog .woocommerce-breadcrumb a { color: #6b6b6b; text-decoration: none; }
html body .tr-blog .woocommerce-breadcrumb a:hover { color: #000; }

/* Título con línea gris a la derecha. */
.tr-blog__cabecera {
	display: flex;
	align-items: center;
	gap: 48px;
	margin: 0 0 56px;
}
.tr-blog__cabecera::after {
	content: "";
	flex: 1 1 auto;
	height: 1px;
	background: #d9d9d9;
}
html body .tr-blog__h1 {
	margin: 0;
	color: #000;
	font-family: 'Unbounded', sans-serif;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.3;
	text-transform: uppercase;
}

.tr-blog__grid {
	display: grid;
	grid-template-columns: minmax(0, 1fr) 280px;
	gap: 32px;
	align-items: start;
}
.tr-blog__principal { min-width: 0; }

/* ----- Tarjetas (2 columnas) ----- */
.tr-blog__tarjetas {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 32px;
}
.tr-blog__tarjeta {
	display: flex;
	flex-direction: column;
	overflow: hidden;
	border: 1px solid #ddd;
	border-radius: 21px;
	background: #fff;
}
.tr-blog__foto { display: block; }
.tr-blog__foto img {
	display: block;
	width: 100%;
	height: auto;
	aspect-ratio: 493 / 267;
	object-fit: cover;
}
.tr-blog__texto {
	display: flex;
	flex: 1 1 auto;
	flex-direction: column;
	padding: 0 32px 32px;
}
.tr-blog__fecha {
	margin: 0;
	padding: 12px 0;
	color: #b8361a;
	font-size: 15px;
	font-weight: 600;
	line-height: 1.5;
	text-transform: uppercase;
}
.tr-blog__fecha a {
	color: #b8361a;
	font-family: 'Unbounded', sans-serif;
	font-size: 13px;
	font-weight: 400;
	text-decoration: none;
}
.tr-blog__fecha a:hover { color: #000; }
html body .tr-blog__titulo {
	margin: 0 0 16px;
	color: #000;
	font-family: 'Unbounded', sans-serif;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.3;
}
.tr-blog__titulo a { color: #000; text-decoration: none; }
.tr-blog__titulo a:hover { color: #b8361a; }
.tr-blog__resumen { color: #404040; font-size: 16px; line-height: 1.2; }
.tr-blog__resumen p {
	display: -webkit-box;
	margin: 4px 0 16px;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 4;
	line-clamp: 4;
}
.tr-blog__leer {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 10px;
	margin-top: auto;
	padding-top: 16px;
	color: #000;
	font-family: 'Unbounded', sans-serif;
	font-size: 16px;
	font-weight: 500;
	text-decoration: none;
	text-transform: uppercase;
}
.tr-blog__leer::before {
	content: "+";
	display: flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	width: 37px;
	height: 37px;
	border: 1px solid var(--oz-brand-accent, #e74520);
	border-radius: 6px;
	color: var(--oz-brand-accent, #e74520);
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
}
.tr-blog__leer:hover::before { background: var(--oz-brand-accent, #e74520); color: #000; }

/* ----- Paginación ----- */
.tr-blog .pagination { margin: 48px 0 0; text-align: center; }
.tr-blog .pagination .nav-links {
	display: inline-flex;
	flex-wrap: wrap;
	justify-content: center;
	border: 1px solid #ddd;
	border-right: 0;
}
.tr-blog .pagination .page-numbers {
	display: block;
	min-width: 44px;
	padding: 12px 10px;
	border-right: 1px solid #ddd;
	color: #000;
	font-family: 'Unbounded', sans-serif;
	font-size: 14px;
	font-weight: 500;
	line-height: 1.3;
	text-decoration: none;
}
.tr-blog .pagination .page-numbers.current { background: var(--oz-brand-accent, #e74520); color: #000; }
.tr-blog .pagination a.page-numbers:hover { background: #f2f2f2; }

/* ----- Barra lateral negra ----- */
.tr-blog__lateral .widget {
	margin: 0 0 24px;
	padding: 24px;
	border-radius: 10px;
	background: #000;
	color: #fff;
}
html body .tr-blog__lateral .widget-title {
	margin: 0 0 13px;
	color: #fff;
	font-family: 'Unbounded', sans-serif;
	font-size: 20px;
	font-weight: 500;
	line-height: 1.3;
	text-transform: uppercase;
}
.tr-blog__lateral .widget ul { margin: 0; padding: 0; list-style: none; }
.tr-blog__lateral .widget li {
	padding: 10px 0;
	border-bottom: 1px solid #ddd;
	line-height: 1.3;
}
.tr-blog__lateral .widget li:last-child { border-bottom: 0; }
.tr-blog__lateral .widget li a { color: #fff; font-size: 16px; text-decoration: none; }
.tr-blog__lateral .widget li a:hover { color: var(--oz-brand-accent, #e74520); }
.tr-blog__lateral .widget_media_image { padding: 0; overflow: hidden; }
.tr-blog__lateral .widget_media_image img { display: block; width: 100%; height: auto; }

/* ----- Entrada ----- */
.tr-entrada__foto { margin: 0; }
.tr-entrada__foto img { display: block; width: 100%; height: auto; }
html body .tr-entrada__titulo {
	margin: 0 0 22px;
	color: #000;
	font-family: 'Unbounded', sans-serif;
	font-size: 32px;
	font-weight: 700;
	line-height: 1.3;
}
.tr-entrada__contenido { color: #404040; font-size: 16px; line-height: 1.5; }
html body .tr-entrada__contenido h2 { margin: 40px 0 20px; color: #404040; font-family: 'Unbounded', sans-serif; font-size: 24px; font-weight: 700; line-height: 1.3; }
html body .tr-entrada__contenido h3 { margin: 32px 0 18px; color: #404040; font-family: 'Unbounded', sans-serif; font-size: 19px; font-weight: 700; line-height: 1.3; }
.tr-entrada__contenido a { color: #b8361a; text-decoration: underline; text-underline-offset: 2px; }
.tr-entrada__contenido img { max-width: 100%; height: auto; }
.tr-entrada__contenido table { width: 100%; border-collapse: collapse; font-size: 14px; }
.tr-entrada__contenido th,
.tr-entrada__contenido td { padding: 8px 10px; border: 1px solid #ddd; vertical-align: top; }
.tr-entrada__contenido th { background: #e3f0f4; color: #000; }
.tr-entrada__contenido .wp-block-table { overflow-x: auto; }

/* Anterior / Siguiente: pastillas naranjas centradas. */
.tr-blog--entrada .post-navigation { margin: 48px 0 0; }
.tr-blog--entrada .post-navigation .nav-links {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 16px;
}
.tr-entrada__nav-rotulo {
	display: block;
	padding: 8px 32px;
	border-radius: 10px;
	background: var(--oz-brand-accent, #e74520);
	color: #000;
	font-family: 'Unbounded', sans-serif;
	font-size: 15px;
	text-transform: uppercase;
}
.tr-blog--entrada .post-navigation a { text-decoration: none; }
.tr-blog--entrada .post-navigation a:hover .tr-entrada__nav-rotulo { background: #000; color: #fff; }

@media (max-width: 1199.98px) {
	.tr-blog__grid { grid-template-columns: minmax(0, 1fr); }
	.tr-blog__lateral { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 24px; }
	.tr-blog__lateral .widget { margin: 0; }
}
@media (max-width: 767.98px) {
	.tr-blog { padding-top: 24px; }
	html body .tr-blog .woocommerce-breadcrumb { margin-bottom: 24px; font-size: 12px; }
	.tr-blog__cabecera { gap: 24px; margin-bottom: 32px; }
	html body .tr-blog__h1 { font-size: 26px; }
	.tr-blog__tarjetas { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.tr-blog__texto { padding: 0 20px 24px; }
	html body .tr-entrada__titulo { font-size: 24px; }
	html body .tr-entrada__contenido h2 { font-size: 20px; }
	html body .tr-entrada__contenido h3 { font-size: 17px; }
}

/* =========================================================================
   ÍNDICE DE CONTENIDOS DE LA ENTRADA (inc/blog.php) — sustituye al plugin
   Easy Table of Contents. Numeración con contadores CSS (1, 1.1) y plegado
   con <details>, sin JavaScript.
   ========================================================================= */
.tr-indice {
	margin: 0 0 28px;
	padding: 14px 20px;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	background: #f9f9f9;
	font-size: 15px;
}
.tr-indice__titulo {
	display: flex;
	align-items: center;
	gap: 10px;
	color: #000;
	font-family: 'Unbounded', sans-serif;
	font-size: 17px;
	font-weight: 500;
	line-height: 1.4;
	list-style: none;
	cursor: pointer;
}
.tr-indice__titulo::-webkit-details-marker { display: none; }
.tr-indice__titulo::after {
	content: "";
	width: 12px;
	height: 12px;
	margin-left: auto;
	border-right: 2px solid #000;
	border-bottom: 2px solid #000;
	transform: rotate(45deg) translate(-2px, -2px);
	transition: transform .2s ease;
}
.tr-indice[open] > .tr-indice__titulo::after { transform: rotate(-135deg) translate(-2px, -2px); }
.tr-indice__titulo:focus-visible { outline: 2px solid #000; outline-offset: 2px; }
.tr-indice__nav { margin-top: 12px; }
.tr-indice__lista,
.tr-indice__sub {
	margin: 0;
	padding: 0 0 0 4px;
	list-style: none;
	counter-reset: tr-indice;
}
.tr-indice__lista li { margin: 0 0 8px; padding: 0; line-height: 1.4; }
.tr-indice__lista li::marker { content: none; }
.tr-indice__lista a,
.tr-indice__sub a {
	color: #404040;
	font-weight: 500;
	text-decoration: none;
}
.tr-indice__lista a::before {
	counter-increment: tr-indice;
	content: counters(tr-indice, ".") ". ";
	color: #6b6b6b;
	font-weight: 400;
}
.tr-indice__lista a:hover,
.tr-indice__lista a:focus-visible { color: #b8361a; text-decoration: underline; }
.tr-indice__sub { margin: 8px 0 0 18px; }
.tr-indice__sub a { font-weight: 400; font-size: 14px; }

/* Al saltar a una sección, que la cabecera fija no la tape. */
.tr-entrada__contenido :is(h2, h3)[id] { scroll-margin-top: 120px; }

@media (max-width: 767.98px) {
	.tr-indice { padding: 12px 16px; font-size: 14px; }
	.tr-indice__titulo { font-size: 15px; }
	.tr-entrada__contenido :is(h2, h3)[id] { scroll-margin-top: 90px; }
}
