/**
 * Senior HR Forum v1.8.1: calm Articles listing and a steadier article header picture.
 * Loads after v18.css. See inc/v181.php.
 */

/* ===================== 1. Articles page: title band ===================== */
.shf-ed-hero--calm { padding-bottom: clamp(48px, 5vw, 72px) !important; }
.shf-ed-hero--calm .shf-ed-chips { gap: 8px; }
.shf-ed-hero--calm .shf-ed-chip { padding: 8px 16px; font-size: 0.88rem; }

/* ===================== 2. Articles page: one featured row, then an even grid ===================== */
.shf-al { padding-top: clamp(40px, 5vw, 64px) !important; background: #fff; }
.shf-al-grid .wp-block-post-template {
	display: grid !important; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 28px;
	margin: 0 !important; padding: 0 !important; list-style: none;
}
.shf-al-grid .wp-block-post-template > li { margin: 0 !important; min-width: 0; list-style: none; display: flex; }
.shf-al-card {
	display: flex; flex-direction: column; width: 100%; margin: 0 !important;
	background: #fff; border: 1px solid var(--shf-line, #DCE8EC); border-radius: 16px; overflow: hidden;
	transition: border-color .2s ease, box-shadow .2s ease, transform .2s ease;
}
.shf-al-card:hover, .shf-al-card:focus-within { border-color: rgba(11, 106, 133, 0.45); box-shadow: 0 14px 30px rgba(11, 26, 51, 0.08); transform: translateY(-2px); }
@media (prefers-reduced-motion: reduce) { .shf-al-card:hover, .shf-al-card:focus-within { transform: none; } }
.shf-al-card > * { margin: 0 !important; }

/* Picture frame: same shape on every card. */
.shf-al-card__image {
	position: relative; aspect-ratio: 16 / 10; width: 100%; margin: 0 !important; overflow: hidden;
	background: #EEF5F7; border-bottom: 1px solid var(--shf-line, #DCE8EC);
}
.shf-al-card__image a { display: flex; align-items: center; justify-content: center; width: 100%; height: 100%; }
.shf-al-card__image.shf-fit-cover img { display: block; width: 100% !important; height: 100% !important; max-width: none !important; max-height: none !important; object-fit: cover; }
.shf-al-card__image.shf-fit-contain a { padding: 22px; box-sizing: border-box; }
.shf-al-card__image.shf-fit-contain img {
	display: block; width: auto !important; height: auto !important; object-fit: contain;
	box-shadow: none !important; border-radius: 6px; padding: 0 !important; background: transparent !important;
}
/* No picture: a quiet typographic tile with the article type. */
.shf-al-card__image.shf-fit-type a { text-decoration: none; }
.shf-al-tile {
	position: relative; display: flex; align-items: flex-end; width: 100%; height: 100%; box-sizing: border-box; padding: 22px 24px;
	background: radial-gradient(70% 90% at 100% 0%, rgba(34, 184, 207, 0.20) 0%, rgba(34, 184, 207, 0) 70%), linear-gradient(160deg, #F4FAFB 0%, #E3F1F5 100%);
}
.shf-al-tile__label {
	font-family: var(--wp--preset--font-family--maven-pro); font-weight: 700; font-size: clamp(1.4rem, 1rem + 1vw, 1.9rem); line-height: 1.1;
	color: var(--shf-teal-dark, #08546A); letter-spacing: -0.01em;
}
.shf-al-tile__label::after { content: ""; display: inline-block; width: 0.22em; height: 0.22em; margin-left: 0.08em; border-radius: 50%; background: var(--shf-sunset, #FF7A1A); }
/* v1.8.2: a complete faint ring with the logo's cyan and orange dot pair at the lower right
   (static, never a partial arc, so it cannot read as a loading spinner). */
.shf-al-tile__mark {
	position: absolute; right: 22px; top: 20px; width: 52px; height: 52px; border-radius: 50%;
	border: 2px solid rgba(11, 106, 133, 0.16); box-sizing: border-box;
}
.shf-al-tile__mark::before, .shf-al-tile__mark::after { content: ""; position: absolute; border-radius: 50%; }
.shf-al-tile__mark::before { width: 9px; height: 9px; right: 3px; bottom: 3px; background: var(--shf-cyan, #22B8CF); }
.shf-al-tile__mark::after { width: 12px; height: 12px; right: -6px; bottom: -6px; background: var(--shf-sunset, #FF7A1A); }

/* Text: type, title, two-line excerpt, date (always at the bottom so the cards line up). */
.shf-al-card__body { display: flex; flex-direction: column; flex: 1; padding: 20px 22px 22px; }
.shf-al-card__body > * { margin: 0 !important; }
.shf-al-card__label {
	font-size: 0.76rem !important; font-weight: 700; letter-spacing: 0.12em; text-transform: uppercase; color: var(--shf-teal, #0B6A85) !important;
}
.shf-al-card__title { margin-top: 10px !important; font-size: 1.16rem !important; line-height: 1.3 !important; font-weight: 700 !important; letter-spacing: -0.005em; }
.shf-al-card__title a { color: var(--shf-ink, #0B1A33) !important; text-decoration: none; }
.shf-al-card__title a:hover, .shf-al-card__title a:focus-visible { color: var(--shf-teal, #0B6A85) !important; text-decoration: underline; text-underline-offset: 3px; }
.shf-al-card__title a::after { content: ""; position: absolute; inset: 0; } /* whole card clickable */
.shf-al-card { position: relative; }
.shf-al-card__excerpt { margin-top: 10px !important; color: var(--shf-slate, #3D4F66); font-size: 0.95rem; line-height: 1.55; }
.shf-al-card__excerpt .wp-block-post-excerpt__excerpt {
	margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.shf-al-card__excerpt .wp-block-post-excerpt__more-text { display: none; }
.shf-al-card__date { margin-top: auto !important; padding-top: 16px; font-size: 0.85rem; color: var(--shf-slate, #3D4F66); }

/* Featured row: the first card only, picture left and text right, modest height. */
.shf-al-grid .wp-block-post-template > li:first-child { grid-column: 1 / -1; }
.shf-al-grid li:first-child .shf-al-card { flex-direction: row; }
.shf-al-grid li:first-child .shf-al-card__image { flex: 0 0 52%; aspect-ratio: auto; min-height: 300px; max-height: 360px; border-bottom: 0; border-right: 1px solid var(--shf-line, #DCE8EC); }
.shf-al-grid li:first-child .shf-al-card__body { justify-content: center; padding: clamp(24px, 3vw, 44px); }
.shf-al-grid li:first-child .shf-al-card__title { font-size: clamp(1.45rem, 1.1rem + 1vw, 1.9rem) !important; line-height: 1.2 !important; }
.shf-al-grid li:first-child .shf-al-card__excerpt .wp-block-post-excerpt__excerpt { -webkit-line-clamp: 3; }
.shf-al-grid li:first-child .shf-al-card__date { margin-top: 0 !important; padding-top: 18px; }

.shf-al-pagination { margin-top: 48px !important; }

@media (max-width: 1000px) {
	.shf-al-grid .wp-block-post-template { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
	.shf-al-grid .wp-block-post-template { grid-template-columns: minmax(0, 1fr); gap: 24px; }
	.shf-al-grid li:first-child .shf-al-card { flex-direction: column; }
	.shf-al-grid li:first-child .shf-al-card__image { flex: none; aspect-ratio: 16 / 10; min-height: 0; max-height: none; border-right: 0; border-bottom: 1px solid var(--shf-line, #DCE8EC); }
	.shf-al-grid li:first-child .shf-al-card__body { padding: 20px 22px 22px; }
	.shf-al-grid li:first-child .shf-al-card__title { font-size: 1.3rem !important; }
}

/* ===================== 3. Article page: header picture ===================== */
/* Same width as the text, a steady maximum height; logos and small pictures shown whole on mist. */
.shf-article--v18 .shf-article__image { width: 100%; max-width: 760px; margin-left: auto !important; margin-right: auto !important; border-radius: 14px; overflow: hidden; }
.shf-article--v18 .shf-article__image.shf-fit-cover img { display: block; width: 100% !important; height: auto; max-height: 440px; object-fit: cover; border: 0 !important; border-radius: 0; }
.shf-article--v18 .shf-article__image.shf-fit-contain,
.shf-article--v18 .shf-article__image.shf-event-head.shf-img-small {
	display: flex !important; align-items: center; justify-content: center; box-sizing: border-box;
	height: clamp(220px, 30vw, 340px) !important; padding: 28px !important;
	background: #EEF5F7 !important; border: 1px solid var(--shf-line, #DCE8EC);
}
.shf-article--v18 .shf-article__image.shf-fit-contain img,
.shf-article--v18 .shf-article__image.shf-event-head.shf-img-small img {
	width: auto !important; height: auto !important; object-fit: contain; border: 0 !important; border-radius: 6px; box-shadow: none !important;
}
