/* KWS United Technology - main stylesheet (mobile-first).
   Breakpoints: 48em (tablet), 64em (desktop).
   Replaces library/KWS_style.css, KWS_structure.css and menu_style.css. */

/* ===== Base ===== */
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body, html { margin: 0; padding: 0; background-color: #97acbd; }
body {
	font-family: Verdana, Geneva, Arial, Helvetica, sans-serif;
	font-size: 16px; line-height: 1.6; color: #111;
	overflow-wrap: break-word;
}
img { box-sizing: border-box; max-width: 100%; height: auto; padding: 4px; border: none; }
a { text-decoration: none; }
a:active, a:hover { text-decoration: underline; }

/* Everything that changes on hover, focus or tap */
a, .nav-toggle, .swap img, .home-caption { transition: all .2s ease; }
h1, h2, h3 { color: #000; text-transform: uppercase; }
h1 { font-size: 1.6em; padding: 20px 0 5px; letter-spacing: 1px; }
h2 { font-size: 1.2em; padding: 10px 0 0; letter-spacing: -0.5px; }
h3 { font-size: 1.2em; letter-spacing: -0.5px; }
hr { border: none; border-top: 1px solid #ccc; margin: 0 0 0 20px; height: 1px; }
p { line-height: 1.6; margin: 0 0 12px; }
.bold { font-weight: bold; }
.clearer { clear: both; }

/* ===== Layout ===== */
#container { box-sizing: border-box; max-width: 1080px; margin: 0 auto; padding: 12px 16px 0; }

/* ===== Header ===== */
#container-Header {
	display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
	border-bottom: 1px solid #6f889c;
}
#container-Slogan { display: none; color: #fff; }
#container-Logo img { display: block; height: auto; width: 220px; max-width: 100%; }

.nav-toggle {
	min-width: 44px; min-height: 44px; padding: 10px;
	background: transparent; border: 2px solid #193247; border-radius: 4px;
	color: #193247; cursor: pointer;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
	display: block; width: 22px; height: 2px; background: currentColor;
}
.nav-toggle span { position: relative; }
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -7px; }
.nav-toggle span::after { top: 7px; }
.js .nav-toggle { display: block; }

/* ===== Menu (mobile: stacked, collapsible) ===== */
#nav { width: 100%; padding: 8px 8px; border-radius: 10px; box-shadow: 0 20px 35px -17px #000; }
.js #nav { display: none; }
.js #nav.open { display: block; background: #193247; }
#nav ul { margin: 0; padding: 0; list-style: none; }
#nav li { border-top: 1px solid rgb(0 0 0 / 18%); padding: 5px; }
#nav a { display: block; color: #fff; font-weight: bold; font-size: 14px; padding: 13px 4px; }
#nav a br { display: none; }
#nav a.current { text-decoration: underline; }
#nav .submenu li { border: 0; }
#nav .submenu li:first-child { display: none; } /* repeats the parent link */
#nav .submenu a { font-size: 14px; padding: 11px 4px 11px 20px; }

/* ===== Content ===== */
#container-LeftContent { padding-bottom: 10px; }
#container-LeftContent a { color: #EEE; }
#container-LeftContent p a:hover, #container-LeftContent p a:active { color: #444; text-decoration: underline; }
#container-LeftContent ul, #container-LeftContent ol, ol { margin-top: -8px; }
#container-LeftContent ul, #container-LeftContent ol { padding-left: 20px; }
#container-LeftContent ul li { line-height: 1.6; margin: 0 0 0 10px; }
#container-LeftContent ol li { line-height: 1.6; margin: 0 0 10px; }
#container-LeftContent ol li ul { margin-top: 5px; margin-bottom: 10px; }
#container-LeftContent ol li ul li { line-height: normal; margin-bottom: 5px; }
p.faq-q { font-weight: bold; margin: 0 0 2px; }
p.faq-a { padding-bottom: 10px; }

/* Slideshow */
.hero { padding-top: 20px; }
#container-LeftContent .sb-slider {
	width: 100%; aspect-ratio: 795 / 350;
	margin: 0 auto !important; padding: 0;
}
#container-LeftContent .sb-slider li { width: 100%; height: 100%; margin: 0; }
.sb-slider li img, .sb-slider li > a { display: block; width: 100%; height: 100%; object-fit: cover; }

/* Thumbnail gallery */
.gallery { max-width: 400px; margin: 0 auto; padding-top: 20px; }
#container-LeftContent .gallery ul { margin-top: 0; padding-left: 0; }
#container-LeftContent .gallery ul li { margin: 0; }

/* Floated images */
.float-img { display: block; margin: 0 auto 10px; }
.float-img--small { width: 185px; }
.float-img--medium { width: 275px; }
.float-img--narrow { width: 165px; }

/* Contact page */
.contact-block { font-size: 110%; }
.contact-email { padding-bottom: 20px; letter-spacing: 1px; }

/* ===== Home page ===== */
.home-split { padding-top: 20px; }
.home-split .homeimg { display: block; width: 100%; padding: 0; }
.home-split > a { display: block; margin-bottom: 16px; }
.home-caption {
	display: block; padding: 12px; text-align: center;
	background: #000; color: #fff; font-weight: bold; text-transform: uppercase;
}
.custom_hover .home-caption { background: #fff; color: #000; }
.home-arrows { display: none; }
.home_arrow { display: block; width: 100%; max-width: 150px; padding: 0 0 4px; }

/* Two stacked images that cross-fade when the link gets .is-active (see scripts/hover.js) */
.swap { display: block; position: relative; }
.swap img { display: block; }
.swap .swap-alt { position: absolute; top: 0; left: 0; height: 100%; opacity: 0; }
.js .homeimg:not(.swap-alt) { opacity: .5; }
.js .is-active .homeimg, .is-active .swap-alt { opacity: 1; }
@media (hover: none) { .js .homeimg:not(.swap-alt) { opacity: .7; } .js .is-active .homeimg:not(.swap-alt) { opacity: 1; } }

/* Phones and tablets: no hover, so the two photos cross-fade automatically */
@media (max-width: 63.99em) {
	.js .home-split .homeimg:not(.swap-alt) { opacity: 1; }
	.home-split .swap .swap-alt { animation: home-fade 8s ease-in-out infinite; }
}
/* countdown bar: fills up, and when it is full the next photo is there */
@media (max-width: 63.99em) {
	.home-split .swap::after {
		content: ""; position: absolute; left: 0; bottom: 0; z-index: 2; width: 100%; height: 5px;
		background: #fff; box-shadow: 0 0 4px rgba(0, 0, 0, .6);
		transform-origin: left; animation: home-countdown 4s linear infinite; /* half of home-fade */
	}
}
@keyframes home-countdown { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* each photo stays about 3s, the fade takes 1s */
@keyframes home-fade {
	0%, 37.5% { opacity: 0; }
	50%, 87.5% { opacity: 1; }
	100% { opacity: 0; }
}

/* ===== Right column ===== */
#container-RightContent { letter-spacing: 1px; color: #fff; padding-top: 10px; border-top: 1px solid #6f889c; }
#container-RightContent p { color: #fff; }
#container-RightContent ul.right_nav { list-style: none; margin: 0; padding: 0; font-size: 1.05em; }
#container-RightContent ul.right_nav li { padding-bottom: 10px; }
#container-RightContent ul.right_nav li::before { content: "\00BB \0020"; }
#container-RightContent ul.right_nav a { color: #000; text-decoration: none; }
#container-RightContent ul.right_nav a:hover { color: #fff; }

/* ===== Footer ===== */
#footer { padding: 15px 0 20px; font-size: 14px; line-height: 1.6; letter-spacing: .5px; color: #fff; text-align: center; }
#footer br, #footer-image { display: none; }
#footer-address { padding: 6px 0; }
#footer-email a { color: #fff; text-decoration: none; display: inline-block; padding: 6px 0; }

/* No hover zoom where there is no room (or no mouse) for the viewer */
@media (max-width: 63.99em), (hover: none) {
	.zm-viewer, .zm-handler { display: none !important; }
}

/* ===== Tablet ===== */
@media (min-width: 48em) {
	#container { padding: 24px 24px 0; }
	.gallery { float: right; width: 45%; margin: 0 0 10px; padding: 33px 0 0 30px; }
	.float-img { float: right; margin: 0 0 5px; padding: 0 0 5px 15px; }
	.contact-block { margin-left: 100px; }

	.home-split { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
	.home-split > a { margin: 0; }
}

/* ===== Desktop ===== */
@media (min-width: 64em) {
	#container {
		display: grid;
		grid-template-columns: minmax(0, 1fr) 170px;
		grid-template-areas: "header header" "main side" "footer footer";
		padding: 40px 12px 0;
	}
	#container > .clearer { display: none; }

	/* Header */
	#container-Header {
		grid-area: header;
		display: grid; grid-template-columns: minmax(0, 1fr) 170px;
		grid-template-rows: auto auto;
		align-items: stretch; padding-left: 5px;
	}
	#container-Logo { grid-area: 1 / 1; border-right: 1px solid #6f889c; margin-right: 20px; }
	#container-Logo img { width: auto; height: 83px; }
	#container-Slogan { display: block; grid-area: 1 / 2 / 3 / 3; padding-top: 25px; }
	#container-Slogan p { margin-left: 20px; font-size: 15px; line-height: 1.5; }
	.js .nav-toggle, .nav-toggle { display: none; }

	/* Menu: horizontal with dropdowns */
	#nav, .js #nav, .js #nav.open {
		display: block; grid-area: 2 / 1; width: auto;
		margin-right: 20px; padding: 18px 30px 0; border-right: 1px solid #6f889c;
		background: none; border-radius: 0; box-shadow: none;
	}
	#nav > ul { display: flex; align-items: flex-end; gap: 32px; }
	#nav li { border: 0; padding: 0; position: relative; }
	#nav a br { display: inline; }
	#nav > ul > li > a { position: relative; text-align: center; line-height: 18px; padding: 0 0 12px; font-size: 13px; letter-spacing: .8px; }
	#nav > ul > li > a:hover { text-decoration: none; color: #3d6585; }
	#nav > ul > li > a.current { text-decoration: none; }
	/* underline grows from the left on hover, stays on the current page */
	#nav > ul > li > a::after {
		content: ""; position: absolute; left: 0; bottom: -3px; width: 0; height: 3px;
		background: #3d6585; box-shadow: 0 0 5px #3d6585; transition: width .2s ease;
	}
	#nav > ul > li:hover > a::after, #nav > ul > li:focus-within > a::after, #nav > ul > li > a.current::after { width: 100%; }
	#nav > ul > li > a:not(:only-child)::after { display: none; } /* no underline on items with a dropdown */
	#nav .submenu {
		display: block; opacity: 0; visibility: hidden; transform: translateY(-4px); transition: all .2s ease;
		position: absolute; top: 100%; left: -16px; z-index: 1000;
		width: max-content; min-width: 220px; padding: 6px 0;
		background: #fff; border-top: 2px solid #6f889c; box-shadow: 0 8px 20px rgba(20, 35, 50, .18);
	}
	#nav li:hover > .submenu, #nav li:focus-within > .submenu { opacity: 1; visibility: visible; transform: none; }
	#nav .submenu li:first-child { display: list-item; }
	#nav .submenu a { color: #333; font-size: 12px; letter-spacing: .5px; line-height: 18px; padding: 10px 16px; }
	#nav .submenu a:hover, #nav .submenu a:focus { background: #e9eef2; color: #111; text-decoration: none; }

	/* Columns */
	#container-LeftContent { grid-area: main; padding: 0 20px 0 5px; margin-right: 20px; border-right: 1px solid #6f889c; }
	#container-RightContent { grid-area: side; padding-top: 20px; border-top: 0; }
	#container-RightContent p { padding-bottom: 20px; }
	#container-RightContent ul.right_nav { margin-left: 25px; padding-left: 10px; text-indent: -15px; }

	.gallery { width: 400px; padding-left: 45px; }

	/* Home page: arrows overlap the seam between the photos */
	.home-split { position: relative; }
	.home-caption { display: none; }
	.home-arrows {
		display: block; position: absolute; z-index: 10;
		top: 50%; left: 50%; transform: translate(-50%, -50%); width: 150px;
	}
	.home-arrows a { display: block; line-height: 0; }

	/* Footer */
	#footer { grid-area: footer; margin-top: 20px; padding-left: 10px; text-align: right; }
	#footer-copyright { float: left; padding-left: 10px; }
	#footer-address { float: right; padding: 0 10px 0 0; }
	#footer br { display: inline; }
	#footer-email { clear: right; padding: 4px 10px 0 0; }
	#footer-email a { padding: 0; }
}

/* Respect the system setting for reduced motion (keep last) */
@media (prefers-reduced-motion: reduce) {
	a, .nav-toggle, .swap img, .home-caption, #nav .submenu, #nav a::after { transition: none !important; }
}
