/**
 * Blog index - the parts Elementor's panel cannot express.
 *
 * Columns, gaps, the chip design, the hero band and every padding are Elementor
 * controls now, set on the widgets themselves so the client can change them.
 * What is left here is the fine detail no control covers: the search field,
 * line clamps, the card's aspect ratio, the topic pill sitting over the image
 * and the hover lift.
 *
 * Selectors are deliberately kept to one class where possible. Elementor writes
 * its control CSS at .elementor-<doc> .elementor-element-<id> ... which is three
 * classes deep, so anything the client sets in the panel still wins over this
 * file.
 */

.entx {
	--entx-orange: #F37021;
	--entx-tint: #FEF1E9;
	--entx-ink: #16181D;
	--entx-body: #4B5159;
	--entx-muted: #767E88;
	--entx-line: #E6E8EB;
	--entx-line-soft: #F0F1F3;

	font-family: "Satoshi", sans-serif;
}

/* hello-elementor's reset.css styles bare form controls at a specificity these
   rules have to clear:
     input[type=search]       -> border: 1px solid #666   (0,1,1)
     input[type=search]:focus -> border-color: #333       (0,2,1)
     button                   -> border + colour #c36     (0,0,1)
     button:hover             -> background-color: #c36   (0,1,1, the maroon)
   Hence the .entx-search ancestor in front of the field and its clear button,
   and an explicit background on the hover state. */

/* ---------- hero ---------- */
.entx-hero__eyebrow .elementor-heading-title {
	font-size: 12px;
	font-weight: 700;
	letter-spacing: .15em;
	text-transform: uppercase;
	color: var(--entx-orange);
}
.entx-hero__title .elementor-heading-title {
	font-size: clamp(30px, 4.2vw, 46px);
	line-height: 1.12;
	font-weight: 700;
	letter-spacing: -.01em;
	color: var(--entx-ink);
}
.entx-hero__title,
.entx-hero__sub,
.entx-hero__search {
	max-width: 720px;
	width: 100%;
}
.entx-hero__sub {
	font-size: 17px;
	line-height: 1.6;
	color: var(--entx-body);
}
.entx-hero__sub p { margin: 0; }

/* ---------- search ---------- */
.entx-search {
	position: relative;
	display: flex;
	align-items: center;
	max-width: 560px;
	margin-inline: auto;
	background: #fff;
	border: 1px solid var(--entx-line);
	border-radius: 999px;
	box-shadow: 0 2px 10px rgba(16, 24, 40, .05);
	transition: border-color .15s ease, box-shadow .15s ease;
	text-align: start;
}
.entx-search:focus-within {
	border-color: var(--entx-orange);
	box-shadow: 0 0 0 4px rgba(243, 112, 33, .14);
}
.entx-search__icon {
	width: 19px;
	height: 19px;
	margin-inline: 20px 0;
	flex: none;
	color: var(--entx-muted);
}
.entx-search .entx-search__input,
.entx-search .entx-search__input:focus {
	flex: 1;
	min-width: 0;
	width: auto;
	border: 0;
	outline: 0;
	box-shadow: none;
	background: none;
	padding: 16px 14px;
	font: inherit;
	font-size: 15.5px;
	color: var(--entx-ink);
	border-radius: 999px;
	transition: none;
}
.entx-search__input::placeholder { color: var(--entx-muted); }
.entx-search__input::-webkit-search-cancel-button { display: none; }
.entx-search .entx-search__clear {
	flex: none;
	display: grid;
	place-items: center;
	width: 30px;
	height: 30px;
	margin-right: 12px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: #F1F2F4;
	color: var(--entx-body);
	cursor: pointer;
}
.entx-search .entx-search__clear:hover {
	background: #E4E6E9;
	color: var(--entx-ink);
}
.entx-search .entx-search__clear svg { width: 15px; height: 15px; }
/* the user-agent [hidden] rule loses to the display above */
.entx-search .entx-search__clear[hidden] { display: none; }

/* ---------- the centred column everything below the hero sits in ---------- */
.entx-main {
	max-width: 1200px;
	margin-inline: auto;
	padding-inline: 20px;
}

/* ---------- result count ---------- */
.entx-count {
	margin: 0 0 22px;
	text-align: center;
	font-size: 14px;
	color: var(--entx-muted);
}

/* ---------- grid ---------- */
/* The Loop Grid has a row-gap control but no column-gap one; without this the
   columns sit at Elementor's 30px default while the rows use the 28px set in
   the panel. */
.entx-grid { --grid-column-gap: 28px; }

/* ---------- the grid while a search is in flight ---------- */
.entx-grid { transition: opacity .15s ease; }
.entx-grid.entx-busy { opacity: .45; }

/* ---------- card ---------- */
.entx-card {
	height: 100%;
	background: #fff;
	border: 1px solid var(--entx-line);
	border-radius: 20px;
	overflow: hidden;
	text-decoration: none;
	color: inherit;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.entx-card:hover {
	transform: translateY(-3px);
	box-shadow: 0 12px 30px rgba(16, 24, 40, .09);
	border-color: #D8DBDF;
}
.entx-card:focus-visible {
	outline: 2px solid var(--entx-orange);
	outline-offset: -2px;
}

/* The client's featured images are banners, so the card crops to a fixed shape
   rather than letting a tall image set the card's height. */
.entx-card__media {
	position: relative;
	aspect-ratio: 16 / 10;
	background: var(--entx-tint);
	overflow: hidden;
	width: 100%;
}
.entx-card__img,
.entx-card__img img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.entx-card__pill {
	position: absolute;
	left: 14px;
	bottom: 14px;
	padding: 5px 11px;
	border-radius: 999px;
	background: rgba(255, 255, 255, .94);
	backdrop-filter: blur(4px);
	font-size: 11.5px;
	font-weight: 700;
	letter-spacing: .04em;
	text-transform: uppercase;
	color: var(--entx-orange);
	z-index: 2;
}
.entx-card__pill .elementor-heading-title {
	font: inherit;
	color: inherit;
	margin: 0;
}
/* a post with no topic yet would otherwise leave an empty white lozenge */
.entx-card__pill:not(:has(span)) { display: none; }

.entx-card__body {
	--flex-grow: 1;
	flex-grow: 1;
}
.entx-card__title .elementor-heading-title {
	margin: 0;
	font-size: 18.5px;
	line-height: 1.33;
	font-weight: 700;
	color: var(--entx-ink);
	transition: color .15s ease;
	display: -webkit-box;
	-webkit-line-clamp: 3;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.entx-card:hover .entx-card__title .elementor-heading-title { color: var(--entx-orange); }
.entx-card__excerpt {
	font-size: 14.5px;
	line-height: 1.6;
	color: var(--entx-body);
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}
.entx-card__foot {
	border-top: 1px solid var(--entx-line-soft);
	font-size: 13px;
	color: var(--entx-muted);
}
.entx-card__date .elementor-heading-title {
	font: inherit;
	color: inherit;
	margin: 0;
}

/* ---------- load more ---------- */
.entx-grid .elementor-button {
	font-family: inherit;
	font-size: 14.5px;
	font-weight: 700;
	letter-spacing: 0;
}

@media (max-width: 767px) {
	.entx-main { padding-inline: 16px; }
	.entx-hero__sub { font-size: 16px; }
}
