.wp-block-codex-counter-homepage.ctc-homepage,
.ctc-homepage {
	--chg-primary: #7f77dd;
	--chg-secondary: #0f6e56;
	--chg-tertiary: #854f0b;
	--chg-primary-light: #eeedfe;
	--chg-secondary-light: #e1f5ee;
	--chg-tertiary-light: #faeeda;
	--chg-text-primary: #1a1a1a;
	--chg-text-secondary: #555;
	--chg-text-muted: #888;
	--chg-bg-white: #fff;
	--chg-bg-light: #f8f8f8;
	--chg-border: #e0e0e0;
	--chg-font-family: Georgia, "Times New Roman", serif;
	--chg-card-radius: 12px;
	--chg-btn-radius: 8px;
	--chg-typo-scale: 1;
	--chg-cat-desktop: 3;
	--chg-cat-tablet: 2;
	--chg-cat-mobile: 1;
	--chg-article-desktop: 3;
	--chg-article-tablet: 2;
	--chg-article-mobile: 1;
	font-family: var(--chg-font-family);
	color: var(--chg-text-primary);
	background: var(--chg-bg-white);
}

.ctc-homepage.is-dark {
	--chg-text-primary: #f7f7f7;
	--chg-text-secondary: #d5d5d5;
	--chg-text-muted: #a9a9a9;
	--chg-bg-white: #151515;
	--chg-bg-light: #202020;
	--chg-border: #373737;
	--chg-primary-light: #2b2858;
	--chg-secondary-light: #123d32;
	--chg-tertiary-light: #3d2a12;
}

.ctc-homepage *,
.ctc-homepage *::before,
.ctc-homepage *::after {
	box-sizing: border-box;
}

.ctc-homepage h1,
.ctc-homepage h2,
.ctc-homepage h3,
.ctc-homepage h4,
.ctc-homepage p {
	margin: 0;
	font-family: var(--chg-font-family);
}

.ctc-homepage h1 {
	font-size: calc(28px * var(--chg-typo-scale));
	font-weight: 500;
	line-height: 1.3;
}

.ctc-homepage h2,
.ctc-homepage h3,
.ctc-homepage h4 {
	font-size: calc(18px * var(--chg-typo-scale));
	font-weight: 500;
	line-height: 1.3;
}

.ctc-homepage p {
	font-size: calc(16px * var(--chg-typo-scale));
	line-height: 1.8;
	color: var(--chg-text-secondary);
}

.ctc-homepage a {
	color: inherit;
	text-decoration: none;
}

.ctc-homepage img {
	display: block;
	max-width: 100%;
	height: auto;
}

.ctc-homepage .hero-section {
	padding: 4rem 2rem;
	text-align: center;
	background: linear-gradient(135deg, var(--chg-primary-light), var(--chg-secondary-light));
	background-position: center;
	background-size: cover;
}

.ctc-homepage.hero-bg-color .hero-section {
	background: var(--chg-primary-light);
}

.ctc-homepage .hero-content {
	max-width: 760px;
	margin: 0 auto;
}

.ctc-homepage .hero-image {
	width: min(100%, 520px);
	max-height: 320px;
	margin: 0 auto 2rem;
	border-radius: var(--chg-card-radius);
	object-fit: cover;
}

.ctc-homepage .hero-badge {
	display: inline-block;
	margin-bottom: 1.25rem;
	padding: 6px 14px;
	border-radius: 99px;
	background: rgba(127, 119, 221, 0.15);
	color: var(--chg-primary);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.05em;
}

.ctc-homepage .hero-section h1,
.ctc-homepage .final-cta h2 {
	margin-bottom: 1.25rem;
}

.ctc-homepage .hero-description,
.ctc-homepage .cta-description {
	max-width: 620px;
	margin: 0 auto 2.5rem;
}

.ctc-homepage .hero-buttons {
	display: flex;
	flex-wrap: wrap;
	gap: 1rem;
	justify-content: center;
}

.ctc-homepage .btn {
	display: inline-block;
	padding: 12px 28px;
	border-radius: var(--chg-btn-radius);
	font-size: calc(16px * var(--chg-typo-scale));
	font-weight: 500;
	line-height: 1;
	text-align: center;
	transition: transform 0.2s ease, background 0.2s ease;
}

.ctc-homepage .btn-primary {
	background: var(--chg-primary);
	color: #fff;
}

.ctc-homepage .btn-secondary {
	border: 2px solid var(--chg-primary);
	color: var(--chg-primary);
}

.ctc-homepage .btn-white {
	background: #fff;
	color: var(--chg-primary);
}

.ctc-homepage .btn:hover {
	transform: translateY(-2px);
}

.ctc-homepage .divider {
	height: 1px;
	background: var(--chg-border);
}

.ctc-homepage .three-categories,
.ctc-homepage .articles-grid {
	display: grid;
	gap: 1.5rem;
	max-width: 1200px;
	margin: 0 auto;
}

.ctc-homepage .three-categories {
	grid-template-columns: repeat(var(--chg-cat-desktop), minmax(0, 1fr));
	padding: 4rem 2rem;
}

.ctc-homepage .articles-grid {
	grid-template-columns: repeat(var(--chg-article-desktop), minmax(0, 1fr));
}

.ctc-homepage .category-card,
.ctc-homepage .article-card {
	position: relative;
	border: 1px solid var(--chg-border);
	border-radius: var(--chg-card-radius);
	background: var(--chg-bg-white);
	overflow: hidden;
	transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}

.ctc-homepage .category-card {
	padding: 2rem;
	text-align: center;
}

.ctc-homepage .category-card:hover,
.ctc-homepage .article-card:hover {
	border-color: var(--chg-primary);
	box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
}

.ctc-homepage .category-icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 64px;
	height: 64px;
	margin: 0 auto 1.5rem;
	border-radius: 12px;
	font-size: 34px;
}

.ctc-homepage .icon-accounting,
.ctc-homepage .article-image.accounting {
	background: var(--chg-primary-light);
}

.ctc-homepage .icon-sales,
.ctc-homepage .article-image.sales {
	background: var(--chg-secondary-light);
}

.ctc-homepage .icon-career,
.ctc-homepage .article-image.career {
	background: var(--chg-tertiary-light);
}

.ctc-homepage .category-card h3,
.ctc-homepage .category-card p {
	margin-bottom: 1rem;
}

.ctc-homepage .category-link {
	color: var(--chg-primary);
	font-weight: 600;
}

.ctc-homepage .featured-section {
	padding: 4rem 2rem;
	background: var(--chg-bg-light);
}

.ctc-homepage .featured-section > h2 {
	margin-bottom: 3rem;
	text-align: center;
}

.ctc-homepage .article-card:hover {
	transform: translateY(-4px);
}

.ctc-homepage .article-image {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	height: 160px;
	font-size: 44px;
}

.ctc-homepage .article-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
}

.ctc-homepage .article-body {
	padding: 1.5rem;
}

.ctc-homepage .article-category {
	display: block;
	margin-bottom: 0.75rem;
	color: var(--chg-text-muted);
	font-size: 12px;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.ctc-homepage .article-title {
	margin-bottom: 0.75rem;
}

.ctc-homepage .article-meta {
	color: var(--chg-text-muted);
	font-size: 12px;
}

.ctc-homepage .about-section {
	max-width: 800px;
	margin: 0 auto;
	padding: 4rem 2rem;
}

.ctc-homepage .about-section h2 {
	margin-bottom: 2rem;
	text-align: center;
}

.ctc-homepage .about-section img {
	margin: 0 auto 2rem;
	border-radius: var(--chg-card-radius);
}

.ctc-homepage .about-section p {
	margin-bottom: 1.5rem;
}

.ctc-homepage .about-highlight {
	margin: 2rem 0;
	padding: 1.5rem 1.75rem;
	border-left: 4px solid var(--chg-primary);
	border-radius: 0 var(--chg-card-radius) var(--chg-card-radius) 0;
	background: var(--chg-primary-light);
}

.ctc-homepage .about-highlight p {
	margin: 0;
	color: var(--chg-primary);
	font-weight: 500;
}

.ctc-homepage .final-cta {
	padding: 4rem 2rem;
	text-align: center;
	background: linear-gradient(135deg, var(--chg-primary), var(--chg-secondary));
}

.ctc-homepage .final-cta h2,
.ctc-homepage .final-cta p {
	color: #fff;
}

@media (max-width: 900px) {
	.ctc-homepage .three-categories {
		grid-template-columns: repeat(var(--chg-cat-tablet), minmax(0, 1fr));
	}

	.ctc-homepage .articles-grid {
		grid-template-columns: repeat(var(--chg-article-tablet), minmax(0, 1fr));
	}
}

@media (max-width: 640px) {
	.ctc-homepage h1 {
		font-size: calc(26px * var(--chg-typo-scale));
	}

	.ctc-homepage .hero-section,
	.ctc-homepage .three-categories,
	.ctc-homepage .featured-section,
	.ctc-homepage .about-section,
	.ctc-homepage .final-cta {
		padding: 2.5rem 1.25rem;
	}

	.ctc-homepage .hero-buttons {
		flex-direction: column;
	}

	.ctc-homepage .btn {
		width: 100%;
	}

	.ctc-homepage .three-categories {
		grid-template-columns: repeat(var(--chg-cat-mobile), minmax(0, 1fr));
	}

	.ctc-homepage .articles-grid {
		grid-template-columns: repeat(var(--chg-article-mobile), minmax(0, 1fr));
	}
}
