/*
 * Home page: card images and the hero search box.
 * Plain CSS (not Tailwind) so it does not depend on the generated Tailwind build.
 */

/* ---------- Card image: full width, same 16:9 frame on every card ---------- */
.wpscorix-card-media {
	display: block;
	position: relative;
	margin: -1.25rem -1.25rem 1rem;
	aspect-ratio: 16 / 9;
	overflow: hidden;
	background: #f1f5f9;
	border-bottom: 1px solid #e5e7eb;
	border-radius: 1.25rem 1.25rem 0 0;
}

.wpscorix-card-media--content {
	border-radius: 0.5rem 0.5rem 0 0;
}

.wpscorix-card-media img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	transition: transform 0.3s ease;
}

/* Images that are not ~16:9 (e.g. wide banners, square logos): show whole, centred. */
.wpscorix-card-media--contain img {
	object-fit: contain;
	padding: 1rem;
	background: #fff;
}

.group:hover .wpscorix-card-media img {
	transform: scale(1.03);
}

/* No image: a calm tile with the item's initials and type icon. */
.wpscorix-card-media__fallback {
	position: absolute;
	inset: 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.5rem;
	background: linear-gradient(135deg, #ecfdf5 0%, #f1f5f9 100%);
	color: #0f766e;
}

.wpscorix-card-media__initials {
	font-size: 2.25rem;
	font-weight: 800;
	letter-spacing: 0.02em;
	line-height: 1;
}

.wpscorix-card-media__type {
	display: inline-flex;
	align-items: center;
	gap: 0.4rem;
	font-size: 0.7rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: #64748b;
}

/* The Editor's Choice tag sits above the image. */
.wpscorix-card-media + * .spr-ec--ribbon,
.group > .spr-ec--ribbon {
	z-index: 4;
}

/* ---------- Hero search box ---------- */
.wpscorix-home-search {
	position: relative;
}

.wpscorix-home-search > .wpscorix-home-search__icon {
	position: absolute;
	top: 0;
	bottom: 0;
	left: 0;
	display: flex;
	align-items: center;
	padding-left: 1.1rem;
	pointer-events: none;
	z-index: 2;
}

.wpscorix-home-search > .wpscorix-home-search__icon svg {
	width: 1.5rem;
	height: 1.5rem;
}

.wpscorix-home-search input[type="search"] {
	box-sizing: border-box;
	width: 100%;
	height: 4rem;
	margin: 0;
	padding: 0 8.5rem 0 3.4rem;
	border-radius: 999px;
	background: #fff;
	font-size: 1.125rem;
	line-height: 1.4;
}

.wpscorix-home-search input[type="search"]::-webkit-search-decoration,
.wpscorix-home-search input[type="search"]::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.wpscorix-home-search > button[type="submit"] {
	position: absolute;
	top: 0.5rem;
	bottom: 0.5rem;
	right: 0.5rem;
	margin: 0;
	padding: 0 1.5rem;
	border-radius: 999px;
	line-height: 1;
}

@media (max-width: 640px) {
	.wpscorix-home-search input[type="search"] {
		height: 3.5rem;
		padding-right: 6.25rem;
		font-size: 1rem;
	}

	.wpscorix-home-search > button[type="submit"] {
		padding: 0 1rem;
		font-size: 0.9rem;
	}
}

/* ---------- Small square thumbnails (Top Rated, Popular Comparisons): centred crop ---------- */
.wpscorix-top-rated__main {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	min-width: 0;
}

.wpscorix-top-rated__text {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

/* Spans instead of paragraphs: no theme paragraph margins under the title. */
.wpscorix-top-rated__title,
.wpscorix-top-rated__label {
	display: block;
	margin: 0;
}

.wpscorix-top-rated__title {
	line-height: 1.35;
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.wpscorix-top-rated__label {
	line-height: 1.3;
}

.wpscorix-thumb {
	flex: none;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 48px;
	height: 48px;
	aspect-ratio: 1 / 1;
	overflow: hidden;
	border: 1px solid #e5e7eb;
	border-radius: 0.75rem;
	background: #f8fafc;
}

.wpscorix-thumb img {
	display: block;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center;
}

.wpscorix-thumb--initials {
	background: linear-gradient(135deg, #ecfdf5 0%, #f1f5f9 100%);
	color: #0f766e;
	font-size: 0.9rem;
	font-weight: 800;
	letter-spacing: 0.02em;
}

/* The theme's default list indent pushed the Top Rated rows to the right. */
ul:has(> li .wpscorix-top-rated__main) {
	margin: 0;
	padding-left: 0;
	list-style: none;
}

/* ==========================================================================
 * Home page sections added 2026-11-25: trust strip, browse by need,
 * Editor's Choice, comparisons, deals, How we score, newsletter and
 * "suggest a product". Plain CSS, same palette as the Tailwind build.
 * ========================================================================== */
.wps-trust { background: #e6f7f0; border-bottom: 1px solid #cdeedf; }
.wps-trust__list { max-width: 80rem; margin: 0 auto; padding: 0.85rem 1rem; list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem 2rem; }
.wps-trust__item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.875rem; color: #1f2937; margin: 0; }
.wps-trust__item i { color: #17995f; }
.wps-trust__item a { color: #17995f; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }

.wps-section { margin-bottom: 3rem; }
.wps-section__head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; margin-bottom: 1rem; padding: 0 0.25rem; }
.wps-section__title { font-size: 1.25rem; font-weight: 700; color: #1f2937; margin: 0; }
.wps-section__sub { font-size: 0.875rem; color: #6b7280; margin: 0.25rem 0 0; }
.wps-section__more { font-size: 0.875rem; font-weight: 500; color: #22b573; white-space: nowrap; }
.wps-section__more:hover { color: #17995f; }

.wps-need { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; }
@media (min-width: 768px) { .wps-need { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wps-need__tile { display: flex; flex-direction: column; gap: 0.25rem; padding: 1rem 1.1rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.5rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: border-color .2s, box-shadow .2s; }
.wps-need__tile:hover, .wps-need__tile:focus-visible { border-color: #22b573; box-shadow: 0 4px 12px rgba(34,181,115,.12); }
.wps-need__name { font-weight: 600; color: #1f2937; }
.wps-need__count { font-size: 0.75rem; color: #6b7280; }

.wps-ec, .wps-cards { display: grid; grid-template-columns: 1fr; gap: 1rem; }
@media (min-width: 768px) { .wps-ec, .wps-cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.wps-ec__card, .wps-card { display: flex; flex-direction: column; gap: 0.5rem; padding: 1.25rem; background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; box-shadow: 0 1px 2px rgba(0,0,0,.04); color: inherit; transition: border-color .2s, box-shadow .2s; }
.wps-ec__card:hover, .wps-card:hover, .wps-ec__card:focus-visible, .wps-card:focus-visible { border-color: #22b573; box-shadow: 0 6px 16px rgba(0,0,0,.06); }
.wps-ec__card { border-color: #f3d27a; background: linear-gradient(180deg, #fffbeb 0, #fff 60%); }
.wps-ec__title, .wps-card__title { font-weight: 700; color: #1f2937; line-height: 1.3; }
.wps-ec__meta, .wps-card__text { font-size: 0.875rem; color: #4b5563; line-height: 1.5; }
.wps-card__eyebrow { font-size: 0.7rem; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: #17995f; }
.wps-card__cta { margin-top: auto; padding-top: 0.5rem; font-size: 0.875rem; font-weight: 600; color: #22b573; }

.wps-score { background: #fff; border: 1px solid #e5e7eb; border-radius: 0.75rem; padding: 1.5rem; }
.wps-score__steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 1.25rem; }
@media (min-width: 768px) { .wps-score__steps { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1024px) { .wps-score__steps { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.wps-score__step { display: flex; flex-direction: column; gap: 0.35rem; margin: 0; font-size: 0.875rem; color: #4b5563; line-height: 1.5; }
.wps-score__step strong { color: #1f2937; font-size: 0.95rem; }
.wps-score__num { display: inline-flex; align-items: center; justify-content: center; width: 1.75rem; height: 1.75rem; border-radius: 9999px; background: #e6f7f0; color: #17995f; font-weight: 700; font-size: 0.85rem; }

.wps-cta-row { display: grid; grid-template-columns: 1fr; gap: 1rem; margin-bottom: 3rem; }
@media (min-width: 768px) { .wps-cta-row { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.wps-cta { padding: 1.5rem; border-radius: 0.75rem; background: #1f2937; color: #e5e7eb; }
.wps-cta--alt { background: #fff; color: #4b5563; border: 1px solid #e5e7eb; }
.wps-cta__title { font-size: 1.15rem; font-weight: 700; margin: 0 0 0.5rem; color: #fff; }
.wps-cta--alt .wps-cta__title { color: #1f2937; }
.wps-cta__text { font-size: 0.9rem; line-height: 1.55; margin: 0 0 1rem; }
.wps-cta__admin { font-size: 0.8rem; margin: 0; padding: 0.75rem; border: 1px dashed #6b7280; border-radius: 0.5rem; color: #d1d5db; }
.wps-cta__admin code { color: #fff; }
.wps-cta__button { display: inline-block; padding: 0.55rem 1.1rem; border-radius: 0.375rem; background: #22b573; color: #fff; font-weight: 600; font-size: 0.9rem; }
.wps-cta__button:hover, .wps-cta__button:focus-visible { background: #17995f; color: #fff; }
.wps-cta-row > .wps-cta:only-child { grid-column: 1 / -1; }
/* Newsletter inputs on the dark box: readable placeholder and typed text. */
.wps-cta:not(.wps-cta--alt) .wps-cta__form input::placeholder,
.wps-cta:not(.wps-cta--alt) .wps-cta__form textarea::placeholder { color: #9ca3af; opacity: 1; }
.wps-cta:not(.wps-cta--alt) .wps-cta__form input:not([type="submit"]):not([type="checkbox"]),
.wps-cta:not(.wps-cta--alt) .wps-cta__form textarea { color: #f3f4f6; }
/* Newsletter box in a sidebar widget: same look as the homepage box. */
.wps-cta--sidebar a:not(.wps-cta__button) { color: #007f5f; }
.wps-cta--sidebar .gchoice { display: flex; align-items: flex-start; gap: 0.5rem; }
.wps-cta--sidebar .gchoice input[type="checkbox"] { flex: none; margin-top: 0.3em; }

/* Short excerpt on homepage review cards (max 3 lines). */
.wps-card-excerpt { font-size: 0.875rem; line-height: 1.5; color: #4b5563; margin: 0 0 1rem; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
