/* =========================================================
   Coach Tam Hoang v2 - main stylesheet
   ========================================================= */

:root {
	--cth-primary: #1B33B0;
	--cth-primary-dark: #15297F;
	--cth-accent: #F2934D;
	--cth-accent-dark: #C26A1A;
	--cth-ink: #1B2440;
	--cth-bg: #F7F8FB;
	--cth-surface: #EAEEF6;
	--cth-navy: #14224F;
	--cth-teal: #3FB8A0;
	--cth-light: #EEF2FB;
}

/* Aliases so design markup using var(--primary) / var(--accent) resolves. */
.cth-root,
.cth-header,
.cth-footer {
	--primary: var(--cth-primary);
	--accent: var(--cth-accent);
}

html {
	scroll-behavior: smooth;
}

body.cth {
	margin: 0;
	background: var(--cth-bg);
	color: var(--cth-ink);
	font-family: 'Be Vietnam Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
	line-height: 1.55;
	-webkit-font-smoothing: antialiased;
	overflow-x: hidden;
}

.cth-root * {
	box-sizing: border-box;
}

::selection {
	background: var(--cth-primary);
	color: #fff;
}

.cth-container {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 clamp(18px, 5vw, 40px);
}

/* Rich-text wrappers for WYSIWYG custom fields. */
.cth-rt p { margin: 0 0 1em; }
.cth-rt p:last-child { margin-bottom: 0; }
.cth-rt strong { color: var(--cth-primary); font-weight: 600; }
.cth-rt a { color: var(--cth-primary); }
.cth-hero-rt {
	font-size: clamp(16px, 2.1vw, 19px);
	color: #474B60;
	max-width: 520px;
	margin: 0 0 30px;
}
.cth-about-rt p {
	font-size: clamp(15px, 1.9vw, 17px);
	color: #474B60;
	margin: 0 0 22px;
}
.cth-about-rt p:first-child {
	font-size: clamp(16px, 2vw, 18.5px);
	color: #3A3E55;
}

/* Reusable hover hooks injected on design markup. */
.cth-btn {
	transition: background .15s ease, transform .15s ease;
}
.cth-btn:hover {
	background: var(--cth-primary-dark) !important;
}
.cth-btn-outline:hover {
	border-color: var(--cth-primary) !important;
	background: rgba(27, 51, 176, 0.04) !important;
}
.cth-card {
	transition: box-shadow .2s ease, transform .2s ease;
}
.cth-card:hover {
	box-shadow: 0 16px 40px rgba(27, 51, 176, 0.12);
	transform: translateY(-3px);
}
.cth-arrow {
	transition: gap .15s ease;
}
.cth-arrow:hover {
	gap: 11px !important;
}

/* =========================================================
   HEADER
   ========================================================= */

.cth-header {
	position: sticky;
	top: 0;
	z-index: 60;
	background: rgba(250, 248, 244, 0.82);
	-webkit-backdrop-filter: blur(14px);
	backdrop-filter: blur(14px);
	border-bottom: 1px solid rgba(26, 29, 46, 0.08);
}

.cth-header__inner {
	width: 100%;
	max-width: 1180px;
	margin: 0 auto;
	padding: 0 clamp(18px, 5vw, 40px);
	height: 72px;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 16px;
}

.cth-brand {
	display: flex;
	align-items: center;
	gap: 11px;
	text-decoration: none;
	color: inherit;
}
.cth-brand img {
	width: 42px;
	height: 42px;
	border-radius: 11px;
	object-fit: cover;
	flex: none;
}
.cth-brand__text {
	display: flex;
	flex-direction: column;
	line-height: 1.15;
}
.cth-brand__name {
	font-weight: 700;
	font-size: 15px;
	letter-spacing: 0.2px;
}
.cth-brand__role {
	font-size: 10.5px;
	letter-spacing: 1.4px;
	text-transform: uppercase;
	color: #6A6E82;
	font-weight: 500;
}

.cth-nav {
	display: flex;
	align-items: center;
	gap: 24px;
}
.cth-nav > a,
.cth-dropdown__btn {
	text-decoration: none;
	color: #3A3E55;
	font-size: 14.5px;
	font-weight: 500;
	background: none;
	border: none;
	cursor: pointer;
	font-family: inherit;
	padding: 0;
	display: inline-flex;
	align-items: center;
	gap: 5px;
}
.cth-nav > a:hover,
.cth-dropdown__btn:hover {
	color: var(--cth-primary);
}
.cth-nav > a[aria-current="page"],
.cth-nav > a.is-active {
	color: var(--cth-primary);
	font-weight: 600;
}
.cth-dropdown__btn span {
	font-size: 9px;
	opacity: 0.55;
}
.cth-nav__cta {
	background-color: #1B33B0 !important;
	color: #fff !important;
	font-size: 14px !important;
	font-weight: 600 !important;
	padding: 11px 20px !important;
	border-radius: 999px !important;
	text-decoration: none !important;
	transition: background-color .15s ease;
}
.cth-nav__cta:hover {
	background-color: #15297F !important;
	color: #fff !important;
}

.cth-dropdown {
	position: relative;
	display: flex;
	align-items: center;
}
/* Transparent bridge over the 14px gap so the cursor can travel from the
   button down to the submenu without the dropdown losing :hover. */
.cth-dropdown__menu::before {
	content: "";
	position: absolute;
	left: 0;
	right: 0;
	top: -16px;
	height: 18px;
}
.cth-dropdown__menu {
	position: absolute;
	top: 100%;
	left: 50%;
	transform: translateX(-50%);
	margin-top: 14px;
	background: #fff;
	border: 1px solid rgba(26, 29, 46, 0.1);
	border-radius: 14px;
	box-shadow: 0 18px 44px rgba(20, 34, 79, 0.16);
	padding: 8px;
	min-width: 236px;
	display: flex;
	flex-direction: column;
	gap: 2px;
	opacity: 0;
	visibility: hidden;
	pointer-events: none;
	transition: opacity .15s ease;
	z-index: 80;
}
.cth-dropdown:hover .cth-dropdown__menu,
.cth-dropdown.is-open .cth-dropdown__menu {
	opacity: 1;
	visibility: visible;
	pointer-events: auto;
}
.cth-dropdown__menu a {
	text-decoration: none;
	color: #3A3E55;
	font-size: 14px;
	font-weight: 500;
	padding: 11px 14px;
	border-radius: 9px;
	white-space: nowrap;
}
.cth-dropdown__menu a:hover {
	background: var(--cth-surface);
	color: var(--cth-primary);
}

.cth-burger {
	display: none;
	flex-direction: column;
	gap: 5px;
	background: none;
	border: none;
	padding: 10px;
	cursor: pointer;
}
.cth-burger span {
	width: 24px;
	height: 2px;
	background: var(--cth-primary);
	border-radius: 2px;
	display: block;
}

@media (max-width: 899px) {
	.cth-burger {
		display: flex;
	}
	.cth-nav {
		position: absolute;
		left: 0;
		right: 0;
		top: 72px;
		flex-direction: column;
		align-items: stretch;
		gap: 0;
		background: var(--cth-bg);
		border-top: 1px solid rgba(26, 29, 46, 0.08);
		padding: 8px clamp(18px, 5vw, 40px) 20px;
		display: none;
	}
	.cth-header.is-open .cth-nav {
		display: flex;
	}
	.cth-nav > a {
		font-size: 16px;
		padding: 14px 0;
		border-bottom: 1px solid rgba(26, 29, 46, 0.06);
		color: var(--cth-ink);
	}
	.cth-dropdown {
		flex-direction: column;
		align-items: stretch;
		border-bottom: 1px solid rgba(26, 29, 46, 0.06);
		padding: 6px 0;
	}
	.cth-dropdown__btn {
		justify-content: space-between;
		padding: 14px 0;
		color: var(--cth-ink);
		font-size: 16px;
	}
	.cth-dropdown__menu {
		position: static;
		transform: none;
		margin: 0 0 8px;
		box-shadow: none;
		border: none;
		padding: 0 0 0 14px;
		min-width: 0;
		opacity: 1;
		visibility: hidden;
		max-height: 0;
		overflow: hidden;
		pointer-events: none;
	}
	.cth-dropdown__menu::before {
		display: none;
	}
	.cth-dropdown.is-open .cth-dropdown__menu {
		visibility: visible;
		max-height: 400px;
		pointer-events: auto;
	}
	.cth-nav__cta {
		margin-top: 14px;
		text-align: center;
		padding: 14px !important;
		font-size: 15px !important;
	}
}

/* =========================================================
   BLOG (Query Loop) - homepage + archives
   ========================================================= */

.cth-blog-section {
	padding: clamp(56px, 9vw, 104px) 0;
}
.cth-blog-head {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	justify-content: space-between;
	align-items: flex-end;
	margin-bottom: clamp(34px, 4vw, 48px);
}
.cth-eyebrow {
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: var(--cth-accent);
	margin-bottom: 12px;
}
.cth-blog-grid {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 24px;
	list-style: none;
	margin: 0;
	padding: 0;
}
.cth-blog-grid > li {
	margin: 0;
}
.cth-blog-grid .wp-block-post-featured-image {
	margin: 0 0 18px;
	border-radius: 16px;
	overflow: hidden;
}
.cth-blog-grid .wp-block-post-featured-image img {
	display: block;
	width: 100%;
	aspect-ratio: 3 / 2;
	object-fit: cover;
	border-radius: 16px;
	transition: transform .3s ease;
}
.cth-blog-grid .wp-block-post-featured-image:hover img {
	transform: scale(1.04);
}
.cth-blog-grid .wp-block-post-date {
	font-size: 12.5px;
	color: var(--cth-primary);
	font-weight: 600;
	margin: 0 0 6px;
}
.cth-blog-grid .wp-block-post-title {
	font-family: 'Lora', Georgia, serif;
	font-weight: 600;
	font-size: 19px;
	line-height: 1.3;
	margin: 0 0 8px;
}
.cth-blog-grid .wp-block-post-title a {
	text-decoration: none;
	color: var(--cth-ink);
}
.cth-blog-grid .wp-block-post-title a:hover {
	color: var(--cth-primary);
}
.cth-blog-grid .wp-block-post-excerpt {
	font-size: 14.5px;
	color: #5A5E74;
	margin: 0;
}
.cth-blog-grid .wp-block-post-excerpt__excerpt {
	margin: 0;
}

/* =========================================================
   GENERIC CONTENT (single post / page fallback)
   ========================================================= */

.cth-content {
	width: 100%;
	max-width: 760px;
	margin: 0 auto;
	padding: clamp(48px, 7vw, 90px) clamp(18px, 5vw, 40px);
}
.cth-content .wp-block-post-title {
	font-family: 'Lora', Georgia, serif;
	font-size: clamp(28px, 4.4vw, 40px);
	line-height: 1.15;
	margin: 0 0 24px;
}
.cth-content p,
.cth-content li {
	font-size: 17px;
	color: #3A3E55;
}
.cth-page-hero {
	background: linear-gradient(180deg, #E7ECF8 0%, #F7F8FB 100%);
	padding: clamp(48px, 7vw, 90px) 0 clamp(32px, 5vw, 56px);
}

/* =========================================================
   FOOTER
   ========================================================= */

.cth-footer {
	background: var(--cth-navy);
	color: rgba(238, 242, 251, 0.78);
	padding: clamp(48px, 7vw, 72px) 0 32px;
}
.cth-foot-link {
	transition: color .15s ease;
}
.cth-foot-link:hover {
	color: var(--cth-accent) !important;
}

/* =========================================================
   404 / search helpers
   ========================================================= */

.cth-narrow {
	max-width: 720px;
	margin: 0 auto;
	padding: clamp(60px, 10vw, 120px) clamp(18px, 5vw, 40px);
	text-align: center;
}
