/**
 * CMP LMS — Homepage (Tutor Starter layout).
 */

.cmp-home-landing {
	--cmp-primary: var(--ts-primary);
	--cmp-primary-dark: var(--ts-primary-dark);
	--cmp-accent: var(--ts-primary-dark);
	--cmp-text: var(--ts-text-strong);
	--cmp-muted: var(--ts-muted);
	--cmp-bg: var(--ts-surface-soft);
	--cmp-white: var(--ts-surface);
	--cmp-radius: var(--ts-radius-lg);
	--cmp-shadow: var(--ts-shadow-md);
	font-family: inherit;
	color: var(--cmp-text);
}

.cmp-home-landing .cmp-home-container {
	margin: 0 auto;
	padding: 40px;
	z-index: 3;
	max-width: 1200px;
}

.cmp-home-landing .cmp-home-banner {
	margin: 0 auto;
	padding: 0;
	position: relative;
	z-index: 3;
	width: 100%;
	flex: 1;
	display: flex;
}

.cmp-home-landing .cmp-lms-shell,
.cmp-lms-shell.cmp-lms-front-page {
	max-width: none;
	padding: 0;
	width: 100%;
}

/* Hero — khung cố định 580px, ảnh contain vừa khung (không crop). Nền 2 bên
   (lộ ra khi ảnh contain không lấp đầy hết chiều ngang) dùng đúng màu nền
   header (--cmp-header-bg) thay vì xanh đen trung tính, để liền mạch với
   header phía trên — không dùng --cmp-primary vì đó là 2 biến độc lập, tuy
   hiện đang cùng giá trị #0066ff nhưng không đảm bảo luôn đồng bộ sau này. */
.cmp-home-hero {
	background: var(--cmp-header-bg, #0066ff);
	position: relative;
	width: 100vw;
	max-width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	min-height: 580px;
	display: flex;
	align-items: stretch;
	overflow: hidden;
}

.cmp-home-hero__carousel {
	overflow: hidden;
	position: relative;
	width: 100%;
	max-width: none;
	margin: 0;
	min-height: 580px;
}

.cmp-home-hero__carousel .swiper-wrapper,
.cmp-home-hero__carousel .swiper-slide {
	height: 580px;
	min-height: 580px;
}

.cmp-home-hero__slide {
	position: relative;
	width: 100%;
	min-height: 580px;
	height: 580px;
	display: flex;
	align-items: flex-end;
	background-color: var(--cmp-header-bg, #0066ff);
	overflow: hidden;
}

/* object-fit: cover (thay vì contain) — ảnh phủ đầy toàn bộ khung slide,
   không còn khoảng hở 2 bên nên không cần kỹ thuật "hoà màu" nào nữa (mờ/
   phóng to hay nền phẳng). Đây cũng là cách làm chuẩn của hầu hết hero
   slider — ảnh nền được thiết kế để crop an toàn ở 2 bên, phần chữ/nút nằm
   trên layer riêng (.cmp-home-hero__content) nên không bị ảnh hưởng khi crop. */
.cmp-home-hero__media {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	max-width: none;
	object-fit: cover;
	object-position: center center;
	display: block;
	pointer-events: none;
	image-rendering: auto;
}

.cmp-home-hero__slide-overlay,
.cmp-home-hero__slide--has-image .cmp-home-hero__slide-overlay {
	position: absolute;
	inset: 0;
	background: rgba(6, 12, 28, 0.5);
	pointer-events: none;
}

.cmp-home-hero__slide .cmp-home-hero__content {
	position: relative;
	z-index: 2;
	width: min(100%, 760px);
	padding: 48px;
}

.cmp-home-hero__slide--pos-top-left,
.cmp-home-hero__slide--pos-top-center,
.cmp-home-hero__slide--pos-top-right {
	align-items: flex-start;
}

.cmp-home-hero__slide--pos-middle-left,
.cmp-home-hero__slide--pos-middle-center,
.cmp-home-hero__slide--pos-middle-right {
	align-items: center;
}

.cmp-home-hero__slide--pos-bottom-left,
.cmp-home-hero__slide--pos-bottom-center,
.cmp-home-hero__slide--pos-bottom-right {
	align-items: flex-end;
}

.cmp-home-hero__slide--pos-top-center .cmp-home-hero__content,
.cmp-home-hero__slide--pos-middle-center .cmp-home-hero__content,
.cmp-home-hero__slide--pos-bottom-center .cmp-home-hero__content {
	margin-inline: auto;
	text-align: center;
}

.cmp-home-hero__slide--pos-top-right .cmp-home-hero__content,
.cmp-home-hero__slide--pos-middle-right .cmp-home-hero__content,
.cmp-home-hero__slide--pos-bottom-right .cmp-home-hero__content {
	margin-left: auto;
	text-align: right;
}

.cmp-home-hero__controls {
	position: absolute;
	inset: 0;
	z-index: 3;
	pointer-events: none;
}

.cmp-home-hero__nav {
	position: absolute;
	top: 50%;
	transform: translateY(-50%);
	z-index: 4;
	pointer-events: auto;
}

.cmp-home-hero__nav--prev {
	left: 24px;
}

.cmp-home-hero__nav--next {
	right: 24px;
}

.cmp-home-hero__pagination {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 20px;
	margin-top: 0;
	pointer-events: auto;
}

.cmp-home-hero__carousel .cmp-home-hero__nav {
	width: 44px;
	height: 44px;
	border-radius: 999px;
	border: none;
	background: rgba(0, 102, 255, 0.5);
	color: var(--cmp-white);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0;
	cursor: pointer;
	box-shadow: var(--cmp-shadow);
	transition: transform 0.15s, box-shadow 0.2s, border-color 0.2s;
}

.cmp-home-hero__nav:hover {
	transform: translateY(-50%) scale(1.05);
	border-color: var(--cmp-primary);
}

.cmp-home-hero__nav span {
	font-size: 1.5rem;
	line-height: 1;
}

.cmp-home-hero__pagination {
	display: flex;
	align-items: center;
	justify-content: center;
	gap: 10px;
}

.cmp-home-hero__pagination .swiper-pagination-bullet {
	width: 10px;
	height: 10px;
	margin: 0 !important;
	background: #c7d5e3;
	opacity: 1;
}

.cmp-home-hero__pagination .swiper-pagination-bullet-active {
	background: var(--cmp-primary);
}

.cmp-home-hero__badge {
	display: inline-block;
	background: linear-gradient(135deg, var(--ts-primary-dark) 0%, var(--ts-primary) 100%);
	color: var(--cmp-white);
	font-size: 0.875rem;
	font-weight: 600;
	padding: 6px 14px;
	border-radius: 999px;
	margin-bottom: 16px;
}

body.cmp-tutor-starter-layout .cmp-home-hero__title,
.cmp-home-hero__title {
	font-size: clamp(1.75rem, 4vw, 2.5rem);
	line-height: 1.2;
	font-weight: 800;
	letter-spacing: 0.01em;
	margin: 0 0 16px;
	color: var(--cmp-hero-title-color, #ffffff);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
	-webkit-font-smoothing: antialiased;
}

.cmp-home-hero__slide--stats,
.cmp-home-hero__slide--visual {
	flex-direction: column;
	align-items: center;
	justify-content: center;
}

.cmp-home-hero__slide--content {
	flex-direction: column;
}

.cmp-home-hero__actions {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	justify-content: center;
	align-items: center;
	margin-top: 28px;
}

.cmp-home-hero__slide--pos-top-left .cmp-home-hero__actions,
.cmp-home-hero__slide--pos-middle-left .cmp-home-hero__actions,
.cmp-home-hero__slide--pos-bottom-left .cmp-home-hero__actions {
	justify-content: flex-start;
	padding-left: 48px;
	padding-bottom: 48px;
}

.cmp-home-hero__slide--pos-top-right .cmp-home-hero__actions,
.cmp-home-hero__slide--pos-middle-right .cmp-home-hero__actions,
.cmp-home-hero__slide--pos-bottom-right .cmp-home-hero__actions {
	justify-content: flex-end;
	padding-right: 48px;
	padding-bottom: 48px;
}

.cmp-home-hero__slide--pos-bottom-left .cmp-home-hero__content,
.cmp-home-hero__slide--pos-bottom-center .cmp-home-hero__content,
.cmp-home-hero__slide--pos-bottom-right .cmp-home-hero__content {
	padding-bottom: 12px;
}

.cmp-home-hero__lead {
	font-size: 1.0625rem;
	line-height: 1.65;
	font-weight: 600;
	color: var(--cmp-hero-text-color, #ffffff);
	margin: 0;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
	-webkit-font-smoothing: antialiased;
}

.cmp-home-hero__actions.mt-4 {
	margin-top: 40px;
}

.cmp-home-hero__stats {
	position: relative;
	z-index: 2;
	display: flex;
	flex-wrap: wrap;
	gap: 30px;
	margin-bottom: 0;
}

.cmp-home-stat {
	text-align: center;
}

.cmp-home-stat strong {
	display: block;
	font-size: 2.5rem;
	color: var(--cmp-hero-title-color, #ffffff);
	line-height: 1.2;
	font-weight: 800;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.cmp-home-stat span {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--cmp-hero-text-color, #ffffff);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.cmp-home-hero__visual {
	position: relative;
	z-index: 2;
	min-height: 280px;
}

/* .cmp-home-hero__card {
	
} */

.cmp-home-hero__card--main {
	position: relative;
	z-index: 1;
	text-align: center;
}

.cmp-home-hero__card--float {
	padding-top: 40px;
}

.cmp-home-hero__card--float small {
	color: var(--cmp-hero-text-color, #ffffff);
	font-size: 1.5rem;
	font-weight: 800;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.cmp-home-hero__card-label {
	font-size: 1.75rem;
	color: var(--cmp-hero-title-color, #ffffff);
	text-transform: uppercase;
	letter-spacing: 0.04em;
	font-weight: 800;
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.85);
}

.cmp-home-hero__card--main strong {
	display: block;
	margin: 8px 0 16px;
	font-size: 1.125rem;
	font-weight: 700;
	color: var(--cmp-hero-title-color, #ffffff);
	text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.cmp-home-hero__progress {
	height: 8px;
	background: #e8eef4;
	border-radius: 4px;
	overflow: hidden;
}

.cmp-home-hero__progress span {
	display: block;
	height: 100%;
	background: linear-gradient(90deg, var(--cmp-primary), var(--cmp-accent));
	border-radius: 4px;
}

/* Buttons */
.cmp-home-btn,
.cmp-home-landing .cmp-pill-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 8px;
	padding: 12px 28px;
	border-radius: var(--ts-radius-btn, 12px);
	font-weight: 700;
	font-size: 0.9375rem;
	text-decoration: none;
	border: 2px solid transparent;
	transition: background 0.2s, color 0.2s, border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

.cmp-home-btn--primary,
.cmp-home-landing .cmp-pill-btn--primary {
	background: linear-gradient(90deg, var(--ts-primary) 0%, var(--ts-primary-light) 100%);
	color: var(--cmp-white);
	box-shadow: 0 8px 24px rgba(0, 102, 255, 0.3);
}

.cmp-home-btn--primary:hover,
.cmp-home-landing .cmp-pill-btn--primary:hover {
	background: linear-gradient(90deg, var(--ts-primary) 0%, var(--ts-primary-light) 100%);
	color: var(--cmp-white);
	box-shadow: 0 10px 28px rgba(0, 102, 255, 0.4);
	transform: translateY(-2px);
}

.cmp-home-btn--ghost {
	background: transparent;
	color: var(--cmp-primary);
	border-color: var(--cmp-primary);
}

.cmp-home-btn--ghost:hover {
	background: rgba(0, 102, 179, 0.08);
}

.cmp-home-btn--secondary {
	background: transparent;
	color: var(--cmp-white);
	border-color: var(--cmp-white);
}

.cmp-home-btn--secondary:hover {
	background: rgba(0, 102, 179, 0.08);
}

.cmp-home-btn--outline {
	background: transparent;
	color: var(--cmp-primary);
	border-color: #c5d9eb;
}

.cmp-home-btn--outline:hover {
	border-color: var(--cmp-primary);
}

.cmp-home-btn--sm {
	padding: 8px 16px;
	font-size: 0.875rem;
}

.cmp-home-btn--white {
	background: var(--cmp-white);
	color: var(--cmp-primary);
}

.cmp-home-btn--outline-white {
	border-color: rgba(255, 255, 255, 0.7);
	color: var(--cmp-white);
}

.cmp-home-btn--outline-white:hover {
	background: rgba(255, 255, 255, 0.15);
	color: var(--cmp-white);
}

/* Sections */
.cmp-home-section {
	padding: 72px 0;
}

.cmp-home-section--alt {
	background-color: var(--cmp-white);
}

.cmp-home-challenges {
	background: var(--cmp-bg);
}

.cmp-home-courses {
	background: var(--cmp-white);
}

.cmp-home-section-head {
	margin-bottom: 40px;
	text-align: center;
}

.cmp-home-section-head--center {
	text-align: center;
	margin-left: auto;
	margin-right: auto;
}

.cmp-home-eyebrow {
	font-size: 0.8125rem;
	font-weight: 600;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	color: var(--cmp-accent);
	margin: 0 0 8px;
}

.cmp-home-section-title {
	font-size: clamp(1.5rem, 3vw, 2.125rem);
	margin: 0 0 12px;
	font-weight: 700;
}

.cmp-home-section-lead {
	margin: 0;
	color: var(--cmp-muted);
	line-height: 1.6;
}

.cmp-home-features {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
}

.cmp-home-feature-card {
	background: var(--cmp-white);
	border-radius: var(--cmp-radius);
	padding: 28px;
	border: 1px solid #e8eef4;
}

.cmp-home-feature-card__icon {
	font-size: 2rem;
	margin-bottom: 12px;
	text-align: center;
}

.cmp-home-feature-card h3 {
	font-size: 1.125rem;
	margin: 0 0 10px;
	text-align: center;
}

.cmp-home-feature-card p {
	margin: 0;
	font-size: 0.9375rem;
	color: var(--cmp-muted);
	line-height: 1.55;
}

.cmp-home-challenges__note {
	text-align: center;
	margin: 32px 0 0;
	font-weight: 600;
	color: var(--cmp-primary);
}

/* Course grid — card styles in cmp-cards.css */
.cmp-home-courses__footer {
	text-align: center;
	margin-top: 40px;
}

.cmp-home-empty {
	text-align: center;
	padding: 48px 24px;
	background: var(--cmp-white);
	border-radius: var(--cmp-radius);
}

/* Benefits */
.cmp-home-benefits__grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 24px;
}

.cmp-home-benefit {
	text-align: center;
	padding: 24px 16px;
}

.cmp-home-benefit strong {
	display: block;
	font-size: 2.5rem;
	color: var(--cmp-primary);
	line-height: 1;
	margin-bottom: 12px;
}

.cmp-home-benefit h3 {
	font-size: 1rem;
	margin: 0 0 8px;
}

.cmp-home-benefit p {
	margin: 0;
	font-size: 0.875rem;
	color: var(--cmp-muted);
	line-height: 1.5;
}

/* CTA — nền trắng, nội dung xanh; border + shadow nhẹ để vẫn tách lớp rõ với
   nền trắng phía trên và footer xanh phía dưới */
.cmp-home-cta {
	background: var(--cmp-white);
	padding: 36px 0;
	color: var(--cmp-primary);
	border-top: 1px solid var(--ts-border);
	box-shadow: 0 -1px 0 rgba(0, 0, 0, 0.03) inset;
}

.cmp-home-cta__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 24px;
}

.cmp-home-cta__inner h2 {
	color: var(--cmp-primary) !important;
}

.cmp-home-cta__inner p {
	color: var(--cmp-muted);
}

.cmp-home-cta h2 {
	margin: 0 0 8px;
	font-size: 1.75rem;
	color: var(--cmp-primary);
}

.cmp-home-cta p {
	margin: 0;
	color: var(--cmp-muted);
	opacity: 1;
}

.cmp-home-cta__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
}

/* Full-width homepage: hide duplicate page title from editor content */
.cmp-lms-front-page .entry-header,
.cmp-lms-front-page .entry-content {
	display: none;
}

body.cmp-home-active,
body.cmp-lms-front-page {
	overflow-x: hidden;
}

@media (max-width: 992px) {
	.cmp-home-hero,
	.cmp-home-hero__carousel,
	.cmp-home-hero__carousel .swiper-wrapper,
	.cmp-home-hero__carousel .swiper-slide,
	.cmp-home-hero__slide {
		min-height: 500px;
		height: 500px;
	}

	.cmp-home-hero__slide .cmp-home-hero__content {
		padding: 32px;
	}

	.cmp-home-features {
		grid-template-columns: 1fr;
	}

	.cmp-home-benefits__grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 576px) {
	.cmp-home-hero,
	.cmp-home-hero__carousel,
	.cmp-home-hero__carousel .swiper-wrapper,
	.cmp-home-hero__carousel .swiper-slide,
	.cmp-home-hero__slide {
		min-height: 420px;
		height: 420px;
	}

	.cmp-home-hero {
		padding: 0;
	}

	.cmp-home-hero__slide .cmp-home-hero__content {
		padding: 24px 20px;
	}

	.cmp-home-cta {
		padding: 28px 0;
	}

	.cmp-home-hero__stats {
		flex-direction: column;
		align-items: center;
		gap: 20px;
	}

	.cmp-home-hero__card--float {
		right: 0;
		bottom: 16px;
		width: 160px;
	}

	.cmp-home-hero__nav--prev {
		left: -8px;
	}

	.cmp-home-hero__nav--next {
		right: -8px;
	}

	.cmp-home-hero__nav {
		width: 36px;
		height: 36px;
	}

	.cmp-home-section {
		padding: 48px 0;
	}

	.cmp-home-benefits__grid {
		grid-template-columns: 1fr;
	}
}