/* ============================================================
   TestCoches - Single de artículo (sin Elementor)
   Tipografía editorial, tablas, embeds horizontales y
   verticales (Shorts / Reels / TikTok)
   ============================================================ */

.tc-single {
	margin: 0;
	background: #fff;
	color: var(--tc-ink);
	font-family: var(--tc-body);
	-webkit-font-smoothing: antialiased;
}

.tc-article { padding: 36px 0 8px; }
.tc-article__inner { max-width: 780px; margin: 0 auto; }

/* ---------------- Cabecera del artículo ---------------- */
.tc-kicker--link { text-decoration: none; transition: color .15s ease; }
.tc-kicker--link:hover { color: var(--tc-rojo-oscuro); }

.tc-article__title {
	margin: 10px 0 14px;
	font-family: var(--tc-display); font-weight: 700;
	font-size: clamp(32px, 4.5vw, 50px);
	line-height: 1.05; letter-spacing: 0.005em;
	color: var(--tc-ink);
}

.tc-article__lede {
	margin: 0 0 16px;
	font-size: 19px; line-height: 1.55;
	color: #3f3f44; font-weight: 500;
}

.tc-article__meta {
	display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
	font-size: 14px; color: var(--tc-muted);
	padding-bottom: 18px; margin-bottom: 22px;
	border-bottom: 1px solid var(--tc-line);
}
.tc-article__author { font-weight: 600; color: var(--tc-ink); }
.tc-article__sep { color: #c9c9c6; }

.tc-article__media { margin: 0 0 26px; }
.tc-article__media img {
	width: 100%; height: auto; display: block;
	border-radius: var(--tc-radius);
}
.tc-article__media figcaption {
	margin-top: 8px; font-size: 13px; color: var(--tc-muted);
}

/* ---------------- Cuerpo del artículo ---------------- */
.tc-content {
	font-size: 17.5px; line-height: 1.7; color: #232327;
}
.tc-content > * { margin: 0 0 1.35em; }

.tc-content a {
	color: var(--tc-rojo);
	text-decoration: underline;
	text-decoration-thickness: 1px;
	text-underline-offset: 3px;
	transition: color .15s ease;
}
.tc-content a:hover { color: var(--tc-rojo-oscuro); }

.tc-content h2, .tc-content h3, .tc-content h4 {
	font-family: var(--tc-display); font-weight: 700;
	line-height: 1.12; color: var(--tc-ink);
	margin: 1.5em 0 0.55em;
}
.tc-content h2 { font-size: clamp(26px, 3vw, 33px); }
.tc-content h2::before {
	content: ""; display: inline-block;
	width: 11px; height: 0.68em; background: var(--tc-rojo);
	margin-right: 11px; transform: translateY(0.05em);
	border-radius: 2px;
}
.tc-content h3 { font-size: clamp(22px, 2.4vw, 26px); }
.tc-content h4 { font-size: 20px; }

.tc-content ul, .tc-content ol { padding-left: 1.3em; }
.tc-content li { margin-bottom: 0.45em; }
.tc-content li::marker { color: var(--tc-rojo); font-weight: 700; }

.tc-content strong { color: var(--tc-ink); }

.tc-content blockquote {
	margin: 1.6em 0; padding: 4px 0 4px 20px;
	border-left: 4px solid var(--tc-rojo);
	font-family: var(--tc-display); font-weight: 500;
	font-size: 22px; line-height: 1.35; color: var(--tc-ink);
}
.tc-content blockquote p { margin: 0; }

.tc-content img {
	max-width: 100%; height: auto; display: block;
	border-radius: var(--tc-radius);
}
.tc-content figure { margin-left: 0; margin-right: 0; }
.tc-content figcaption {
	margin-top: 8px; font-size: 13px; color: var(--tc-muted);
}

.tc-content hr {
	border: 0; height: 1px; background: var(--tc-line); margin: 2em 0;
}

/* ---------------- Tablas (fichas técnicas) ---------------- */
.tc-table-scroll {
	overflow-x: auto; -webkit-overflow-scrolling: touch;
	margin: 1.6em 0; border-radius: var(--tc-radius);
	border: 1px solid var(--tc-line);
}
.tc-content table {
	width: 100%; min-width: 480px;
	border-collapse: collapse;
	font-size: 15px; line-height: 1.45;
	margin: 0;
}
.tc-content th {
	background: var(--tc-antracita); color: #fff;
	font-family: var(--tc-display); font-weight: 600;
	font-size: 15.5px; text-transform: uppercase; letter-spacing: 0.04em;
	text-align: left; padding: 11px 14px;
}
.tc-content td {
	padding: 10px 14px;
	border-bottom: 1px solid var(--tc-line);
}
.tc-content tr:nth-child(even) td { background: var(--tc-surface); }
.tc-content tr:last-child td { border-bottom: 0; }

/* ---------------- Embeds ---------------- */
.tc-embed { margin: 1.8em 0; }

/* PROTECCIÓN ADSENSE: los iframes de publicidad no se tocan
   jamás. Google dimensiona sus bloques con estilos inline y
   cualquier margen/tamaño nuestro los hace desbordar. */
.tc-content .sponsor-wrap iframe,
.tc-content ins.adsbygoogle iframe,
.tc-content iframe[src*="doubleclick"],
.tc-content iframe[src*="googlesyndication"] {
	margin: 0 !important;
	border-radius: 0 !important;
	background: none !important;
	display: inline-block !important;
	width: auto; height: auto;
	aspect-ratio: auto !important;
	max-width: none !important;
}

/* Contenedor de ratio fijo: el iframe va en absoluto dentro.
   Encaje perfecto siempre, da igual los atributos del embed. */
.tc-content .tc-embed {
	margin: 1.8em auto;
	max-width: 100%;
	border-radius: var(--tc-radius);
	overflow: hidden;
}

/* Horizontales: YouTube, Vimeo... 16:9 exacto */
.tc-content .tc-embed--video {
	position: relative;
	width: 100%;
	aspect-ratio: 16 / 9;
	background: #000;
}
.tc-content .tc-embed--video iframe {
	position: absolute; inset: 0;
	width: 100% !important; height: 100% !important;
	border: 0; margin: 0 !important;
	border-radius: 0;
}

/* Verticales: Shorts, Reels, TikTok. 9:16 completo y centrado
   sobre marco antracita de marca */
.tc-content .tc-embed--vertical {
	background: var(--tc-antracita);
	padding: 18px 0;
	text-align: center;
}
.tc-content .tc-embed--vertical iframe,
.tc-content iframe.tc-vertical {
	display: block;
	width: min(380px, calc(100% - 32px)) !important;
	aspect-ratio: 9 / 16;
	height: auto !important;
	border: 0; margin: 0 auto !important;
	border-radius: 8px;
	background: #000;
}

/* Embeds por script (TikTok, Instagram blockquote) */
.tc-content .tiktok-embed,
.tc-content .instagram-media {
	margin: 1.6em auto !important;
	max-width: 420px !important;
	min-width: 0 !important;
}

/* Wrappers responsive de WordPress (Gutenberg) */
.tc-content .wp-block-embed { margin: 1.6em 0; }
.tc-content .wp-block-embed__wrapper { position: relative; }

@media (max-width: 760px) {
	/* En móvil el embed horizontal va a sangre completa */
	.tc-content .tc-embed--video {
		margin-left: -20px; margin-right: -20px;
		width: auto; max-width: none;
		border-radius: 0;
	}
	/* Y los verticales aprovechan todo el ancho */
	.tc-content .tc-embed--vertical { padding: 14px 0; }
	.tc-content iframe.tc-vertical,
	.tc-content .tc-embed--vertical iframe {
		width: min(340px, calc(100% - 24px)) !important;
	}
}

/* ---------------- Tags ---------------- */
.tc-article__tags {
	display: flex; flex-wrap: wrap; gap: 8px;
	margin: 30px 0 6px;
}
.tc-tag {
	display: inline-block; padding: 6px 12px;
	background: var(--tc-surface); border: 1px solid var(--tc-line);
	border-radius: 99px;
	font-family: var(--tc-display); font-weight: 600; font-size: 14.5px;
	text-transform: uppercase; letter-spacing: 0.04em;
	color: var(--tc-ink); text-decoration: none;
	transition: border-color .15s ease, color .15s ease;
}
.tc-tag:hover { border-color: var(--tc-rojo); color: var(--tc-rojo); }

/* ---------------- CTA y relacionadas ---------------- */
.tc-article__yt { margin: 26px 0 8px; }

.tc-article__related { border-top: 1px solid var(--tc-line); margin-top: 34px; }

/* ---------------- Responsive ---------------- */
@media (max-width: 760px) {
	.tc-article { padding: 24px 0 4px; }
	.tc-content { font-size: 17px; }
	.tc-article__lede { font-size: 17.5px; }
}

@media (prefers-reduced-motion: reduce) {
	.tc-article *, .tc-article *::before { transition: none !important; }
}

/* ============================================================
   Sistema de publicidad y recirculación (script custom TC)
   ============================================================ */

/* ---- Recirculación in-content ---- */
.tc-recirc {
	margin: 28px 0;
	padding: 20px;
	background: var(--tc-surface);
	border-left: 3px solid var(--tc-rojo);
	border-radius: 0 8px 8px 0;
}
.tc-recirc__heading {
	display: block;
	font-family: var(--tc-display);
	font-size: 13px; font-weight: 700;
	text-transform: uppercase; letter-spacing: 0.07em;
	color: var(--tc-muted);
	margin-bottom: 14px;
}
.tc-recirc__list { display: flex; flex-direction: column; gap: 14px; }
.tc-recirc__card {
	display: block; text-decoration: none; color: inherit;
	padding: 6px 0; transition: opacity 0.15s ease;
}
.tc-recirc__card:hover { opacity: 0.65; }
.tc-recirc__card + .tc-recirc__card {
	border-top: 1px solid var(--tc-line); padding-top: 12px;
}
.tc-recirc__title {
	font-size: 15px; font-weight: 600; line-height: 1.4;
	color: var(--tc-ink);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.tc-recirc__skeleton { height: 20px; border-radius: 4px; background: #e4e4e4; }
.tc-recirc__skeleton + .tc-recirc__skeleton { margin-top: 14px; }
.tc-recirc--loading .tc-recirc__skeleton {
	animation: tc-recirc-shimmer 1.5s ease-in-out infinite;
}
.tc-recirc__skeleton:first-child { width: 85%; }
.tc-recirc__skeleton:last-child { width: 70%; }
@keyframes tc-recirc-shimmer {
	0%, 100% { opacity: 1; }
	50%      { opacity: 0.5; }
}

@media (max-width: 480px) {
	.tc-recirc { padding: 16px; margin: 22px 0; }
	.tc-recirc__title { font-size: 14px; }
}

/* ---- Bloque publicitario ---- */
.sponsor-wrap {
	text-align: center;
	margin: 20px 0;
	position: relative;
	max-width: none !important;
	padding-left: 0 !important;
	padding-right: 0 !important;
	overflow: visible !important;
}
.sponsor-label {
	display: inline-block;
	font-size: 10px; font-weight: 600;
	color: #999; letter-spacing: 0.08em;
	background: #f7f7f8;
	padding: 3px 14px; margin-bottom: 0;
}
.sponsor-box {
	display: flex; align-items: center; justify-content: center;
	min-height: 280px; position: relative;
	width: 100vw !important;
	max-width: none !important;
	margin-left: calc(-50vw + 50%) !important;
	margin-right: 0 !important;
	padding: 0 !important;
	box-sizing: border-box !important;
	background-color: #f7f7f8;
	background-image: repeating-linear-gradient(
		-45deg,
		transparent, transparent 8px,
		rgba(0, 0, 0, 0.018) 8px, rgba(0, 0, 0, 0.018) 9px
	);
}
.sponsor-box .adsbygoogle { width: 100%; }
.sponsor-box[data-loaded="0"]::after {
	content: '';
	position: absolute; inset: 0;
	background: linear-gradient(90deg, transparent 0%, rgba(255,255,255,0.4) 50%, transparent 100%);
	background-size: 200% 100%;
	animation: sponsor-shimmer 1.8s ease-in-out infinite;
}
@keyframes sponsor-shimmer {
	0%   { background-position: 200% 0; }
	100% { background-position: -200% 0; }
}
.sponsor-box[data-loaded="1"] .adsbygoogle { animation: sponsor-fadein 0.3s ease-out; }
@keyframes sponsor-fadein { from { opacity: 0; } to { opacity: 1; } }

/* ---- Hint de scroll en tablas ---- */
.table-hint {
	font-size: 12px; color: var(--tc-muted);
	text-align: right; padding: 4px 2px;
	transition: opacity 0.4s ease;
}
.table-hint-arrow {
	display: inline-block;
	animation: hint-nudge 1.2s ease-in-out infinite;
}
@keyframes hint-nudge {
	0%, 100% { transform: translateX(0); }
	50%      { transform: translateX(4px); }
}
.table-hint-hidden { opacity: 0; pointer-events: none; }

/* ============================================================
   Pasada mobile-first del single
   ============================================================ */
@media (max-width: 760px) {
	.tc-article__media { margin-left: -20px; margin-right: -20px; }
	.tc-article__media img { border-radius: 0; }
	.tc-article__media figcaption { padding: 0 20px; }
	.tc-article__title { font-size: clamp(29px, 8vw, 40px); }
	.tc-content blockquote { font-size: 20px; padding-left: 16px; }
}

/* Barra de progreso de lectura */
.tc-progress {
	position: fixed; top: 0; left: 0;
	width: 100%; height: 3px;
	background: var(--tc-rojo);
	transform: scaleX(0); transform-origin: 0 0;
	z-index: 300;
	pointer-events: none;
}
@media (prefers-reduced-motion: reduce) {
	.tc-progress { display: none; }
}
