/*
 * WT METALL - child of Cassiopeia (Joomla 6).
 * Recreates the legacy "siteground-j15-44" look (Joomla 1.5) and makes it responsive.
 * Loaded after the Cassiopeia stylesheet.
 */

:root {
	--wt-text: #333;
	--wt-link: #666;
	--wt-hover: #4CAFC6;
	--wt-green: #92C545;
	--wt-h3: #92C546;        /* legacy: #leftcolumn h3 */
	--wt-menu-link: #666;    /* legacy: #leftcolumn ul.menu li a (set #2EB6F4 for the lighter blue of div.module_menu ul li a) */
	--wt-menu-hover: #4CAFC6;
	--wt-font: Tahoma, Arial, sans-serif;
	--wt-page: 860px;
}

html {
	height: 100%;
	margin-bottom: 0;
	background: #999999;
}

body.site {
	background: #999999;
	font-family: var(--wt-font);
	font-size: 12px;
	line-height: 1.3em;
	color: var(--wt-text);
	margin: 0;
	padding: 0;
	min-height: 100%;
}

img { border: 0; max-width: 100%; height: auto; }

#page_bg {
	flex: 1 0 auto;
	min-height: 100vh;
	padding: 0;
	background: #999999 url(../images/topbg.jpg) top center repeat-x;
}

/* Page frame ---------------------------------------------------------- */
#header,
#middle_header,
.center,
#footer,
.pill_m {
	width: var(--wt-page);
	max-width: 100%;
	margin: 0 auto;
	box-sizing: border-box;
}

#header {
	height: 10px;
	background: url(../images/header.png) bottom center no-repeat;
	background-size: 100% 115px;
	margin-top: 2px;
}

#middle_header {
	position: relative;
	aspect-ratio: 860 / 230;
	background: url(../images/middle_header.jpg) top center no-repeat;
	background-size: 100% 100%;
}

#middle_header .header-home {
	position: absolute;
	inset: 0 40% 0 0;
	display: block;
}

#newsflash {
	position: absolute;
	top: 0;
	right: 6.5%;
	width: 250px;
	max-width: 36%;
}

#newsflash img { display: block; width: 100%; height: auto; }

.center {
	background: url(../images/center_bg.jpg) top center repeat-y;
	background-size: 100% 10px;
	text-align: left;
	padding: 2px 0;
}

#wrapper { width: 100%; margin: 0 auto; background: transparent; }

#content {
	display: flex;
	align-items: flex-start;
	width: 840px;
	max-width: 100%;
	margin: 0 auto;
	padding: 5px 0 0;
	overflow: hidden;
}

#leftcolumn {
	flex: 0 0 180px;
	width: 180px;
	padding: 0 0 10px;
	text-align: left;
}

#maincolumn {
	flex: 1 1 0;
	min-width: 0;
	margin: 7px 0 6px;
	padding: 10px 0 0 10px;
}

#footer {
	min-height: 60px;
	padding: 10px 0 20px;
	text-align: right;
	color: #666;
}

#footer p { margin: 0; text-align: right; color: #666; }

/* Typography ---------------------------------------------------------- */
#maincolumn a:not(.btn),
#footer a {
	color: #666666;
	text-decoration: underline;
	font-weight: normal;
	outline: none;
}

#maincolumn a:not(.btn):hover,
#footer a:hover {
	color: var(--wt-hover);
	text-decoration: none;
}

#maincolumn p {
	margin: 0 0 5px;
	text-align: justify;
}

#maincolumn h1,
#maincolumn .page-header h1 {
	padding: 0;
	margin: 0.67em 0;
	font-family: var(--wt-font);
	font-size: 1.3em;
	font-weight: bold;
	color: #333;
	text-align: left;
}

#maincolumn h2,
#maincolumn .contentheading {
	padding: 0;
	font-family: var(--wt-font);
	font-size: 12px;
	font-weight: bold;
	color: var(--wt-hover);
	text-align: left;
}

#maincolumn h3,
#maincolumn legend {
	margin: 0;
	padding: 0;
	font-family: var(--wt-font);
	font-size: 14px;
	font-weight: bold;
	color: var(--wt-hover);
	text-align: left;
}

#maincolumn h4 {
	font-family: var(--wt-font);
	font-size: 12px;
	color: #333;
}

#maincolumn .page-header { margin: 0; padding: 0; border: 0; }
#maincolumn .page-header h2 { margin: 0 0 6px; }

#maincolumn ul, #maincolumn ol { margin: 0 0 8px; padding-left: 22px; }
#maincolumn li { margin-bottom: 5px; }

#maincolumn .small,
#maincolumn .article-info,
#maincolumn .modifydate,
#maincolumn .createdate {
	font-size: 10px;
	color: var(--wt-green);
	font-weight: normal;
}

/* Left column ---------------------------------------------------------- */
#leftcolumn .moduletable,
#leftcolumn .card {
	margin: 0 0 16px;
	padding: 0 0 8px;
	border: 0;
	border-radius: 0;
	background: url(../images/menu_bg.png) top center repeat-y;
	text-align: left;
}

/* Cassiopeia "card" chrome (module style may force it): same legacy rendering */
#leftcolumn .card-body {
	padding: 0;
	background: none;
	color: var(--wt-text);
}

#leftcolumn h3,
#leftcolumn .card-header {
	margin: 0;
	box-sizing: border-box;
	width: 180px;
	height: 30px;
	padding: 0 0 0 10px;
	background: url(../images/h3.png) top left no-repeat;
	font-family: var(--wt-font);
	font-size: 13px;
	font-weight: bold;
	line-height: 27px;
	text-align: left;
	text-decoration: none;
	color: var(--wt-h3);
	border: 0;
	border-radius: 0;
}

#leftcolumn ul,
#leftcolumn ul.mod-menu,
#leftcolumn ul.menu {
	display: block;
	margin: 6px auto;
	padding: 0;
	width: 164px;
	list-style: none;
}

#leftcolumn ul li {
	display: block;
	margin: 0;
	padding: 0;
	list-style: none;
}

#leftcolumn ul li a,
#leftcolumn ul li a:link,
#leftcolumn ul li a:visited,
#leftcolumn ul li > span {
	display: block;
	margin: 0;
	padding: 0 0 0 12px;
	min-height: 18px;
	line-height: 18px;
	font-family: var(--wt-font);
	font-size: 11px;
	font-weight: bold;
	text-decoration: none;
	color: var(--wt-menu-link);
	background: radial-gradient(circle, var(--wt-green) 0 2px, transparent 2.5px) 1px center / 7px 7px no-repeat;
}

#leftcolumn ul li a:hover,
#leftcolumn ul li.current > a,
#leftcolumn ul li.active > a {
	color: var(--wt-menu-hover);
	text-decoration: none;
}

#leftcolumn ul ul { margin: 0; padding: 0 0 0 6px; width: auto; }
#leftcolumn ul ul a { font-weight: normal; }

/* Search box ---------------------------------------------------------- */
#leftcolumn form { width: 164px; margin: 6px auto 0; padding: 4px 0 0; }

#leftcolumn .container-search .moduletable,
#leftcolumn .container-search .card { padding-bottom: 12px; }

#leftcolumn input[type="search"],
#leftcolumn input[type="text"],
#leftcolumn .inputbox,
#leftcolumn .form-control {
	box-sizing: border-box;
	float: left;
	width: 94px;
	height: 22px;
	margin: 0;
	padding: 2px 0 0 6px;
	border: 1px solid #B9DB9A;
	border-radius: 0;
	background: none;
	font-family: var(--wt-font);
	font-size: 12px;
	line-height: 16px;
	color: #95C866;
}

#leftcolumn button,
#leftcolumn input[type="submit"],
#leftcolumn .btn {
	float: left;
	height: 22px;
	margin: 0 0 0 5px;
	padding: 0 8px;
	border: 0;
	border-radius: 0;
	background: #2CB5F4;
	color: #fff;
	font-family: var(--wt-font);
	font-size: 10px;
	line-height: 22px;
}

#leftcolumn .mod-finder__search { display: flex; gap: 5px; }
#leftcolumn .mod-finder__search .input-group { display: flex; }
#leftcolumn .mod-finder__search label { display: none; }

/* Forms / buttons in content ---------------------------------------- */
#maincolumn .btn,
#maincolumn input.button,
#maincolumn .validate {
	background: var(--wt-green);
	border: 0;
	border-radius: 0;
	font-size: 11px;
	color: #fff;
}

#maincolumn .btn:hover { background: #7fb034; color: #fff; }

#maincolumn input[type="text"],
#maincolumn input[type="email"],
#maincolumn input[type="tel"],
#maincolumn input[type="password"],
#maincolumn input[type="search"],
#maincolumn textarea,
#maincolumn select {
	border: 1px solid #92C546;
	border-radius: 0;
	padding: 2px 4px;
	font-family: var(--wt-font);
	font-size: 12px;
	max-width: 100%;
}

#maincolumn fieldset { border: 1px solid #ccc; margin-top: 15px; padding: 15px; }
#maincolumn .invalid, #maincolumn label.invalid { border-color: #f00; color: #f00; }

#maincolumn .pagination span,
#maincolumn .pagination a { padding: 2px; }

#maincolumn table { max-width: 100%; }

/* Breadcrumbs (if used) -------------------------------------------- */
#maincolumn .mod-breadcrumbs__wrapper { font-size: 10px; color: var(--wt-green); }
#maincolumn .breadcrumb { background: none; padding: 0; margin: 0 0 6px; }

/* System messages --------------------------------------------------- */
#maincolumn joomla-alert,
#maincolumn .alert { font-family: var(--wt-font); font-size: 12px; }

/* Responsive -------------------------------------------------------- */
@media (max-width: 700px) {
	/* banner keeps its ratio, the photo moves below it */
	#middle_header {
		aspect-ratio: auto;
		padding-top: 26.74%; /* 230 / 860 */
		background-size: 100% auto;
		background-color: #fff;
	}

	#middle_header .header-home { inset: 0 0 auto 0; height: 26.74vw; max-height: 230px; }

	#newsflash {
		position: static;
		width: auto;
		max-width: none;
		padding: 6px 10px 10px;
		text-align: center;
		background: #fff;
	}

	#newsflash img { display: inline-block; width: 250px; max-width: 100%; }

	#content { flex-direction: column; padding-left: 10px; padding-right: 10px; box-sizing: border-box; }

	#leftcolumn {
		flex: none;
		width: 100%;
		display: grid;
		grid-template-columns: repeat(auto-fill, 180px);
		justify-content: center;
		column-gap: 10px;
	}

	#leftcolumn .container-search { grid-column: 1 / -1; display: flex; justify-content: center; }

	#leftcolumn .moduletable { margin-bottom: 10px; }

	#maincolumn { width: 100%; padding: 6px 0 0; margin: 0; }

	#maincolumn p { text-align: left; }
	#maincolumn img { max-width: 100%; height: auto; }

	#footer { text-align: center; padding-bottom: 14px; }
	#footer p { text-align: center; }
}

@media (max-width: 400px) {
	#leftcolumn { grid-template-columns: 180px; }
}

/* Photo galleries (replace the legacy Flash galleries MorfeoShow / Expose) */
.wt-gallery { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 10px 0 20px; }
.wt-gallery figure { margin: 0; width: 128px; text-align: center; }
.wt-gallery img { display: block; width: 128px; height: 96px; object-fit: cover; border: 1px solid #ccc; padding: 2px; background: #fff; }
.wt-gallery a:hover img { border-color: #92C545; }
.wt-gallery figcaption { font-size: 10px; line-height: 1.2em; color: #666; margin-top: 3px; }
