/* =========================================================================
   Blog: listado (Prototipado/Blog.png) y entrada individual.
   ========================================================================= */

/* -------------------------------------------------------------------------
   Filtro por tema
   ------------------------------------------------------------------------- */

.ct-topics ul {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin: 30px 0 0;
	padding: 0;
	list-style: none;
}

.ct-topics li {
	margin: 0;
}

.ct-topics a {
	display: block;
	padding: 8px 18px;
	border: 1px solid var(--ct-line);
	border-radius: var(--ct-radius-pill);
	background: var(--ct-white);
	font-size: .92rem;
	font-weight: 500;
	color: var(--ct-ink);
	text-decoration: none;
	transition: border-color .15s, background .15s, color .15s;
}

.ct-topics a:hover {
	border-color: var(--ct-forest);
	color: var(--ct-forest);
}

.ct-topics a[aria-current="page"] {
	border-color: var(--ct-forest);
	background: var(--ct-forest);
	color: var(--ct-white);
}

/* -------------------------------------------------------------------------
   Tarjetas de entrada
   ------------------------------------------------------------------------- */

.ct-blog-list {
	padding-top: 24px;
}

.ct-post,
.ct-post-featured {
	margin: 0;
}

.ct-post__link {
	display: flex;
	flex-direction: column;
	height: 100%;
	overflow: hidden;
	border: 1px solid var(--ct-line);
	border-radius: var(--ct-radius);
	background: var(--ct-white);
	color: var(--ct-ink);
	text-decoration: none;
	transition: box-shadow .2s, transform .2s;
}

.ct-post__link:hover {
	box-shadow: var(--ct-shadow);
	color: var(--ct-ink);
	transform: translateY(-3px);
}

.ct-post__link:focus-visible {
	outline: 2px solid var(--ct-terra);
	outline-offset: 3px;
}

.ct-post__media {
	display: block;
	overflow: hidden;
	background: var(--ct-peach-soft);
}

.ct-post__media > img {
	display: block;
	width: 100%;
	height: 100%;
	aspect-ratio: 16 / 10;
	object-fit: cover;
	transition: transform .4s ease;
}

.ct-post__link:hover .ct-post__media > img {
	transform: scale(1.03);
}

.ct-post__placeholder {
	display: grid;
	place-items: center;
	aspect-ratio: 16 / 10;
	background: linear-gradient(135deg, var(--ct-peach-soft), var(--ct-sage-soft));
}

.ct-post__placeholder .ct-logo {
	height: 56px;
	opacity: .9;
}

.ct-post__body {
	display: flex;
	flex: 1;
	flex-direction: column;
	padding: 22px 24px 24px;
}

.ct-post__meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 8px 12px;
	margin: 0;
	font-size: .8rem;
	color: var(--ct-muted);
}

.ct-post__cat {
	padding: 2px 10px;
	border-radius: var(--ct-radius-pill);
	background: var(--ct-sage-soft);
	font-weight: 600;
	color: var(--ct-forest);
	text-decoration: none;
}

a.ct-post__cat:hover {
	background: var(--ct-forest);
	color: var(--ct-white);
}

.ct-blog-page .ct-post__title {
	margin: 14px 0 10px;
	font-size: 1.22rem;
	line-height: 1.3;
}

.ct-post__excerpt {
	display: -webkit-box;
	margin-bottom: 18px;
	overflow: hidden;
	-webkit-box-orient: vertical;
	-webkit-line-clamp: 3;
	font-size: .93rem;
	line-height: 1.6;
	color: var(--ct-muted);
}

.ct-post__more {
	margin-top: auto;
	font-size: .9rem;
	font-weight: 600;
	color: var(--ct-terra);
}

/* Entrada destacada: imagen a la izquierda, texto a la derecha */
.ct-post-featured {
	margin-bottom: 28px;
}

.ct-post-featured .ct-post__link {
	display: grid;
	grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
	border-radius: 24px;
}

.ct-post-featured .ct-post__media > img,
.ct-post-featured .ct-post__placeholder {
	aspect-ratio: auto;
	min-height: 360px;
}

.ct-post-featured .ct-post__body {
	justify-content: center;
	padding: 44px 44px 40px;
}

.ct-blog-page .ct-post-featured .ct-post__title {
	font-size: clamp(1.6rem, 2.8vw, 2.2rem);
	line-height: 1.2;
}

.ct-post-featured .ct-post__excerpt {
	font-size: 1rem;
}

/* Rejilla */
.ct-posts {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 24px;
}

/* -------------------------------------------------------------------------
   Paginación
   ------------------------------------------------------------------------- */

.ct-pager ul {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 8px;
	margin: 52px 0 0;
	padding: 0;
	list-style: none;
}

.ct-pager li {
	margin: 0;
}

.ct-pager a,
.ct-pager span {
	display: grid;
	place-items: center;
	min-width: 44px;
	height: 44px;
	padding: 0 14px;
	box-sizing: border-box;
	border: 1px solid var(--ct-line);
	border-radius: 12px;
	background: var(--ct-white);
	font-weight: 500;
	color: var(--ct-ink);
	text-decoration: none;
	transition: border-color .15s, color .15s;
}

.ct-pager a:hover {
	border-color: var(--ct-forest);
	color: var(--ct-forest);
}

.ct-pager .current {
	border-color: var(--ct-forest);
	background: var(--ct-forest);
	color: var(--ct-white);
}

.ct-pager .dots {
	border-color: transparent;
	background: transparent;
}

.ct-blog-empty {
	padding: 48px 0;
	text-align: center;
	color: var(--ct-muted);
}

/* -------------------------------------------------------------------------
   Entrada individual
   ------------------------------------------------------------------------- */

.ct-article__head .ct-wrap {
	max-width: calc(820px + 2 * var(--ct-chrome-gutter));
}

.ct-article__head .ct-post__meta {
	margin-bottom: 18px;
}

.ct-article__head h1 {
	font-size: clamp(2.1rem, 4.2vw, 3.2rem);
	line-height: 1.12;
}

.ct-article__image {
	max-width: 1040px;
	margin: 0 auto 56px;
}

.ct-article__image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 560px;
	object-fit: cover;
	border-radius: var(--ct-radius);
}

/* Texto de la entrada: columna cómoda de leer */
.ct-article__content {
	max-width: 720px;
	margin: 0 auto;
	font-size: 1.06rem;
	line-height: 1.8;
	color: var(--ct-ink);
}

.ct-article__content > * {
	margin-top: 0;
	margin-bottom: 1.2em;
}

.ct-article__content h2 {
	margin: 1.8em 0 .6em;
	font-size: 1.8rem;
}

.ct-article__content h3 {
	margin: 1.6em 0 .5em;
	font-size: 1.35rem;
}

.ct-article__content a {
	color: var(--ct-terra-dark);
	text-decoration: underline;
	text-decoration-color: var(--ct-peach);
	text-decoration-thickness: 2px;
	text-underline-offset: 3px;
}

.ct-article__content a:hover {
	color: var(--ct-terra);
}

.ct-article__content ul,
.ct-article__content ol {
	padding-left: 1.3em;
}

.ct-article__content li {
	margin-bottom: .4em;
}

.ct-article__content ul li::marker {
	color: var(--ct-terra);
}

.ct-article__content blockquote {
	margin: 1.8em 0;
	padding: 4px 0 4px 24px;
	border-left: 3px solid var(--ct-peach);
	font-family: var(--ct-serif);
	font-size: 1.35rem;
	font-style: normal;
	line-height: 1.5;
	color: var(--ct-forest);
}

.ct-article__content blockquote p {
	margin: 0;
}

.ct-article__content blockquote cite {
	display: block;
	margin-top: 10px;
	font-family: var(--ct-sans);
	font-size: .85rem;
	font-style: normal;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--ct-muted);
}

.ct-article__content img {
	height: auto;
	border-radius: var(--ct-radius-md);
}

.ct-article__content figcaption {
	margin-top: 8px;
	font-size: .85rem;
	color: var(--ct-muted);
	text-align: center;
}

.ct-article__content hr {
	margin: 2.4em auto;
	border: 0;
	border-top: 1px solid var(--ct-line);
}

/* Autora */
.ct-author {
	display: flex;
	gap: 22px;
	max-width: 720px;
	margin: 56px auto 0;
	padding: 28px 30px;
	border-radius: var(--ct-radius);
	background: var(--ct-sand);
}

.ct-author .ct-logo {
	flex: none;
	height: 46px;
}

.ct-author p {
	margin: 0 0 10px;
	font-size: .95rem;
	line-height: 1.6;
	color: var(--ct-muted);
}

.ct-author .ct-author__name {
	margin-bottom: 4px;
	font-family: var(--ct-serif);
	font-size: 1.25rem;
	color: var(--ct-forest);
}

.ct-related-posts {
	padding-bottom: 72px;
}

/* -------------------------------------------------------------------------
   Tableta y móvil
   ------------------------------------------------------------------------- */

@media (max-width: 1024px) {
	.ct-posts {
		grid-template-columns: repeat(2, minmax(0, 1fr));
	}
}

@media (max-width: 880px) {
	.ct-post-featured .ct-post__link {
		grid-template-columns: 1fr;
	}

	.ct-post-featured .ct-post__media > img,
	.ct-post-featured .ct-post__placeholder {
		min-height: 0;
		aspect-ratio: 16 / 10;
	}

	.ct-post-featured .ct-post__body {
		padding: 26px 24px 28px;
	}

}

@media (max-width: 600px) {
	.ct-posts {
		grid-template-columns: 1fr;
	}

	.ct-author {
		flex-direction: column;
		padding: 24px 22px;
	}

	.ct-article__content {
		font-size: 1rem;
	}
}
