/* =========================================================
   Custom Search Results — Streamit
   File: Custom-Pages/search-results.css
   ========================================================= */

/* ---------- Layout ---------- */
.csp-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
	gap: 24px;
	margin: 24px 0 0;
	width: 100%;
}

/* ---------- Card ---------- */
.csp-card {
	display: flex;
	flex-direction: column;
	background: #fff;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	overflow: hidden;
	transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}

.csp-card:hover {
	transform: translateY(-3px);
	border-color: #c7d2fe;
	box-shadow: 0 12px 28px rgba(17, 24, 39, .09);
}

/* Thumbnail */
.csp-card__thumb {
	display: block;
	aspect-ratio: 16 / 9;
	background: #f3f4f6;
	overflow: hidden;
}

.csp-card__thumb img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
	transition: transform .3s ease;
}

.csp-card:hover .csp-card__thumb img {
	transform: scale(1.04);
}

/* Fallback initial when no featured image */
.csp-card__initial {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 100%;
	font-size: 44px;
	font-weight: 700;
	color: #9ca3af;
	text-transform: uppercase;
}

/* Body */
.csp-card__body {
	display: flex;
	flex-direction: column;
	gap: 8px;
	padding: 18px 20px 22px;
}

.csp-card__title {
	margin: 0;
	font-size: 18px;
	line-height: 1.35;
	font-weight: 600;
}

.csp-card__title a {
	color: #111827;
	text-decoration: none;
}

.csp-card__title a:hover {
	color: #2563eb;
}

.csp-card__excerpt {
	margin: 0;
	font-size: 14px;
	line-height: 1.6;
	color: #4b5563;
}

.csp-card__meta {
	margin-top: auto;
	padding-top: 10px;
	font-size: 13px;
	color: #9ca3af;
}

/* ---------- Search term highlight ---------- */
.csp-mark {
	background: #fef08a;
	color: inherit;
	padding: 0 2px;
	border-radius: 3px;
}

/* ---------- Responsive ---------- */
@media (max-width: 991px) {
	.csp-grid {
		grid-template-columns: repeat(auto-fill, minmax(230px, 1fr));
		gap: 20px;
	}
}

@media (max-width: 600px) {
	.csp-grid {
		grid-template-columns: 1fr;
		gap: 16px;
	}

	.csp-card__title {
		font-size: 17px;
	}

	.csp-card__body {
		padding: 14px 16px 18px;
	}
}



/* ---------- Card type label (e.g. "Attachment") ---------- */
.csp-card__type {
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: #2563eb;
}

/* ---------- Attachment thumb cursor ---------- */
.csp-card__thumb--attachment {
	cursor: zoom-in;
}

.csp-card__thumb--fallback {
	background: #eef2ff;
}

/* ---------- Infinite scroll loader ---------- */
.csp-loader {
	display: flex;
	align-items: center;
	justify-content: center;
	min-height: 60px;
	padding: 28px 0 8px;
	width: 100%;
}

.csp-loader__spinner {
	display: none;
	width: 32px;
	height: 32px;
	border: 3px solid #e5e7eb;
	border-top-color: #2563eb;
	border-radius: 50%;
	animation: csp-spin .8s linear infinite;
}

.csp-loader.is-loading .csp-loader__spinner {
	display: block;
}

@keyframes csp-spin {
	to { transform: rotate(360deg); }
}


/* ---------- Search bar at top of results ---------- */
.csp-searchbar {
	width: 100%;
	margin: 0 0 22px;
}

.csp-searchbar form {
	display: flex;
	align-items: center;
	background: #fff;
	border: 1px solid #d1d5db;
	border-radius: 12px;
	padding: 6px 6px 6px 14px;
	box-shadow: 0 1px 2px rgba(17,24,39,.04);
	transition: border-color .18s ease, box-shadow .18s ease;
}

.csp-searchbar form:focus-within {
	border-color: #2563eb;
	box-shadow: 0 0 0 4px rgba(37,99,235,.15);
}

.csp-searchbar__icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	color: #6b7280;
	flex: 0 0 auto;
	margin-right: 8px;
}

.csp-searchbar__input {
	flex: 1 1 auto;
	min-width: 0;
	border: 0;
	outline: none;
	background: transparent;
	font-size: 16px;
	line-height: 1.4;
	padding: 10px 8px 10px 0;
	color: #111827;
	-webkit-appearance: none;
	appearance: none;
}

.csp-searchbar__input::placeholder {
	color: #9ca3af;
}

.csp-searchbar__input::-webkit-search-cancel-button {
	-webkit-appearance: none;
}

.csp-searchbar__btn {
	flex: 0 0 auto;
	border: 0;
	cursor: pointer;
	background: #2563eb;
	color: #fff;
	font-weight: 600;
	font-size: 15px;
	padding: 11px 20px;
	border-radius: 9px;
	transition: background .18s ease;
}

.csp-searchbar__btn:hover {
	background: #1d4ed8;
}

@media (max-width: 600px) {
	.csp-searchbar form {
		padding: 4px 4px 4px 12px;
		border-radius: 10px;
	}

	.csp-searchbar__input {
		font-size: 16px; /* stops iOS zoom-on-focus */
		padding: 10px 6px 10px 0;
	}

	.csp-searchbar__btn {
		padding: 10px 14px;
		font-size: 14px;
	}

	.csp-searchbar__icon svg {
		width: 18px;
		height: 18px;
	}
}









