/*
 * El Rito Headlines
 *
 * Inherits the site's Elementor global colors and typography so the block
 * matches the theme kit automatically. To override, set any --erh-* variable
 * in Elementor > Site Settings > Custom CSS, e.g.
 *
 *   .erh { --erh-accent: #8a1c1c; --erh-rule: #ddd; }
 */
.erh {
	--erh-heading-font: var(--e-global-typography-primary-font-family, inherit);
	--erh-text-font:    var(--e-global-typography-text-font-family, inherit);
	--erh-text:         var(--e-global-color-text, inherit);
	--erh-accent:       var(--e-global-color-primary, currentColor);
	--erh-muted:        color-mix(in srgb, var(--erh-text) 55%, transparent);
	--erh-rule:         color-mix(in srgb, var(--erh-text) 15%, transparent);
	--erh-gap:          28px;

	font-family: var(--erh-text-font);
	color: var(--erh-text);
	width: 100%;
}

.erh__heading {
	font-family: var(--erh-heading-font);
	font-size: 1.5em;
	font-weight: 600;
	line-height: 1.2;
	margin: 0 0 1.1em;
	padding-bottom: 0.5em;
	border-bottom: 1px solid var(--erh-rule);
}

.erh__grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(165px, 1fr));
	column-gap: var(--erh-gap);
	row-gap: calc(var(--erh-gap) * 1.2);
}

.erh__pub-name {
	font-family: var(--erh-heading-font);
	font-size: 0.78em;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	line-height: 1.3;
	margin: 0 0 0.9em;
	padding-bottom: 0.6em;
	border-bottom: 2px solid var(--erh-accent);
}
.erh__pub-name a {
	color: var(--erh-accent);
	text-decoration: none;
}
.erh__pub-name a:hover,
.erh__pub-name a:focus-visible {
	text-decoration: underline;
}

.erh__list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.erh__item {
	margin: 0 0 1em;
	padding: 0;
}
.erh__item:last-child {
	margin-bottom: 0;
}

.erh__title {
	display: block;
	font-family: var(--erh-heading-font);
	font-size: 1em;
	font-weight: 500;
	line-height: 1.35;
	color: var(--erh-text);
	text-decoration: none;
	transition: color 0.15s ease;
}
.erh__title:hover,
.erh__title:focus-visible {
	color: var(--erh-accent);
	text-decoration: underline;
	text-underline-offset: 3px;
}

.erh__meta,
.erh__empty {
	display: block;
	font-size: 0.78em;
	line-height: 1.4;
	color: var(--erh-muted);
	margin-top: 0.3em;
}
.erh__empty {
	font-style: italic;
	margin: 0;
}

/* Tablet: three columns */
@media (max-width: 1024px) {
	.erh__grid {
		grid-template-columns: repeat(3, 1fr);
	}
}

/* Phone: two columns, tighter */
@media (max-width: 640px) {
	.erh {
		--erh-gap: 20px;
	}
	.erh__grid {
		grid-template-columns: repeat(2, 1fr);
	}
	.erh__heading {
		font-size: 1.3em;
	}
}

/* Very narrow: single column */
@media (max-width: 380px) {
	.erh__grid {
		grid-template-columns: 1fr;
	}
}

/* Fallback for browsers without color-mix (older Safari) */
@supports not (color: color-mix(in srgb, red 50%, transparent)) {
	.erh {
		--erh-muted: #777;
		--erh-rule: #e0e0e0;
	}
}
