/**
 * Company Timeline Page Styles
 * Matches Figma design specifications
 *
 * @package UnitedNPL
 */

/* ============================================
   CSS Variables
   ============================================ */
:root {
	--timeline-primary-green: #35763A;
	--timeline-bg-light: #F5F5F5;
	--timeline-bg-white: #FFFFFF;
	--timeline-text-primary: #1A1A1A;
	--timeline-text-secondary: rgba(0, 0, 0, 0.8);
	--timeline-shadow-card: 0px 12px 16px -4px rgba(10, 13, 18, 0.08), 0px 4px 6px -2px rgba(10, 13, 18, 0.03), 0px 2px 2px -1px rgba(0, 0, 0, 0.1);
	--timeline-border-radius: 16px;
	--timeline-border-color: #E9EAEB;
}

/* ============================================
   Timeline Section
   ============================================ */
.company-timeline-section {
	padding: 80px 0;
	background-color: var(--timeline-bg-light);
	position: relative;
}

.company-timeline-section-title {
	font-family: 'Hanken Grotesk', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 36px;
	line-height: 144%;
	color: #1E1E1E;
	margin-bottom: 0;
}

/* ============================================
   Timeline Wrapper
   ============================================ */
.company-timeline-wrapper {
	position: relative;
	padding: 60px 0 40px; /* Extra top padding for signpost icon */
	max-width: 1200px;
	margin: 0 auto;
}

/* Vertical Timeline Line */
.company-timeline-line {
	position: absolute;
	left: 50%;
	top: 18.5px; /* Start below signpost icon (37px / 2 = 18.5px) */
	bottom: calc(40px + 18px); /* End at last year badge center: bottom padding (40px) + half badge height (18px) */
	width: 2px;
	border-left: 2px dashed var(--timeline-primary-green);
	transform: translateX(-50%);
	z-index: 1;
}


/* ============================================
   Signpost Icon at Top of Timeline
   ============================================ */
.company-timeline-signpost {
	position: absolute;
	left: 50%;
	top: 0;
	transform: translateX(-50%) translateY(-50%);
	z-index: 5;
	width: 33px;
	height: 37px;
	display: flex;
	align-items: center;
	justify-content: center;
	pointer-events: none;
}

.company-timeline-signpost svg {
	width: 100%;
	height: 100%;
	display: block;
	visibility: visible;
}

/* ============================================
   Timeline Items
   ============================================ */
.company-timeline-item {
	position: relative;
	margin-bottom: 60px;
	display: flex;
	align-items: flex-start;
	z-index: 2;
	min-height: 128px;
	padding-bottom: 40px;
}

.company-timeline-item:last-child {
	margin-bottom: 0;
	padding-bottom: 0;
	position: relative;
}

/* Timeline line ends at last green dot (between last year badge and title) */
/* Green dot is at top: 18px with translateY(-50%), so center is at 18px from item top */
.company-timeline-wrapper:has(.company-timeline-item:last-child) .company-timeline-line {
	bottom: calc(180px + 18px); /* Bottom padding (40px) + dot center position (18px) to end exactly at dot center */
}

/* Left side items (even index - 1, 3, 5) - card on left */
.timeline-item-left {
	flex-direction: row;
	justify-content: flex-start;
	padding-right: 50%;
}

/* Right side items (odd index - 0, 2, 4) - card on right */
.timeline-item-right {
	flex-direction: row-reverse;
	justify-content: flex-start;
	padding-left: 50%;
}

/* ============================================
   Year Badge
   ============================================ */
.company-timeline-year-badge {
	position: absolute;
	left: 50%;
	top: 0;
	width: 91px;
	height: 36px;
	background: var(--timeline-primary-green);
	border-radius: 18px;
	box-shadow: 0px 4px 4px rgba(0, 0, 0, 0.25);
	display: flex;
	align-items: center;
	justify-content: center;
	z-index: 3;
	flex-shrink: 0;
}

/* Badge on left side of line (when card is on right) */
.company-timeline-year-badge.badge-left {
	transform: translateX(calc(-100% - 20px));
}

/* Badge on right side of line (when card is on left) */
.company-timeline-year-badge.badge-right {
	transform: translateX(20px);
}

/* ============================================
   Timeline Dot (Green Circle)
   ============================================ */
.company-timeline-dot {
	position: absolute;
	left: 50%;
	top: 18px; /* Center of year badge (36px height / 2 = 18px) */
	transform: translateX(-50%) translateY(-50%);
	width: 9px;
	height: 9px;
	background: var(--timeline-primary-green);
	border-radius: 50%;
	z-index: 4;
	display: flex;
	align-items: center;
	justify-content: center;
}

/* White inner circle */
.company-timeline-dot::after {
	content: '';
	position: absolute;
	width: 3px;
	height: 3px;
	background: var(--timeline-bg-white);
	border-radius: 50%;
	top: 50%;
	left: 50%;
	transform: translate(-50%, -50%);
}

.company-timeline-year {
	font-family: 'Hanken Grotesk', sans-serif;
	font-style: normal;
	font-weight: 600;
	font-size: 20px;
	line-height: 29px;
	color: var(--timeline-bg-white);
	white-space: nowrap;
}

/* ============================================
   Timeline Title (Outside Card)
   ============================================ */
.company-timeline-title {
	font-family: 'Hanken Grotesk', sans-serif;
	font-style: normal;
	font-weight: 500;
	font-size: 20px;
	line-height: 29px;
	color: var(--timeline-primary-green);
	margin: 0;
	padding: 0;
	position: absolute;
	top: 0;
	z-index: 2;
	padding-bottom: 30px;
}

.timeline-item-left .company-timeline-title {
	right: 50%;
	margin-right: 20px;
	text-align: right;
}

.timeline-item-right .company-timeline-title {
	left: 50%;
	margin-left: 20px;
	text-align: left;
}

/* ============================================
   Timeline Card
   ============================================ */
.company-timeline-card {
	background: #FFFFFB;
	box-shadow: var(--timeline-shadow-card);
	border-radius: var(--timeline-border-radius);
	border: 1px solid var(--timeline-border-color);
	padding: 20px;
	width: 100%;
	position: relative;
	margin-top: 50px;
	overflow: visible;
	height: 100%;
	max-height: 128px;
}

.timeline-item-left .company-timeline-card {
	max-width: 413px;
	margin-right: 20px;
	margin-left: auto;
}

.timeline-item-right .company-timeline-card {
	max-width: 413px;
	margin-left: 20px;
	margin-right: auto;
}

/* Timeline Icon (Below Year Badge) */
.company-timeline-icon {
	position: absolute;
	top: 50px; /* Below year badge (36px height + 14px gap) */
	z-index: 2;
	pointer-events: none;
	width: auto;
	height: auto;
	background: #F5F5F5;
	border-radius: 8px;
	padding: 12px;
	box-sizing: border-box;
	display: flex;
	align-items: center;
	justify-content: center;
}

.company-timeline-icon.icon-left {
	left: 50%;
	transform: translateX(calc(-100% - 20px));
	padding-right: 40px;
	padding-top: 20px;
}

.company-timeline-icon.icon-right {
	left: 50%;
	transform: translateX(20px);
	padding-left: 40px;
	padding-top: 20px;
}

.company-timeline-icon svg,
.company-timeline-icon img {
	width: auto;
	height: auto;
	object-fit: contain;
	display: block;
	opacity: 1;
}

/* Individual Icon Styles - Each icon has its own size */
.company-timeline-icon.icon-document {
	width: 153px;
	height: 107px;
}

.company-timeline-icon.icon-document svg {
	width: 153px;
	height: 107px;
}

.company-timeline-icon.icon-building {
	width: 147px;
	height: 147px;
	transform: translateX(10px);
}

.company-timeline-icon.icon-building.icon-left {
	transform: translateX(calc(-100% - 35px + 10px)) translateY(-30px);
}

.company-timeline-icon.icon-building.icon-right {
	transform: translateX(calc(20px + 10px));
}

.company-timeline-icon.icon-building svg {
	width: 147px;
	height: 147px;
}

.company-timeline-icon.icon-aca {
	width: 207px;
	height: 76px;
}

.company-timeline-icon.icon-aca.icon-left {
	transform: translateX(calc(-100% - 35px + 10px)) translateY(50px);
}

.company-timeline-icon.icon-aca.icon-right {
	transform: translateX(calc(20px + 10px))translateY(60px);
}

.company-timeline-icon.icon-aca svg {
	width: 207px;
	height: 76px;
}

.company-timeline-icon.icon-dollar {
	width: 110px;
	height: 116px;
}
.company-timeline-icon.icon-dollar.icon-left {
	transform: translateX(calc(-100% - 35px + 10px)) translateY(30px);
}

.company-timeline-icon.icon-dollar.icon-right {
	transform: translateX(calc(20px + 10px))translateY(40px);
}

.company-timeline-icon.icon-dollar svg {
	width: 110px;
	height: 116px;
}

.company-timeline-icon.icon-npl {
	width: 193px;
	height: 76px;
}
.company-timeline-icon.icon-npl.icon-left {
	transform: translateX(calc(-100% - 35px + 10px)) translateY(50px);
}

.company-timeline-icon.icon-npl.icon-right {
	transform: translateX(calc(20px + 10px))translateY(60px);
}

.company-timeline-icon.icon-npl svg {
	width: 193px;
	height: 76px;
}

.company-timeline-icon.icon-globe {
	width: 145px;
	height: 145px;
}
.company-timeline-icon.icon-globe.icon-left {
	transform: translateX(calc(-100% - 35px + 10px)) ;
}

.company-timeline-icon.icon-globe.icon-right {
	transform: translateX(calc(20px + 10px));
}

.company-timeline-icon.icon-globe svg {
	width: 145px;
	height: 145px;
}

/* Card Description */
.company-timeline-card-description {
	font-family: 'Hanken Grotesk', sans-serif;
	font-style: regular;
	font-weight: 400;
	font-size: 16px;
	line-height: 193%;
	color: var(--timeline-text-primary);
	position: relative;
	z-index: 1;
}

.timeline-item-left .company-timeline-card-description {
	/* Left card description styles - add custom styles here */
	text-align: left;
	max-width: 413px;
}

.timeline-item-right .company-timeline-card-description {
	/* Right card description styles - add custom styles here */
	text-align: left;
	max-width: 377px;
}

.company-timeline-card-description p {
	margin-bottom: 0;
}

.company-timeline-card-description p:not(:last-child) {
	margin-bottom: 8px;
}

/* ============================================
   Responsive - Large Desktop (1200px+)
   ============================================ */
@media (min-width: 1200px) {
	.company-timeline-wrapper {
		max-width: 1400px;
	}

	.company-timeline-card {
		max-width: 360px;
	}

	.company-timeline-section-title {
		font-size: 40px;
	}
}

/* ============================================
   Responsive - Desktop (992px - 1199px)
   ============================================ */
@media (min-width: 992px) and (max-width: 1199.98px) {
	.company-timeline-wrapper {
		max-width: 1140px;
	}

	.company-timeline-card {
		max-width: 300px;
	}
}

/* ============================================
   Responsive - Tablet (768px - 991px)
   ============================================ */
@media (min-width: 768px) and (max-width: 991.98px) {
	.company-timeline-section {
		padding: 60px 0;
	}

	.company-timeline-section-title {
		font-size: 32px;
		margin-bottom: 40px;
	}

	.company-timeline-wrapper {
		padding: 30px 0;
	}

	.company-timeline-item {
		margin-bottom: 50px;
	}

	/* Maintain alternating layout on tablet */
	.timeline-item-left {
		padding-right: 50%;
		padding-left: 0;
		flex-direction: row;
		justify-content: flex-start;
	}

	.timeline-item-right {
		padding-left: 50%;
		padding-right: 0;
		flex-direction: row-reverse;
		justify-content: flex-start;
	}

	.timeline-item-left .company-timeline-card {
		margin-right: 15px;
		margin-left: auto;
	}

	.timeline-item-right .company-timeline-card {
		margin-left: 15px;
		margin-right: auto;
	}

	.timeline-item-left .company-timeline-title {
		right: 50%;
		margin-right: 15px;
		text-align: right;
	}

	.timeline-item-right .company-timeline-title {
		left: 50%;
		margin-left: 15px;
		text-align: left;
	}

	.company-timeline-year-badge {
		left: 50%;
		width: 85px;
		height: 34px;
	}

	.company-timeline-year-badge.badge-left {
		transform: translateX(calc(-100% - 20px));
	}

	.company-timeline-year-badge.badge-right {
		transform: translateX(20px);
	}

	.company-timeline-line {
		left: 50%;
		top: 18.5px;
		transform: translateX(-50%);
	}

	.company-timeline-signpost {
		left: 50%;
		width: 30px;
		height: 34px;
	}

	.company-timeline-card {
		max-width: 100%;
		overflow: hidden;
		max-height: none;
		min-height: auto;
	}

	.timeline-item-left .company-timeline-card-description,
	.timeline-item-right .company-timeline-card-description {
		max-width: 100%;
	}

	.company-timeline-year {
		font-size: 18px;
	}

	.company-timeline-icon {
		top: 48px; /* Below year badge (34px height + 14px gap) */
		width: 133px;
		height: 107px;
		padding: 12px;
	}

	/* Timeline dot responsive - tablet */
	.company-timeline-dot {
		left: 50%;
		top: 17px; /* Center of year badge (34px height / 2 = 17px) */
		transform: translateX(-50%) translateY(-50%);
		width: 8px;
		height: 8px;
	}

	.company-timeline-dot::after {
		width: 3px;
		height: 3px;
	}

	/* Timeline line ends at last green dot - tablet */
	.company-timeline-wrapper:has(.company-timeline-item:last-child) .company-timeline-line {
		bottom: calc(30px + 17px); /* Bottom padding (30px) + dot center position (17px) to end exactly at dot center */
	}
}

/* ============================================
   Responsive - Mobile (576px - 767px)
   ============================================ */
@media (min-width: 576px) and (max-width: 767.98px) {
	.company-timeline-section {
		padding: 50px 0;
	}

	.company-timeline-section-title {
		font-size: 28px;
		margin-bottom: 35px;
	}

	.company-timeline-wrapper {
		padding: 20px 0;
	}

	.company-timeline-line {
		left: 50%;
		top: 18.5px;
		transform: translateX(-50%);
	}

	.company-timeline-signpost {
		left: 50%;
		width: 28px;
		height: 32px;
	}

	.company-timeline-item {
		margin-bottom: 40px;
		padding-left: 0;
		padding-right: 0;
		flex-direction: row;
		justify-content: flex-start;
	}

	/* Maintain alternating layout on mobile */
	.timeline-item-left {
		padding-right: 50%;
		padding-left: 0;
		flex-direction: row;
		justify-content: flex-start;
	}

	.timeline-item-right {
		padding-left: 50%;
		padding-right: 0;
		flex-direction: row-reverse;
		justify-content: flex-start;
	}

	.company-timeline-year-badge {
		left: 50%;
		width: 80px;
		height: 32px;
	}

	.company-timeline-year-badge.badge-left {
		transform: translateX(calc(-100% - 20px));
	}

	.company-timeline-year-badge.badge-right {
		transform: translateX(20px);
	}

	.company-timeline-year {
		font-size: 16px;
	}

	.company-timeline-icon {
		top: 46px; /* Below year badge (32px height + 14px gap) */
		width: 133px;
		height: 107px;
		padding: 12px;
	}

	.timeline-item-left .company-timeline-card {
		margin-right: 12px;
		margin-left: auto;
		overflow: hidden;
		max-height: none;
		min-height: auto;
	}

	.timeline-item-right .company-timeline-card {
		margin-left: 12px;
		margin-right: auto;
		overflow: hidden;
		max-height: none;
		min-height: auto;
	}

	.timeline-item-left .company-timeline-title {
		right: 50%;
		margin-right: 12px;
		text-align: right;
	}

	.timeline-item-right .company-timeline-title {
		left: 50%;
		margin-left: 12px;
		text-align: left;
	}

	.company-timeline-line {
		left: 50%;
		top: 18.5px;
		transform: translateX(-50%);
	}

	.company-timeline-signpost {
		left: 50%;
		width: 28px;
		height: 32px;
	}

	.company-timeline-title {
		font-size: 18px;
	}

	.company-timeline-card-description {
		font-size: 15px;
	}

	.timeline-item-left .company-timeline-card-description,
	.timeline-item-right .company-timeline-card-description {
		max-width: 100%;
	}

	/* Timeline dot responsive - mobile */
	.company-timeline-dot {
		left: 50%;
		top: 16px; /* Center of year badge (32px height / 2 = 16px) */
		transform: translateX(-50%) translateY(-50%);
		width: 8px;
		height: 8px;
	}

	.company-timeline-dot::after {
		width: 3px;
		height: 3px;
	}

	/* Timeline line ends at last green dot - mobile */
	.company-timeline-wrapper:has(.company-timeline-item:last-child) .company-timeline-line {
		bottom: calc(20px + 16px); /* Bottom padding (20px) + dot center position (16px) to end exactly at dot center */
	}
}

/* ============================================
   Responsive - Small Mobile (<576px)
   ============================================ */
@media (max-width: 575.98px) {
	.company-timeline-section {
		padding: 40px 0;
	}

	.company-timeline-section-title {
		font-size: 24px;
		margin-bottom: 30px;
	}

	.company-timeline-wrapper {
		padding: 15px 0;
	}

	.company-timeline-line {
		left: 50%;
		top: 17.5px;
		transform: translateX(-50%);
	}

	.company-timeline-signpost {
		left: 50%;
		width: 26px;
		height: 30px;
	}

	.company-timeline-item {
		margin-bottom: 35px;
		padding-left: 0;
		padding-right: 0;
		flex-direction: row;
		justify-content: flex-start;
	}

	/* Maintain alternating layout on small mobile */
	.timeline-item-left {
		padding-right: 50%;
		padding-left: 0;
		flex-direction: row;
		justify-content: flex-start;
	}

	.timeline-item-right {
		padding-left: 50%;
		padding-right: 0;
		flex-direction: row-reverse;
		justify-content: flex-start;
	}

	.company-timeline-year-badge {
		left: 50%;
		width: 70px;
		height: 30px;
	}

	.company-timeline-year-badge.badge-left {
		transform: translateX(calc(-100% - 20px));
	}

	.company-timeline-year-badge.badge-right {
		transform: translateX(20px);
	}

	.company-timeline-line {
		left: 50%;
		transform: translateX(-50%);
	}

	/* Ensure dot follows line position on small mobile */
	.company-timeline-dot {
		left: 50%;
	}

	.company-timeline-year {
		font-size: 14px;
		line-height: 20px;
	}

	.company-timeline-icon {
		top: 44px; /* Below year badge (30px height + 14px gap) */
		width: 133px;
		height: 107px;
		padding: 12px;
	}

	.company-timeline-card {
		max-width: 100%;
		padding: 16px;
		overflow: hidden;
		max-height: none;
		min-height: auto;
	}

	.timeline-item-left .company-timeline-card {
		margin-right: 10px;
		margin-left: auto;
	}

	.timeline-item-right .company-timeline-card {
		margin-left: 10px;
		margin-right: auto;
	}

	.timeline-item-left .company-timeline-title {
		right: 50%;
		margin-right: 10px;
		text-align: right;
	}

	.timeline-item-right .company-timeline-title {
		left: 50%;
		margin-left: 10px;
		text-align: left;
	}

	.company-timeline-title {
		font-size: 16px;
		line-height: 24px;
	}

	.company-timeline-card-description {
		font-size: 14px;
		line-height: 180%;
	}

	.timeline-item-left .company-timeline-card-description,
	.timeline-item-right .company-timeline-card-description {
		max-width: 100%;
	}

	.company-timeline-icon img {
		max-width: 40px;
	}

	/* Timeline dot responsive - small mobile */
	.company-timeline-dot {
		left: 50%;
		top: 15px; /* Center of year badge (30px height / 2 = 15px) */
		transform: translateX(-50%) translateY(-50%);
		width: 7px;
		height: 7px;
	}

	.company-timeline-dot::after {
		width: 2.5px;
		height: 2.5px;
	}

	/* Timeline line ends at last green dot - small mobile */
	.company-timeline-wrapper:has(.company-timeline-item:last-child) .company-timeline-line {
		bottom: calc(15px + 15px); /* Bottom padding (15px) + dot center position (15px) to end exactly at dot center */
	}
}

/* ============================================
   Animations
   ============================================ */
@keyframes timelineFadeInUp {
	from {
		opacity: 0;
		transform: translateY(30px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.company-timeline-item {
	animation: timelineFadeInUp 0.6s ease forwards;
	opacity: 0;
}

.company-timeline-item:nth-child(1) {
	animation-delay: 0.1s;
}

.company-timeline-item:nth-child(2) {
	animation-delay: 0.2s;
}

.company-timeline-item:nth-child(3) {
	animation-delay: 0.3s;
}

.company-timeline-item:nth-child(4) {
	animation-delay: 0.4s;
}

.company-timeline-item:nth-child(5) {
	animation-delay: 0.5s;
}

.company-timeline-item:nth-child(6) {
	animation-delay: 0.6s;
}

.company-timeline-item:nth-child(7) {
	animation-delay: 0.7s;
}

.company-timeline-item:nth-child(8) {
	animation-delay: 0.8s;
}

.company-timeline-item:nth-child(9) {
	animation-delay: 0.9s;
}

.company-timeline-item:nth-child(10) {
	animation-delay: 1s;
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
	.company-timeline-item {
		animation: none;
		opacity: 1;
	}
}

/* ============================================
   Print Styles
   ============================================ */
@media print {
	.company-timeline-section {
		background: white !important;
		padding: 20px 0;
	}

	.company-timeline-line {
		border-left: 2px solid var(--timeline-primary-green);
	}

	.company-timeline-year-badge {
		box-shadow: none;
		border: 2px solid var(--timeline-primary-green);
		-webkit-print-color-adjust: exact;
		print-color-adjust: exact;
	}

	.company-timeline-card {
		box-shadow: none;
		border: 1px solid #ccc;
		page-break-inside: avoid;
	}
}

@media only screen and (max-width: 600px) {
	
	.company-timeline-section{
    overflow: hidden;
}

.company-timeline-icon.icon-npl {
    width: 150px !important;
}
.company-timeline-icon.icon-aca {
    width: 150px !important;
}
.company-timeline-card{
    margin-top: 70px !important;
}
	
}