/* History Timeline plugin. Everything is prefixed with .ht- so it won't clash with your theme. */

.ht-timeline {
	--ht-accent: #E3151F;          /* RTD red. Change with [history_timeline accent="#xxxxxx"] */
	--ht-decade: var(--ht-accent); /* decade labels. Change with decade_color="#xxxxxx" */
	--ht-card: #ffffff;            /* card background. Change with card_bg="#xxxxxx" */
	--ht-card-border: #e3e3e3;     /* card outline. Change with card_border="#xxxxxx" */
	--ht-card-ink: #333333;        /* text inside cards */
	--ht-card-muted: #5a5a5a;
	--ht-ink: #333333;             /* RTD charcoal */
	--ht-muted: #5a5a5a;
	--ht-line: #d9d9d9;
	--ht-page: #ffffff;            /* background behind the timeline */
	--ht-band-bg: #f2f2f2;         /* decade band background */
	--ht-offset: 0px;              /* set sticky_offset="80" if your site header is fixed to the top */
	font-family: inherit;
	color: var(--ht-ink);
	position: relative;
	margin: 2em 0;
}
.ht-timeline *, .ht-timeline *::before, .ht-timeline *::after { box-sizing: border-box; }

/* ---------- Decade menu ---------- */
.ht-nav {
	position: sticky;
	top: var(--ht-offset);
	z-index: 5;
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 6px;
	padding: 10px 12px;
	background: rgba(255, 255, 255, .94);
	border-bottom: 1px solid var(--ht-line);
	backdrop-filter: blur(6px);
}
.ht-nav a {
	padding: 6px 13px;
	border-radius: 999px;
	font-size: 14px;
	font-weight: 600;
	text-decoration: none;
	color: var(--ht-muted);
	box-shadow: none;
	transition: background .2s, color .2s;
}
.ht-nav a:hover { color: var(--ht-ink); }
.ht-nav a.ht-active { background: var(--ht-accent); color: #fff; }

/* ---------- The vertical line ---------- */
.ht-track { position: relative; padding: 24px 0 20px; }
.ht-track::before {
	content: "";
	position: absolute; top: 0; bottom: 0; left: 50%;
	width: 2px; background: var(--ht-line);
	transform: translateX(-50%);
}
.ht-progress {
	position: absolute; top: 0; left: 50%;
	width: 2px; height: 0;
	background: var(--ht-accent);
	transform: translateX(-50%);
	z-index: 1;
}
.ht-list { position: relative; }

/* ---------- Decade bands ---------- */
.ht-decade {
	position: relative; z-index: 3;
	display: flex; align-items: baseline; justify-content: space-between; gap: 16px;
	margin: 44px 0 34px;
	padding: 14px 24px;
	background: var(--ht-band-bg);
	border-left: 8px solid var(--ht-decade);
	border-radius: 6px;
	text-align: left;
	scroll-margin-top: calc(var(--ht-offset) + 70px);
}
.ht-decade:first-child { margin-top: 12px; }
.ht-decade-label {
	font-size: clamp(30px, 5vw, 46px);
	line-height: 1; font-weight: 800; letter-spacing: .02em;
	text-transform: uppercase;
	color: var(--ht-ink);
}
.ht-decade-count {
	font-size: 13px; font-weight: 700; letter-spacing: .14em;
	text-transform: uppercase;
	color: var(--ht-decade);
	white-space: nowrap;
}

/* ---------- Entries ---------- */
.ht-entry {
	position: relative; z-index: 2;
	width: 50%;
	padding: 0 44px 36px 0;
	margin: 0;
}
.ht-entry.ht-right { margin-left: 50%; padding: 0 0 36px 44px; }
.ht-entry::after {
	content: "";
	position: absolute; top: 24px; right: -8px;
	width: 16px; height: 16px; border-radius: 50%;
	background: var(--ht-page); border: 3px solid var(--ht-accent);
	z-index: 2;
}
.ht-entry.ht-right::after { right: auto; left: -8px; }

.ht-card {
	background: var(--ht-card);
	border: 1px solid var(--ht-card-border);
	border-top: 4px solid var(--ht-accent);
	border-radius: 14px;
	overflow: hidden;
	box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
}
.ht-card .ht-image { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; margin: 0; }
.ht-text { padding: 18px 22px 22px; }
.ht-year { font-size: 36px; line-height: 1; font-weight: 800; color: var(--ht-accent); margin: 0 0 6px; }
.ht-title { margin: 0 0 8px; font-size: 1.25em; line-height: 1.25; color: var(--ht-card-ink); }
.ht-body { color: var(--ht-card-muted); font-size: 1em; line-height: 1.6; }
.ht-body > :first-child { margin-top: 0; }
.ht-body > :last-child { margin-bottom: 0; }

/* Description bullets: keep them looking the same regardless of the theme */
.ht-timeline .ht-body ul { list-style: disc outside !important; margin: 0; padding: 0 0 0 1.25em; }
.ht-timeline .ht-body li { list-style: disc outside !important; margin: 0 0 .4em; padding: 0; }
.ht-timeline .ht-body li:last-child { margin-bottom: 0; }

/* "Show more" for long lists (added by timeline.js) */
.ht-timeline.ht-collapse-link .ht-body ul.ht-collapsed > li:nth-child(n+4) { display: none !important; }
.ht-timeline.ht-collapse-pill .ht-body ul.ht-collapsed > li:nth-child(n+3) { display: none !important; }
.ht-timeline.ht-collapse-fade .ht-body ul.ht-collapsed {
	max-height: 8.6em; overflow: hidden;
	-webkit-mask-image: linear-gradient(#000 52%, transparent);
	mask-image: linear-gradient(#000 52%, transparent);
}
.ht-timeline .ht-toggle {
	display: inline-block;
	margin: 12px 0 0; padding: 0 !important;
	background: none !important; border: 0 !important; box-shadow: none !important;
	color: var(--ht-accent) !important;
	font: inherit; font-size: .9em; font-weight: 700;
	text-transform: none; letter-spacing: 0;
	text-decoration: underline; text-underline-offset: 3px;
	cursor: pointer;
}

/* ---------- Featured milestones: full width, bigger photo and year ---------- */
.ht-entry.ht-featured { width: 100%; margin-left: 0; padding: 30px 0 44px; }
.ht-entry.ht-featured::after { top: 0; right: auto; left: 50%; margin-left: -8px; }
.ht-featured .ht-card { border-top-width: 6px; box-shadow: 0 10px 30px rgba(0, 0, 0, .12); }
.ht-featured .ht-year { font-size: clamp(54px, 8vw, 88px); letter-spacing: -.02em; margin-bottom: 10px; }
.ht-featured .ht-title { font-size: 1.7em; margin-bottom: 12px; }
.ht-featured .ht-text { padding: 34px 38px; }
.ht-featured.ht-has-img .ht-card { display: grid; grid-template-columns: 1.1fr 1fr; align-items: stretch; }
.ht-featured.ht-has-img .ht-card .ht-image { height: 100%; min-height: 340px; aspect-ratio: auto; }
.ht-featured.ht-has-img .ht-text { align-self: center; }

/* ---------- Look: DARK (charcoal panel, red bands) ---------- */
.ht-style-dark {
	--ht-page: #333333;
	--ht-ink: #ffffff;
	--ht-muted: #cfcfcf;
	--ht-line: #5a5a5a;
	--ht-card-border: #333333;
	background: #333333;
	padding: 0 28px 16px;
	border-radius: 16px;
}
.ht-style-dark .ht-nav { background: rgba(51, 51, 51, .96); border-bottom-color: #555; margin: 0 -28px; padding: 14px 28px; border-radius: 16px 16px 0 0; }
.ht-style-dark .ht-nav a { color: #d6d6d6; }
.ht-style-dark .ht-nav a:hover { color: #fff; }
.ht-style-dark .ht-decade { background: var(--ht-decade); border-left: 0; border-radius: 8px; }
.ht-style-dark .ht-decade-label { color: #fff; }
.ht-style-dark .ht-decade-count { color: #fff; opacity: .85; }
.ht-style-dark .ht-card { border-top-color: var(--ht-accent); box-shadow: 0 10px 30px rgba(0, 0, 0, .35); }

/* ---------- Look: CHAPTERS (big centered decade titles) ---------- */
.ht-style-chapters .ht-decade {
	flex-direction: column; align-items: center; justify-content: center; gap: 10px;
	width: 100%; max-width: 420px; margin: 64px auto 40px;
	padding: 6px 0;
	background: var(--ht-page);
	border: 0; border-radius: 0;
	text-align: center;
}
.ht-style-chapters .ht-decade:first-child { margin-top: 16px; }
.ht-style-chapters .ht-decade-label { font-size: clamp(56px, 11vw, 104px); font-weight: 900; letter-spacing: .01em; color: var(--ht-decade); }
.ht-style-chapters .ht-decade-count { color: var(--ht-muted); letter-spacing: .22em; }
.ht-style-chapters .ht-decade-count::before,
.ht-style-chapters .ht-decade-count::after { content: ""; display: inline-block; width: 38px; height: 2px; background: var(--ht-accent); vertical-align: middle; margin: 0 12px; }

/* ---------- Fade-in (only when JavaScript is running) ---------- */
.ht-js .ht-entry { opacity: 0; transform: translateY(22px); transition: opacity .6s ease, transform .6s ease; }
.ht-js .ht-entry.ht-visible { opacity: 1; transform: none; }

/* ---------- Phones and small tablets: one column, line on the left ---------- */
@media (max-width: 720px) {
	.ht-track::before, .ht-progress { left: 14px; }
	.ht-entry, .ht-entry.ht-right, .ht-entry.ht-featured { width: 100%; margin-left: 0; padding: 0 0 28px 44px; }
	.ht-entry::after, .ht-entry.ht-right::after, .ht-entry.ht-featured::after { left: 6px; right: auto; margin-left: 0; top: 24px; }
	.ht-decade { padding: 12px 16px; margin: 34px 0 26px; }
	.ht-style-chapters .ht-decade { margin: 44px 0 30px; max-width: none; align-items: flex-start; text-align: left; padding-left: 44px; }
	.ht-featured.ht-has-img .ht-card { grid-template-columns: 1fr; }
	.ht-featured.ht-has-img .ht-card .ht-image { height: auto; min-height: 0; aspect-ratio: 16 / 10; }
	.ht-featured .ht-text { padding: 22px; }
	.ht-nav { justify-content: flex-start; overflow-x: auto; flex-wrap: nowrap; }
	.ht-nav a { white-space: nowrap; }
	.ht-style-dark { padding: 0 14px 10px; }
	.ht-style-dark .ht-nav { margin: 0 -14px; padding: 12px 14px; }
}

@media (prefers-reduced-motion: reduce) {
	.ht-js .ht-entry { opacity: 1; transform: none; transition: none; }
}

/* ---------- "Show more" button styles ---------- */
.ht-timeline.ht-collapse-fade .ht-toggle {
	display: block; width: 100%; margin: 6px 0 0; text-align: center; text-decoration: none;
	padding: 9px 14px !important; border: 2px solid var(--ht-accent) !important; border-radius: 999px; font-size: .9em;
}
.ht-timeline.ht-collapse-fade .ht-toggle::after { content: " \25BE"; }
.ht-timeline.ht-collapse-fade .ht-toggle[aria-expanded="true"]::after { content: " \25B4"; }
.ht-timeline.ht-collapse-pill .ht-toggle {
	margin-top: 12px; text-decoration: none;
	padding: 5px 15px !important; border: 2px solid var(--ht-accent) !important; border-radius: 999px; font-size: .85em;
}
.ht-timeline.ht-collapse-fade .ht-toggle:hover,
.ht-timeline.ht-collapse-pill .ht-toggle:hover { background: var(--ht-accent) !important; color: #fff !important; }

/* ---------- Typography ---------- */
/* Slant: years and decade titles lean like the RTD logo */
.ht-type-slant .ht-year, .ht-type-slant .ht-decade-label,
.ht-type-logo .ht-year, .ht-type-logo .ht-decade-label {
	display: inline-block; transform: skewX(-10deg); transform-origin: left bottom; font-weight: 900;
}
.ht-style-chapters.ht-type-slant .ht-decade-label,
.ht-style-chapters.ht-type-logo .ht-decade-label { transform-origin: center bottom; }
.ht-type-slant .ht-title { font-weight: 800; }
/* Full logo: titles lean and go uppercase too */
.ht-type-logo .ht-title {
	transform: skewX(-8deg); transform-origin: left bottom;
	text-transform: uppercase; letter-spacing: .03em; font-weight: 800;
}
.ht-type-logo .ht-decade-label { letter-spacing: .04em; }
/* Industrial: squared corners, uppercase, a red bar under each year */
.ht-type-industrial .ht-card { border-radius: 4px; }
.ht-type-industrial .ht-decade { border-radius: 2px; }
.ht-type-industrial .ht-nav a { border-radius: 3px; text-transform: uppercase; letter-spacing: .08em; font-size: 12px; }
.ht-type-industrial .ht-decade-label { text-transform: uppercase; letter-spacing: .14em; font-weight: 800; }
.ht-type-industrial .ht-title { text-transform: uppercase; letter-spacing: .06em; font-size: 1.05em; font-weight: 800; }
.ht-type-industrial .ht-featured .ht-title { font-size: 1.35em; }
.ht-type-industrial .ht-year { margin-bottom: 14px; }
.ht-type-industrial .ht-year::after { content: ""; display: block; width: 56px; height: 5px; background: var(--ht-accent); margin-top: 12px; }
.ht-type-industrial .ht-entry::after { border-radius: 2px; }
.ht-type-industrial .ht-endcap-btn { border-radius: 3px; }

/* ---------- Connector lines from each card to the timeline ---------- */
.ht-conn-gray { --ht-conn: var(--ht-line); }
.ht-conn-red  { --ht-conn: var(--ht-accent); }
.ht-conn-gray .ht-entry:not(.ht-featured)::before,
.ht-conn-red  .ht-entry:not(.ht-featured)::before {
	content: ""; position: absolute; top: 31px; right: 0; width: 44px; height: 2px;
	background: var(--ht-conn); z-index: 1;
}
.ht-conn-gray .ht-entry.ht-right::before,
.ht-conn-red  .ht-entry.ht-right::before { right: auto; left: 0; }

/* ---------- Start and end caps ---------- */
.ht-startcap { position: relative; z-index: 3; text-align: center; margin: 0 0 6px; }
.ht-startcap span {
	display: inline-block; padding: 8px 20px; background: var(--ht-page);
	border: 2px solid var(--ht-accent); border-radius: 999px;
	color: var(--ht-ink); font-size: 13px; font-weight: 800; letter-spacing: .18em; text-transform: uppercase;
}
.ht-endcap { position: relative; z-index: 3; background: var(--ht-page); text-align: center; padding: 28px 0 34px; margin-bottom: -20px; } /* covers the end of the line */
.ht-endcap-dot {
	display: block; width: 18px; height: 18px; margin: -37px auto 20px;
	border-radius: 50%; background: var(--ht-accent); box-shadow: 0 0 0 6px var(--ht-page);
}
.ht-endcap-badge img {
	display: block; width: 62%; max-width: 240px; height: auto; margin: 0 auto 14px;
	filter: drop-shadow(0 12px 26px rgba(0, 0, 0, .45));
}
.ht-endcap-text { margin: 0 0 14px; color: var(--ht-ink); font-size: 1.05em; font-weight: 700; letter-spacing: .04em; }
.ht-endcap-cta .ht-endcap-text { font-size: 1.5em; font-weight: 800; line-height: 1.2; margin-bottom: 18px; }
.ht-endcap-btn {
	display: inline-block; padding: 14px 30px; border-radius: 999px;
	background: var(--ht-accent); color: #fff !important; text-decoration: none; box-shadow: none;
	font-size: 14px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
}
.ht-endcap-btn:hover { filter: brightness(1.1); }
.ht-endcap-today { padding-top: 0; }
.ht-endcap-pill {
	display: inline-block; margin-top: -6px; padding: 12px 30px; border-radius: 999px;
	background: var(--ht-accent); color: #fff; font-size: 14px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase;
}

@media (max-width: 720px) {
	.ht-conn-gray .ht-entry::before, .ht-conn-red .ht-entry::before,
	.ht-conn-gray .ht-entry.ht-right::before, .ht-conn-red .ht-entry.ht-right::before { left: 14px; right: auto; width: 30px; }
	.ht-conn-gray .ht-entry.ht-featured::before, .ht-conn-red .ht-entry.ht-featured::before { content: ""; position: absolute; top: 31px; }
	.ht-startcap { text-align: left; }
	.ht-endcap { text-align: left; padding-left: 44px; }
	.ht-endcap-dot { margin-left: -39px; }
	.ht-endcap-badge img { margin-left: 0; }
}
