/**
 * Timeline Widget
 *
 * Centered vertical-line journey timeline. Styled to match the
 * shopbar theme warm-tan design system. Collapses to a left rail
 * on mobile.
 */

/* ========================================
   SECTION
   ======================================== */
.sbpa-timeline {
	/* Outer wrapper — mirrors the deals widget container: 24px gutters
	   with the visible panel sitting inside. */
	width: 100%;
	max-width: 1350px;
	margin: 0 auto;
	padding: 0 24px;
	box-sizing: border-box;
	overflow: hidden;
}

.sbpa-timeline__panel {
	background: #FBF9F6;
	padding: 70px 40px;
	border-radius: 16px;
	box-sizing: border-box;
}

.sbpa-timeline__inner {
	max-width: 1200px;
	margin: 0 auto;
}

/* ========================================
   HEADER
   ======================================== */
.sbpa-timeline__head {
	text-align: center;
	margin-bottom: 48px;
}

.sbpa-timeline__eyebrow {
	display: inline-block;
	font-family: var(--font-mono, 'DM Mono', monospace);
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 2px;
	text-transform: uppercase;
	color: #B8977E;
	margin-bottom: 14px;
}

.sbpa-timeline__title {
	font-family: var(--font-display, 'Fraunces', serif);
	font-size: 34px;
	font-weight: 600;
	letter-spacing: -0.4px;
	line-height: 1.2;
	color: #1C1C1C;
	margin: 0 0 12px;
}

.sbpa-timeline__desc {
	font-family: var(--font-sans, 'Hanken Grotesk', sans-serif);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.6;
	color: #6B6560;
	margin: 0 auto;
	max-width: 560px;
}

/* ========================================
   RAIL (centered line)
   ======================================== */
.sbpa-timeline__rail {
	--sbpa-tl-line: #E8E4DF;
	--sbpa-tl-line-w: 2px;
	--sbpa-tl-node: #B8977E;
	--sbpa-tl-node-bg: #FFFFFF;
	--sbpa-tl-node-s: 14px;

	max-width: 900px;
	margin: 0 auto;
	padding: 0 16px;
	position: relative;
}

.sbpa-timeline__rail::before {
	content: '';
	position: absolute;
	left: 50%;
	top: 8px;
	bottom: 8px;
	width: var(--sbpa-tl-line-w);
	background: var(--sbpa-tl-line);
	transform: translateX(-50%);
}

/* ========================================
   ITEM (2-col: year | content)
   ======================================== */
.sbpa-timeline__item {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 40px;
	margin-bottom: 40px;
	position: relative;
}

.sbpa-timeline__item:last-child {
	margin-bottom: 0;
}

/* ========================================
   YEAR (right-aligned, with center node)
   ======================================== */
.sbpa-timeline__year {
	font-family: var(--font-display, 'Fraunces', serif);
	font-size: 24px;
	font-weight: 600;
	letter-spacing: -0.3px;
	line-height: 1.2;
	color: #B8977E;
	text-align: right;
	padding-right: 40px;
	position: relative;
	align-self: center;
}

.sbpa-timeline__year::after {
	content: '';
	position: absolute;
	top: 50%;
	right: calc(40px * -1 + (var(--sbpa-tl-node-s) / -2) + var(--sbpa-tl-line-w) / 2);
	transform: translateY(-50%);
	width: var(--sbpa-tl-node-s);
	height: var(--sbpa-tl-node-s);
	background: var(--sbpa-tl-node-bg);
	border: 3px solid var(--sbpa-tl-node);
	border-radius: 50%;
	box-shadow: 0 2px 8px rgba(28, 28, 28, 0.1);
}

/* ========================================
   CONTENT
   ======================================== */
.sbpa-timeline__content {
	padding-left: 40px;
}

.sbpa-timeline__item-title {
	font-family: var(--font-display, 'Fraunces', serif);
	font-size: 19px;
	font-weight: 600;
	letter-spacing: -0.2px;
	line-height: 1.3;
	color: #1C1C1C;
	margin: 0 0 8px;
}

.sbpa-timeline__item-desc {
	font-family: var(--font-sans, 'Hanken Grotesk', sans-serif);
	font-size: 15px;
	font-weight: 400;
	line-height: 1.65;
	color: #6B6560;
	margin: 0;
}

/* Optional card variant */
.sbpa-timeline__content--card {
	background: #FFFFFF;
	border: 1px solid #E8E4DF;
	border-radius: 16px;
	padding: 22px 26px;
	box-shadow: 0 4px 20px rgba(28, 28, 28, 0.05);
	transition: box-shadow 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sbpa-timeline__content--card:hover {
	box-shadow: 0 12px 40px rgba(28, 28, 28, 0.08);
}

/* ========================================
   RESPONSIVE — MOBILE (left rail)
   ======================================== */
@media (max-width: 767px) {
	.sbpa-timeline {
		padding: 0 24px;
	}

	.sbpa-timeline__panel {
		padding: 40px 20px;
	}

	.sbpa-timeline__title {
		font-size: 26px;
	}

	.sbpa-timeline__head {
		margin-bottom: 32px;
	}

	/* Move line to the left */
	.sbpa-timeline__rail {
		padding: 0 0 0 8px;
	}
	.sbpa-timeline__rail::before {
		left: 0;
		transform: translateX(-50%);
	}

	/* Stack year over content */
	.sbpa-timeline__item {
		grid-template-columns: 1fr;
		gap: 8px;
		padding-left: 32px;
	}

	.sbpa-timeline__year {
		text-align: left;
		padding-left: 0;
		padding-right: 0;
		margin-bottom: 4px;
	}
	.sbpa-timeline__year::after {
		left: calc(-32px - 8px + var(--sbpa-tl-node-s) / 2 + var(--sbpa-tl-line-w) / 2);
		right: auto;
		top: 50%;
		transform: translateY(-50%);
	}

	.sbpa-timeline__content {
		padding-left: 0;
	}
}

/* ========================================
   ELEMENTOR EDITOR PREVIEW
   ======================================== */
.elementor-editor-active .sbpa-timeline__content--card {
	transition: none;
}
