	/*
	 * Modern Job Portal Detail View CSS
	 * Optimized, nested structure for better maintainability
	 */

/* ===== Global Styles ===== */
body {
	color: var(--text-color);
	background-color: var(--background-light);
	line-height: 1.6;
}

.tx-jobapplications {

	.fs18{
		font-size: 18px;
	}

	/* Container Styles */
	& .job-detail-container {
		padding-top: 2rem;
		padding-bottom: 3rem;
	}

	/* Job Detail Layout */
	& .job-detail-wrapper {
		background-color: var(--background-color);
		border-radius: var(--card-radius);
		overflow: hidden;
		margin-bottom: 2rem;

		& .job-detail-header {
			padding: 1.25rem;
			border-bottom: 1px solid var(--border-color);
		}

		& .job-detail-content {
			padding: 0;
		}
	}
}

/* ===== Back Button ===== */
.back-button {
	background-color: transparent;
	color: var(--text-color-secondary);
	border: 1px solid var(--border-color);
	padding: 0.5rem 1rem;
	border-radius: 2rem;
	font-weight: 500;
	transition: var(--transition-default);
	display: inline-flex;
	align-items: center;
	gap: 0.5rem;

	&:hover, &:focus {
		background-color: var(--primary-light);
		color: var(--primary-color);
		border-color: var(--primary-color);
		box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
	}

	& i {
		font-size: 0.85rem;
	}
}

/* ===== Job Hero Section ===== */
.job-hero {
	display: flex;
	flex-direction: row;
	position: relative;
	padding: 0;
	margin: 0;
	overflow: hidden;
	background-color: var(--background-alt);

	/* Image Container */
	& .job-hero-image-container {
		width: 25%;
		height: auto;
		overflow: hidden;
		position: relative;
		padding-top: 15px;

		& .job-hero-image {
			width: 100%;
			height: auto;
			object-fit: cover;
			display: block;
			transition: transform 0.5s ease;
			border: 1px solid var(--primary-color);
		}
	}

	/* Content Area */
	& .job-hero-content {
		width: 75%;
		padding: 2rem;
		background-color: var(--background-color);
		position: relative;

		/* Job Meta Information */
		& .job-meta {
			display: flex;
			flex-wrap: wrap;
			gap: 1rem;
			margin-bottom: 1rem;
			color: var(--text-color-secondary);

			& span {
				display: inline-flex;
				align-items: center;
				gap: 0.375rem;

				& i {
					color: var(--primary-color);
				}
			}
		}

		/* Job Title */
		& .job-title {
			font-weight: 600;
			color: var(--heading-color);
			margin: 0 0 1.5rem 0;
			line-height: 1.3;
			position: relative;
		}

		/* Action Buttons */
		& .job-actions-top {
			display: flex;
			gap: 1rem;
			margin-bottom: 1.5rem;

			& .apply-btn {
				background-color: var(--primary-color);
				border-color: var(--primary-hover);
				color: #333;

				&:hover {
					background-color: var(--primary-hover);
				}
			}


			.base_salary {
				padding: 5px;
			}
		}

		/* Application Deadline */
		& .application-deadline {
			display: flex;
			align-items: center;
			justify-content: space-between;
			padding: 1rem;
			border-radius: 0.5rem;
			margin-top: 1rem;
			background-color: #fcf8e3; /* Alert warning background */

			& .deadline-label {
				display: flex;
				align-items: center;
				gap: 0.5rem;
				font-weight: 600;
			}

			& .deadline-date {
				font-weight: 600;
			}
		}
	}
}

/* ===== Tab Navigation ===== */
.job-tabs-container {
	margin-top: 2rem;
	width: 100%;

	/* Tabs Navigation */
	& .job-tabs {
		border-bottom: 1px solid var(--border-color);
		display: flex;
		flex-wrap: nowrap;
		-webkit-overflow-scrolling: touch;
		background-color: transparent;
		overflow-y: hidden;
		@media (max-width: 996px) {
			overflow-x: auto;
		}
		

		& > li {
			float: none;
			display: inline-block;
			margin-bottom: -1px;
			white-space: nowrap;

			& > a {
				color: var(--text-color-secondary);
				border: none;
				border-bottom: 3px solid transparent;
				margin-right: 0;
				padding: 0.75rem 1rem;
				font-weight: 500;
				transition: var(--transition-default);
				text-transform: uppercase;
				letter-spacing: 0.03em;
				font-size: 1.25rem;
				height: 40px;

				&:hover, &:focus {
					background-color: transparent;
					color: var(--primary-color);
					border-color: var(--primary-light);
				}

				i{
					color: var(--primary-color);
				}
			}

			&.active > a,
			&.active > a:hover,
			&.active > a:focus {
				border: none;
				border-bottom: 3px solid var(--primary-color);
				background-color: transparent;
			}
		}
	}

	/* Tab Content */
	& .job-tab-content {
		padding: 0;
		background-color: var(--background-color);
		border-top: 1px solid var(--border-color);

		& .tab-pane {
			& .tab-inner {
				padding: 2rem;
			}
		}
	}
}

/* ===== Section Titles ===== */
.section-title {
	font-size: 1.5rem;
	font-weight: 600;
	color: var(--heading-color);
	margin: 0 0 1.5rem 0;
	position: relative;
	padding-bottom: 0.75rem;

	&:after {
		content: '';
		position: absolute;
		width: 3rem;
		height: 3px;
		background-color: var(--primary-color);
		bottom: 0;
		left: 0;
	}
}

.subsection-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--heading-color);
	margin: 1.5rem 0 1rem 0;
	display: flex;
	align-items: center;
	gap: 0.5rem;

	& i {
		color: var(--primary-color);
	}
}

/* ===== Content Cards ===== */
.content-card {
	background-color: var(--background-color);
	border-radius: 0.5rem;
	padding: 0;
	margin-bottom: 1.5rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.divider {
	height: 1px;
	background-color: var(--border-color);
	margin: 1.5rem 0;
}

/* ===== Job Requirements Section ===== */
.job-requirements,
.job-responsibilities,
.required-documents,
.job-role,
.job-skills {
	margin-bottom: 1.5rem;

	& h2 {
		display: flex;
		align-items: center;
		gap: 0.5rem;
		font-weight: 600;
		color: var(--heading-color);
		margin-bottom: 1rem;
		font-size: 16px;

		& i {
			color: var(--primary-color);
		}
	}
}

/* Requirements List */
.requirements-list {
	list-style: none;
	padding: 0;
	margin: 0;

	& li {
		display: flex;
		gap: 1rem;
		margin-bottom: 1rem;
		padding-bottom: 1rem;
		border-bottom: 1px solid var(--border-color);

		&:last-child {
			border-bottom: none;
			padding-bottom: 0;
		}

		& .requirement-icon {
			width: 2rem;
			height: 2rem;
			min-width: 2rem;
			display: flex;
			align-items: center;
			justify-content: center;
			background-color: var(--primary-light);
			color: var(--primary-color);
			border-radius: 50%;
		}

		& .requirement-text {
			flex: 1;
			display: flex;
			align-items: center;
		}
	}
}

/* Responsibilities List */
.responsibilities-list {
	padding-left: 1.5rem;

	& li {
		margin-bottom: 0.75rem;
		position: relative;

		&:before {
			content: '';
			position: absolute;
			width: 0.5rem;
			height: 0.5rem;
			border-radius: 50%;
			background-color: var(--primary-color);
			left: -1.5rem;
			top: 0.5rem;
		}
	}
}

/* ===== Benefits Section ===== */
.benefits-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;

	& .benefit-item {
		padding: 1.5rem;
		background-color: var(--background-alt);
		border-radius: 0.5rem;
		transition: var(--transition-default);
		text-align: center;

		&:hover {
			transform: translateY(-5px);
			box-shadow: var(--card-shadow);
		}

		& .benefit-icon {
			width: 3rem;
			height: 3rem;
			display: flex;
			align-items: center;
			justify-content: center;
			background-color: var(--primary-light);
			color: var(--primary-color);
			border-radius: 50%;
			margin: 0 auto 1rem;
			font-size: 1.25rem;
		}

		& .benefit-title {
			font-weight: 600;
			font-size: 1rem;
			margin-bottom: 0.5rem;
			color: var(--heading-color);
		}

		& .benefit-desc {
			font-size: 0.875rem;
			color: var(--text-color-secondary);
		}
	}
}

/* ===== Contact Card ===== */
.contact-card {
	padding: 1.5rem;
	overflow: hidden;
	border-radius: 0.75rem;

	& .contact-info-wrapper {
		display: flex;
		flex-direction: row;
		align-items: center;
		gap: 2rem;
		margin-bottom: 1.5rem;

		& .contact-image {
			width: 6rem;
			height: 6rem;
			overflow: hidden;
			border-radius: 50%;
			border: 3px solid var(--primary-color);
			padding: 0.25rem;
			flex-shrink: 0;

			& img {
				width: 100%;
				height: 100%;
				object-fit: cover;
				border-radius: 50%;
			}
		}

		& .contact-details {
			flex: 1;

			h2{
				margin: 0;
				color: #666666;
			}

			& .contact-name {
				font-size: 1.25rem;
				font-weight: 600;
				color: var(--heading-color);
				margin: 0 0 0.75rem 0;
			}

			& .contact-list {
				list-style: none;
				padding: 0;
				margin: 0;
				display: flex;
				flex-direction: column;
				gap: 0.75rem;

				& li {
					display: flex;
					align-items: center;
					gap: 0.5rem;

					& i {
						color: var(--primary-color);
					}

					& a {
						color: var(--text-color);
						text-decoration: none;
						transition: var(--transition-default);

						&:hover {
							color: var(--primary-color);
						}
					}
				}
			}
		}
	}
}

/* ===== Apply Section ===== */
.apply-section {
	background-color: #666666;
	color: white;
	padding: 3rem 2rem;
	border-radius: var(--card-radius);
	margin-top: 2rem;
	margin-bottom: 2rem;
	box-shadow: var(--card-shadow);

	& .apply-container {
		max-width: 800px;
		margin: 0 auto;
		text-align: center;

		& .apply-heading {
			margin-bottom: 2rem;

			& h3 {
				font-size: 1.75rem;
				font-weight: 600;
				margin-bottom: 0.75rem;
				color: white;
			}

			& p {
				opacity: 0.9;
			}
		}

		& .apply-buttons {
			display: flex;
			gap: 1rem;
			justify-content: center;
			flex-wrap: wrap;

			& .btn-lg.apply-btn {
				background-color: white;
				color: #666666;
				border-color: white;
				font-weight: 600;
				padding: 0.75rem 2rem;
				border-radius: 2rem;
				display: inline-flex;
				align-items: center;
				gap: 0.5rem;
				transition: var(--transition-default);

				&:hover, &:focus {
					background-color: rgba(255, 255, 255, 0.9);
					border-color: rgba(255, 255, 255, 0.9);
					transform: translateY(-3px);
					box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
					color: var(--primary-color);
				}
			}

			& .btn-lg.email-btn {
				background-color: transparent;
				color: white;
				border: 2px solid rgba(255, 255, 255, 0.5);
				font-weight: 600;
				padding: 0.75rem 2rem;
				border-radius: 2rem;
				display: inline-flex;
				align-items: center;
				gap: 0.5rem;
				transition: var(--transition-default);

				&:hover, &:focus {
					background-color: var(--primary-color);
					border-color: white;
					transform: translateY(-3px);
				}
			}
		}
	}
}

/* ===== Responsive Adjustments ===== */
@media (min-width: 768px) {
	.job-hero-content {
		padding: 2.5rem;
	}

	.job-tabs > li > a {
		padding: 0.75rem 1.25rem;
		font-size: 1.25rem;
	}
}


@media (max-width: 430px) {
	.job-hero {
		.job-hero-content {
			.job-actions-top {
				justify-content: center;
				flex-wrap: wrap;
				a{
					width: 100%;
				}
			}
		}

		.job-tabs-container{
			.tab-inner{
				padding: 1rem;
				.content-card.contact-card{
					padding: 0;
				}
			}
		}
	}

}


@media (max-width: 767px) {
	.job-hero {
		flex-direction: column; /* Stack on mobile */

		& .job-hero-image-container {
			width: 100%;

			& .job-hero-image {
				height: 100%;
				object-fit: contain;
			}
		}

		& .job-hero-content {
			width: 100%;
			padding: 1.5rem;
		}
	}

	.job-tabs > li > a {
		padding: 0.5rem 0.75rem;
		font-size: 0.875rem;
	}

	.tab-inner {
		padding: 1.5rem;
	}

	.benefits-grid {
		grid-template-columns: 1fr;
	}

	.contact-info-wrapper {
		flex-direction: column;
		text-align: center;
		gap: 1rem;

		& .contact-list li {
			justify-content: center;
		}
	}

	.apply-buttons {
		flex-direction: column;
	}
}

/* ===== Fallback Support ===== */
@supports not (--test: orange) {
	.back-button:hover, .back-button:focus {
		background-color: rgba(136, 184, 0, 0.1);
		color: #88b800;
		border-color: #88b800;
	}

	.job-tabs > li.active > a {
		color: #88b800;
		border-bottom: 3px solid #88b800;
	}

	.section-title:after {
		background-color: #88b800;
	}

	.benefit-icon, .requirement-icon {
		background-color: rgba(136, 184, 0, 0.1);
		color: #88b800;
	}
}
