/* ----------------------------------------------------------------------
 * POST SINGULAR — Artículo de blog (versión editorial)
 *   0. Reading progress bar
 *   1. Breadcrumb (usa .cc-breadcrumb base)
 *   2. Hero (categoría · h1 · lead · fila meta + share)
 *   3. Imagen destacada
 *   4. Body 2-col: TOC sticky · contenido
 *   5. Sobre el autor
 *   6. CTA ligero
 *   7. Relacionados
 * -------------------------------------------------------------------- */

/* ░ 0. READING PROGRESS ░ */
.cc-post-progress {
	position: fixed;
	top: 0; left: 0;
	width: 100%; height: 3px;
	z-index: 60;
	background: transparent;
	pointer-events: none;
}
.cc-post-progress span {
	display: block;
	height: 100%;
	width: 100%;
	transform: scaleX(0);
	transform-origin: left center;
	background: var(--cc-red);
	transition: transform 80ms linear;
	will-change: transform;
}

/* ░ 1. HERO POST ░ */
.cc-post-hero { padding: 40px 0 36px; }
/* La cabecera ocupa el mismo ancho que la imagen destacada (los dos son
   .cc-container), asi los bordes de titulo, linea y compartir coinciden
   con los de la foto. La entradilla conserva su tope de lectura, abajo. */
.cc-post-hero__cat {
	display: inline-block;
	font-family: var(--cc-font);
	font-size: 12px;
	font-weight: 600;
	color: var(--cc-red);
	letter-spacing: 1.4px;
	text-transform: uppercase;
	text-decoration: none;
	margin-bottom: 20px;
}
.cc-post-hero__cat:hover { color: var(--cc-red-dark); }
.cc-post-hero__title {
	font-family: var(--cc-font);
	/* 40px y no los 48 del h1 global: es el escalon que sigue al h2 del
	   articulo (30px). Ver la escala en .cc-post-body__content h2. */
	font-size: clamp(30px, 3.4vw, 40px);
	font-weight: 600;
	line-height: 1.12;
	letter-spacing: -0.02em;
	color: #000;
	margin: 0 0 24px;
	/* pretty y no balance: balance partia el titulo en dos lineas iguales de
	   ~850px aunque hubiera sitio. Asi llena la linea y solo evita que la
	   ultima quede con una palabra suelta. Tope para no llegar a los 1280. */
	max-width: 1080px;
	text-wrap: pretty;
}
.cc-post-hero__lead {
	font-size: 19px;
	line-height: 1.55;
	color: var(--cc-text);
	margin: 0 0 28px;
	text-wrap: pretty;
}
/* Mismo ancho que la columna de texto del cuerpo (3/4 del contenedor menos
   el hueco de 64px de la rejilla): la entradilla acaba donde acaba el texto. */
@media (min-width: 1024px) {
	.cc-post-hero__lead { max-width: calc((100% - 64px) * 3 / 4); }
}

.cc-post-hero__row {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
	align-items: center;
	padding-top: 20px;
	border-top: 1px solid var(--cc-gray-border);
}
.cc-post-hero__meta {
	display: inline-flex;
	gap: 10px;
	align-items: center;
	font-family: var(--cc-font);
	font-size: 13px;
	color: var(--cc-text-muted);
	letter-spacing: 0.2px;
}
.cc-post-hero__meta span[aria-hidden] { color: rgba(0,0,0,0.2); }

/* Share pill horizontal */
.cc-post-share {
	display: inline-flex;
	align-items: center;
	gap: 6px;
}
.cc-post-share__label {
	font-family: var(--cc-font);
	font-size: 11px;
	font-weight: 600;
	color: var(--cc-text-muted);
	letter-spacing: 1.2px;
	text-transform: uppercase;
	margin-right: 4px;
}
.cc-post-share__btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 34px; height: 34px;
	background: transparent;
	border: 1px solid var(--cc-gray-border);
	border-radius: 50%;
	color: var(--cc-text-muted);
	cursor: pointer;
	transition: background 180ms ease, border-color 180ms ease, color 180ms ease, transform 180ms ease;
}
.cc-post-share__btn:hover {
	background: var(--cc-red);
	border-color: var(--cc-red);
	color: var(--cc-white);
	transform: translateY(-1px);
}
.cc-post-share__btn.is-copied {
	background: var(--cc-red);
	border-color: var(--cc-red);
	color: var(--cc-white);
}

/* ░ 2. IMAGEN DESTACADA ░ */
.cc-post-featured { margin: 0 0 60px; }
.cc-post-featured img {
	width: 100%;
	max-height: 560px;
	object-fit: cover;
	border-radius: 12px;
	display: block;
}

/* ░ 3. BODY ░ */
.cc-post-body { padding: 0 0 90px; }
.cc-post-body__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 40px;
}
/* Mismo ancho que la cabecera y la imagen destacada (todo .cc-container):
   3/4 para el texto, a la izquierda, y 1/4 para el autor y el indice, a la
   derecha. Con el texto a la izquierda, categoria, titulo, entradilla,
   imagen y cuerpo caen sobre el mismo eje. */
@media (min-width: 1024px) {
	.cc-post-body__grid {
		grid-template-columns: 3fr 1fr;
		gap: 64px;
	}
}

/* Sidebar izquierda: bloque autor arriba + TOC debajo, todo sticky en desktop */
.cc-post-sidebar {
	display: flex;
	flex-direction: column;
	gap: 24px;
	order: 2;
}
@media (min-width: 1024px) {
	.cc-post-sidebar {
		order: 2;                     /* a la derecha del texto */
		position: sticky;
		top: 140px;
		align-self: flex-start;
		max-height: calc(100vh - 160px);
		overflow-y: auto;
		padding-bottom: 12px;
	}
}
.cc-post-sidebar__author {
	display: flex;
	gap: 12px;
	align-items: flex-start;
	padding-bottom: 20px;
	border-bottom: 1px solid var(--cc-gray-border);
}
.cc-post-sidebar__avatar {
	width: 44px; height: 44px;
	border-radius: 50%;
	object-fit: cover;
	object-position: 50% 25%;   /* fotos de equipo verticales: cara arriba */
	background: var(--cc-gray-border);
	flex-shrink: 0;
}
.cc-post-sidebar__label {
	display: block;
	font-family: var(--cc-font);
	font-size: 11px;
	font-weight: 600;
	color: var(--cc-text-muted);
	letter-spacing: 1.2px;
	text-transform: uppercase;
	margin-bottom: 2px;
}
.cc-post-sidebar__name {
	display: block;
	font-family: var(--cc-font);
	font-size: 15px;
	font-weight: 600;
	color: #000;
	line-height: 1.2;
	margin-bottom: 4px;
}
.cc-post-sidebar__link {
	font-size: 12px;
	color: var(--cc-red);
	text-decoration: none;
}
.cc-post-sidebar__link:hover { color: var(--cc-red-dark); text-decoration: underline; }

/* Table of Contents */
.cc-post-toc__label {
	display: block;
	font-family: var(--cc-font);
	font-size: 11px;
	font-weight: 600;
	color: var(--cc-text-muted);
	letter-spacing: 1.4px;
	text-transform: uppercase;
	margin-bottom: 14px;
}
.cc-post-toc__list {
	list-style: none;
	padding: 0;
	margin: 0;
	counter-reset: cc-toc;
	display: flex;
	flex-direction: column;
	gap: 4px;
}
.cc-post-toc__list li { counter-increment: cc-toc; }
.cc-post-toc__list a {
	display: block;
	position: relative;
	padding: 6px 0 6px 30px;
	font-family: var(--cc-font);
	font-size: 13.5px;
	line-height: 1.45;
	color: var(--cc-text-muted);
	text-decoration: none;
	transition: color 180ms ease;
}
.cc-post-toc__list a::before {
	content: counter(cc-toc, decimal-leading-zero);
	position: absolute;
	left: 0; top: 6px;
	font-size: 11px;
	font-weight: 600;
	color: var(--cc-text-muted);
	letter-spacing: 0.8px;
	transition: color 180ms ease;
}
.cc-post-toc__list a:hover { color: var(--cc-heading); }
.cc-post-toc__list a.is-active { color: var(--cc-red); font-weight: 500; }
.cc-post-toc__list a.is-active::before { color: var(--cc-red); }
.cc-post-toc:empty,
.cc-post-toc[data-empty="true"] { display: none; }

/* Body content */
.cc-post-body__content {
	min-width: 0;                     /* que tablas o codigo largos no la ensanchen */
	font-size: 17px;
	line-height: 1.75;
	color: var(--cc-text);
}
.cc-post-body__content > p:first-of-type {
	font-size: 20px;
	line-height: 1.6;
	color: var(--cc-heading);
	font-weight: 400;
}
/* El contenedor declara 17px, pero la regla global p { font-size: 15px }
   de base.css se lo pisaba a cada parrafo y lista. Con la columna a 3/4
   (~900px), a 15px salian lineas de ~130 caracteres. */
.cc-post-body__content p,
.cc-post-body__content li { font-size: 17px; }
.cc-post-body__content p { margin: 0 0 22px; }

.cc-post-body__content h2 {
	font-family: var(--cc-font);
	/* Escala propia del articulo, no la global: el h2 global (40px) esta
	   pensado para titulos de seccion de landing y aqui, sobre texto de
	   17px, se comia la jerarquia (h2 40 -> h3 22 era un salto x1,8 y
	   h3 -> texto solo x1,3). Ahora cada nivel sube ~x1,25:
	   texto 17 · h4 17 (bold) · h3 20 · h2 30 · h1 40. El h3 va
	   contenido (20px) para que no compita con el h2. */
	font-size: clamp(24px, 2.6vw, 30px);
	font-weight: 600;                 /* como h1, h3 y h4 del articulo */
	color: #000;
	line-height: 1.2;
	letter-spacing: var(--ls-h2);
	/* Sin guion rojo encima: el aire hace de separador entre bloques. */
	margin: clamp(56px, 6vw, 80px) 0 18px;
	scroll-margin-top: 100px;
}
.cc-post-body__content > h2:first-child { margin-top: 0; }
.cc-post-body__content h3 {
	font-family: var(--cc-font);
	font-size: clamp(18px, 1.6vw, 20px);
	font-weight: 600;
	color: #000;
	line-height: 1.3;
	letter-spacing: var(--ls-h3);
	margin: 36px 0 12px;
}
.cc-post-body__content h4 {
	font-family: var(--cc-font);
	font-size: 17px;
	font-weight: 600;
	color: #000;
	line-height: 1.35;
	letter-spacing: var(--ls-h4);
	margin: 28px 0 10px;
}

/* Preguntas frecuentes en acordeon (las genera cc_faq_accordion en
   functions.php). Mismo lenguaje que el FAQ de las landings de sede (+ rojo
   que gira a x, rojo al hover/abrir, mismas curvas), pero con filetes de
   1px entre preguntas en lugar de tarjetas, para que encaje en el texto. */
.cc-post-body__content .cc-faq { border-bottom: 1px solid var(--cc-gray-border); }
.cc-post-body__content :not(.cc-faq) + .cc-faq,
.cc-post-body__content .cc-faq:first-child { border-top: 1px solid var(--cc-gray-border); }
.cc-post-body__content :not(.cc-faq) + .cc-faq { margin-top: 8px; }
.cc-post-body__content .cc-faq + :not(.cc-faq) { margin-top: 32px; }
.cc-post-body__content .cc-faq summary {
	cursor: pointer;
	list-style: none;
	display: flex;
	justify-content: space-between;
	align-items: center;
	gap: 24px;
	padding: 20px 0;
	font-family: var(--cc-font);
	font-size: 17px;
	font-weight: 600;
	line-height: 1.4;
	letter-spacing: -0.2px;
	color: var(--cc-heading);
	transition: color 200ms ease;
}
.cc-post-body__content .cc-faq summary::-webkit-details-marker { display: none; }
.cc-post-body__content .cc-faq summary:hover,
.cc-post-body__content .cc-faq[open] summary { color: var(--cc-red); }
.cc-post-body__content .cc-faq summary :is(strong, b) { font-weight: inherit; color: inherit; }
.cc-post-body__content .cc-faq summary:focus-visible { outline: 2px solid var(--cc-red); outline-offset: 4px; border-radius: 2px; }
.cc-faq__icon {
	position: relative;
	flex: none;
	width: 14px;
	height: 14px;
	transition: transform 260ms cubic-bezier(0.22, 1, 0.36, 1);
}
.cc-faq__icon::before,
.cc-faq__icon::after {
	content: "";
	position: absolute;
	left: 0;
	top: 50%;
	width: 14px;
	height: 2px;
	margin-top: -1px;
	border-radius: 1px;
	background: var(--cc-red);
}
.cc-faq__icon::after { transform: rotate(90deg); }
.cc-faq[open] .cc-faq__icon { transform: rotate(45deg); }
.cc-post-body__content .cc-faq__a { padding: 0 48px 22px 0; }
.cc-post-body__content .cc-faq__a > :last-child { margin-bottom: 0; }
.cc-post-body__content .cc-faq[open] .cc-faq__a {
	animation: cc-faq-reveal 320ms cubic-bezier(0.22, 1, 0.36, 1);
}
@keyframes cc-faq-reveal {
	from { opacity: 0; transform: translateY(-6px); }
	to   { opacity: 1; transform: translateY(0); }
}
@media (prefers-reduced-motion: reduce) {
	.cc-faq__icon, .cc-post-body__content .cc-faq summary { transition: none; }
	.cc-post-body__content .cc-faq[open] .cc-faq__a { animation: none; }
}

/* Listas — bullets pequeños rojos */
.cc-post-body__content ul,
.cc-post-body__content ol {
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}
.cc-post-body__content ul li,
.cc-post-body__content ol li {
	position: relative;
	padding-left: 28px;
	margin-bottom: 10px;
	font-size: 17px;
	line-height: 1.65;
}
.cc-post-body__content ul li::before {
	content: '';
	position: absolute;
	left: 4px; top: 12px;
	width: 6px; height: 6px;
	border-radius: 50%;
	background: var(--cc-red);
}
.cc-post-body__content ol { counter-reset: cc-ol; }
.cc-post-body__content ol li { counter-increment: cc-ol; }
.cc-post-body__content ol li::before {
	content: counter(cc-ol, decimal-leading-zero);
	position: absolute;
	left: 0; top: 2px;
	font-family: var(--cc-font);
	font-size: 12px;
	font-weight: 600;
	color: var(--cc-red);
	letter-spacing: 0.6px;
}

.cc-post-body__content a { color: var(--cc-red); text-underline-offset: 3px; }
.cc-post-body__content a:hover { color: var(--cc-red-dark); }
.cc-post-body__content strong { color: #000; font-weight: 600; }

/* Blockquote — pull quote editorial */
.cc-post-body__content blockquote {
	margin: 40px -20px;
	padding: 8px 24px;
	color: #000;
	font-family: var(--cc-font);
	font-size: 24px;
	line-height: 1.35;
	letter-spacing: -0.4px;
	font-weight: 500;
	font-style: normal;
	text-wrap: balance;
}
.cc-post-body__content blockquote::before {
	content: '';
	display: block;
	width: 32px;
	height: 3px;
	background: var(--cc-red);
	margin-bottom: 16px;
	border-radius: 2px;
}
.cc-post-body__content blockquote p { margin: 0; }
.cc-post-body__content blockquote cite {
	display: block;
	margin-top: 12px;
	font-size: 13px;
	font-weight: 500;
	color: var(--cc-text-muted);
	letter-spacing: 0.2px;
	font-style: normal;
}
.cc-post-body__content blockquote cite::before { content: '— '; }
@media (max-width: 768px) {
	.cc-post-body__content blockquote { margin: 32px 0; font-size: 20px; padding: 4px 0; }
}

/* Imágenes con caption */
.cc-post-body__content img {
	max-width: 100%;
	height: auto;
	border-radius: 8px;
	margin: 26px 0 10px;
	display: block;
}
.cc-post-body__content figure {
	margin: 28px 0;
}
.cc-post-body__content figure img { margin: 0; }
.cc-post-body__content figcaption {
	font-size: 13px;
	color: var(--cc-text-muted);
	line-height: 1.5;
	margin-top: 10px;
	text-align: center;
	font-style: italic;
}

/* Callout box (usar .wp-block-quote.is-style-callout o clase custom) */
.cc-post-body__content .cc-callout,
.cc-post-body__content .is-style-callout {
	margin: 28px 0;
	padding: 20px 24px;
	background: var(--cc-red);
	color: var(--cc-white);
	border-radius: 8px;
	font-size: 16px;
	line-height: 1.6;
}
.cc-post-body__content .cc-callout p:last-child,
.cc-post-body__content .is-style-callout p:last-child { margin-bottom: 0; }
.cc-post-body__content .cc-callout strong,
.cc-post-body__content .is-style-callout strong { color: var(--cc-white); }

/* Code */
.cc-post-body__content pre,
.cc-post-body__content code {
	font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
	font-size: 14px;
	background: #1F2124;
	color: #fafafa;
	padding: 2px 6px;
	border-radius: 4px;
}
.cc-post-body__content pre { padding: 18px 22px; overflow-x: auto; margin: 22px 0; }
/* Tablas insertadas en el cuerpo: scroll horizontal en móvil en vez de desbordar. */
.cc-post-body__content table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; max-width: 100%; margin: 22px 0; }

/* Tags */
.cc-post-tags {
	margin: 48px 0 0;
	padding-top: 28px;
	border-top: 1px solid var(--cc-gray-border);
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.cc-post-tags__label {
	font-family: var(--cc-font);
	font-size: 13px;
	font-weight: 600;
	color: var(--cc-text-muted);
	margin-right: 4px;
}
.cc-post-tags__tag {
	font-family: var(--cc-font);
	font-size: 13px;
	color: var(--cc-text);
	padding: 6px 12px;
	background: #fff;
	border-radius: 999px;
	text-decoration: none;
	border: 1px solid var(--cc-gray-border);
	transition: background 200ms ease, color 200ms ease, border-color 200ms ease;
}
.cc-post-tags__tag:hover { background: var(--cc-red); color: var(--cc-white); border-color: var(--cc-red); }

/* Sobre el autor */
.cc-post-author {
	margin: 56px 0 0;
	padding: 28px;
	background: #fafafa;
	border-radius: 12px;
	display: flex;
	gap: 20px;
	align-items: flex-start;
}
.cc-post-author__avatar {
	width: 72px; height: 72px;
	border-radius: 50%;
	flex-shrink: 0;
	object-fit: cover;
}
.cc-post-author__body { display: flex; flex-direction: column; gap: 4px; }
.cc-post-author__label {
	font-family: var(--cc-font);
	font-size: 11px;
	font-weight: 600;
	color: var(--cc-text-muted);
	letter-spacing: 1.2px;
	text-transform: uppercase;
}
.cc-post-author__name {
	font-family: var(--cc-font);
	font-size: 18px;
	font-weight: 600;
	color: #000;
}
.cc-post-author__bio {
	font-size: 14px;
	line-height: 1.55;
	color: var(--cc-text);
	margin: 4px 0 0;
}
.cc-post-author__link {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	margin-top: 10px;
	font-size: 13px;
	font-weight: 500;
	color: var(--cc-red);
	text-decoration: none;
}
.cc-post-author__link svg { transition: transform 200ms cubic-bezier(0.22, 1, 0.36, 1); }
.cc-post-author__link:hover svg { transform: translateX(3px); }

/* Navegación prev/next entre posts */
.cc-post-nav {
	margin: 40px 0 0;
	padding-top: 32px;
	border-top: 1px solid var(--cc-gray-border);
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 20px;
}
.cc-post-nav__item {
	display: flex;
	flex-direction: column;
	gap: 6px;
	padding: 16px 18px;
	background: #fafafa;
	border-radius: 8px;
	text-decoration: none;
	transition: background 200ms ease;
}
.cc-post-nav__item:hover { background: #f0f0f0; }
.cc-post-nav__item--next { text-align: right; }
.cc-post-nav__label {
	font-family: var(--cc-font);
	font-size: 11px;
	font-weight: 600;
	color: var(--cc-red);
	letter-spacing: 1.2px;
	text-transform: uppercase;
}
.cc-post-nav__title {
	font-family: var(--cc-font);
	font-size: var(--fs-h4);
	font-weight: 500;
	color: #000;
	line-height: var(--lh-snug);
}

/* ░ 4. CTA ligero ░ */
.cc-post-cta {
	background: #fafafa;
	padding: 60px 0;
	border-top: 1px solid var(--cc-gray-border);
	border-bottom: 1px solid var(--cc-gray-border);
}
.cc-post-cta__inner {
	display: grid;
	grid-template-columns: 1fr;
	gap: 24px;
	align-items: center;
	max-width: 960px;
	margin: 0 auto;
}
@media (min-width: 1024px) {
	.cc-post-cta__inner { grid-template-columns: 1.5fr auto; gap: 40px; }
}
.cc-post-cta__inner h2 {
	font-family: var(--cc-font);
	font-size: var(--fs-h2);
	font-weight: 700;
	color: #000;
	line-height: var(--lh-heading);
	letter-spacing: var(--ls-h2);
	margin: 0 0 8px;
}
.cc-post-cta__inner p {
	font-size: 15px;
	line-height: 1.6;
	color: var(--cc-text);
	margin: 0;
	max-width: 620px;
}

/* ░ 5. Relacionados ░ */
.cc-post-related { padding: 80px 0; background: #f5f5f5; }
.cc-post-related__head {
	text-align: center;
	max-width: 720px;
	margin: 0 auto 44px;
}
.cc-post-related__head .cc-eyebrow { color: var(--cc-red); margin-bottom: 14px; }
.cc-post-related__head h2 {
	font-family: var(--cc-font);
	font-size: var(--fs-h2);
	font-weight: 700;
	letter-spacing: var(--ls-h2);
	color: #000;
	margin: 0;
}
