/* Responsive layout — preserves legacy table structure and visual design */

*,
*::before,
*::after {
	box-sizing: border-box;
}

html {
	-webkit-text-size-adjust: 100%;
}

body {
	min-width: 0;
	background: #ffffff linear-gradient(#ececec, #ffffff 320px) no-repeat;
}

/* Grey backdrop behind the home banner; its edge lines up with the banner bottom (y = 400) */
.page-home {
	background: #ffffff url(../images/main-body-back.jpg) repeat-x 0 0;
}

.nowrap {
	white-space: nowrap;
}

/* Header — full-width bands, so the blue rule is one continuous line.
   Desktop height is 16 + 108 + 3 + 41 = 168px to match main-body-back.jpg. */
.site-header {
	position: relative;
	width: 100%;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}

.site-topbar {
	background: linear-gradient(#4a4a4a, #1f1f1f);
}

.site-topbar__inner {
	height: 16px;
	padding: 0 8px;
	overflow: hidden;
	color: #e6e6e6;
	font-size: 10px;
	line-height: 16px;
	text-align: center;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.site-header__brand {
	background: #ffffff;
	border-bottom: 3px solid #01538b;
}

.site-header__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 14px;
	max-width: 900px;
	height: 108px;
	margin: 0 auto;
}

.site-header__logo {
	flex: 0 0 auto;
	line-height: 0;
}

.site-header__logo img {
	display: block;
	width: 376px;
	max-width: 100%;
	height: auto;
}

.site-certs {
	display: grid;
	grid-template-columns: 66px 60px 60px 66px 92px 88px;
	grid-template-rows: 50px 40px;
	gap: 6px 10px;
	flex: 0 0 auto;
	margin: 0;
	padding: 0;
	list-style: none;
}

.site-certs__item {
	display: flex;
	align-items: center;
	justify-content: center;
	min-width: 0;
	min-height: 0;
}

.site-certs__item img {
	display: block;
	width: auto;
	height: auto;
	max-width: 100%;
	max-height: 100%;
}

/* Main nav */
.site-nav {
	background: #a6daff linear-gradient(#d8efff, #a6daff);
}

.site-nav__list {
	display: flex;
	flex-wrap: wrap;
	max-width: 900px;
	margin: 0 auto;
	padding: 0;
	list-style: none;
}

.site-nav__item {
	flex: 1 1 auto;
}

.site-nav__link {
	display: block;
	height: 41px;
	padding: 0 10px;
	color: #2c4a66;
	font-size: 11px;
	font-weight: bold;
	line-height: 41px;
	text-align: center;
	text-decoration: none;
	text-transform: uppercase;
	white-space: nowrap;
}

.site-nav__link:hover,
.site-nav__link:focus-visible,
.site-nav__link.is-active {
	background: rgba(30, 70, 110, 0.14);
	color: #1a2f4a;
}

.site-nav__link:focus-visible {
	outline: 2px solid #01538b;
	outline-offset: -3px;
}

/* Page body */
.site-shell {
	width: 100%;
	padding: 0 8px;
}

.site-main {
	width: 100% !important;
	max-width: 900px;
	margin-left: auto;
	margin-right: auto;
}

.site-main > tbody > tr > td {
	padding: 0;
}

.site-main img:not([src*="spacer.gif"]) {
	max-width: 100%;
	height: auto;
}

/* Standards mode gives inline images a text line box, which stretched the
   1px spacer rows into 18px bars. Block display restores the real heights. */
.site-main img[src*="spacer.gif"] {
	display: block;
}

.site-main a > img {
	vertical-align: bottom;
}

.site-certs__item--ce img {
	max-height: 74%;
}

.txt,
.site-main li,
.contact-details {
	text-align: left;
}

.contact-details td {
	text-align: left;
}

.contact-details a,
.txt a:not([class]) {
	color: #006699;
}

/* Home flash banner (replaces legacy Flash SWF) */
.site-flash {
	position: relative;
	width: 100%;
	max-width: 900px;
	height: 232px;
	overflow: hidden;
	background: #003a5c;
	line-height: 0;
}

.site-flash__track {
	position: relative;
	width: 100%;
	height: 100%;
}

.site-flash__slide {
	position: absolute;
	inset: 0;
	width: 100%;
	height: 100%;
	object-fit: cover;
	opacity: 0;
	transition: opacity 0.7s ease;
}

.site-flash__slide.is-active {
	opacity: 1;
	z-index: 1;
}

.site-flash__dots {
	position: absolute;
	left: 0;
	right: 0;
	bottom: 10px;
	z-index: 2;
	display: flex;
	justify-content: center;
	gap: 6px;
}

.site-flash__dot {
	width: 8px;
	height: 8px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: rgba(255, 255, 255, 0.45);
	cursor: pointer;
}

.site-flash__dot.is-active {
	background: #ffffff;
}

@media (max-width: 900px) {
	.site-flash {
		height: auto;
		aspect-ratio: 900 / 232;
	}
}

/* Footer */
.site-footer {
	margin-top: 12px;
	border-top: 1px solid #d1d1d1;
	background: #efefef linear-gradient(#f6f6f6, #e9e9e9);
}

.site-footer__inner {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px 16px;
	max-width: 916px;
	margin: 0 auto;
	padding: 10px 8px;
}

.site-footer__logo {
	flex: 0 0 auto;
	line-height: 0;
}

/* Multiply drops the white box of the JPEG logo on the grey bar */
.site-footer__logo img {
	display: block;
	mix-blend-mode: multiply;
}

.site-footer__brands {
	display: flex;
	flex: 0 0 auto;
	flex-wrap: nowrap;
	align-items: center;
	justify-content: center;
	gap: 8px 14px;
}

.site-footer__logo img {
	width: 160px;
	height: auto;
}

.site-footer__logo--brand img {
	width: 118px;
	mix-blend-mode: normal;
}

.site-footer__logo--brand {
	padding: 4px 0 4px 14px;
	border-left: 1px solid #cfcfcf;
}

/* AMRUT brand mark beside the Company Profile intro */
.site-main img.brand-logo-inline {
	float: right;
	width: 160px;
	height: auto;
	margin: 4px 0 8px 18px;
}

.site-footer__nav {
	flex: 1 1 auto;
	min-width: 0;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 6px;
}

.site-footer__links {
	display: flex;
	flex-wrap: wrap;
	justify-content: flex-end;
	gap: 4px 0;
	margin: 0;
	padding: 0;
	list-style: none;
	line-height: 16px;
}

.site-footer__links li + li {
	margin-left: 7px;
	padding-left: 7px;
	border-left: 1px solid #108bd9;
}

@media (min-width: 901px) {
	.site-footer__links {
		flex-wrap: nowrap;
		white-space: nowrap;
	}
}

a.site-footer__credit:link,
a.site-footer__credit:visited {
	font-size: 10px;
	font-weight: normal;
}

.site-footer__strip {
	height: 15px;
	background: url(../images/bottom-strip.jpg) repeat-x 0 0;
	background-size: 265px 15px;
}

/* Forms */
.form-field,
.form-field2,
.form-field3,
.form-field4,
.form-field5,
.form-field6 {
	display: block;
	width: 100%;
	height: 30px;
	margin: 2px 0;
	padding: 5px 8px;
	border: 1px solid #cccccc;
	background-color: #fafafa;
}

.form-field2,
.form-field3,
.form-field6 {
	height: 64px;
	resize: vertical;
}

.form-field:focus,
.form-field2:focus,
.form-field3:focus,
.form-field4:focus,
.form-field5:focus,
.form-field6:focus {
	border-color: #108bd9;
	background-color: #ffffff;
	outline: none;
	box-shadow: 0 0 0 2px rgba(16, 139, 217, 0.2);
}

/* Enlarged product image */
.image-viewer {
	width: min(94vw, 900px);
	max-width: none;
	padding: 12px;
	border: 0;
	background: #ffffff;
	font-family: Verdana, Arial, Helvetica, sans-serif;
}

.image-viewer::backdrop {
	background: rgba(0, 0, 0, 0.75);
}

.image-viewer img {
	display: block;
	width: 100%;
	height: auto;
}

.image-viewer__caption {
	margin: 10px 0 0;
	color: #666666;
	font-size: 12px;
	font-weight: bold;
}

.image-viewer__close {
	position: absolute;
	top: 12px;
	right: 12px;
	width: 36px;
	height: 36px;
	border: 0;
	background: rgba(0, 0, 0, 0.65);
	color: #ffffff;
	font-size: 22px;
	line-height: 1;
	cursor: pointer;
}

/* Scrollable data tables on small screens */
.table-scroll-x {
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
	max-width: 100%;
}

.table-scroll-x > table {
	min-width: 280px;
}

/* Tablet and below */
@media (max-width: 900px) {
	body,
	.page-home {
		background: #ffffff;
	}

	.site-header__inner {
		flex-direction: column;
		gap: 8px;
		height: auto;
		padding: 8px;
	}

	.site-header__logo img {
		width: 340px;
	}

	.site-nav__list {
		padding: 0 4px;
	}

	/* Legacy tables become plain stacked blocks so nothing can force extra width */
	.site-main,
	.site-main > tbody,
	.site-main > tbody > tr,
	.site-main > tbody > tr > td,
	.site-main table:has(> tbody > tr > td[width="33%"]),
	.site-main table:has(> tbody > tr > td[width="33%"]) > tbody,
	.site-main table:has(> tbody > tr > td[width="33%"]) > tbody > tr > td,
	.site-main table:has(> tbody > tr > td[width="50%"]),
	.site-main table:has(> tbody > tr > td[width="50%"]) > tbody,
	.site-main table:has(> tbody > tr > td[width="50%"]) > tbody > tr,
	.site-main table:has(> tbody > tr > td[width="50%"]) > tbody > tr > td,
	.site-main table:has(> tbody > tr > td[width="60%"]),
	.site-main table:has(> tbody > tr > td[width="60%"]) > tbody,
	.site-main table:has(> tbody > tr > td[width="60%"]) > tbody > tr,
	.site-main table:has(> tbody > tr > td[width="60%"]) > tbody > tr > td {
		display: block;
		width: 100% !important;
	}

	/* Page content first, sidebar after it */
	.site-main tr:has(> td[width="33%"]) {
		display: flex;
		flex-direction: column;
		gap: 24px;
	}

	.site-main tr > td[width="33%"] {
		order: 2;
	}

	.site-main tr:has(> td[width="50%"]) > td + td,
	.site-main tr:has(> td[width="60%"]) > td + td {
		margin-top: 16px;
	}

	.site-main table[width="268"],
	.site-main table[width="267"] {
		float: none;
		width: 100% !important;
		max-width: 420px;
		margin: 0 auto;
	}

	.site-main table[width="268"],
	.site-main table[width="268"] > tbody > tr > td[background],
	.site-main table[width="267"] > tbody > tr > td[background] {
		background-size: 100% auto;
	}

	.site-main table[width="268"] > tbody > tr > td.head {
		background-size: 100% 100%;
	}

	.site-main table[width="267"] > tbody > tr > td > img:not([src*="spacer.gif"]) {
		display: block;
		width: 100%;
	}

	.site-main table[width="597"],
	.site-main table[width="90%"],
	.site-main table[width="92%"],
	.site-main table[width="97%"] {
		width: 100% !important;
	}

	.site-main td[height="300"] {
		height: auto !important;
	}

	.site-main img[width="602"],
	.site-main img[width="900"] {
		display: block;
		width: 100%;
	}

	.txt2,
	.site-main li {
		text-align: left;
	}

	.sidebar-decor {
		display: none !important;
	}

	.site-main img.brand-logo-inline {
		width: 130px;
		margin-left: 12px;
	}
}

@media (max-width: 700px) {
	.site-footer__inner {
		flex-direction: column;
	}

	.site-footer__brands {
		flex-wrap: wrap;
	}

	.site-footer__nav {
		align-items: center;
	}

	.site-footer__links {
		justify-content: center;
	}

	.breadcrumbs {
		line-height: 1.5;
	}
}

@media (max-width: 600px) {
	.site-topbar__inner {
		height: auto;
		white-space: normal;
	}

	.site-header__logo img {
		width: 280px;
	}

	.site-certs {
		grid-template-columns: repeat(6, minmax(0, 1fr));
		grid-template-rows: 38px 30px;
		gap: 6px 8px;
		width: 100%;
	}

	.site-nav__list {
		display: grid;
		grid-template-columns: 1fr 1fr;
		padding: 0;
	}

	.site-nav__link {
		height: 36px;
		border-bottom: 1px solid rgba(1, 83, 139, 0.15);
		line-height: 36px;
	}

	.site-nav__item:last-child:nth-child(odd) {
		grid-column: 1 / -1;
	}

	/* iOS zooms the page when a field's text is under 16px */
	.form-field,
	.form-field2,
	.form-field3,
	.form-field4,
	.form-field5,
	.form-field6 {
		height: 40px;
		font-size: 16px;
		font-weight: normal;
	}

	.form-field2,
	.form-field3,
	.form-field6 {
		height: 80px;
	}
}

/* Home / products category cards — balanced 2x2 grid */
.product-card-grid {
	display: grid;
	grid-template-columns: repeat(2, minmax(0, 1fr));
	gap: 16px;
	width: 100%;
	max-width: 900px;
	margin: 0 auto;
	padding: 0 2px;
	box-sizing: border-box;
}

.product-card {
	display: flex;
	flex-direction: column;
	align-items: center;
	background: #fff;
	border: 1px solid #cccccc;
	min-width: 0;
}

.product-card__head {
	width: 100%;
	box-sizing: border-box;
	min-height: 38px;
	padding: 10px 12px;
	display: flex;
	align-items: center;
	justify-content: center;
	text-align: center;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 13px;
	font-weight: bold;
	color: #666666;
	line-height: 1.25;
	border-bottom: 1px solid #cccccc;
	background-repeat: repeat-x;
	background-position: top left;
	background-size: 100% 100%;
}

.product-card__head--blue {
	background-color: #d7eaf7;
	background-image: url("../images/box-blue-back.jpg");
}

.product-card__head--green {
	background-color: #d9ecd8;
	background-image: url("../images/box-green-back.jpg");
}

.product-card__head--orange {
	background-color: #f3e4d0;
	background-image: url("../images/box-orange-back.jpg");
}

.product-card__head--teal {
	background-color: #d5ebef;
	background-image: url("../images/box-teal-back.jpg");
}

.product-card__media {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 100%;
	padding: 15px 12px 12px;
	box-sizing: border-box;
	text-decoration: none;
}

.product-card__media img {
	display: block;
	width: 225px;
	max-width: 100%;
	height: auto;
	border: 0;
}

.product-card__cta {
	display: block;
	width: calc(100% - 24px);
	max-width: 225px;
	margin: 0 auto 14px;
	padding: 7px 10px;
	box-sizing: border-box;
	background: #cccccc;
	color: #666666;
	text-align: center;
	text-decoration: none;
	font-family: Verdana, Arial, Helvetica, sans-serif;
	font-size: 10px;
	font-weight: bold;
	line-height: 1.3;
}

.product-card__cta:hover {
	text-decoration: underline;
	color: #333333;
}

@media (max-width: 700px) {
	.product-card-grid {
		grid-template-columns: 1fr;
		gap: 14px;
	}
}
