/* History timeline */
#n-compass-our-history {
	position: relative;
}

/* Add the verical line */
#n-compass-our-history::before {
    content: '';
    position: absolute;
    width: 5px;
    height: calc( 100% - 12.5rem );
    left: 50%;
	transform: translateX( -50% );
	top: 4rem;
    background-color: gray;
    z-index: 0;
}

/* Each history entry on smaller screens */
.history-entry {
	display: flex;
	flex-direction: column;
	align-items: center;
	margin-bottom: 1rem;
	text-align: center;
	position: relative;
}

/* Format the year */
.history-entry .year {
	font-size: 2rem;
	font-weight: bold;
	color: var( --global-palette9 );
	width: 8rem;
	height: 8rem;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	border: 5px solid var( --global-palette9 );
}

/* Cycle through three colours */
.history-entry:nth-child(3n+1) .year { background: var( --global-palette1 ); }
.history-entry:nth-child(3n+2) .year { background: var( --global-palette5 ); }
.history-entry:nth-child(3n+3) .year { background: var( --global-palette2 ); }

/* Format the Title */
.history-entry .history-content-title {
    margin-top: 1rem;
    margin-bottom: 0;
    border-bottom: 4px solid;
	padding: 0.5rem 1rem;
	background: var( --global-palette9 );
	width: 100%;
}

.history-entry:nth-child(3n+1) .history-content-title { color: var( --global-palette1 ); }
.history-entry:nth-child(3n+2) .history-content-title { color: var( --global-palette5 ); }
.history-entry:nth-child(3n+3) .history-content-title { color: var( --global-palette2 ); }

/* Format the content area */
.history-entry .history-content {
	background: var( --global-palette9 );
	padding: 0.5rem 1rem;
}

@media screen and ( min-width: 768px ) {
	.history-entry {
		display: grid;
		grid-template-columns: 1fr auto 1fr;
		grid-template-rows: 1fr auto;
		grid-column-gap: 0px;
		grid-row-gap: 0px;
		align-items: start;
		position: relative;
	}

	.history-entry .year {
		grid-area: 1 / 2 / 2 / 3;
		align-self: end;
		/* margin-bottom: -4rem; */
		margin-right: -5px;
		margin-left: -5px;
	}

	.history-entry .history-content-title {
		grid-area: 1 / 1 / 2 / 2;
		background-color: transparent;
		text-align: right;
	}

	.history-entry .history-content {
		grid-area: 2 / 1 / 3 / 2 ;
		background-color: transparent;
		text-align: right;
	}
	.history-entry:nth-child( even ) .history-content-title {
		grid-area: 1 / 3 / 2 / 4;
		text-align: left;
	}
	.history-entry:nth-child( even ) .history-content {
		grid-area: 2 / 3 / 3 / 4;
		text-align: left;
	}
}