/**
 * Homepage-specific styles.
 *
 * @package CrabTheme
 */

/* ── Page Hero (tool pages, subpages) ── */
.page-hero {
	background: linear-gradient(135deg, var(--color-navy), var(--color-ocean));
	color: #fff;
	padding: var(--space-12) 0 var(--space-10);
	text-align: center;
}

.page-hero--tool {
	padding: var(--space-10) 0 var(--space-8);
}

.page-hero__title {
	font-family: var(--font-heading);
	font-size: var(--text-3xl);
	font-weight: var(--weight-bold);
	line-height: var(--leading-tight);
	margin-bottom: var(--space-3);
	color: #fff;
}

.page-hero + .container {
	padding-top: var(--space-10);
}

.page-hero__subtitle {
	font-size: var(--text-md);
	opacity: 0.85;
	max-width: 36rem;
	margin: 0 auto;
	line-height: var(--leading-normal);
}

@media (max-width: 767px) {
	.page-hero__title {
		font-size: var(--text-2xl);
	}
}

/* ── Section Headers ── */
.section-header {
	text-align: center;
	margin-bottom: var(--space-10);
}

.section-header__title {
	font-family: var(--font-heading);
	font-size: var(--text-2xl);
	font-weight: var(--weight-bold);
	color: var(--color-text);
	margin-bottom: var(--space-2);
}

.section-header__subtitle {
	font-size: var(--text-md);
	color: var(--color-text-muted);
	max-width: 32rem;
	margin: 0 auto;
}

/* ── Featured Tools Section ── */
.featured-tools {
	padding: var(--space-16) 0;
	background: var(--color-bg-alt);
}

.tools-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: var(--space-6);
}

/* Tool card */
.tool-card {
	display: flex;
	flex-direction: column;
	background: var(--color-white);
	border-radius: var(--radius-lg);
	padding: var(--space-6);
	text-decoration: none;
	color: var(--color-text);
	border: 1px solid var(--color-border-light);
	box-shadow: var(--shadow-sm);
	transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}

.tool-card:hover {
	transform: translateY(-3px);
	box-shadow: var(--shadow-lg);
}

.tool-card__icon {
	width: 3rem;
	height: 3rem;
	border-radius: var(--radius-md);
	display: flex;
	align-items: center;
	justify-content: center;
	margin-bottom: var(--space-4);
}

.tool-card__icon svg {
	width: 1.5rem;
	height: 1.5rem;
	fill: currentColor;
}

/* Color variants */
.tool-card--teal .tool-card__icon {
	background: rgba(20, 143, 119, 0.12);
	color: var(--color-teal);
}
.tool-card--teal:hover {
	border-color: var(--color-teal);
}

.tool-card--ocean .tool-card__icon {
	background: rgba(26, 82, 118, 0.12);
	color: var(--color-ocean);
}
.tool-card--ocean:hover {
	border-color: var(--color-ocean);
}

.tool-card--kelp .tool-card__icon {
	background: rgba(39, 174, 96, 0.12);
	color: var(--color-kelp);
}
.tool-card--kelp:hover {
	border-color: var(--color-kelp);
}

.tool-card--coral .tool-card__icon {
	background: rgba(231, 76, 60, 0.12);
	color: var(--color-coral);
}
.tool-card--coral:hover {
	border-color: var(--color-coral);
}

.tool-card__title {
	font-family: var(--font-heading);
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
	margin-bottom: var(--space-2);
}

.tool-card__description {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
	line-height: var(--leading-normal);
	flex: 1;
}

.tool-card__link {
	display: inline-block;
	margin-top: var(--space-4);
	font-size: var(--text-sm);
	font-weight: var(--weight-semibold);
	color: var(--color-primary);
	transition: color var(--transition-fast);
}

.tool-card:hover .tool-card__link {
	color: var(--color-primary-hover);
}

/* ── Latest Posts Section ── */
.latest-posts {
	padding: var(--space-16) 0;
}

.section-footer {
	text-align: center;
	margin-top: var(--space-8);
}

/* ── About Teaser Section ── */
.about-teaser {
	padding: var(--space-16) 0;
	background: var(--color-bg-warm);
}

.about-teaser__grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: var(--space-10);
	align-items: center;
}

@media (min-width: 768px) {
	.about-teaser__grid {
		grid-template-columns: 1.2fr 1fr;
	}
}

.about-teaser__content h2 {
	font-family: var(--font-heading);
	font-size: var(--text-2xl);
	font-weight: var(--weight-bold);
	margin-bottom: var(--space-4);
}

.about-teaser__content p {
	color: var(--color-text-muted);
	line-height: var(--leading-relaxed);
	margin-bottom: var(--space-4);
}

.about-teaser__content .btn {
	margin-top: var(--space-2);
}

/* Stats grid */
.about-teaser__stats {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: var(--space-6);
}

.stat-item {
	text-align: center;
	padding: var(--space-5);
	background: var(--color-white);
	border-radius: var(--radius-lg);
	box-shadow: var(--shadow-sm);
}

.stat-item__number {
	display: block;
	font-family: var(--font-heading);
	font-size: var(--text-3xl);
	font-weight: var(--weight-bold);
	color: var(--color-ocean);
	line-height: 1;
	margin-bottom: var(--space-1);
}

.stat-item__label {
	display: block;
	font-size: var(--text-sm);
	color: var(--color-text-muted);
	font-weight: var(--weight-medium);
}

/* ── Resources Hub page ── */
.resources-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
	gap: var(--space-6);
	margin-bottom: var(--space-12);
}

.resource-card {
	display: flex;
	flex-direction: column;
	background: var(--color-white);
	border: 1px solid var(--color-border);
	border-radius: var(--radius-lg);
	padding: var(--space-6);
	text-decoration: none;
	color: var(--color-text);
	transition: box-shadow var(--transition-base), transform var(--transition-base);
}

.resource-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.resource-card h3 {
	font-family: var(--font-heading);
	font-size: var(--text-lg);
	font-weight: var(--weight-semibold);
	margin-bottom: var(--space-2);
}

.resource-card p {
	font-size: var(--text-sm);
	color: var(--color-text-muted);
	line-height: var(--leading-normal);
}
