/*
 * PMyF Archivo — estilos
 * Version: 1.3.0
 */

:root {
	--pmyf-blue:        #00769d;
	--pmyf-blue-light:  #e0f2f8;
	--pmyf-yellow:      #f5c518;
	--pmyf-muted:       #6b7280;
	--pmyf-border:      #e5e7eb;
}

/* ------------------------------------------------------------------ */
/* [pmyf_hemeroteca]                                                   */
/* ------------------------------------------------------------------ */

.pmyf-hemeroteca {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(60px, 1fr));
	gap: 6px;
	width: 100%;
}

.pmyf-hemeroteca__tarjeta {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 3px;
	padding: 8px;
	background: #f0f9fc;
	border: 1px solid #c8e8f2;
	border-radius: 6px;
	text-decoration: none;
	color: inherit;
	transition: border-color 0.15s, background 0.15s;
}

.pmyf-hemeroteca__tarjeta:hover {
	background: #ddf0f7;
	border-color: var(--pmyf-blue);
	text-decoration: none;
}

.pmyf-hemeroteca__tarjeta--actual {
	border-color: var(--pmyf-blue);
	background: #ddf0f7;
}

.pmyf-hemeroteca__anio-num {
	font-family: var(--wp--preset--font-family--yanone-kaffeesatz, 'Yanone Kaffeesatz', sans-serif);
	font-size: clamp(1rem, 3.5cqi, 1.4rem);
	font-weight: 700;
	color: var(--pmyf-blue);
	line-height: 1;
	white-space: nowrap;
}

.pmyf-hemeroteca__count {
	font-size: clamp(0.7rem, 2cqi, 0.78rem);
	color: var(--pmyf-muted);
	line-height: 1;
}

.pmyf-hemeroteca__cat {
	font-size: clamp(0.65rem, 2cqi, 0.7rem);
	background: white;
	color: var(--pmyf-blue);
	border: 1px solid #c8e8f2;
	padding: 2px 5px;
	border-radius: 20px;
	font-weight: 500;
	margin-top: 1px;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
	max-width: 100%;
}

/* ------------------------------------------------------------------ */
/* [pmyf_antiguamente]                                                 */
/* ------------------------------------------------------------------ */

.pmyf-antiguamente {
	display: flex;
	flex-direction: column;
	gap: 0;
}

.pmyf-antiguamente__lista {
	display: flex;
	flex-direction: column;
	gap: 0;
}

/* Cada artículo: fila con imagen + texto */
.pmyf-antiguamente__item {
	display: flex;
	flex-direction: row;
	align-items: flex-start;
	gap: 10px;
	padding: 10px 0;
	border-bottom: 1px solid var(--pmyf-border);
	text-decoration: none;
	color: inherit;
	transition: color 0.15s;
}

.pmyf-antiguamente__item:first-child {
	border-top: 1px solid var(--pmyf-border);
}

.pmyf-antiguamente__item:hover .pmyf-antiguamente__post-titulo {
	color: var(--pmyf-blue);
}

/* Imagen destacada */
.pmyf-antiguamente__thumb {
	width: 68px;
	height: 68px;
	object-fit: cover;
	border-radius: 4px;
	flex-shrink: 0;
}

/* Bloque de texto a la derecha de la imagen */
.pmyf-antiguamente__texto {
	display: flex;
	flex-direction: column;
	gap: 2px;
	flex: 1;
	min-width: 0;
}

.pmyf-antiguamente__hace {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--pmyf-blue);
	text-transform: uppercase;
	letter-spacing: 0.05em;
}

.pmyf-antiguamente__post-titulo {
	font-size: 1rem;
	line-height: 1.35;
	color: inherit;
	transition: color 0.15s;
}

.pmyf-antiguamente__cat {
	font-size: 0.85rem;
	color: var(--pmyf-muted);
}

/* Placeholder cuando no hay imagen destacada: icono del sitio */
.pmyf-antiguamente__thumb--placeholder {
	background: #e0f2f8;
	border-radius: 50%;
	object-fit: contain;
	padding: 6px;
}

/* Corregir desbordamiento de píldora de categoría en tarjetas estrechas */
.pmyf-hemeroteca__tarjeta {
	overflow: hidden;
	min-width: 0;
}

/* Evita que Gutenberg estire las columnas a la misma altura */
.pmyf-archivo-row.wp-block-columns {
	align-items: flex-start;
}
