/* ==========================================================================
   Industry News Feed
   --------------------------------------------------------------------------
   Layout note: the ad is FLOATED right and the cards are inline-block, not
   grid items. This is deliberate — CSS Grid and Flexbox both ignore floats,
   so a grid child can never wrap around the ad. Floats are the only layout
   mode where text/blocks flow around a sibling. Cards are sized with
   calc() percentages so two fit beside the ad and three fit below it.
   ========================================================================== */

.inf-feed {
	--inf-gap: 32px;
	--inf-ad-width: 340px;
	--inf-radius: 6px;
	--inf-text: #1c1c22;
	--inf-muted: #55555f;
	--inf-border: #e3e3e8;
	--inf-bg-soft: #f7f7f9;
	--inf-accent: #4a4ae8;

	position: relative;
	max-width: 1280px;
	margin: 0 auto;
	padding: 0 20px;
	box-sizing: border-box;
}

.inf-feed *,
.inf-feed *::before,
.inf-feed *::after {
	box-sizing: border-box;
}

/* Screen-reader-only, in case the theme doesn't define it */
.inf-feed .screen-reader-text {
	position: absolute !important;
	width: 1px;
	height: 1px;
	padding: 0;
	margin: -1px;
	overflow: hidden;
	clip: rect(0, 0, 0, 0);
	white-space: nowrap;
	border: 0;
}

/* --------------------------------------------------------------------------
   Controls: search + category filter
   -------------------------------------------------------------------------- */

/* --------------------------------------------------------------------------
   Controls: search + category filter
   --------------------------------------------------------------------------
   Everything here is defensively scoped and uses !important on the handful of
   properties themes most often clobber (width, height, padding on inputs,
   position on wrappers). Without this, a theme rule like
   `input[type="search"] { width: auto }` collapses the field and the absolutely
   positioned icon/clear button detach from it.
   -------------------------------------------------------------------------- */

.inf-feed .inf-controls {
	display: flex;
	flex-wrap: wrap;
	gap: 14px;
	align-items: stretch;
	margin: 0 0 34px;
	padding: 0 0 26px;
	border-bottom: 1px solid var(--inf-border);
}

/* The search field is a 3-column grid: icon | input | clear.
   Grid instead of absolute positioning means the icon physically occupies
   a track, so it can never overlap the text or drift out of the box. */
.inf-feed .inf-search {
	position: relative;
	display: grid;
	grid-template-columns: 42px 1fr 36px;
	align-items: center;
	flex: 1 1 320px;
	min-width: 0;
	max-width: 100%;
	background: #fff;
	border: 1px solid var(--inf-border);
	border-radius: var(--inf-radius);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.inf-feed .inf-search:focus-within {
	border-color: var(--inf-accent);
	box-shadow: 0 0 0 3px rgba(74, 74, 232, .13);
}

.inf-feed .inf-search__icon {
	display: flex !important;
	align-items: center;
	justify-content: center;
	grid-column: 1;
	grid-row: 1;
	width: auto !important;
	height: auto !important;
	margin: 0 !important;
	padding: 0 !important;
	position: static !important;
	transform: none !important;
	color: var(--inf-muted);
	pointer-events: none;
}

.inf-feed .inf-search__icon svg {
	display: block;
	width: 18px;
	height: 18px;
	flex: none;
}

/* The input sits in the middle track with NO border of its own — the
   wrapper draws the border. This is what prevents double-boxing. */
.inf-feed input[type="search"].inf-search__input {
	grid-column: 2;
	grid-row: 1;
	width: 100% !important;
	max-width: 100% !important;
	min-width: 0 !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 13px 0 !important;
	font-size: 15px;
	font-family: inherit;
	line-height: 1.4;
	color: var(--inf-text);
	background: transparent !important;
	border: 0 !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	-webkit-appearance: none;
	appearance: none;
}

.inf-feed input[type="search"].inf-search__input:focus {
	border: 0 !important;
	box-shadow: none !important;
	outline: none !important;
	background: transparent !important;
}

.inf-feed .inf-search__input::placeholder {
	color: #9a9aa6;
	opacity: 1;
}

/* Kill the native WebKit search decorations; we ship our own clear button */
.inf-feed .inf-search__input::-webkit-search-cancel-button,
.inf-feed .inf-search__input::-webkit-search-decoration,
.inf-feed .inf-search__input::-webkit-search-results-button {
	-webkit-appearance: none;
	appearance: none;
	display: none;
}

.inf-feed .inf-search__clear {
	display: flex !important;
	align-items: center;
	justify-content: center;
	grid-column: 3;
	grid-row: 1;
	position: static !important;
	transform: none !important;
	width: 24px !important;
	height: 24px !important;
	min-height: 0 !important;
	margin: 0 auto !important;
	padding: 0 !important;
	font-size: 19px;
	line-height: 1;
	color: var(--inf-muted);
	background: transparent !important;
	border: 0 !important;
	border-radius: 50%;
	box-shadow: none !important;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.inf-feed .inf-search__clear:hover {
	background: var(--inf-bg-soft) !important;
	color: var(--inf-text);
}

.inf-feed .inf-search__clear[hidden] {
	display: none !important;
}

.inf-feed .inf-filter {
	flex: 0 1 250px;
	min-width: 0;
}

.inf-feed select.inf-filter__select {
	display: block;
	width: 100% !important;
	max-width: 100% !important;
	height: auto !important;
	min-height: 0 !important;
	margin: 0 !important;
	padding: 13px 38px 13px 15px !important;
	font-size: 15px;
	font-family: inherit;
	line-height: 1.4;
	color: var(--inf-text);
	background-color: #fff;
	background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2355555f' stroke-width='2' stroke-linecap='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 12px center;
	background-size: 16px;
	border: 1px solid var(--inf-border);
	border-radius: var(--inf-radius);
	box-shadow: none;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}

.inf-feed select.inf-filter__select:focus {
	outline: none;
	border-color: var(--inf-accent);
	box-shadow: 0 0 0 3px rgba(74, 74, 232, .13);
}

/* --------------------------------------------------------------------------
   Layout wrapper — establishes the float context
   -------------------------------------------------------------------------- */

.inf-layout {
	position: relative;
}

.inf-layout::after {
	content: "";
	display: table;
	clear: both;
}

/* --------------------------------------------------------------------------
   Floated ad
   -------------------------------------------------------------------------- */

.inf-ad {
	float: right;
	width: var(--inf-ad-width);
	margin: 0 0 var(--inf-gap) var(--inf-gap);
}

.inf-ad__label {
	margin: 0 0 10px;
	font-size: 15px;
	font-style: italic;
	font-weight: 400;
	text-align: right;
	color: #8f8fb8;
}

.inf-ad__inner img {
	display: block;
	max-width: 100%;
	height: auto;
}

/* --------------------------------------------------------------------------
   Results container + cards
   --------------------------------------------------------------------------
   Cards are inline-block so they participate in inline flow and therefore
   respect the float. font-size:0 on the parent removes the whitespace gaps
   between inline-block elements; cards reset it back.
   -------------------------------------------------------------------------- */

.inf-results {
	font-size: 0;
	transition: opacity .18s ease;
}

.inf-results[aria-busy="true"] {
	opacity: .4;
	pointer-events: none;
}

.inf-card {
	display: inline-block;
	vertical-align: top;
	width: calc(33.333% - (var(--inf-gap) * 2 / 3));
	margin: 0 var(--inf-gap) 48px 0;
	font-size: 16px;
	text-align: left;
}

/* Two cards per row while the ad occupies the right column.
   The ad is 340px + 32px gap, so the remaining track is
   calc(100% - 372px), split in two with one gap between. */
@media (min-width: 1024px) {
	.inf-feed--has-ad:not(.inf-feed--featured) .inf-card {
		width: calc((100% - var(--inf-ad-width) - var(--inf-gap) - var(--inf-gap)) / 2);
	}

	/* Once we've cleared the ad's height, go back to three across.
	   Cards 3+ (0-indexed: nth-child(n+3)) sit below the ad. */
	.inf-feed--has-ad:not(.inf-feed--featured) .inf-card:nth-child(n + 3) {
		width: calc(33.333% - (var(--inf-gap) * 2 / 3));
	}

	/* Remove the trailing right margin on the last card of each row so the
	   rows stay flush. Row 1 has 2 cards, rows below have 3. */
	.inf-feed--has-ad:not(.inf-feed--featured) .inf-card:nth-child(2) {
		margin-right: 0;
	}

	.inf-feed--has-ad:not(.inf-feed--featured) .inf-card:nth-child(3n + 5) {
		margin-right: 0;
	}
}

/* No ad: plain 3-up */
.inf-feed:not(.inf-feed--has-ad) .inf-card:nth-child(3n) {
	margin-right: 0;
}

/* --------------------------------------------------------------------------
   Featured card (the "latest" post)
   --------------------------------------------------------------------------
   In featured mode the first card gets a wider column and a bigger title so
   it reads as the lead story beside the ad. It's still an inline-block
   participating in the float flow — no special positioning.
   -------------------------------------------------------------------------- */

@media (min-width: 1024px) {
	.inf-feed--featured.inf-feed--has-ad .inf-card--featured {
		width: calc(100% - var(--inf-ad-width) - var(--inf-gap));
		margin-right: 0;
	}

	.inf-feed--featured:not(.inf-feed--has-ad) .inf-card--featured {
		width: calc(66.666% - (var(--inf-gap) / 3));
	}

	/* Horizontal split: image left, copy right. Keeps the lead card's height
	   close to the ad's so row 2 starts right below both, instead of the
	   ad leaving a gap while a tall stacked card runs past it. */
	.inf-feed--featured .inf-card--featured {
		display: grid;
		grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
		column-gap: 28px;
		align-items: start;
	}

	.inf-feed--featured .inf-card--featured .inf-card__thumb {
		grid-column: 1;
		grid-row: 1 / span 4;
		margin-bottom: 0;
		align-self: stretch;
	}

	.inf-feed--featured .inf-card--featured .inf-card__thumb img,
	.inf-feed--featured .inf-card--featured .inf-card__img,
	.inf-feed--featured .inf-card--featured .inf-card__thumb--placeholder {
		height: 100%;
		min-height: 320px;
	}

	.inf-feed--featured .inf-card--featured .inf-card__title {
		grid-column: 2;
		grid-row: 1;
		align-self: start;
		font-size: 32px;
		line-height: 1.18;
		margin-bottom: 10px;
	}

	.inf-feed--featured .inf-card--featured .inf-card__meta {
		grid-column: 2;
		grid-row: 2;
		margin-bottom: 14px;
	}

	.inf-feed--featured .inf-card--featured .inf-card__excerpt {
		grid-column: 2;
		grid-row: 3;
		font-size: 16px;
		line-height: 1.75;
		margin-bottom: 18px;
	}

	.inf-feed--featured .inf-card--featured .inf-card__footer {
		grid-column: 2;
		grid-row: 4;
		justify-content: flex-start;
	}

	/* Cards after the featured one go 3-up and flow beneath the float */
	.inf-feed--featured.inf-feed--has-ad .inf-card:nth-child(n + 2) {
		width: calc(33.333% - (var(--inf-gap) * 2 / 3));
		margin-right: var(--inf-gap);
	}

	/* Row structure in featured mode: (1) (2,3,4) (5,6,7)…
	   Right-hand card of each 3-up row is child 4, 7, 10 → 3n+1 from 4 */
	.inf-feed--featured.inf-feed--has-ad .inf-card:nth-child(3n + 4) {
		margin-right: 0;
	}
}

/* Category meta row, sits directly under the title */
.inf-card__meta {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin: 0 0 14px;
}

.inf-card__cat {
	display: inline-block;
	padding: 4px 10px;
	font-size: 11px;
	font-weight: 600;
	letter-spacing: .07em;
	text-transform: uppercase;
	text-decoration: none;
	color: var(--inf-accent);
	background: rgba(74, 74, 232, .08);
	border-radius: 3px;
	transition: background .15s ease, color .15s ease;
}

a.inf-card__cat:hover,
a.inf-card__cat:focus {
	color: #fff;
	background: var(--inf-accent);
}

/* --------------------------------------------------------------------------
   Card internals
   -------------------------------------------------------------------------- */

.inf-card__thumb {
	display: block;
	overflow: hidden;
	margin-bottom: 20px;
	background: var(--inf-bg-soft);
	border-radius: 2px;
}

.inf-card__thumb img,
.inf-card__img {
	display: block;
	width: 100%;
	height: 240px;
	object-fit: cover;
	transition: transform .35s ease;
}

.inf-card__thumb:hover img {
	transform: scale(1.03);
}

.inf-card__thumb--placeholder {
	display: flex;
	align-items: center;
	justify-content: center;
	height: 240px;
	color: #c9c9d2;
}

.inf-card__thumb--placeholder svg {
	width: 64px;
	height: 48px;
	fill: currentColor;
}

.inf-card__title {
	margin: 0 0 10px;
	font-size: 27px;
	font-weight: 700;
	line-height: 1.24;
	letter-spacing: -.01em;
}

/* When a card has no categories the meta row is absent and the excerpt
   follows the title directly — restore the roomier gap so cards with and
   without categories keep a consistent rhythm. */
.inf-card__title + .inf-card__excerpt {
	margin-top: 18px;
}

.inf-card__title a {
	color: var(--inf-text);
	text-decoration: none;
}

.inf-card__title a:hover,
.inf-card__title a:focus {
	color: var(--inf-accent);
}

.inf-card__excerpt {
	margin-bottom: 22px;
	font-size: 16px;
	line-height: 1.85;
	color: var(--inf-muted);
}

.inf-card__excerpt p {
	margin: 0;
}

.inf-card__footer {
	display: flex;
	justify-content: flex-end;
}

.inf-card__btn {
	display: inline-flex;
	align-items: center;
	gap: 9px;
	padding: 13px 26px;
	font-size: 15px;
	font-weight: 500;
	color: var(--inf-text);
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--inf-border);
	border-radius: var(--inf-radius);
	box-shadow: 0 1px 2px rgba(20, 20, 40, .05);
	transition: background .15s ease, border-color .15s ease, transform .15s ease;
}

.inf-card__btn:hover,
.inf-card__btn:focus {
	background: var(--inf-bg-soft);
	border-color: #d0d0d8;
	transform: translateY(-1px);
}

.inf-card__btn-icon {
	flex: none;
	color: var(--inf-muted);
}

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */

.inf-empty {
	font-size: 16px;
	padding: 70px 20px;
	text-align: center;
	color: var(--inf-muted);
}

.inf-empty svg {
	margin-bottom: 16px;
	color: #c2c2cc;
}

.inf-empty__title {
	margin: 0 0 6px;
	font-size: 19px;
	font-weight: 600;
	color: var(--inf-text);
}

.inf-empty__text {
	margin: 0;
	font-size: 15px;
}

/* --------------------------------------------------------------------------
   Pagination
   -------------------------------------------------------------------------- */

.inf-pagination {
	clear: both;
	padding-top: 20px;
}

.inf-pager__list {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	justify-content: center;
	margin: 0;
	padding: 0;
	list-style: none;
}

.inf-pager__item {
	margin: 0;
}

.inf-pager__item .page-numbers {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 42px;
	height: 42px;
	padding: 0 13px;
	font-size: 15px;
	font-weight: 500;
	color: var(--inf-text);
	text-decoration: none;
	background: #fff;
	border: 1px solid var(--inf-border);
	border-radius: var(--inf-radius);
	transition: background .15s ease, border-color .15s ease;
}

.inf-pager__item .page-numbers:hover {
	background: var(--inf-bg-soft);
	border-color: #d0d0d8;
}

.inf-pager__item .page-numbers.current {
	color: #fff;
	background: var(--inf-text);
	border-color: var(--inf-text);
}

.inf-pager__item .page-numbers.dots {
	background: transparent;
	border-color: transparent;
}

/* --------------------------------------------------------------------------
   Loader
   -------------------------------------------------------------------------- */

.inf-loader {
	position: absolute;
	top: 50%;
	left: 50%;
	z-index: 5;
	transform: translate(-50%, -50%);
}

.inf-loader[hidden] {
	display: none;
}

.inf-loader__spinner {
	display: block;
	width: 34px;
	height: 34px;
	border: 3px solid rgba(74, 74, 232, .2);
	border-top-color: var(--inf-accent);
	border-radius: 50%;
	animation: inf-spin .7s linear infinite;
}

@keyframes inf-spin {
	to { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.inf-loader__spinner { animation-duration: 2s; }
	.inf-card__thumb img,
	.inf-card__btn { transition: none; }
	.inf-card__thumb:hover img { transform: none; }
}

/* --------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */

/* Tablet: ad narrows. Row 1 is a single card beside the ad (there isn't
   room for two next to a 300px ad at this width); everything below the
   float goes 2-up. */
@media (min-width: 861px) and (max-width: 1023px) {
	.inf-feed {
		--inf-ad-width: 300px;
		--inf-gap: 24px;
	}

	/* Card 1 fills the space left of the ad */
	.inf-feed--has-ad .inf-card {
		width: calc(100% - var(--inf-ad-width) - var(--inf-gap));
		margin-right: 0;
	}

	/* Cards 2+ clear the float and sit 2-up */
	.inf-feed--has-ad .inf-card:nth-child(n + 2) {
		width: calc(50% - (var(--inf-gap) / 2));
		margin-right: var(--inf-gap);
	}

	/* Zero the right margin on the second card of each 2-up row.
	   Row structure below the float: (2,3) (4,5) (6,7)… so the
	   right-hand card is every odd-indexed child from 3 onward. */
	.inf-feed--has-ad .inf-card:nth-child(2n + 3) {
		margin-right: 0;
	}

	/* No ad at this width: straight 2-up */
	.inf-feed:not(.inf-feed--has-ad) .inf-card {
		width: calc(50% - (var(--inf-gap) / 2));
	}

	.inf-feed:not(.inf-feed--has-ad) .inf-card:nth-child(2n) {
		margin-right: 0;
	}

	/* Featured mode at tablet: lead card sits beside the ad, rest go 2-up */
	.inf-feed--featured.inf-feed--has-ad .inf-card--featured {
		width: calc(100% - var(--inf-ad-width) - var(--inf-gap));
		margin-right: 0;
	}

	.inf-feed--featured.inf-feed--has-ad .inf-card:nth-child(n + 2) {
		width: calc(50% - (var(--inf-gap) / 2));
		margin-right: var(--inf-gap);
	}

	/* Rows below the lead: (2,3) (4,5)… right card is 2n+3 */
	.inf-feed--featured.inf-feed--has-ad .inf-card:nth-child(2n + 3) {
		margin-right: 0;
	}

	.inf-feed--featured .inf-card--featured .inf-card__title { font-size: 28px; }
	.inf-feed--featured .inf-card--featured .inf-card__thumb img,
	.inf-feed--featured .inf-card--featured .inf-card__img,
	.inf-feed--featured .inf-card--featured .inf-card__thumb--placeholder { height: 300px; }

	.inf-card__title { font-size: 23px; }
	.inf-card__thumb img,
	.inf-card__img,
	.inf-card__thumb--placeholder { height: 200px; }
}
/* Small tablet band: ad unfloats (below), cards stay 2-up */
@media (min-width: 601px) and (max-width: 860px) {
	.inf-feed {
		--inf-gap: 24px;
	}

	.inf-card,
	.inf-feed--has-ad .inf-card,
	.inf-feed--has-ad .inf-card:nth-child(n + 3),
	.inf-feed--featured .inf-card--featured,
	.inf-feed--featured.inf-feed--has-ad .inf-card--featured,
	.inf-feed--featured.inf-feed--has-ad .inf-card:nth-child(n + 2) {
		width: calc(50% - (var(--inf-gap) / 2));
		margin-right: var(--inf-gap);
	}

	.inf-card:nth-child(2n),
	.inf-feed--has-ad .inf-card:nth-child(2n),
	.inf-feed--featured.inf-feed--has-ad .inf-card:nth-child(2n) {
		margin-right: 0;
	}

	.inf-feed--featured .inf-card--featured .inf-card__title { font-size: 26px; }
	.inf-feed--featured .inf-card--featured .inf-card__thumb img,
	.inf-feed--featured .inf-card--featured .inf-card__img,
	.inf-feed--featured .inf-card--featured .inf-card__thumb--placeholder { height: 200px; }

	.inf-card__title { font-size: 23px; }
	.inf-card__thumb img,
	.inf-card__img,
	.inf-card__thumb--placeholder { height: 200px; }
}

/* Small tablet: ad stops floating, sits full width on top */
@media (max-width: 860px) {
	.inf-ad {
		float: none;
		width: 100%;
		max-width: 420px;
		margin: 0 auto 32px;
	}

	.inf-ad__label { text-align: center; }
}

/* Phone: single column */
@media (max-width: 600px) {
	.inf-feed {
		--inf-gap: 0px;
		padding: 0 16px;
	}

	.inf-controls {
		flex-direction: column;
		align-items: stretch;
	}

	/* In a column flex container the search wrapper would stretch to the
	   tallest sibling and drag its grid rows with it. Pin the row height. */
	.inf-feed .inf-search {
		flex: 0 0 auto;
		grid-template-rows: auto;
		align-items: center;
	}

	.inf-filter { flex: 0 0 auto; }

	.inf-card,
	.inf-feed--has-ad .inf-card,
	.inf-feed--has-ad .inf-card:nth-child(n + 3),
	.inf-feed--featured .inf-card--featured,
	.inf-feed--featured.inf-feed--has-ad .inf-card--featured,
	.inf-feed--featured.inf-feed--has-ad .inf-card:nth-child(n + 2) {
		width: 100%;
		margin-right: 0;
		margin-bottom: 40px;
	}

	.inf-feed--featured .inf-card--featured .inf-card__title { font-size: 23px; }
	.inf-feed--featured .inf-card--featured .inf-card__thumb img,
	.inf-feed--featured .inf-card--featured .inf-card__img,
	.inf-feed--featured .inf-card--featured .inf-card__thumb--placeholder { height: 190px; }

	.inf-card__title { font-size: 21px; }

	.inf-card__thumb img,
	.inf-card__img,
	.inf-card__thumb--placeholder { height: 190px; }

	.inf-card__footer { justify-content: stretch; }
	.inf-card__btn { flex: 1; justify-content: center; }
}
