/* =============================================================================
   TMB Promo Cards — Frontend Styles
   Reusable promotional card grid with animated spinning gradient borders.
   ============================================================================= */

.tmb-promo-section {
	margin: 2rem 0;
	padding: 2.5rem 1.5rem;
	background: #f9fafb;
	border: 1px solid #e5e7eb;
	border-radius: 12px;
}

/* ── Section Header ── */
.tmb-promo-header {
	text-align: center;
	margin-bottom: 2rem;
}

.tmb-promo-eyebrow {
	display: inline-block;
	font-size: 11px;
	font-weight: 700;
	letter-spacing: .12em;
	text-transform: uppercase;
	color: #4f46e5;
	background: rgba(79, 70, 229, 0.08);
	padding: 3px 10px;
	border-radius: 20px;
	margin-bottom: 8px;
}

.tmb-promo-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: #111827;
	margin: 8px 0;
	line-height: 1.3;
}

.tmb-promo-subtitle {
	font-size: 0.875rem;
	color: #6b7280;
	margin: 0 auto;
	max-width: 480px;
	line-height: 1.6;
}

/* ── Grid Layouts ── */
.tmb-promo-grid {
	display: grid;
	gap: 1.25rem;
}

.tmb-promo-grid--1 { grid-template-columns: 1fr; }
.tmb-promo-grid--2 { grid-template-columns: repeat(2, 1fr); }
.tmb-promo-grid--3 { grid-template-columns: repeat(3, 1fr); }
.tmb-promo-grid--4 { grid-template-columns: repeat(4, 1fr); }
.tmb-promo-grid--auto { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }

@media (max-width: 1024px) {
	.tmb-promo-grid--3,
	.tmb-promo-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 640px) {
	.tmb-promo-grid--2,
	.tmb-promo-grid--3,
	.tmb-promo-grid--4 { grid-template-columns: 1fr; }
}

/* ── Card Wrapper (spinner layer) ── */
.tmb-promo-card-wrap {
	position: relative;
	border-radius: 14px;
	padding: 2px;
}

.tmb-promo-card-wrap--spinner::before {
	content: "";
	position: absolute;
	inset: -2px;
	border-radius: 16px;
	background: conic-gradient(
		from 0deg,
		transparent 0%,
		var(--promo-accent-a, #f97316) 25%,
		var(--promo-accent-b, #ef4444) 50%,
		transparent 75%
	);
	animation: tmb-promo-spin 4s linear infinite;
	z-index: 0;
}

.tmb-promo-card-wrap--spinner::after {
	content: "";
	position: absolute;
	inset: 2px;
	border-radius: 12px;
	background: #ffffff;
	z-index: 1;
}

/* ── Card ── */
.tmb-promo-card {
	position: relative;
	z-index: 10;
	background: #ffffff;
	border-radius: 12px;
	overflow: hidden;
	padding: 1.25rem;
	display: flex;
	flex-direction: column;
	gap: .625rem;
	height: 100%;
	box-sizing: border-box;
	border: 1px solid #e5e7eb;
}

.tmb-promo-card-wrap--spinner .tmb-promo-card {
	border: none;
}

/* Gradient glow behind image */
.tmb-promo-card-overlay {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 200px;
	border-radius: inherit;
	background: conic-gradient(
		from 0deg,
		transparent 0%,
		var(--promo-accent-a, #f97316) 25%,
		var(--promo-accent-b, #ef4444) 50%,
		transparent 75%
	);
	opacity: .12;
	pointer-events: none;
}

/* ── Card Logo ── */
.tmb-promo-card-logo {
	position: absolute;
	top: 0;
	left: 50%;
	transform: translateX(-50%);
	width: 200px;
	height: 200px;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 9;
}

.tmb-promo-card-logo img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Card Body ── */
.tmb-promo-card-body {
	flex: 1;
	display: flex;
	flex-direction: column;
	gap: 6px;
	margin-top: 200px;
}

.tmb-promo-card-tagline {
	font-size: 10px;
	font-weight: 700;
	letter-spacing: .1em;
	text-transform: uppercase;
	color: var(--promo-tagline-color, #ea580c);
	margin: 0;
}

.tmb-promo-card-name {
	font-size: 15px;
	font-weight: 700;
	color: #111827;
	margin: 0;
	line-height: 1.3;
}

.tmb-promo-card-desc {
	font-size: 12.5px;
	color: #6b7280;
	margin: 0;
	line-height: 1.6;
}

/* ── Card Footer / Button ── */
.tmb-promo-card-footer {
	margin-top: auto;
	padding-top: .625rem;
	border-top: 1px solid #f3f4f6;
}

.tmb-promo-card-btn {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-size: 12.5px;
	font-weight: 600;
	color: var(--promo-btn-color, #c2410c) !important;
	text-decoration: none !important;
	transition: gap .2s ease, opacity .2s ease;
}

.tmb-promo-card-btn svg {
	flex-shrink: 0;
	transition: transform .2s ease;
}

.tmb-promo-card-btn:hover {
	opacity: .8;
	gap: 9px;
}

.tmb-promo-card-btn:hover svg {
	transform: translateX(3px);
}

/* ── Animations ── */
@keyframes tmb-promo-spin {
	from { transform: rotate(0deg); }
	to   { transform: rotate(360deg); }
}

@media (prefers-reduced-motion: reduce) {
	.tmb-promo-card-wrap--spinner::before {
		animation: none;
	}
}
