/* =========================================================================
   ITV Defectos: diseño de la web (pensado para GeneratePress)
   ====================================================================== */

:root {
	--itvd-azul: #1d4ed8;
	--itvd-azul-claro: #eff4ff;
	--itvd-marino: #0b1f4d;
	--itvd-ambar: #f59e0b;
	--itvd-ambar-claro: #fff7e6;
	--itvd-rojo: #dc2626;
	--itvd-rojo-claro: #fef2f2;
	--itvd-verde: #059669;
	--itvd-verde-claro: #ecfdf5;
	--itvd-texto: #1f2937;
	--itvd-suave: #6b7280;
	--itvd-borde: #e5e7eb;
	--itvd-fondo: #f5f7fb;
	--itvd-blanco: #fff;
	--itvd-radio: 14px;
	--itvd-sombra: 0 1px 2px rgba(15, 23, 42, .06), 0 4px 16px rgba(15, 23, 42, .06);
	--itvd-sombra-alta: 0 10px 30px rgba(15, 23, 42, .14);
	--itvd-letra: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
	--itvd-rapido: .25s cubic-bezier(.2, .7, .2, 1);
}

html { scroll-behavior: smooth; }

body.itvd {
	background: var(--itvd-fondo);
	color: var(--itvd-texto);
	font-family: var(--itvd-letra);
	font-size: 17px;
	line-height: 1.7;
	-webkit-font-smoothing: antialiased;
}

.itvd a { color: var(--itvd-azul); transition: color var(--itvd-rapido); }
.itvd a:hover { color: var(--itvd-marino); }
.itvd h1, .itvd h2, .itvd h3, .itvd h4 { color: var(--itvd-marino); font-family: var(--itvd-letra); font-weight: 800; letter-spacing: -.015em; line-height: 1.25; }
.itvd ::selection { background: var(--itvd-ambar); color: var(--itvd-marino); }
.itvd :focus-visible { outline: 3px solid var(--itvd-ambar); outline-offset: 2px; border-radius: 4px; }

/* --- Cabecera --------------------------------------------------------- */

.itvd .site-header {
	position: sticky;
	top: 0;
	z-index: 100;
	background: rgba(255, 255, 255, .96);
	-webkit-backdrop-filter: saturate(180%) blur(10px);
	backdrop-filter: saturate(180%) blur(10px);
	border-bottom: 1px solid var(--itvd-borde);
	transition: box-shadow var(--itvd-rapido);
}
.admin-bar.itvd .site-header { top: 32px; }
@media (max-width: 782px) { .admin-bar.itvd .site-header { top: 0; position: relative; } }
.itvd .site-header.itvd-con-sombra { box-shadow: 0 6px 20px rgba(15, 23, 42, .08); }
.itvd .inside-header { padding-top: 14px; padding-bottom: 14px; align-items: center; }

.itvd .main-title { font-size: 22px; font-weight: 800; line-height: 1.2; margin: 0; letter-spacing: -.02em; }
.itvd .main-title a { display: inline-flex; align-items: center; gap: 10px; color: var(--itvd-marino); text-decoration: none; }
.itvd .main-title a::before {
	content: "";
	flex: none;
	width: 38px;
	height: 38px;
	border-radius: 10px;
	background: var(--itvd-ambar) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%230b1f4d' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M7 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0'/%3E%3Cpath d='M17 17m-2 0a2 2 0 1 0 4 0a2 2 0 1 0 -4 0'/%3E%3Cpath d='M5 17h-2v-6l2 -5h9l4 5h1a2 2 0 0 1 2 2v4h-2m-4 0h-6m-6 -6h15m-6 0v-5'/%3E%3C/svg%3E") center / 24px no-repeat;
	box-shadow: 0 3px 10px rgba(245, 158, 11, .35);
	transition: transform var(--itvd-rapido);
}
.itvd .main-title a:hover::before { transform: rotate(-6deg) scale(1.06); }
.itvd .site-description { font-size: 13px; color: var(--itvd-suave); margin: 2px 0 0 48px; }

/* Menú */
.itvd .main-navigation,
.itvd .main-navigation ul ul { background: transparent; }
.itvd .main-navigation .main-nav ul li a {
	position: relative;
	color: var(--itvd-texto);
	font-weight: 650;
	font-size: 15px;
	transition: color var(--itvd-rapido);
}
.itvd .main-navigation .main-nav ul li a::after {
	content: "";
	position: absolute;
	left: 20px;
	right: 20px;
	bottom: 10px;
	height: 3px;
	border-radius: 3px;
	background: var(--itvd-ambar);
	transform: scaleX(0);
	transition: transform var(--itvd-rapido);
}
.itvd .main-navigation .main-nav ul li a:hover,
.itvd .main-navigation .main-nav ul li.current-menu-item > a,
.itvd .main-navigation .main-nav ul li.current-post-ancestor > a,
.itvd .main-navigation .main-nav ul li.current-menu-parent > a { color: var(--itvd-azul); background: transparent; }
.itvd .main-navigation .main-nav ul li a:hover::after,
.itvd .main-navigation .main-nav ul li.current-menu-item > a::after,
.itvd .main-navigation .main-nav ul li.current-post-ancestor > a::after,
.itvd .main-navigation .main-nav ul li.current-menu-parent > a::after { transform: scaleX(1); }
.itvd .main-navigation .menu-toggle { color: var(--itvd-marino); background: transparent; font-weight: 700; }
.itvd .main-navigation.toggled .main-nav ul li a::after { display: none; }
.itvd .main-navigation.toggled .main-nav > ul { background: var(--itvd-blanco); border-top: 1px solid var(--itvd-borde); }

/* --- Portada: bienvenida ---------------------------------------------- */

.itvd-hero {
	position: relative;
	overflow: hidden;
	color: #fff;
	background:
		radial-gradient(900px 400px at 85% -10%, rgba(245, 158, 11, .28), transparent 60%),
		radial-gradient(700px 380px at -10% 110%, rgba(59, 130, 246, .35), transparent 60%),
		linear-gradient(135deg, #0b1f4d 0%, #123a8c 55%, #1d4ed8 100%);
	padding: 64px 20px 72px;
}
.itvd-hero::after {
	content: "";
	position: absolute;
	inset: 0;
	background-image: linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
	background-size: 36px 36px;
	-webkit-mask-image: linear-gradient(180deg, #000, transparent 85%);
	mask-image: linear-gradient(180deg, #000, transparent 85%);
	pointer-events: none;
}
.itvd-hero__dentro { position: relative; z-index: 1; max-width: 1100px; margin: 0 auto; text-align: center; }
.itvd-hero__sello {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	margin: 0 0 18px;
	padding: 6px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .12);
	border: 1px solid rgba(255, 255, 255, .22);
	font-size: 14px;
	font-weight: 600;
	animation: itvd-entrar .6s both;
}
.itvd-hero__sello .itvd-icono { width: 18px; height: 18px; color: var(--itvd-ambar); }
.itvd .itvd-hero__titulo {
	color: #fff;
	font-size: clamp(32px, 5.4vw, 54px);
	line-height: 1.08;
	letter-spacing: -.03em;
	max-width: 820px;
	margin: 0 auto 18px;
	animation: itvd-entrar .6s .08s both;
}
.itvd-hero__titulo span { color: var(--itvd-ambar); }
.itvd-hero__texto { font-size: clamp(17px, 2vw, 19px); max-width: 680px; margin: 0 auto 28px; color: rgba(255, 255, 255, .86); animation: itvd-entrar .6s .16s both; }

.itvd-buscador {
	display: flex;
	max-width: 620px;
	margin: 0 auto 40px;
	padding: 6px;
	background: #fff;
	border-radius: 999px;
	box-shadow: 0 12px 40px rgba(0, 0, 0, .25);
	animation: itvd-entrar .6s .24s both;
}
.itvd-buscador input[type="search"] {
	flex: 1;
	min-width: 0;
	border: 0;
	background: transparent;
	padding: 12px 18px;
	font-size: 16px;
	color: var(--itvd-texto);
	outline: none;
}
.itvd-buscador button {
	flex: none;
	border: 0;
	border-radius: 999px;
	padding: 12px 24px;
	background: var(--itvd-ambar);
	color: var(--itvd-marino);
	font-weight: 800;
	font-size: 16px;
	cursor: pointer;
	transition: transform var(--itvd-rapido), background var(--itvd-rapido);
}
.itvd-buscador button:hover { background: #fbbf24; transform: translateY(-1px); }

.itvd-cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; text-align: left; }
.itvd-cat {
	--c: var(--itvd-azul);
	--c-claro: var(--itvd-azul-claro);
	position: relative;
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 22px 22px 20px;
	border-radius: var(--itvd-radio);
	background: #fff;
	color: var(--itvd-texto) !important;
	text-decoration: none;
	box-shadow: var(--itvd-sombra);
	border-top: 4px solid var(--c);
	transition: transform var(--itvd-rapido), box-shadow var(--itvd-rapido);
	animation: itvd-entrar .6s both;
}
.itvd-cat:nth-child(1) { animation-delay: .3s; }
.itvd-cat:nth-child(2) { animation-delay: .38s; }
.itvd-cat:nth-child(3) { animation-delay: .46s; }
.itvd-cat:hover { transform: translateY(-6px); box-shadow: var(--itvd-sombra-alta); }
.itvd-cat--rojo { --c: var(--itvd-rojo); --c-claro: var(--itvd-rojo-claro); }
.itvd-cat--verde { --c: var(--itvd-verde); --c-claro: var(--itvd-verde-claro); }
.itvd-cat__icono { width: 46px; height: 46px; padding: 10px; border-radius: 12px; background: var(--c-claro); color: var(--c); margin-bottom: 6px; transition: transform var(--itvd-rapido); }
.itvd-cat:hover .itvd-cat__icono { transform: scale(1.08) rotate(-4deg); }
.itvd-cat__nombre { font-size: 20px; font-weight: 800; color: var(--itvd-marino); }
.itvd-cat__texto { font-size: 15px; line-height: 1.5; color: var(--itvd-suave); }
.itvd-cat__num { margin-top: 6px; font-size: 14px; font-weight: 700; color: var(--c); }
.itvd-cat__num::after { content: " →"; display: inline-block; transition: transform var(--itvd-rapido); }
.itvd-cat:hover .itvd-cat__num::after { transform: translateX(4px); }

.itvd .itvd-seccion-titulo {
	grid-column: 1 / -1;
	display: flex;
	align-items: center;
	gap: 12px;
	font-size: 26px;
	margin: 6px 0 18px;
}
.itvd .itvd-seccion-titulo::before { content: ""; width: 6px; height: 26px; border-radius: 3px; background: var(--itvd-ambar); }

/* --- Cabecera de categoría -------------------------------------------- */

.itvd-cabecera-cat {
	--c: var(--itvd-azul);
	--c-claro: var(--itvd-azul-claro);
	display: flex;
	align-items: center;
	gap: 20px;
	padding: 28px;
	margin: 0 0 24px;
	border-radius: var(--itvd-radio);
	background: linear-gradient(120deg, var(--c-claro), #fff 70%);
	border: 1px solid var(--itvd-borde);
	border-left: 6px solid var(--c);
	box-shadow: var(--itvd-sombra);
	animation: itvd-entrar .5s both;
}
.itvd-cabecera-cat--rojo { --c: var(--itvd-rojo); --c-claro: var(--itvd-rojo-claro); }
.itvd-cabecera-cat--verde { --c: var(--itvd-verde); --c-claro: var(--itvd-verde-claro); }
.itvd-cabecera-cat__icono { flex: none; width: 64px; height: 64px; padding: 14px; border-radius: 16px; background: var(--c); color: #fff; }
.itvd-cabecera-cat__antetitulo { margin: 0; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--c); }
.itvd .itvd-cabecera-cat h1 { margin: 0 0 4px; font-size: clamp(28px, 4vw, 38px); }
.itvd-cabecera-cat p:last-child { margin: 0; color: var(--itvd-suave); }
.itvd.category .page-header { display: none; } /* ya lo pinta la cabecera de arriba */

/* --- Lista de artículos en tarjetas (portada, categorías, búsqueda) --- */

.itvd .site-content { padding-top: 32px; }
.itvd.blog .site-main,
.itvd.archive .site-main,
.itvd.search .site-main {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 22px;
	align-items: stretch;
}
.itvd.blog .site-main > *,
.itvd.archive .site-main > *,
.itvd.search .site-main > * { margin: 0 !important; }
.itvd.blog .site-main > :not(article),
.itvd.archive .site-main > :not(article),
.itvd.search .site-main > :not(article) { grid-column: 1 / -1; }

.itvd.blog .site-main article,
.itvd.archive .site-main article,
.itvd.search .site-main article {
	position: relative;
	display: flex;
	background: #fff;
	border-radius: var(--itvd-radio);
	box-shadow: var(--itvd-sombra);
	overflow: hidden;
	transition: transform var(--itvd-rapido), box-shadow var(--itvd-rapido);
}
.itvd.blog .site-main article:hover,
.itvd.archive .site-main article:hover,
.itvd.search .site-main article:hover { transform: translateY(-5px); box-shadow: var(--itvd-sombra-alta); }

.itvd.blog .inside-article,
.itvd.archive .inside-article,
.itvd.search .inside-article {
	display: flex;
	flex-direction: column;
	width: 100%;
	padding: 0 !important;
	background: transparent;
}
.itvd.blog .post-image,
.itvd.archive .post-image,
.itvd.search .post-image { order: -1; margin: 0 !important; overflow: hidden; aspect-ratio: 16 / 9; background: var(--itvd-marino); }
.itvd .post-image a { display: block; height: 100%; }
.itvd .post-image img { display: block; width: 100%; height: 100%; object-fit: cover; transition: transform .5s cubic-bezier(.2, .7, .2, 1); }
.itvd .site-main article:hover .post-image img { transform: scale(1.05); }

.itvd.blog .entry-header,
.itvd.archive .entry-header,
.itvd.search .entry-header { padding: 20px 22px 0; }
.itvd.blog .entry-title,
.itvd.archive .entry-title,
.itvd.search .entry-title { font-size: 20px; line-height: 1.3; margin: 0 0 6px; }
.itvd .site-main article .entry-title a { color: var(--itvd-marino); text-decoration: none; }
/* toda la tarjeta se puede pulsar */
.itvd.blog .entry-title a::after,
.itvd.archive .entry-title a::after,
.itvd.search .entry-title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.itvd .site-main article:hover .entry-title a { color: var(--itvd-azul); }
.itvd.blog .entry-header .entry-meta,
.itvd.archive .entry-header .entry-meta,
.itvd.search .entry-header .entry-meta { font-size: 13px; color: var(--itvd-suave); }
.itvd.blog .entry-summary,
.itvd.archive .entry-summary,
.itvd.search .entry-summary { padding: 8px 22px 0; margin: 0; font-size: 15.5px; line-height: 1.6; color: #4b5563; }
.itvd.blog .entry-summary p,
.itvd.archive .entry-summary p,
.itvd.search .entry-summary p { margin: 0; }
.itvd .entry-summary .read-more-container,
.itvd .entry-summary .read-more { display: none; }
.itvd.blog .inside-article > footer.entry-meta,
.itvd.archive .inside-article > footer.entry-meta,
.itvd.search .inside-article > footer.entry-meta {
	margin-top: auto;
	padding: 14px 22px 18px;
	font-size: 13px;
}
.itvd .inside-article > footer.entry-meta .comments-link,
.itvd .inside-article > footer.entry-meta .tags-links { display: none; }
.itvd .cat-links { position: relative; z-index: 2; }
.itvd .cat-links .gp-icon { display: none; }
.itvd .cat-links a {
	display: inline-block;
	padding: 3px 10px;
	border-radius: 999px;
	background: var(--itvd-azul-claro);
	color: var(--itvd-azul);
	font-weight: 700;
	font-size: 12px;
	text-decoration: none;
	text-transform: uppercase;
	letter-spacing: .04em;
}
.itvd .paging-navigation,
.itvd .page-header { grid-column: 1 / -1; }
.itvd .paging-navigation .nav-links { display: flex; gap: 8px; justify-content: center; }
.itvd .paging-navigation .page-numbers { padding: 8px 14px; border-radius: 10px; background: #fff; box-shadow: var(--itvd-sombra); text-decoration: none; font-weight: 700; }
.itvd .paging-navigation .page-numbers.current { background: var(--itvd-azul); color: #fff; }

/* --- Artículo ---------------------------------------------------------- */

.itvd.single .inside-article,
.itvd.page .inside-article {
	border-radius: var(--itvd-radio);
	box-shadow: var(--itvd-sombra);
	background: #fff;
}
@media (min-width: 769px) {
	.itvd.single .inside-article,
	.itvd.page .inside-article { padding: 44px 52px; }
}
.itvd.single .featured-image { margin: -44px -52px 28px; overflow: hidden; border-radius: var(--itvd-radio) var(--itvd-radio) 0 0; }
.itvd.single .featured-image img { display: block; width: 100%; height: auto; }
@media (max-width: 768px) {
	.itvd.single .featured-image { margin: -30px -30px 22px; }
}
.itvd.single .entry-title,
.itvd.page .entry-title { font-size: clamp(28px, 4.2vw, 40px); line-height: 1.15; letter-spacing: -.025em; margin-bottom: 10px; }
.itvd.single .entry-header .entry-meta,
.itvd.single .inside-article > footer.entry-meta { display: none; } /* la fecha y el autor ya van en la barra de abajo */

.itvd .entry-content > p:first-of-type { font-size: 1.08em; color: #374151; }
.itvd .entry-content h2 {
	position: relative;
	font-size: clamp(24px, 3vw, 29px);
	margin: 2.1em 0 .7em;
	padding-left: 18px;
	scroll-margin-top: 100px;
}
.itvd .entry-content h2::before {
	content: "";
	position: absolute;
	left: 0;
	top: .15em;
	bottom: .15em;
	width: 5px;
	border-radius: 3px;
	background: linear-gradient(var(--itvd-ambar), #f97316);
}
.itvd .entry-content h3 { font-size: 21px; margin: 1.6em 0 .5em; }
.itvd .entry-content strong { color: #111827; }
.itvd .entry-content a:not(.itvd-pastilla) {
	text-decoration: underline;
	text-decoration-color: rgba(29, 78, 216, .35);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
	transition: text-decoration-color var(--itvd-rapido), color var(--itvd-rapido);
}
.itvd .entry-content a:not(.itvd-pastilla):hover { text-decoration-color: var(--itvd-ambar); }

/* Barra de datos */
.itvd-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; margin: 0 0 26px; padding-bottom: 20px; border-bottom: 1px solid var(--itvd-borde); font-size: 14px; color: var(--itvd-suave); }
.itvd-meta > span { display: inline-flex; align-items: center; gap: 6px; }
.itvd-meta .itvd-icono { width: 17px; height: 17px; }
.itvd-meta__oficial { color: var(--itvd-verde); font-weight: 650; }
.itvd-pastilla {
	--c: var(--itvd-azul);
	--c-claro: var(--itvd-azul-claro);
	display: inline-block;
	padding: 4px 12px;
	border-radius: 999px;
	background: var(--c-claro);
	color: var(--c) !important;
	font-weight: 800;
	font-size: 12px;
	text-transform: uppercase;
	letter-spacing: .05em;
	text-decoration: none !important;
	transition: background var(--itvd-rapido), color var(--itvd-rapido);
}
.itvd-pastilla:hover { background: var(--c); color: #fff !important; }
.itvd-pastilla--rojo { --c: var(--itvd-rojo); --c-claro: var(--itvd-rojo-claro); }
.itvd-pastilla--verde { --c: var(--itvd-verde); --c-claro: var(--itvd-verde-claro); }

/* Respuesta rápida */
.itvd-respuesta {
	position: relative;
	margin: 26px 0 30px;
	padding: 22px 24px 22px 24px;
	border-radius: var(--itvd-radio);
	background: linear-gradient(135deg, var(--itvd-ambar-claro), #fffdf7);
	border: 1px solid #fde68a;
	border-left: 6px solid var(--itvd-ambar);
	box-shadow: 0 6px 20px rgba(245, 158, 11, .12);
}
.itvd-respuesta p { margin: 0; }
.itvd .itvd-respuesta .itvd-respuesta__etiqueta { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 8px; font-size: 13px; font-weight: 800; text-transform: uppercase; letter-spacing: .07em; color: #b45309; }
.itvd-respuesta__etiqueta .itvd-icono { width: 18px; height: 18px; fill: var(--itvd-ambar); stroke: #b45309; }

/* Índice */
.itvd-indice { margin: 0 0 32px; border: 1px solid var(--itvd-borde); border-radius: var(--itvd-radio); background: #f9fafb; overflow: hidden; }
.itvd-indice summary {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 16px 20px;
	cursor: pointer;
	list-style: none;
	font-weight: 800;
	color: var(--itvd-marino);
}
.itvd-indice summary::-webkit-details-marker { display: none; }
.itvd-indice summary::after { content: ""; margin-left: auto; width: 10px; height: 10px; border-right: 2.5px solid currentColor; border-bottom: 2.5px solid currentColor; transform: rotate(45deg); transition: transform var(--itvd-rapido); }
.itvd-indice details[open] summary::after { transform: rotate(-135deg); }
.itvd-indice summary .itvd-icono { width: 20px; height: 20px; color: var(--itvd-azul); }
.itvd-indice ol { counter-reset: itvd-i; list-style: none; margin: 0; padding: 0 20px 16px; columns: 2 260px; column-gap: 28px; }
.itvd-indice li { counter-increment: itvd-i; break-inside: avoid; margin: 0; padding: 5px 0; }
.itvd-indice li a { display: flex; gap: 10px; color: var(--itvd-texto) !important; text-decoration: none !important; font-size: 15px; line-height: 1.45; transition: color var(--itvd-rapido), transform var(--itvd-rapido); }
.itvd-indice li a::before { content: counter(itvd-i); flex: none; width: 22px; height: 22px; border-radius: 6px; background: var(--itvd-azul-claro); color: var(--itvd-azul); font-size: 12px; font-weight: 800; display: grid; place-items: center; margin-top: 1px; }
.itvd-indice li a:hover { color: var(--itvd-azul) !important; transform: translateX(3px); }
.itvd-indice li a.itvd-activo { color: var(--itvd-azul) !important; font-weight: 700; }

/* Tablas */
.itvd .entry-content .wp-block-table,
.itvd .entry-content figure.wp-block-table { margin: 1.6em 0; overflow-x: auto; border-radius: 12px; box-shadow: 0 0 0 1px var(--itvd-borde), var(--itvd-sombra); -webkit-overflow-scrolling: touch; }
.itvd .entry-content table { width: 100%; border-collapse: collapse; border: 0; margin: 0; font-size: 15px; line-height: 1.5; background: #fff; }
.itvd .entry-content .wp-block-table table { display: table; }
.itvd .entry-content th { background: var(--itvd-marino); color: #fff; text-align: left; font-weight: 700; padding: 12px 14px; border: 0; white-space: nowrap; }
.itvd .entry-content td { padding: 11px 14px; border: 0; border-top: 1px solid var(--itvd-borde); vertical-align: top; }
.itvd .entry-content tbody tr:nth-child(even) td { background: #f9fafb; }
.itvd .entry-content tbody tr { transition: background var(--itvd-rapido); }
.itvd .entry-content tbody tr:hover td { background: var(--itvd-azul-claro); }
.itvd .entry-content td:first-child { font-weight: 600; color: #111827; }
@media (max-width: 600px) {
	.itvd .entry-content th { white-space: normal; }
	.itvd .entry-content table { font-size: 14px; }
	.itvd .entry-content th, .itvd .entry-content td { padding: 9px 10px; -webkit-hyphens: auto; hyphens: auto; overflow-wrap: anywhere; }
}

/* Listas y pasos */
.itvd .entry-content ul:not(.itvd-pie) { list-style: none; margin-left: 0; padding-left: 0; }
.itvd .entry-content ul:not(.itvd-pie) > li { position: relative; padding-left: 28px; margin: .45em 0; }
.itvd .entry-content ul:not(.itvd-pie) > li::before { content: ""; position: absolute; left: 6px; top: .62em; width: 9px; height: 9px; border-radius: 3px; background: var(--itvd-ambar); transform: rotate(45deg); }
.itvd .entry-content ol:not(.itvd-indice ol) { list-style: none; counter-reset: itvd-paso; margin-left: 0; padding-left: 0; }
.itvd .entry-content ol:not(.itvd-indice ol) > li {
	counter-increment: itvd-paso;
	position: relative;
	padding: 14px 16px 14px 62px;
	margin: 0 0 10px;
	background: #f9fafb;
	border: 1px solid var(--itvd-borde);
	border-radius: 12px;
	transition: border-color var(--itvd-rapido), box-shadow var(--itvd-rapido), transform var(--itvd-rapido);
}
.itvd .entry-content ol:not(.itvd-indice ol) > li:hover { border-color: #bfdbfe; box-shadow: var(--itvd-sombra); transform: translateX(3px); }
.itvd .entry-content ol:not(.itvd-indice ol) > li::before {
	content: counter(itvd-paso);
	position: absolute;
	left: 14px;
	top: 13px;
	width: 34px;
	height: 34px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--itvd-azul);
	color: #fff;
	font-weight: 800;
	font-size: 15px;
	box-shadow: 0 3px 8px rgba(29, 78, 216, .3);
}

/* Preguntas frecuentes */
.itvd-faqs { margin-top: 2.2em; }
.itvd-faq {
	margin: 0 0 12px;
	border: 1px solid var(--itvd-borde);
	border-radius: 12px;
	background: #fff;
	transition: border-color var(--itvd-rapido), box-shadow var(--itvd-rapido);
}
.itvd-faq:hover { border-color: #bfdbfe; }
.itvd-faq[open] { border-color: #93c5fd; box-shadow: 0 6px 20px rgba(29, 78, 216, .08); }
.itvd-faq summary { display: flex; align-items: center; gap: 14px; padding: 16px 20px; cursor: pointer; list-style: none; }
.itvd-faq summary::-webkit-details-marker { display: none; }
.itvd .itvd-faq__pregunta { margin: 0 !important; font-size: 17px !important; line-height: 1.4; flex: 1; }
.itvd-faq summary::after {
	content: "+";
	flex: none;
	width: 30px;
	height: 30px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--itvd-azul-claro);
	color: var(--itvd-azul);
	font-weight: 800;
	font-size: 20px;
	line-height: 1;
	transition: transform var(--itvd-rapido), background var(--itvd-rapido), color var(--itvd-rapido);
}
.itvd-faq[open] summary::after { transform: rotate(45deg); background: var(--itvd-azul); color: #fff; }
.itvd-faq__respuesta { padding: 0 20px 4px; color: #374151; }
.itvd-faq[open] .itvd-faq__respuesta { animation: itvd-desplegar .3s ease-out; }

/* Fuentes oficiales */
.itvd-fuentes { position: relative; margin: 2.4em 0 1.5em; padding: 22px 24px 8px 76px; border-radius: var(--itvd-radio); background: var(--itvd-verde-claro); border: 1px solid #a7f3d0; }
.itvd-fuentes__icono { position: absolute; left: 22px; top: 22px; width: 38px; height: 38px; padding: 8px; border-radius: 10px; background: var(--itvd-verde); color: #fff; }
.itvd .itvd-fuentes h2 { margin: 0 0 .4em; padding: 0; font-size: 20px; }
.itvd .itvd-fuentes h2::before { display: none; }
.itvd .entry-content .itvd-fuentes ul > li::before { background: var(--itvd-verde); }

/* Autor */
.itvd-autor { display: flex; gap: 16px; align-items: flex-start; margin: 1.5em 0 0; padding: 20px 22px; border-radius: var(--itvd-radio); background: #f9fafb; border: 1px solid var(--itvd-borde); font-size: 15px; color: #4b5563; }
.itvd-autor p { margin: 0; }
.itvd-autor__avatar { flex: none; width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: linear-gradient(135deg, var(--itvd-azul), var(--itvd-marino)); color: #fff; font-weight: 800; font-size: 20px; box-shadow: 0 0 0 3px #fff, 0 0 0 5px var(--itvd-ambar); }

/* Relacionados en tarjetas */
.itvd-relacionados { margin: 2.6em 0 0; padding: 0; background: none; }
.itvd .itvd-relacionados__titulo { display: flex; align-items: center; gap: 10px; font-size: 22px; font-weight: 800; color: var(--itvd-marino); margin: 0 0 16px; }
.itvd .itvd-relacionados__titulo::before { content: ""; width: 5px; height: 22px; border-radius: 3px; background: var(--itvd-ambar); }
.itvd .entry-content .itvd-relacionados ul { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin: 0; padding: 0; }
.itvd .entry-content .itvd-relacionados ul > li { margin: 0; padding: 0; }
.itvd .entry-content .itvd-relacionados ul > li::before { display: none; }
.itvd .entry-content .itvd-relacionados a {
	display: flex;
	flex-direction: column;
	height: 100%;
	border-radius: 12px;
	overflow: hidden;
	background: #fff;
	border: 1px solid var(--itvd-borde);
	text-decoration: none;
	color: var(--itvd-marino);
	transition: transform var(--itvd-rapido), box-shadow var(--itvd-rapido), border-color var(--itvd-rapido);
}
.itvd .entry-content .itvd-relacionados a:hover { transform: translateY(-4px); box-shadow: var(--itvd-sombra-alta); border-color: transparent; }
.itvd-relacionados__img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.itvd-relacionados__texto { display: flex; flex-direction: column; gap: 4px; padding: 12px 14px 14px; }
.itvd-relacionados__cat { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--itvd-ambar); }
.itvd-relacionados__nombre { font-weight: 750; font-size: 15.5px; line-height: 1.35; }

/* Anuncios: espacio reservado discreto */
.itvd .itvd-anuncio { border-color: var(--itvd-borde); }

/* --- Barra lateral ------------------------------------------------------ */

.itvd .sidebar .widget {
	background: #fff;
	border-radius: var(--itvd-radio);
	box-shadow: var(--itvd-sombra);
	padding: 22px;
}
.itvd .sidebar .widget:has(.wp-block-latest-comments),
.itvd .sidebar .widget:has(.wp-block-archives),
.itvd .sidebar .widget_recent_comments,
.itvd .sidebar .widget_archive,
.itvd .sidebar .widget_meta { display: none; }
.itvd .sidebar .widget h2,
.itvd .sidebar .widget .widget-title { font-size: 17px; margin: 0 0 12px; }
.itvd .sidebar .widget ul { list-style: none; margin: 0; padding: 0; }
.itvd .sidebar .widget li { margin: 0; padding: 8px 0; border-top: 1px solid var(--itvd-borde); font-size: 15px; line-height: 1.45; }
.itvd .sidebar .widget li:first-child { border-top: 0; padding-top: 0; }
.itvd .sidebar .widget li a { color: var(--itvd-texto); text-decoration: none; transition: color var(--itvd-rapido), padding var(--itvd-rapido); }
.itvd .sidebar .widget li a:hover { color: var(--itvd-azul); padding-left: 4px; }
.itvd .sidebar .wp-block-search__inside-wrapper { border: 1px solid var(--itvd-borde); border-radius: 999px; padding: 4px; overflow: hidden; }
.itvd .sidebar .wp-block-search__input { border: 0; background: transparent; padding: 8px 12px; }
.itvd .sidebar .wp-block-search__button { border: 0; border-radius: 999px; background: var(--itvd-azul); color: #fff; padding: 8px 16px; font-weight: 700; margin-left: 0; }

/* --- Pie ---------------------------------------------------------------- */

.itvd .site-footer,
.itvd .site-info { background: var(--itvd-marino); color: rgba(255, 255, 255, .7); }
.itvd .site-info { border-top: 4px solid var(--itvd-ambar); font-size: 14px; }
.itvd .inside-site-info { padding-top: 34px; padding-bottom: 34px; }
.itvd .site-info a,
.itvd .itvd-pie a { color: rgba(255, 255, 255, .85); text-decoration: none !important; }
.itvd .site-info a:hover { color: var(--itvd-ambar); }
.itvd .itvd-pie { gap: .4em 1.6em !important; margin-bottom: 1em !important; }

/* --- Barra de progreso y botón de subir ------------------------------- */

.itvd-progreso { position: fixed; top: 0; left: 0; right: 0; height: 4px; z-index: 1000; pointer-events: none; }
.itvd-progreso span { display: block; height: 100%; width: 100%; transform: scaleX(0); transform-origin: 0 50%; background: linear-gradient(90deg, var(--itvd-ambar), #f97316); }
.admin-bar .itvd-progreso { top: 32px; }

.itvd-arriba {
	position: fixed;
	right: 20px;
	bottom: 20px;
	z-index: 90;
	width: 48px;
	height: 48px;
	border-radius: 50%;
	display: grid;
	place-items: center;
	background: var(--itvd-marino);
	color: #fff !important;
	box-shadow: var(--itvd-sombra-alta);
	opacity: 0;
	visibility: hidden;
	transform: translateY(14px);
	transition: opacity var(--itvd-rapido), transform var(--itvd-rapido), visibility var(--itvd-rapido), background var(--itvd-rapido);
}
.itvd-arriba.itvd-visible { opacity: 1; visibility: visible; transform: none; }
.itvd-arriba:hover { background: var(--itvd-azul); }
.itvd-arriba .itvd-icono { width: 22px; height: 22px; }

.itvd-icono { width: 1em; height: 1em; flex: none; vertical-align: middle; }

/* --- Aparecer al bajar (solo lo que está fuera de la pantalla al cargar) */

.itvd-js .itvd-aparece { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s cubic-bezier(.2, .7, .2, 1); }
.itvd-js .itvd-aparece.itvd-visto { opacity: 1; transform: none; }

@keyframes itvd-entrar { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: none; } }
@keyframes itvd-desplegar { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* --- Móvil --------------------------------------------------------------- */

@media (max-width: 900px) {
	.itvd-cats { grid-template-columns: 1fr; gap: 12px; }
	.itvd-cat { flex-direction: row; flex-wrap: wrap; align-items: center; column-gap: 14px; padding: 16px 18px; }
	.itvd-cat__icono { margin: 0; }
	.itvd-cat__nombre { flex: 1; }
	.itvd-cat__texto { flex-basis: 100%; }
}
@media (max-width: 768px) {
	body.itvd { font-size: 16.5px; }
	.itvd .site-description { display: none; }
	.itvd-hero { padding: 40px 16px 44px; }
	.itvd-buscador { margin-bottom: 28px; }
	.itvd-buscador button { padding: 12px 18px; }
	.itvd.blog .site-main,
	.itvd.archive .site-main,
	.itvd.search .site-main { grid-template-columns: 1fr; gap: 18px; }
	.itvd .site-content { padding-top: 20px; }
	.itvd-cabecera-cat { padding: 20px; gap: 14px; }
	.itvd-cabecera-cat__icono { width: 52px; height: 52px; padding: 12px; }
	.itvd .entry-content .itvd-relacionados ul { grid-template-columns: 1fr; }
	.itvd .entry-content .itvd-relacionados a { flex-direction: row; align-items: center; }
	.itvd-relacionados__img { width: 120px; flex: none; align-self: stretch; aspect-ratio: auto; }
	.itvd-fuentes { padding: 20px 20px 6px; }
	.itvd-fuentes__icono { position: static; margin-bottom: 10px; }
	.itvd-arriba { right: 14px; bottom: 14px; width: 44px; height: 44px; }
	.itvd .entry-content ol:not(.itvd-indice ol) > li { padding-left: 56px; }
}

/* --- Menos movimiento para quien lo pide en su sistema ---------------- */

@media (prefers-reduced-motion: reduce) {
	html { scroll-behavior: auto; }
	.itvd *, .itvd *::before, .itvd *::after { animation: none !important; transition: none !important; }
	.itvd-js .itvd-aparece { opacity: 1; transform: none; }
}
