/**
 * site-front.css
 *
 * Shared styles for the homepage, individual tool pages, category
 * archive pages, and the tools directory — everything rendered by
 * Includes\Homepage and Includes\ToolPageRouter.
 *
 * Design direction: minimal, professional, utility-first (per the
 * project's own UI Design spec) — quiet color-coding by category
 * rather than heavy decoration, generous white space, and one small
 * signature touch (the live tool-count stat row in the hero) rather
 * than scattered ornamentation.
 */

.cas-breadcrumb {
	font-size: 0.85rem;
	color: var(--cas-muted, #6b7280);
}

.cas-breadcrumb a {
	color: var(--cas-muted, #6b7280);
	text-decoration: none;
}

.cas-breadcrumb a:hover {
	color: var(--cas-primary, #0d6efd);
	text-decoration: underline;
}

.cas-breadcrumb span[aria-hidden] {
	margin: 0 0.4rem;
}

/* Tool cards — used on the homepage, category pages, tools index, and
 * "Related Tools" everywhere. Centered icon-tile layout: a bold, solid
 * color badge carries the category identity, so the card border itself
 * stays neutral and quiet. */

.cas-tool-card {
	position: relative;
	border: 1px solid #e5e7eb;
	border-radius: 14px;
	transition: box-shadow 0.15s ease, transform 0.15s ease, border-color 0.15s ease;
	color: inherit;
}

.cas-tool-card .card-body {
	display: flex;
	flex-direction: column;
	align-items: center;
	text-align: center;
	padding: 1.75rem 1.25rem;
}

.cas-tool-card:hover,
.cas-tool-card:focus-visible {
	box-shadow: 0 0.75rem 2rem rgba(15, 23, 42, 0.1);
	transform: translateY(-3px);
	border-color: #d1d5db;
}

.cas-tool-card-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 14px;
	background: var(--cas-muted-bg, #f8fafc);
	color: var(--cas-muted, #6b7280);
	font-size: 1.35rem;
	margin-bottom: 0.85rem;
}

.cas-tool-card[data-tool-category="business"] .cas-tool-card-icon { color: var(--cas-cat-business, #4f46e5); background: rgba(79, 70, 229, 0.1); }
.cas-tool-card[data-tool-category="finance"] .cas-tool-card-icon  { color: var(--cas-cat-finance, #0d9488); background: rgba(13, 148, 136, 0.1); }
.cas-tool-card[data-tool-category="document"] .cas-tool-card-icon { color: var(--cas-cat-document, #b45309); background: rgba(180, 83, 9, 0.1); }
.cas-tool-card[data-tool-category="ai"] .cas-tool-card-icon       { color: var(--cas-cat-ai, #db2777); background: rgba(219, 39, 119, 0.1); }

.cas-tool-card .fw-semibold {
	font-size: 0.95rem;
}

.cas-tool-card-tag {
	display: inline-block;
	font-size: 0.7rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--cas-muted, #6b7280);
}

.cas-tool-cta {
	background: var(--cas-muted-bg, #f8fafc);
}

.cas-tools-count {
	color: var(--cas-muted, #6b7280);
	font-weight: 500;
	font-size: 0.65em;
	vertical-align: middle;
}

/* Section headings with a small icon chip (Popular Tools / each
 * category). The icon color is the one place category identity shows
 * up outside the cards — kept small and quiet. */

.cas-section-heading {
	display: flex;
	align-items: center;
	gap: 0.6rem;
}

.cas-section-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 2.25rem;
	height: 2.25rem;
	border-radius: 0.6rem;
	background: var(--cas-muted-bg, #f8fafc);
	color: var(--cas-primary, #0d6efd);
	font-size: 1.05rem;
	flex-shrink: 0;
}

.cas-section-icon--popular {
	color: var(--cas-accent, #f59e0b);
	background: rgba(245, 158, 11, 0.12);
}

.cas-section-icon[data-cat="business"] { color: var(--cas-cat-business, #4f46e5); background: rgba(79, 70, 229, 0.1); }
.cas-section-icon[data-cat="finance"]  { color: var(--cas-cat-finance, #0d9488); background: rgba(13, 148, 136, 0.1); }
.cas-section-icon[data-cat="document"] { color: var(--cas-cat-document, #b45309); background: rgba(180, 83, 9, 0.1); }
.cas-section-icon[data-cat="ai"]       { color: var(--cas-cat-ai, #db2777); background: rgba(219, 39, 119, 0.1); }

/* Hero */

.cas-hero {
	background: var(--cas-muted-bg, #f8fafc);
	border-radius: 20px;
	padding: 3rem 1.5rem;
}

.cas-hero-eyebrow {
	display: inline-block;
	font-size: 0.75rem;
	font-weight: 600;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--cas-primary, #0d6efd);
	background: #fff;
	border: 1px solid rgba(13, 110, 253, 0.15);
	padding: 0.3rem 0.8rem;
	border-radius: 999px;
	margin-bottom: 0.9rem;
}

.cas-home-search {
	max-width: 640px;
	display: flex;
	gap: 0.5rem;
	background: #fff;
	padding: 0.6rem;
	border-radius: 999px;
	box-shadow: 0 0.5rem 1.5rem rgba(15, 23, 42, 0.08);
}

.cas-home-search .form-control,
.cas-home-search .form-select {
	border-color: transparent;
	background: transparent;
}

.cas-home-search .form-control:focus,
.cas-home-search .form-select:focus {
	box-shadow: none;
}

.cas-home-search-input-wrap {
	position: relative;
	flex: 1;
}

.cas-home-search-input-wrap .bi-search {
	position: absolute;
	left: 1rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cas-muted, #6b7280);
	pointer-events: none;
}

.cas-home-search-input-wrap .form-control {
	padding-left: 2.5rem;
	border-radius: 999px;
}

.cas-home-search-category {
	max-width: 200px;
	flex-shrink: 0;
	border-radius: 999px;
}

.cas-home-tool-col.cas-is-hidden {
	display: none;
}

.cas-hero-stats {
	margin-top: 1.25rem;
	color: var(--cas-muted, #6b7280);
	font-size: 0.875rem;
}

.cas-hero-stats .list-inline-item:not(:last-child) {
	margin-right: 1.25rem;
}

.cas-hero-stats .bi-check-circle-fill {
	color: var(--cas-primary, #0d6efd);
	margin-right: 0.3rem;
}

/* FAQ + Newsletter */

.cas-newsletter {
	background: var(--cas-muted-bg, #f8fafc);
	border-radius: var(--cas-radius, 0.75rem);
}

.cas-newsletter-form {
	max-width: 420px;
}

/* Expandable sections (Business Plan sections, tool-page FAQ, homepage
 * FAQ) share this class so all three look consistent. */
.cas-plan-section {
	border: 1px solid #e5e7eb;
	border-radius: 0.5rem;
	padding: 0.75rem 1rem;
	margin-bottom: 0.6rem;
}

.cas-plan-section summary {
	font-weight: 600;
	cursor: pointer;
}

.cas-plan-section p {
	margin: 0.6rem 0 0;
}

/* Respect reduced-motion preferences: drop the hover lift/transition. */
@media (prefers-reduced-motion: reduce) {
	.cas-tool-card {
		transition: none;
	}

	.cas-tool-card:hover {
		transform: none;
	}
}

/* Tools directory (/tools/) — sidebar + filterable grid */

.cas-tools-index-page {
	max-width: 1280px;
	margin: 0 auto;
	padding: 2rem 1.25rem 4rem;
}

.cas-directory-layout {
	display: grid;
	grid-template-columns: 260px 1fr;
	gap: 2.5rem;
	align-items: start;
}

.cas-directory-sidebar {
	position: sticky;
	top: 90px;
	display: flex;
	flex-direction: column;
	gap: 1.25rem;
}

.cas-directory-search-wrap {
	position: relative;
}

.cas-directory-search-wrap .bi-search {
	position: absolute;
	left: 0.9rem;
	top: 50%;
	transform: translateY(-50%);
	color: var(--cas-muted, #6b7280);
	pointer-events: none;
}

.cas-directory-search-wrap input {
	padding-left: 2.4rem;
	border-radius: 999px;
}

.cas-directory-nav {
	display: flex;
	flex-direction: column;
	gap: 0.15rem;
}

.cas-directory-nav-link {
	display: flex;
	align-items: center;
	gap: 0.65rem;
	padding: 0.55rem 0.75rem;
	border-radius: 0.6rem;
	color: var(--cas-ink, #1d2327);
	text-decoration: none;
	font-size: 0.92rem;
	font-weight: 500;
}

.cas-directory-nav-link i {
	color: var(--cas-muted, #6b7280);
	font-size: 1rem;
	width: 1.1rem;
	text-align: center;
}

.cas-directory-nav-link span:not(.cas-directory-nav-count) {
	flex: 1;
}

.cas-directory-nav-count {
	font-size: 0.78rem;
	color: var(--cas-muted, #6b7280);
	background: var(--cas-muted-bg, #f8fafc);
	padding: 0.1rem 0.5rem;
	border-radius: 999px;
}

.cas-directory-nav-link:hover {
	background: var(--cas-muted-bg, #f8fafc);
	color: var(--cas-ink, #1d2327);
}

.cas-directory-nav-link.is-active {
	background: rgba(13, 110, 253, 0.08);
	color: var(--cas-primary, #0d6efd);
}

.cas-directory-nav-link.is-active i {
	color: var(--cas-primary, #0d6efd);
}

.cas-directory-nav-link.is-active .cas-directory-nav-count {
	background: rgba(13, 110, 253, 0.12);
	color: var(--cas-primary, #0d6efd);
}

.cas-directory-footnote {
	font-size: 0.8rem;
	color: var(--cas-muted, #6b7280);
	display: flex;
	align-items: center;
	gap: 0.4rem;
	margin: 0;
	padding-top: 0.5rem;
	border-top: 1px solid #e5e7eb;
}

.cas-directory-heading-count {
	color: var(--cas-muted, #6b7280);
	font-weight: 400;
}

.cas-directory-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 1rem;
}

.cas-directory-grid .cas-tool-card.cas-is-hidden {
	display: none;
}

@media (max-width: 900px) {
	.cas-directory-layout {
		grid-template-columns: 1fr;
	}

	.cas-directory-sidebar {
		position: static;
		flex-direction: row;
		flex-wrap: nowrap;
		overflow-x: auto;
		gap: 0.5rem;
		padding-bottom: 0.5rem;
	}

	.cas-directory-search-wrap {
		flex: 1 0 100%;
	}

	.cas-directory-nav {
		flex-direction: row;
		flex-wrap: nowrap;
	}

	.cas-directory-nav-link {
		white-space: nowrap;
		flex-shrink: 0;
	}

	.cas-directory-footnote {
		display: none;
	}
}

/* Mobile: stack the homepage search input and category filter instead
 * of squeezing them side by side. */
@media (max-width: 576px) {
	.cas-home-search {
		flex-direction: column;
	}

	.cas-home-search-category {
		max-width: none;
	}
}
