/* El blog del obrador (módulo hyp_blog). Solo se carga en /blog y /blog/... */

.hyp-blog {
	--hyp-blog-accent: #20b2aa;
	--hyp-blog-accent-dark: #2592a9;
	--hyp-blog-text: #232323;
	--hyp-blog-muted: #7a7a7a;
	--hyp-blog-line: #e5e5e5;
	--hyp-blog-bg: #f6f6f6;
	color: var(--hyp-blog-text);
	padding-bottom: 2rem;
}

.hyp-blog-header {
	margin-bottom: 1.5rem;
}

.hyp-blog-intro {
	max-width: 46rem;
	margin: -.5rem auto 0;
	text-align: center;
	color: #7a7a7a;
	font-size: 1.05em;
}

.hyp-blog-date {
	display: block;
	color: var(--hyp-blog-muted);
	font-size: .85em;
	letter-spacing: .02em;
	text-transform: uppercase;
	margin: 0 0 .4rem;
}

/* ---------- Rejilla de tarjetas ---------- */

.hyp-blog-grid {
	display: grid;
	grid-template-columns: repeat(3, minmax(0, 1fr));
	gap: 1.75rem;
}

.hyp-blog-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid var(--hyp-blog-line);
	transition: box-shadow .2s ease, transform .2s ease;
}

.hyp-blog-card:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
	transform: translateY(-2px);
}

.hyp-blog-card__img {
	display: block;
	aspect-ratio: 16 / 10;
	overflow: hidden;
	background: var(--hyp-blog-bg);
}

.hyp-blog-card__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hyp-blog-card__noimg {
	display: block;
	width: 100%;
	height: 100%;
	background: linear-gradient(135deg, #f6f6f6 0%, #e8f6f5 100%);
}

.hyp-blog-card__body {
	display: flex;
	flex-direction: column;
	flex: 1;
	padding: 1.1rem 1.25rem 1.25rem;
}

.hyp-blog-card__title {
	font-size: 1.15em;
	font-weight: 500;
	line-height: 1.35;
	margin: 0 0 .6rem;
	text-transform: none;
}

.hyp-blog-card__title a {
	color: var(--hyp-blog-text);
}

.hyp-blog-card__title a:hover {
	color: var(--hyp-blog-accent);
	text-decoration: none;
}

.hyp-blog-card__summary {
	color: #5a5a5a;
	font-size: .95em;
	line-height: 1.6;
	margin: 0 0 1rem;
}

.hyp-blog-card__more {
	margin-top: auto;
	color: var(--hyp-blog-accent);
	font-weight: 500;
}

.hyp-blog-card__more:hover {
	color: var(--hyp-blog-accent-dark);
}

.hyp-blog-empty {
	text-align: center;
	color: var(--hyp-blog-muted);
	padding: 3rem 0;
}

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

.hyp-blog-pagination {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: center;
	gap: .75rem;
	margin-top: 2.5rem;
}

.hyp-blog-pagination ul {
	display: flex;
	gap: .35rem;
	list-style: none;
	margin: 0;
	padding: 0;
}

.hyp-blog-pagination li a,
.hyp-blog-pagination li span {
	display: inline-block;
	min-width: 2.4rem;
	padding: .4rem .6rem;
	text-align: center;
	border: 1px solid var(--hyp-blog-line);
	color: var(--hyp-blog-text);
}

.hyp-blog-pagination li a:hover {
	border-color: var(--hyp-blog-accent);
	color: var(--hyp-blog-accent);
	text-decoration: none;
}

.hyp-blog-pagination li .current {
	background: var(--hyp-blog-accent);
	border-color: var(--hyp-blog-accent);
	color: #fff;
}

.hyp-blog-pagination li.hyp-blog-pagination__gap {
	padding: .4rem .2rem;
	color: var(--hyp-blog-muted);
}

.hyp-blog-pagination__step {
	color: var(--hyp-blog-accent);
	font-weight: 500;
}

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

.hyp-blog-post {
	max-width: 52rem;
	margin: 0 auto;
}

.hyp-blog-preview {
	margin-bottom: 1.5rem;
}

.hyp-blog-post__header {
	text-align: center;
	margin: 1rem 0 1.5rem;
}

.hyp-blog-post__title {
	font-size: 2em;
	font-weight: 500;
	line-height: 1.25;
	margin: 0 0 .75rem;
	text-transform: none;
	color: var(--hyp-blog-text);
}

.hyp-blog-post__cover {
	margin: 0 0 2rem;
}

.hyp-blog-post__cover img {
	display: block;
	width: 100%;
	height: auto;
}

.hyp-blog-post__content {
	font-size: 1.08em;
	line-height: 1.75;
	overflow-wrap: break-word;
}

.hyp-blog-post__content p,
.hyp-blog-post__content ul,
.hyp-blog-post__content ol {
	margin: 0 0 1.1em;
}

/* El tema quita las viñetas a todas las listas: aquí sí se quieren */
.hyp-blog-post__content ul,
.hyp-blog-post__content ol {
	padding-left: 1.5em;
}

.hyp-blog-post__content ul {
	list-style: disc;
}

.hyp-blog-post__content ol {
	list-style: decimal;
}

.hyp-blog-post__content li {
	margin-bottom: .35em;
}

.hyp-blog-post__content h2 {
	font-size: 1.45em;
	font-weight: 500;
	line-height: 1.3;
	margin: 2em 0 .7em;
	text-transform: none;
}

.hyp-blog-post__content h3 {
	font-size: 1.2em;
	font-weight: 500;
	margin: 1.6em 0 .6em;
	text-transform: none;
}

.hyp-blog-post__content a {
	color: var(--hyp-blog-accent);
	text-decoration: underline;
}

.hyp-blog-post__content a:hover {
	color: var(--hyp-blog-accent-dark);
}

.hyp-blog-post__content img {
	max-width: 100%;
	height: auto;
}

.hyp-blog-post__content blockquote {
	margin: 1.5em 0;
	padding: .5em 1.25em;
	border-left: 4px solid var(--hyp-blog-accent);
	background: var(--hyp-blog-bg);
}

.hyp-blog-post__content table {
	width: 100%;
	border-collapse: collapse;
	margin: 0 0 1.5em;
	font-size: .92em;
	line-height: 1.45;
}

.hyp-blog-post__content th,
.hyp-blog-post__content td {
	border: 1px solid var(--hyp-blog-line);
	padding: .55em .75em;
	text-align: left;
	vertical-align: top;
}

.hyp-blog-post__content thead th {
	background: var(--hyp-blog-accent);
	border-color: var(--hyp-blog-accent);
	color: #fff;
	font-weight: 500;
}

.hyp-blog-post__content tbody tr:nth-child(even) {
	background: var(--hyp-blog-bg);
}

.hyp-blog-post__content td:first-child {
	font-weight: 500;
	white-space: nowrap;
}

/* Preguntas frecuentes y subapartados */
.hyp-blog-post__content h3 + p {
	margin-top: 0;
}

/* Vídeos de YouTube a todo el ancho */
.hyp-blog-post__content iframe {
	display: block;
	max-width: 100%;
	margin: 0 auto 1.25em;
}

.hyp-blog-post__content iframe[src*="youtube"],
.hyp-blog-post__content iframe[src*="youtu.be"],
.hyp-blog-post__content iframe[src*="vimeo"] {
	width: 100%;
	height: auto;
	aspect-ratio: 16 / 9;
}

.hyp-blog-post__footer {
	margin-top: 2.5rem;
	padding-top: 1.25rem;
	border-top: 1px solid var(--hyp-blog-line);
}

.hyp-blog-back {
	color: var(--hyp-blog-accent);
	font-weight: 500;
}

.hyp-blog-related {
	margin-top: 3rem;
}

/* ---------- Portada: últimos artículos (antes de "Texto Home") ---------- */

.hyp-blog-home {
	margin: 2.5rem 0 2.5rem;
	padding-bottom: 0;
}

.hyp-blog-home .hyp-blog-intro {
	margin-bottom: 1.5rem;
}

.hyp-blog-home__grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 1.75rem;
}

.hyp-blog-home__grid--single {
	grid-template-columns: minmax(0, 1fr);
	max-width: 50%;
	margin: 0 auto;
}

.hyp-blog-home__card {
	display: grid;
	grid-template-columns: 45% minmax(0, 1fr);
	background: #fff;
	border: 1px solid var(--hyp-blog-line);
	transition: box-shadow .2s ease;
}

.hyp-blog-home__card:hover {
	box-shadow: 0 6px 18px rgba(0, 0, 0, .08);
}

.hyp-blog-home__img {
	display: block;
	min-height: 100%;
	overflow: hidden;
	background: var(--hyp-blog-bg);
}

.hyp-blog-home__img picture,
.hyp-blog-home__img img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.hyp-blog-home__img .hyp-blog-card__noimg {
	min-height: 12rem;
}

.hyp-blog-home__body {
	display: flex;
	flex-direction: column;
	padding: 1.1rem 1.25rem 1.25rem;
}

.hyp-blog-home__more {
	text-align: center;
	margin-top: 1.75rem;
}

.hyp-blog-home__more .btn {
	padding: .6rem 1.75rem;
}

/* ---------- Tablet y móvil ---------- */

@media (max-width: 991px) {
	.hyp-blog-grid {
		grid-template-columns: repeat(2, minmax(0, 1fr));
		gap: 1.25rem;
	}
}

@media (max-width: 991px) {
	.hyp-blog-home__grid {
		grid-template-columns: minmax(0, 1fr);
		gap: 1.25rem;
	}

	.hyp-blog-home__grid--single {
		max-width: none;
	}
}

/* En móvil la portada no tiene margen lateral (ver .txthome en theme.css) */
@media (max-width: 767px) {
	.hyp-blog-home {
		padding-left: 15px;
		padding-right: 15px;
	}
}

/* Tablas anchas: desplazamiento horizontal en móvil en vez de desbordar la página */
@media (max-width: 767px) {
	.hyp-blog-post__content table {
		display: block;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}
}

@media (max-width: 575px) {
	.hyp-blog-home__card {
		grid-template-columns: minmax(0, 1fr);
	}

	.hyp-blog-home__img {
		aspect-ratio: 16 / 10;
	}

	.hyp-blog-grid {
		grid-template-columns: minmax(0, 1fr);
	}

	.hyp-blog-post__title {
		font-size: 1.5em;
	}

	.hyp-blog-post__content {
		font-size: 1em;
	}

	.hyp-blog-pagination__step {
		flex-basis: 100%;
		text-align: center;
	}
}
