/* =========================================================================
   AB Engineering Entrance Exams Apply Portal Stylesheet
   Loaded ONLY on the /top-engineering-entrance-exams-apply/ post.
   ========================================================================= */

#ab-exams-apply {
	--ab-navy: #081225;
	--ab-navy-soft: #0f2245;
	--ab-blue: #2563eb;
	--ab-blue-soft: rgba(37, 99, 235, 0.08);
	--ab-orange: #ea580c;
	--ab-muted: #64748b;
	--ab-line: #e2e8f0;
	--ab-radius-lg: 16px;
	--ab-radius-md: 10px;
	--ab-shadow: 0 4px 15px -3px rgba(15, 23, 42, 0.05), 0 2px 6px -2px rgba(15, 23, 42, 0.03);
	--ab-shadow-hover: 0 10px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 16px -6px rgba(15, 23, 42, 0.05);
	--ab-font: "Inter", ui-sans-serif, system-ui, sans-serif;

	font-family: var(--ab-font);
	-webkit-font-smoothing: antialiased;
	color: #1e293b;
	background: #f8fafc;
	min-height: 100vh;
	width: auto;
	max-width: 100%;
	overflow: hidden;
}

#ab-exams-apply * {
	box-sizing: border-box;
}

#ab-exams-apply .ab-wrap {
	max-width: 1200px;
	margin: 0 auto;
	padding: 0 24px;
}

/* ---------- 1. HEADER BANNER ---------- */
.ab-exams-hero {
	background: radial-gradient(circle at 100% 0%, var(--ab-navy-soft) 0%, transparent 40%),
		linear-gradient(135deg, #020617 0%, var(--ab-navy) 100%);
	padding: 80px 0;
	color: #ffffff;
	position: relative;
	overflow: hidden;
	/* Breakout from single post content widths */
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
}

.ab-exams-hero .ab-eyebrow {
	font-size: 11px;
	font-weight: 800;
	text-transform: uppercase;
	color: #60a5fa;
	letter-spacing: 0.1em;
	display: block;
	margin-bottom: 12px;
}

.ab-exams-hero .ab-title {
	font-family: var(--ab-font);
	font-size: 33px;
	font-weight: 800;
	line-height: 1.25;
	margin: 0 0 16px !important;
	color: #ffffff !important;
	letter-spacing: -0.02em;
}

.ab-exams-hero .ab-desc {
	font-size: 16px;
	color: #94a3b8;
	line-height: 1.6;
	max-width: 680px;
	margin: 0;
}

.ab-hero-flex {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 40px;
	position: relative;
}

.ab-hero-text {
	flex: 1;
	max-width: 740px;
}

/* Feature benefit pills */
.ab-hero-stats-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px;
	margin-top: 24px;
}

.ab-hero-stat-pill {
	display: inline-flex;
	align-items: center;
	gap: 8px;
	background: rgba(255, 255, 255, 0.04);
	backdrop-filter: blur(8px);
	-webkit-backdrop-filter: blur(8px);
	border: 1px solid rgba(255, 255, 255, 0.08);
	padding: 6px 14px;
	border-radius: 99px;
	transition: all 0.25s ease;
}

.ab-hero-stat-pill:hover {
	background: rgba(255, 255, 255, 0.09);
	border-color: rgba(96, 165, 250, 0.3);
	transform: translateY(-1.5px);
}

.ab-hero-stat-pill .stat-icon {
	font-size: 13px;
}

.ab-hero-stat-pill .stat-text {
	font-size: 12.5px;
	font-weight: 700;
	color: #94a3b8;
	letter-spacing: 0.02em;
	transition: color 0.2s ease;
}

.ab-hero-stat-pill:hover .stat-text {
	color: #ffffff;
}

.ab-hero-brand-image {
	display: flex;
	align-items: flex-end;
	justify-content: center;
	flex-shrink: 0;
	position: relative;
	margin-top: -30px;
	margin-bottom: -60px;
	z-index: 2;
}

/* Radial aura glow behind transparent cut-out image */
.ab-hero-brand-image::before {
	content: '';
	position: absolute;
	width: 280px;
	height: 280px;
	background: radial-gradient(circle, rgba(96, 165, 250, 0.18) 0%, rgba(37, 99, 235, 0.02) 60%, transparent 70%);
	bottom: 20px;
	left: 50%;
	transform: translateX(-50%);
	z-index: -1;
	pointer-events: none;
}

.brand-avatar-img {
	width: 300px; /* Scaled up proportion */
	height: auto;
	object-fit: contain;
	border: none !important;
	border-radius: 0 !important;
	box-shadow: none !important;
	background: transparent !important;
	filter: drop-shadow(0 15px 30px rgba(0, 0, 0, 0.35));
	transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
	display: block;
}

.brand-avatar-img:hover {
	transform: translateY(-5px) scale(1.02);
	filter: drop-shadow(0 20px 45px rgba(0, 0, 0, 0.45));
}

@media (max-width: 991px) {
	.brand-avatar-img {
		width: 240px;
	}
	.ab-hero-brand-image::before {
		width: 220px;
		height: 220px;
	}
	.ab-hero-brand-image {
		margin-bottom: -60px;
	}
}

@media (max-width: 768px) {
	.ab-hero-flex {
		flex-direction: column;
		text-align: center;
		gap: 30px;
	}
	.ab-hero-text {
		max-width: 100%;
	}
	.ab-hero-stats-row {
		justify-content: center;
	}
	.ab-hero-brand-image {
		margin: 0;
		align-self: center;
	}
	.brand-avatar-img {
		width: 210px;
	}
}

/* ---------- 2. DIRECT ADMISSION CARDS ---------- */
.ab-direct-admission-section {
	padding: 50px 0 30px;
}

.ab-direct-admission-section .ab-section-header {
	margin-bottom: 24px;
}

.ab-direct-admission-section .ab-section-header h3 {
	font-size: 18px !important;
	font-weight: 800 !important;
	color: var(--ab-navy) !important;
	margin: 0 0 6px !important;
}

.ab-direct-admission-section .ab-section-header p {
	font-size: 13.5px;
	color: var(--ab-muted);
	margin: 0;
}

.ab-direct-cards {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 20px;
}

.ab-direct-card {
	background: #ffffff;
	border: 1px solid var(--ab-line);
	border-radius: var(--ab-radius-md);
	padding: 20px;
	text-decoration: none !important;
	display: flex;
	flex-direction: column;
	transition: all 0.25s ease;
	box-shadow: var(--ab-shadow);
}

.ab-direct-card:hover {
	transform: translateY(-4px);
	box-shadow: var(--ab-shadow-hover);
	border-color: rgba(37, 99, 235, 0.2);
}

.direct-badge {
	font-size: 9.5px;
	font-weight: 800;
	padding: 3px 8px;
	border-radius: 4px;
	align-self: flex-start;
	margin-bottom: 12px;
	text-transform: uppercase;
	letter-spacing: 0.04em;
}

.bg-wbjee { background: rgba(22, 163, 74, 0.08); color: #16a34a; }
.bg-uptac { background: rgba(37, 99, 235, 0.08); color: #2563eb; }
.bg-comedk { background: rgba(124, 58, 237, 0.08); color: #7c3aed; }
.bg-other { background: rgba(234, 88, 12, 0.08); color: #ea580c; }

.ab-direct-card h4 {
	font-size: 14.5px !important;
	font-weight: 800 !important;
	color: var(--ab-navy) !important;
	margin: 0 0 6px !important;
	line-height: 1.3 !important;
}

.ab-direct-card p {
	font-size: 12.5px;
	color: var(--ab-muted);
	line-height: 1.45;
	margin: 0 0 16px !important;
	flex-grow: 1;
}

.direct-cta {
	font-size: 12.5px;
	font-weight: 800;
	color: var(--ab-blue);
	transition: transform 0.2s ease;
}

.ab-direct-card:hover .direct-cta {
	transform: translateX(4px);
}

/* ---------- 3. TABLE FILTER CONTROLS ---------- */
.ab-directory-table-section {
	padding: 30px 0 60px;
}

.ab-table-controls {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 24px;
	gap: 16px;
}

.ab-table-tabs {
	display: flex;
	gap: 8px;
	overflow-x: auto;
	padding-bottom: 4px;
}

.ab-table-tabs::-webkit-scrollbar {
	display: none;
}

#ab-exams-apply .ab-tab-btn {
	background: #ffffff !important;
	border: 1px solid var(--ab-line) !important;
	border-radius: 999px !important;
	padding: 8px 16px !important;
	font-size: 13px !important;
	font-weight: 600 !important;
	color: var(--ab-muted) !important;
	cursor: pointer !important;
	transition: all 0.2s ease !important;
	white-space: nowrap !important;
}

#ab-exams-apply .ab-tab-btn:hover {
	color: var(--ab-navy) !important;
	border-color: #cbd5e1 !important;
}

#ab-exams-apply .ab-tab-btn.active {
	background: var(--ab-blue) !important;
	border-color: var(--ab-blue) !important;
	color: #ffffff !important;
	box-shadow: 0 4px 10px rgba(37, 99, 235, 0.2) !important;
}

.ab-table-search-wrapper {
	width: 300px;
	flex-shrink: 0;
}

#ab-exam-search {
	width: 100%;
	padding: 10px 18px;
	border: 1px solid var(--ab-line);
	border-radius: 999px;
	font-size: 13.5px;
	outline: none;
	transition: all 0.25s ease;
	box-shadow: var(--ab-shadow);
}

#ab-exam-search:focus {
	border-color: var(--ab-blue);
	box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

/* ---------- 4. DATATABLE CARD ---------- */
.ab-table-card {
	background: #ffffff;
	border: 1px solid var(--ab-line);
	border-radius: var(--ab-radius-lg);
	box-shadow: var(--ab-shadow);
	overflow: hidden;
}

.ab-table-wrapper {
	overflow-x: auto;
}

.ab-exams-table {
	width: 100%;
	border-collapse: collapse;
	text-align: left;
}

#ab-exams-apply .ab-exams-table th {
	background: #f8fafc !important;
	padding: 16px 24px !important;
	font-size: 11px !important;
	font-weight: 700 !important;
	text-transform: uppercase !important;
	color: var(--ab-muted) !important;
	letter-spacing: 0.05em !important;
	border-bottom: 1.5px solid var(--ab-line) !important;
}

.ab-exams-table td {
	padding: 18px 24px;
	border-bottom: 1px solid var(--ab-line);
	vertical-align: middle;
}

.ab-exams-table tr:last-child td {
	border-bottom: none;
}

/* Exam Info Cell */
.ab-exam-meta-cell {
	display: flex;
	align-items: center;
	gap: 14px;
}

.ab-exam-badge-circle {
	width: 42px;
	height: 42px;
	border-radius: 50%;
	display: flex;
	align-items: center;
	justify-content: center;
	font-weight: 850;
	font-size: 12px;
	flex-shrink: 0;
}

.ab-exam-name-details {
	display: flex;
	flex-direction: column;
	gap: 4px;
}

.exam-title-text {
	font-size: 15px;
	font-weight: 800;
	color: var(--ab-navy);
}

.exam-classification-tag {
	font-size: 9px;
	font-weight: 800;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	padding: 2px 6px;
	border-radius: 4px;
	align-self: flex-start;
}

.exam-classification-tag.national { background: rgba(37, 99, 235, 0.06); color: var(--ab-blue); }
.exam-classification-tag.state { background: rgba(16, 185, 129, 0.06); color: #10b981; }
.exam-classification-tag.private { background: rgba(219, 39, 119, 0.06); color: #db2777; }
.exam-classification-tag.college-specific { background: rgba(109, 40, 217, 0.06); color: #6d28d9; }

/* Dates Cell */
.ab-exam-date-cell {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.exam-dates-value {
	font-size: 13.5px;
	font-weight: 600;
	color: #334155;
	line-height: 1.4;
}

.status-badge {
	font-size: 9.5px;
	font-weight: 800;
	text-transform: uppercase;
	padding: 2px 8px;
	border-radius: 999px;
	align-self: flex-start;
}

.status-badge.status-open { background: rgba(34, 197, 94, 0.1); color: #16a34a; }
.status-badge.status-closed { background: rgba(239, 68, 68, 0.08); color: #ef4444; }
.status-badge.status-pending { background: rgba(245, 158, 11L, 0.1); color: #d97706; }

/* Actions Cell */
.ab-exam-actions-cell {
	display: flex;
	align-items: center;
	justify-content: flex-end;
	gap: 8px;
}

.ab-btn-apply {
	background: var(--ab-blue);
	color: #ffffff !important;
	font-size: 12.5px;
	font-weight: 800;
	text-decoration: none !important;
	padding: 8px 16px;
	border-radius: 999px;
	transition: all 0.2s ease;
	box-shadow: 0 3px 8px rgba(37, 99, 235, 0.18);
	text-transform: uppercase;
	letter-spacing: 0.02em;
	display: inline-block;
}

.ab-btn-apply:hover {
	background: #1d4ed8;
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(37, 99, 235, 0.28);
}

.ab-btn-info {
	background: #f1f5f9;
	color: #334155 !important;
	border: 1px solid var(--ab-line);
	font-size: 12.5px;
	font-weight: 700;
	text-decoration: none !important;
	padding: 7px 16px;
	border-radius: 999px;
	transition: all 0.2s ease;
	display: inline-block;
}

.ab-btn-info:hover {
	background: #e2e8f0;
	color: var(--ab-navy) !important;
}

.ab-apply-disabled {
	font-size: 12px;
	color: var(--ab-muted);
	font-weight: 600;
	padding: 8px 16px;
}

/* Empty Matches */
.ab-no-matches-alert {
	padding: 40px;
	text-align: center;
	font-size: 14.5px;
	color: var(--ab-muted);
}

/* ---------- 5. INTEGRATED MEDIA SECTION ---------- */
.ab-exams-media-section {
	padding: 50px 0 80px;
	background: #ffffff;
	width: 100vw;
	margin-left: calc(50% - 50vw);
	margin-right: calc(50% - 50vw);
	border-top: 1px solid var(--ab-line);
}

.ab-media-grid {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 36px;
}

.ab-media-card {
	display: flex;
	flex-direction: column;
}

.ab-media-card h3 {
	font-size: 18px !important;
	font-weight: 800 !important;
	color: var(--ab-navy) !important;
	margin: 0 0 8px !important;
}

.ab-media-card p {
	font-size: 13.5px;
	color: var(--ab-muted);
	line-height: 1.5;
	margin: 0 0 20px !important;
}

/* Video embed container */
.video-container {
	position: relative;
	width: 100%;
	aspect-ratio: 16/9;
	border-radius: var(--ab-radius-md);
	overflow: hidden;
	box-shadow: var(--ab-shadow);
	border: 1px solid var(--ab-line);
}

.video-container iframe {
	position: absolute;
	top: 0;
	left: 0;
	width: 100%;
	height: 100%;
}

/* PDF Download Flex layout */
.download-flex {
	display: flex;
	gap: 20px;
	background: #f8fafc;
	border: 1px solid var(--ab-line);
	border-radius: var(--ab-radius-lg);
	padding: 24px;
	margin-bottom: 24px;
	box-shadow: var(--ab-shadow);
}

.pdf-icon-box {
	width: 54px;
	height: 54px;
	background: rgba(239, 68, 68, 0.08);
	color: #ef4444;
	border-radius: 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.pdf-icon-box svg {
	width: 28px;
	height: 28px;
}

.download-info {
	display: flex;
	flex-direction: column;
	gap: 6px;
}

.download-info h3 {
	font-size: 15.5px !important;
	margin: 0 !important;
}

.download-info p {
	font-size: 12.5px;
	margin-bottom: 12px !important;
}

.ab-btn-download {
	background: #ef4444;
	color: #ffffff !important;
	font-size: 13px;
	font-weight: 800;
	text-decoration: none !important;
	padding: 10px 20px;
	border-radius: 8px;
	align-self: flex-start;
	transition: all 0.2s ease;
	box-shadow: 0 4px 10px rgba(239, 68, 68, 0.2);
}

.ab-btn-download:hover {
	background: #dc2626;
	transform: translateY(-1px);
	box-shadow: 0 6px 14px rgba(239, 68, 68, 0.3);
}

/* Quick links tiles */
.ab-quick-tiles {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 12px;
}

.ab-quick-tiles a {
	background: #ffffff;
	border: 1px solid var(--ab-line);
	border-radius: 8px;
	padding: 10px;
	font-size: 12px;
	font-weight: 700;
	color: var(--ab-navy);
	text-decoration: none !important;
	text-align: center;
	transition: all 0.2s ease;
	box-shadow: 0 2px 5px rgba(0,0,0,0.02);
}

.ab-quick-tiles a:hover {
	border-color: var(--ab-blue);
	color: var(--ab-blue);
	box-shadow: var(--ab-shadow);
	transform: translateY(-1px);
}

/* ---------- 6. RESPONSIVE DESIGN ---------- */
@media (max-width: 991px) {
	.ab-direct-cards {
		grid-template-columns: repeat(2, 1fr);
	}
	.ab-media-grid {
		grid-template-columns: 1fr;
		gap: 40px;
	}
}

@media (max-width: 768px) {
	.ab-exams-hero {
		padding: 60px 0;
	}
	.ab-exams-hero .ab-title {
		font-size: 28px;
	}
	.ab-table-controls {
		flex-direction: column;
		align-items: stretch;
	}
	.ab-table-search-wrapper {
		width: 100%;
	}
	
	/* Force table to render as cards */
	.ab-exams-table thead {
		display: none;
	}
	.ab-exams-table tr {
		display: flex;
		flex-direction: column;
		gap: 14px;
		padding: 20px;
		border-bottom: 1.5px solid var(--ab-line);
	}
	.ab-exams-table td {
		padding: 0;
		border: none;
	}
	.ab-exam-actions-cell {
		justify-content: flex-start;
		margin-top: 4px;
	}
}

@media (max-width: 480px) {
	.ab-direct-cards {
		grid-template-columns: 1fr;
	}
	.ab-quick-tiles {
		grid-template-columns: repeat(2, 1fr);
	}
	.download-flex {
		flex-direction: column;
		gap: 16px;
	}
}
