/*
 * Chuknoo theme – WCAG 2.1 AA overrides.
 * Loaded after style.css so it wins without editing the original rules.
 * Colour values were chosen to keep the brand gold/orange while meeting
 * 4.5:1 (normal text) or 3:1 (large text / UI components).
 */

/* ---------- 2.4.1 Bypass Blocks: skip link ---------- */
.skip-link {
	position: absolute;
	left: 10px;
	top: -100px;
	z-index: 10000;
	padding: 10px 16px;
	background: #0c252b;
	color: #fff;
	font-weight: 700;
	border: 2px solid #f6b220;
}
.skip-link:focus {
	top: 10px;
	color: #fff;
	text-decoration: underline;
}
#main-content:focus {
	outline: none;
}

/* ---------- 2.4.7 Focus Visible ----------
 * Two-tone ring (white outline + dark halo) stays visible on the dark header,
 * the gold bars and white content alike. */
a:focus,
button:focus,
input:focus,
select:focus,
textarea:focus,
[tabindex]:focus,
.test-tabs a:focus,
.navbar-inverse .navbar-nav > li > a:focus,
.btn:focus {
	outline: 2px solid #fff;
	outline-offset: 0;
	box-shadow: 0 0 0 5px #0c252b;
}
#main-content:focus {
	box-shadow: none;
}

/* ---------- 1.4.3 Contrast: navigation ---------- */
/* Was white on #f6b220 (1.85:1); dark text on gold is 8.6:1. */
.navbar-inverse .navbar-nav > li > a:focus,
.navbar-inverse .navbar-nav > li > a:hover,
.navbar-inverse .navbar-nav > .active > a,
.navbar-inverse .navbar-nav > .active > a:hover,
.navbar-inverse .navbar-nav > .active > a:focus,
.navbar-inverse .navbar-nav > .open > a,
.navbar-inverse .navbar-nav > .open > a:focus,
.navbar-inverse .navbar-nav > .open > a:hover {
	color: #0c252b;
}
/* Home icon sits on the dark header, keep it white. */
.navbar-inverse .navbar-nav > li:first-child > a,
.navbar-inverse .navbar-nav > li:first-child > a:hover,
.navbar-inverse .navbar-nav > li:first-child > a:focus,
.navbar-inverse .navbar-nav > li:first-child.active > a {
	color: #fff;
}
.top-link ul li a:hover,
.top-link ul li a:focus {
	color: #0c252b;
	text-decoration: underline;
}
.footer-navigation li a:hover,
.footer-navigation li a:focus {
	color: #000;
	text-decoration: underline;
}
.footer_bottom .market ul li a:hover,
.footer_bottom .market ul li a:focus {
	text-decoration: underline;
}

/* ---------- 1.4.3 Contrast: content ---------- */
/* Bootstrap link blue #337ab7 fell below 4.5:1 on the grey/blue panels. */
main a {
	color: #23527c;
}
main a:hover,
main a:focus {
	color: #0c252b;
}
/* 1.4.1 Use of Color: links inside text are underlined, not colour-only. */
main p a,
main li a,
main td a,
.alert a {
	text-decoration: underline;
}
/* "WELCOME" heading: gold on white was 1.85:1. */
.welcome-text h1 {
	color: #8a5b00;
}
/* "View/Download PDF" links: gold on white was 1.85:1. */
.welcome .view-pdf a {
	color: #8a5b00;
}
/* Orange sub-headings (#f5821f, 2.59:1) on Contact Us and other pages. */
.about-institute h4:not([class*="was-h"]), .about-institute .was-h4  {
	color: #a64b00;
}
.content-container h4:not([class*="was-h"]), .content-container .was-h4  {
	color: #a64b00 !important;
}
p.title {
	color: #595959;
}
/* Bootstrap .btn-warning: white on #f0ad4e was 1.94:1. */
.btn-warning,
.btn-warning:hover,
.btn-warning:focus,
.btn-warning:active {
	color: #0c252b;
}

/* ---------- 1.3.1 Headings: new semantic levels, old look ---------- */
.inner-head h1 {
	font-family: 'Roboto Condensed', sans-serif;
	position: relative;
	color: #fff;
	font-size: 3em;
	font-weight: 900;
	text-transform: capitalize;
	margin: 0;
	text-align: center;
	text-shadow: 1px 1px 3px rgba(0, 0, 0, 0.46);
}
.footer_bottom .market h2 {
	color: #f6b220;
}

/* ---------- 2.2.2 Pause, Stop, Hide: replaces the <marquee> ---------- */
.notice-links {
	list-style: none;
	margin: 0;
	padding: 8px 10px;
	background: #dbd2a5;
	text-align: center;
}
.notice-links li {
	display: inline-block;
	margin: 0 20px;
}
.notice-links a {
	color: #000;
	font-size: 18px;
	font-weight: 500;
}

/* ---------- Slider controls ---------- */
.banner {
	position: relative;
}
.slider-toggle {
	position: absolute;
	right: 10px;
	bottom: 10px;
	z-index: 50;
	padding: 5px 12px;
	background: #0c252b;
	color: #fff;
	border: 2px solid #fff;
	border-radius: 3px;
	font-size: 14px;
}
.slider-toggle:hover {
	background: #000;
}
/* Prev/next arrows were only visible on mouse hover. */
.theme-default .nivo-directionNav a:focus,
.slider-wrapper:focus-within .nivo-directionNav a {
	opacity: 1;
}

/* ---------- 1.4.10 Reflow (320 CSS px) ---------- */
/* Long URLs / unbroken strings in page content must wrap, not widen the page. */
main {
	word-wrap: break-word;
	overflow-wrap: break-word;
}
main a,
main b,
main strong {
	overflow-wrap: anywhere;
}
.table-scroll {
	position: relative; /* keeps absolutely-positioned .sr-only text inside the scroll box */
	max-width: 100%;
	overflow-x: auto;
}

@media (max-width: 991px) {
	.welcome-text p {
		padding: 0 15px;
	}
}
@media (max-width: 767px) {
	.topnav {
		margin-left: 0;
	}
	.topnav:before {
		display: none;
	}
	.welcome-text h1 {
		font-size: 40px;
	}
	.inner-head h1 {
		font-size: 2em;
	}
	.notice-links li {
		display: block;
		margin: 4px 0;
	}
	main img {
		max-width: 100%;
		height: auto;
	}
	main iframe {
		max-width: 100%;
	}
}

/* ---------- Motion ---------- */
@media (prefers-reduced-motion: reduce) {
	*,
	*::before,
	*::after {
		transition-duration: 0.01ms !important;
		animation-duration: 0.01ms !important;
	}
	.social-circle li a:hover i {
		transform: none;
	}
}

/* ---------- Content structure fixes (inc/a11y-content.php) ---------- */
/* Table captions created from merged title rows: keep the old centred, bold
 * look (Bootstrap's grey #777 caption text is below 4.5:1). */
main caption {
	caption-side: top;
	padding: 8px;
	color: #333;
	font-weight: 700;
	text-align: center;
}
/* Vernacular downloads: was a 3-column table of links, now a list. */
.link-grid-title {
	margin: 0;
	padding: 8px;
	border: 1px solid #ddd;
	border-bottom: 0;
	font-size: 15px;
	font-weight: 700;
	text-align: center;
}
.link-grid ul {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	margin: 0 0 20px;
	padding: 0;
	list-style: none;
	border-top: 1px solid #ddd;
	border-left: 1px solid #ddd;
}
.link-grid li {
	padding: 8px;
	border-right: 1px solid #ddd;
	border-bottom: 1px solid #ddd;
}
.link-grid li:nth-child(6n+1),
.link-grid li:nth-child(6n+2),
.link-grid li:nth-child(6n+3) {
	background: #f9f9f9;
}
@media (max-width: 479px) {
	.link-grid ul {
		grid-template-columns: 1fr 1fr;
	}
}
/* Site map: group headings that used to be dead "#" links. */
.sitemap-group {
	display: inline-block;
	font-weight: 700;
	color: #0c252b;
}

/* ---------- Forms (Contact Form 7) ---------- */
.cf7-label {
	display: block;
	margin: 10px 0 4px;
	font-weight: 700;
}
.required-mark {
	color: #a01818;
}
.cf7-required-note {
	margin: 10px 0;
	font-style: italic;
}
