/**
 * TTP Exam — Dark premium course cards
 * Desktop: 3 + 2 grid · Mobile: vertical stack, scroll down (one card per screen)
 */

/* Full-page black — remove white margins from theme / Elementor */
body.page-slug-exam,
body.page-slug-enrol-now,
body.page-slug-enroll-now,
body.page-id-563 {
	background: #0a0a0b !important;
}

body.page-slug-exam #page,
body.page-slug-enrol-now #page,
body.page-slug-enroll-now #page,
body.page-id-563 #page,
body.page-slug-exam .site,
body.page-slug-exam .site-content,
body.page-slug-exam #content,
body.page-slug-exam .content-area,
body.page-slug-exam main,
body.page-slug-exam article,
body.page-slug-exam .entry-content,
body.page-slug-exam .elementor,
body.page-slug-exam .elementor-section,
body.page-slug-exam .elementor-container,
body.page-slug-exam .e-con,
body.page-slug-exam .e-con-inner,
body.page-slug-exam .elementor-column,
body.page-slug-exam .elementor-widget-wrap,
body.page-slug-exam .elementor-widget-shortcode {
	background-color: #0a0a0b !important;
	background-image: none !important;
}

body.page-slug-exam .elementor-section.elementor-section-boxed > .elementor-container,
body.page-slug-exam .elementor-section .e-con {
	max-width: 100% !important;
}

body.page-slug-exam .elementor-section,
body.page-slug-exam .e-con {
	padding-top: 0 !important;
	padding-bottom: 0 !important;
}

.ttp-enroll-page .elementor-widget-woocommerce-products,
.ttp-enroll-page .woocommerce ul.products {
	display: none !important;
}

.ttp-enroll-page,
.ttp-enroll-page.ttp-enroll-page--marketplace {
	--ttp-page-bg: #0f0f10;
	--ttp-card-bg: #121214;
	--ttp-card-bg2: #0a0a0b;
	--ttp-text: #ffffff;
	--ttp-text-dim: rgba(255, 255, 255, 0.72);
	--ttp-text-muted: rgba(255, 255, 255, 0.45);
	--ttp-yellow: #f5c518;
	--ttp-details-bg: #e4e0d8;
	--ttp-details-text: #1a1a1a;
	--ttp-buy-bg: #f0b429;
	--ttp-buy-hover: #ffcc4d;
	--ttp-card-w: 380px;
	--ttp-banner-h: 150px;
	--ttp-scroll-h: 130px;

	font-family: "Segoe UI", system-ui, -apple-system, sans-serif;
	background: var(--ttp-page-bg) !important;
	color: var(--ttp-text) !important;
	width: 100%;
	max-width: 100%;
	margin: 0 auto;
	padding: 20px 16px 60px;
	box-sizing: border-box;
	overflow-x: hidden;
}

/* Edge-to-edge black band (kills left/right white gutters) */
.ttp-enroll-page--bleed-x {
	position: relative;
	left: 50%;
	right: 50%;
	width: 100vw;
	max-width: 100vw;
	margin-left: -50vw;
	margin-right: -50vw;
	padding-left: clamp(12px, 2vw, 28px);
	padding-right: clamp(12px, 2vw, 28px);
}

.ttp-enroll-page *,
.ttp-enroll-page *::before,
.ttp-enroll-page *::after {
	box-sizing: border-box;
}

.ttp-enroll-page .ttp-plan-card,
.ttp-enroll-page .ttp-plan-card--edtech,
.ttp-enroll-page .ttp-plan-card--ref,
.ttp-enroll-page .ttp-plan-card--tier-premium,
.ttp-enroll-page .ttp-plan-card--tier-compact {
	display: none !important;
}

.ttp-enroll-card-slot {
	width: 100%;
	max-width: var(--ttp-card-w);
	margin: 0 auto;
}

.ttp-enroll-page--embed {
	padding: 0 0 32px;
	background: transparent;
}

/* Hero */
.ttp-enroll-hero {
	background: linear-gradient(145deg, #1a1a1e 0%, #0f0f10 100%);
	border: 1px solid rgba(255, 255, 255, 0.08);
	border-radius: 12px;
	padding: 36px 20px;
	text-align: center;
	margin-bottom: 32px;
}

.ttp-enroll-hero .ttp-hero-eyebrow--hidden {
	display: none !important;
}

.ttp-enroll-hero h1 {
	margin: 0 0 10px;
	font-size: clamp(22px, 4vw, 36px);
	font-weight: 800;
	line-height: 1.15;
	color: #fff;
}

.ttp-enroll-hero h1 span {
	color: var(--ttp-yellow);
}

.ttp-enroll-hero > p {
	margin: 0 auto 20px;
	max-width: 560px;
	font-size: 15px;
	line-height: 1.55;
	color: var(--ttp-text-dim);
}

.ttp-trust-badges {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 10px 16px;
}

.ttp-trust-badge {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12px;
	font-weight: 600;
	color: var(--ttp-text-dim);
}

.ttp-trust-badge .ttp-dot {
	width: 7px;
	height: 7px;
	border-radius: 50%;
	background: var(--ttp-yellow);
}

.ttp-plans-section {
	width: 100%;
}

.ttp-plans-title {
	margin: 0 0 8px;
	text-align: center;
	font-size: clamp(22px, 3vw, 28px);
	font-weight: 800;
	color: #fff;
}

.ttp-plans-subtitle {
	margin: 0 auto 28px;
	max-width: 520px;
	text-align: center;
	font-size: 14px;
	line-height: 1.5;
	color: var(--ttp-text-dim);
}

.ttp-plans-scroll-hint {
	display: none;
	margin: -16px auto 20px;
	text-align: center;
	font-size: 12px;
	font-weight: 600;
	color: var(--ttp-yellow);
}

@media (max-width: 767px) {
	.ttp-plans-scroll-hint {
		display: block;
	}
}

.ttp-plans-layout {
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 24px;
	width: 100%;
}

.elementor-widget-shortcode .ttp-plans-layout,
.elementor-element .ttp-plans-layout {
	display: flex !important;
	flex-direction: column !important;
	align-items: center !important;
	width: 100% !important;
}

.ttp-plans-row {
	display: grid !important;
	width: 100%;
	gap: 20px;
	justify-content: center;
	align-items: stretch;
}

.ttp-plans-row--top {
	grid-template-columns: repeat(3, minmax(0, var(--ttp-card-w)));
	max-width: calc(var(--ttp-card-w) * 3 + 40px);
	margin: 0 auto;
}

.ttp-plans-row--bottom {
	grid-template-columns: repeat(2, minmax(0, var(--ttp-card-w)));
	max-width: calc(var(--ttp-card-w) * 2 + 20px);
	margin: 0 auto;
}

/* Tablet: 2 per row */
@media (max-width: 1199px) and (min-width: 768px) {
	.ttp-plans-row--top,
	.ttp-plans-row--bottom {
		grid-template-columns: repeat(2, minmax(0, var(--ttp-card-w)));
		max-width: calc(var(--ttp-card-w) * 2 + 20px);
	}
}

/* Mobile: iQuanta-style — ONE course, scroll DOWN for the next (vertical feed) */
@media (max-width: 767px) {
	.ttp-enroll-page {
		padding: 12px 0 56px;
	}

	.ttp-enroll-hero {
		margin: 0 12px 20px;
		border-radius: 10px;
	}

	.ttp-plans-section {
		padding: 0 12px;
		width: 100%;
	}

	/* All 5 cards in one vertical column (rows unwrap) */
	.ttp-plans-layout {
		display: flex !important;
		flex-direction: column !important;
		align-items: stretch !important;
		gap: 24px !important;
		width: 100% !important;
		max-width: 100% !important;
		margin: 0 !important;
		padding: 0 !important;
		scroll-snap-type: y mandatory;
	}

	.ttp-plans-row--top,
	.ttp-plans-row--bottom {
		display: contents !important;
	}

	.ttp-course-card {
		display: flex !important;
		flex-direction: column !important;
		width: 100% !important;
		max-width: 100% !important;
		min-width: 0 !important;
		min-height: 0 !important;
		height: auto !important;
		margin: 0 !important;
		flex: none !important;
		scroll-snap-align: start;
		scroll-snap-stop: always;
		scroll-margin-bottom: 16px;
		border-radius: 16px;
	}

	.ttp-enroll-card-slot {
		width: 100%;
		max-width: 100%;
	}

	.ttp-course-card--branded-banner .ttp-course-card__banner {
		max-height: 200px;
	}
}

/* Card */
.ttp-course-card {
	display: flex;
	flex-direction: column;
	width: 100%;
	max-width: var(--ttp-card-w);
	height: auto;
	min-height: 0;
	margin: 0 auto;
	background: var(--ttp-card-bg);
	border-radius: 12px;
	overflow: hidden;
	border: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow: 0 8px 28px rgba(0, 0, 0, 0.45);
}

.ttp-course-card:hover {
	box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55);
}

.ttp-course-card--popular {
	border-color: rgba(245, 197, 24, 0.4);
}

/* Banner — landscape, no stretch */
.ttp-course-card__banner {
	position: relative;
	flex: 0 0 auto;
	width: 100%;
	height: var(--ttp-banner-h);
	overflow: hidden;
	background: #0a0a0b;
}

.ttp-course-card--branded-banner .ttp-course-card__banner {
	height: auto;
	aspect-ratio: 2.35 / 1;
	max-height: 170px;
}

.ttp-course-card__banner-img {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center center;
	display: block;
}

.ttp-course-card--branded-banner .ttp-course-card__banner-img {
	position: relative;
	inset: auto;
	height: 100%;
	object-fit: cover;
}

.ttp-course-card__banner-img--fallback {
	background: linear-gradient(120deg, #2a2a30 0%, #1a1a1e 50%, #0f0f10 100%);
	min-height: var(--ttp-banner-h);
}

.ttp-course-card__banner-shade {
	position: absolute;
	inset: 0;
	background: linear-gradient(180deg, transparent 0%, rgba(0, 0, 0, 0.5) 100%);
	pointer-events: none;
}

.ttp-course-card__banner-content {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 2;
	padding: 12px 14px;
}

.ttp-course-card__banner-kicker {
	margin: 0 0 8px;
	font-size: 18px;
	font-weight: 900;
	line-height: 1.1;
	color: #fff;
	text-transform: uppercase;
}

.ttp-course-card__banner-pills {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.ttp-course-card__banner-pills span {
	padding: 4px 10px;
	border-radius: 4px;
	background: rgba(0, 0, 0, 0.72);
	color: #fff;
	font-size: 10px;
	font-weight: 700;
}

.ttp-course-card__ribbon {
	position: absolute;
	top: 10px;
	right: 10px;
	z-index: 3;
	padding: 5px 8px;
	border-radius: 4px;
	background: var(--ttp-yellow);
	color: #111;
	font-size: 9px;
	font-weight: 800;
	text-transform: uppercase;
}

/* Body */
.ttp-course-card__body {
	flex: 1 1 auto;
	display: flex;
	flex-direction: column;
	min-height: 0;
	padding: 14px 14px 10px;
	background: var(--ttp-card-bg2);
}

.ttp-course-card__titlebar {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 10px;
}

.ttp-course-card__title {
	flex: 1 1 auto;
	margin: 0;
	font-size: 15px;
	font-weight: 800;
	line-height: 1.3;
	color: var(--ttp-text);
	word-break: break-word;
}

.ttp-course-card__rating {
	flex: 0 0 auto;
	display: inline-flex;
	align-items: center;
	gap: 3px;
	padding: 3px 7px;
	border-radius: 4px;
	background: rgba(245, 197, 24, 0.15);
	color: var(--ttp-yellow);
	font-size: 12px;
	font-weight: 800;
	white-space: nowrap;
}

.ttp-course-card__tags {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	margin-bottom: 10px;
}

.ttp-course-card__tags span {
	padding: 5px 10px;
	border-radius: 6px;
	background: rgba(255, 255, 255, 0.08);
	border: 1px solid rgba(255, 255, 255, 0.1);
	color: var(--ttp-text-dim);
	font-size: 10px;
	font-weight: 700;
	white-space: nowrap;
}

.ttp-course-card__scroll {
	flex: 0 0 auto;
	height: var(--ttp-scroll-h);
	max-height: var(--ttp-scroll-h);
	overflow-y: auto;
	overflow-x: hidden;
	padding-right: 4px;
	-webkit-overflow-scrolling: touch;
	scrollbar-width: thin;
	scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.ttp-course-card__scroll::-webkit-scrollbar {
	width: 3px;
}

.ttp-course-card__scroll::-webkit-scrollbar-thumb {
	background: rgba(255, 255, 255, 0.2);
	border-radius: 3px;
}

.ttp-course-card__list {
	margin: 0;
	padding: 0;
	list-style: none;
}

.ttp-course-card__list li {
	padding: 0 0 8px;
	font-size: 12px;
	line-height: 1.5;
	color: var(--ttp-text-dim);
}

/* Footer: price | Details + Buy Now */
.ttp-course-card__footer {
	flex: 0 0 auto;
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 12px 12px 14px;
	background: var(--ttp-card-bg2);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
}

.ttp-course-card__pricecol {
	flex: 0 0 38%;
	min-width: 0;
}

.ttp-course-card__price {
	margin: 0;
	font-size: 20px;
	font-weight: 900;
	line-height: 1.1;
	color: #fff;
}

.ttp-course-card__price .woocommerce-Price-amount,
.ttp-course-card__price .woocommerce-Price-currencySymbol {
	color: #fff !important;
	font-size: inherit !important;
}

.ttp-course-card__was {
	margin: 2px 0 0;
	font-size: 11px;
	color: var(--ttp-text-muted);
}

.ttp-course-card__was del {
	text-decoration: line-through;
}

.ttp-course-card__save {
	display: block;
	margin-top: 2px;
	font-size: 9px;
	font-weight: 800;
	color: var(--ttp-yellow);
}

.ttp-course-card__actions {
	flex: 1 1 auto;
	display: flex;
	align-items: stretch;
	gap: 8px;
	min-width: 0;
}

.ttp-course-card__details {
	flex: 1 1 50%;
	display: flex !important;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	max-height: 44px;
	padding: 8px 10px;
	border-radius: 8px;
	background: var(--ttp-details-bg) !important;
	color: var(--ttp-details-text) !important;
	font-size: 14px;
	font-weight: 800;
	text-decoration: none !important;
	white-space: nowrap;
	width: auto !important;
	margin: 0 !important;
}

.ttp-course-card__buy {
	flex: 1 1 50%;
	display: flex !important;
	align-items: center;
	justify-content: center;
	min-height: 44px;
	max-height: 44px;
	padding: 8px 10px;
	border: none;
	border-radius: 8px;
	background: var(--ttp-buy-bg) !important;
	color: #1a1a1a !important;
	font-size: 14px;
	font-weight: 800;
	cursor: pointer;
	white-space: nowrap;
	width: auto !important;
	margin: 0 !important;
	box-shadow: none !important;
}

.ttp-course-card__buy:hover {
	background: var(--ttp-buy-hover) !important;
}

.ttp-plans-grid--legacy {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
	gap: 20px;
}

/* Mobile footer: keep buttons side by side */
@media (max-width: 767px) {
	.ttp-course-card__price {
		font-size: 18px;
	}

	.ttp-course-card__pricecol {
		flex: 0 0 34%;
	}

	.ttp-course-card__details,
	.ttp-course-card__buy {
		font-size: 13px;
		min-height: 42px;
		max-height: 42px;
	}
}
