@charset "utf-8";
/* =============================================================================
   responsive.css  —  RWD overlay for U-KNOWN GROUP static site
   -----------------------------------------------------------------------------
   Loaded LAST in <head> so it wins over the original stylesheets and the
   per-page inline <style> blocks.

   Design rule: the desktop layout from 1024px up is left exactly as it was
   (the original design is a fixed 1000px grid). Below that everything becomes
   fluid and the sprite-image navigation is replaced by the text menu built by
   assets/rwd.js.

   Breakpoints
     >= 1024px         original desktop layout (only the universal fixes apply)
     <= 1023px         fluid widths + mobile header / drawer navigation
     <=  768px         portal fan-out banner becomes a plain stack
     <=  640px         single column, stacked footer, larger tap targets
   ========================================================================== */


/* -----------------------------------------------------------------------------
   0. universal — safe at every width
   -------------------------------------------------------------------------- */
/* NOTE: no global `box-sizing: border-box`. The original theme sizes several
   boxes as `height + padding` (#menu li ul, #in_info, #foot, .lmenu_list li a),
   so switching the whole document to border-box silently shrinks them. Only
   the elements this file introduces opt in. */
#rwd-bar, #rwd-bar *, #rwd-nav, #rwd-nav *, #rwd-backdrop,
.rwd-table { box-sizing: border-box; }

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

/* Images and iframes are clamped only below the desktop breakpoint. A couple
   of pages deliberately overhang their column on desktop (the 705px map on the
   contact pages, the 520px photo in a 500px cell on rd_ee.htm), and clamping
   them there would change the original desktop rendering. */

/* Spreadsheet-pasted spec tables are far wider than a phone. Below the
   desktop breakpoint they scroll inside their own box instead of being
   clipped; on desktop the wrapper stays a plain block so the original
   layout is untouched (see the <=1023px section). */
.rwd-table table { max-width: none; }

/* Images/all/bg.gif is referenced by the theme but does not exist on the
   server — give the dark page background a solid fallback. */
body { background-color: #232323; }

/* the outer frames must never force a horizontal scrollbar */
#container { width: 100%; max-width: 1000px; }
#index     { width: 100%; max-width: 1000px; }

/* Desktop drop-down under "U-KNOWN集團".
   The theme's `#menu .B a` rule (specificity 1,1,1) also matches the links
   inside the drop-down, so each one becomes a 46px-tall block sitting in a
   panel whose grey background is only 40px tall — the white links spill past
   the coloured area. Let the panel size itself to its content instead. */
#menu li ul {
	height: auto;
	padding: 6px 16px;
	line-height: 34px;
}
#menu li ul li { line-height: 34px; }
#menu li ul li a[href] {          /* beats #menu .B a */
	height: auto;
	line-height: 34px;
}

/* the slideshow keeps its aspect ratio instead of a hard-coded 343/364px */
.slideshow            { position: relative; width: 100%; max-width: 1000px; }
.slideshow ul         { position: relative; }
.slideshow li         { position: absolute; top: 0; left: 0; width: 100%; }
.slideshow li:first-child { position: relative; }
.slideshow li img     { display: block; width: 100%; height: auto; }


/* -----------------------------------------------------------------------------
   1. mobile header + drawer navigation (markup injected by assets/rwd.js)
   -------------------------------------------------------------------------- */
#rwd-bar, #rwd-nav, #rwd-backdrop { display: none; }

#rwd-bar {
	position: fixed;
	top: 0; left: 0; right: 0;
	height: 52px;
	background: #464646;
	border-bottom: 3px solid #97b31d;
	z-index: 9000;
}
#rwd-bar .rwd-brand {
	display: block;
	float: left;
	padding: 11px 0 0 12px;
}
#rwd-bar .rwd-brand img {
	display: block;
	height: 26px;
	width: auto;
}
#rwd-toggle {
	float: right;
	width: 52px;
	height: 49px;
	padding: 0;
	border: 0;
	background: transparent;
	cursor: pointer;
	-webkit-appearance: none;
	appearance: none;
}
#rwd-toggle span {
	display: block;
	width: 24px;
	height: 2px;
	margin: 5px auto;
	background: #fff;
	transition: transform .25s, opacity .25s;
}
#rwd-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
#rwd-toggle.open span:nth-child(2) { opacity: 0; }
#rwd-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

#rwd-backdrop {
	position: fixed;
	top: 52px; left: 0; right: 0; bottom: 0;
	background: rgba(0, 0, 0, .5);
	z-index: 8900;
}

#rwd-nav {
	position: fixed;
	top: 52px; right: 0; bottom: 0;
	width: 82%;
	max-width: 320px;
	overflow-y: auto;
	-webkit-overflow-scrolling: touch;
	background: #2b2b2b;
	z-index: 9001;
	transform: translateX(100%);
	transition: transform .25s ease;
}
#rwd-nav.open { transform: translateX(0); }

#rwd-nav ul { margin: 0; padding: 0; list-style: none; }

#rwd-nav a {
	display: block;
	padding: 13px 16px;
	color: #eee;
	font-size: 15px;
	line-height: 1.4;
	text-decoration: none;
	border-bottom: 1px solid #3a3a3a;
	overflow: visible;
	text-indent: 0;
}
#rwd-nav a:hover,
#rwd-nav a:active { background: #97b31d; color: #fff; }

#rwd-nav .rwd-sub a {
	padding-left: 32px;
	font-size: 14px;
	color: #bdbdbd;
	background: #262626;
}
#rwd-nav .rwd-sub a:hover { background: #97b31d; color: #fff; }

#rwd-nav .rwd-group {
	padding: 13px 16px 8px;
	color: #97b31d;
	font-size: 13px;
	font-weight: bold;
	letter-spacing: 1px;
	border-bottom: 1px solid #3a3a3a;
}

#rwd-nav .rwd-head {
	padding: 10px 16px;
	background: #97b31d;
	color: #fff;
	font-size: 13px;
	font-weight: bold;
	letter-spacing: 1px;
}

#rwd-nav .rwd-lang { padding: 12px 8px 40px; text-align: center; }
#rwd-nav .rwd-lang a {
	display: inline-block;
	padding: 6px 10px;
	border: 0;
	font-size: 13px;
	color: #bdbdbd;
}


/* =============================================================================
   2. <= 1023px  —  fluid layout, mobile navigation takes over
   ========================================================================== */
@media screen and (max-width: 1023px) {

	/* .rwd-on is set on <html> by rwd.js only when the drawer was built */
	.rwd-on body      { padding-top: 52px; }

	#rwd-bar          { display: block; }
	#rwd-nav          { display: block; }
	#rwd-backdrop.open{ display: block; }

	.rwd-locked, .rwd-locked body { overflow: hidden; }

	/* the original sprite navigation and the language strip are replaced */
	#in_lan   { display: none; }
	#menu     { display: none; }
	#in_menu  { display: none; }
	#in_logo  { display: none; }
	#con_left { display: none; }

	img { max-width: 100%; height: auto; }
	iframe, embed, object, video { max-width: 100%; }

	.rwd-table {
		max-width: 100%;
		overflow-x: auto;
		-webkit-overflow-scrolling: touch;
	}

	#in_topbg, #topbg { float: none; width: 100%; overflow: hidden; }

	#container {
		width: auto;
		max-width: 1000px;
		margin: 0 auto;
		padding: 0 10px;
	}

	#in_top { float: none; width: auto; min-height: 0; }

	/* ---- index page ---- */
	#in_album {
		float: none;
		clear: both;
		width: auto;
		height: auto;
		margin-top: 10px;
		overflow: hidden;   /* contains the floated .slideshow */
	}

	#in_info {
		width: auto;
		height: auto;
		padding: 16px 0 20px;
		background-image: none;
		background-color: #1f1f1f;
		overflow: hidden;
	}
	#in_info_about,
	#in_info_item,
	#in_info_service {
		float: none;
		width: auto;
		padding: 0 14px;
	}
	#in_info_item { margin-top: 22px; }
	#in_info_item #in_info_about { padding: 0; }
	.in_info_compic { float: left; margin: 0 10px 6px 0; max-width: 40%; }

	/* the six sprite buttons become a plain text list */
	.in_info_servicebt {
		width: auto;
		height: auto;
		margin-top: 10px;
		background-image: none;
	}
	.in_info_servicebt li,
	.in_info_servicebt li.A,
	.in_info_servicebt li.B,
	.in_info_servicebt li.C,
	.in_info_servicebt li.D,
	.in_info_servicebt li.E,
	.in_info_servicebt li.F { text-indent: 0; float: none; }
	.in_info_servicebt li a,
	.in_info_servicebt li.A a, .in_info_servicebt li.B a,
	.in_info_servicebt li.C a, .in_info_servicebt li.D a,
	.in_info_servicebt li.E a, .in_info_servicebt li.F a {
		float: left;
		display: block;
		box-sizing: border-box;   /* 50% must include the padding */
		width: 50%;
		height: auto;
		padding: 9px 6px;
		background-image: none;
		color: #d2e583;
		font-size: 13px;
		line-height: 1.4;
		text-indent: 0;
	}
	.in_info_servicebt li a:hover,
	.in_info_servicebt li.A a:hover, .in_info_servicebt li.B a:hover,
	.in_info_servicebt li.C a:hover, .in_info_servicebt li.D a:hover,
	.in_info_servicebt li.E a:hover, .in_info_servicebt li.F a:hover {
		width: 50%;
		height: auto;
		background-image: none;
		color: #fff;
		text-decoration: underline;
	}

	#in_foot {
		float: none;
		clear: both;
		width: auto;
		height: auto;
		padding: 14px 4px;
		line-height: 1.7;
	}
	#in_foot_left, #in_foot_right {
		float: none;
		width: auto;
		text-align: center;
	}
	#in_foot_left  { margin-bottom: 8px; }
	#in_foot_left  img { margin: 0 auto; }
	#in_foot_left  div { text-align: center; }

	/* ---- inner pages ---- */
	#banner {
		float: none;
		clear: both;
		width: auto;
		height: auto;
		margin-top: 10px;
		overflow: hidden;   /* contains the floated .slideshow */
	}

	#content {
		float: none;
		width: auto;
		margin-top: 6px;
		background-image: none;
		background-color: #fff;
	}
	#con_right {
		float: none;
		width: auto;
		background-size: 100% auto;
	}

	/* headings are sprite images with the text pushed off-screen —
	   show the real text instead so it can wrap */
	#con_right h1.h01, #con_right h1.h02,
	#con_right h1.h03, #con_right h1.h04,
	#con_right h1.h05, #con_right h1.h06 {
		height: auto;
		padding: 12px 12px 8px;
		background-image: none;
		text-indent: 0;
		color: #4b8100;
		font-size: 20px;
		font-weight: bold;
		line-height: 1.3;
	}

	.title { float: none; width: auto; overflow: hidden; }
	.title_txt   { float: none; height: auto; padding: 4px 0 4px 43px; line-height: 33px; }
	.title_bread { float: none; margin: 0 0 6px 10px; padding-left: 0; background-image: none; line-height: 1.5; }

	#company_info, #service_info {
		float: none;
		width: auto;
	}
	.company_info_txt { margin: 0 12px; }

	#company_history {
		float: none;
		width: auto;
		margin: 20px 12px;
	}
	.company_history_info { margin-left: 30px; }
	.company_history_txt  { margin-left: 16px; }

	#product {
		float: none;
		width: auto;
		margin: 0 12px 20px;
	}
	#product_list {
		float: none;
		width: auto;
	}
	.product_pic {
		margin: 0 10px 10px 0;
		max-width: 100%;
	}
	#product_bar   { float: none; width: auto; }
	.product_txt01 { float: none; width: auto; line-height: 1.8; }

	.service_info_pic { float: none; margin: 0 0 10px 10px; }
	.service_info_txt { float: none; width: auto; padding: 0 12px; }

	#contact_info { overflow: hidden; padding: 0 12px; }
	.contact_info_txt { float: none; width: auto; }
	.contact_info_txt01, .contact_info_txt02 { float: none; }

	#foot {
		float: none;
		width: auto;
		height: auto;
		padding: 16px 4px;
		background-image: none;
		background-color: #232323;
		border-top: 3px solid #97b31d;
	}
	#foot_left, #foot_right {
		float: none;
		padding: 0 8px;
		text-align: center;
		line-height: 1.7;
	}
	#foot_left { margin-bottom: 8px; }
	#foot_left img { margin: 0 auto; }
	#foot_left div { text-align: center; }

	/* ---- portal page (/index.html) ---- */
	#in_container { background-size: auto 100%; }
	#index {
		width: auto;
		height: auto;
		padding-bottom: 18px;
		background-size: 100% 100%;
	}
	#logo { padding: 18px 10px 10px; text-align: center; }
	#logo img { margin: 0 auto; }
	#in_banner {
		float: none;
		clear: both;
		width: auto;
		height: auto;
		overflow: visible;
	}
}


/* =============================================================================
   3. <= 768px  —  the portal fan-out becomes a simple stack
   ========================================================================== */
@media screen and (max-width: 768px) {

	#in_banner #container { overflow: visible; padding: 0; }

	#img_container { width: auto !important; }
	#img_container a { display: block; }
	#img_container img {
		position: static !important;
		left: auto !important;
		display: block;
		width: 100% !important;
		height: auto !important;
		margin-bottom: 8px;
	}
}


/* =============================================================================
   4. <= 640px  —  single column, bigger type
   ========================================================================== */
@media screen and (max-width: 640px) {

	#container { padding: 0 8px; }

	.company_info_txt,
	.service_info_txt,
	.product_txt01 { font-size: 14px; line-height: 1.9; }

	.product_pic {
		float: none;
		margin: 0 0 12px;
		text-align: center;
	}
	.product_pic img { margin: 0 auto; }

	#product, #company_history { margin-left: 8px; margin-right: 8px; }

	.company_history_date { float: none; padding: 0 0 4px; }
	.company_history_info { margin-left: 0; background-image: none; }
	.company_history_txt  { margin-left: 8px; }

	.in_info_servicebt li a,
	.in_info_servicebt li.A a, .in_info_servicebt li.B a,
	.in_info_servicebt li.C a, .in_info_servicebt li.D a,
	.in_info_servicebt li.E a, .in_info_servicebt li.F a { width: 100%; }
	.in_info_servicebt li a:hover,
	.in_info_servicebt li.A a:hover, .in_info_servicebt li.B a:hover,
	.in_info_servicebt li.C a:hover, .in_info_servicebt li.D a:hover,
	.in_info_servicebt li.E a:hover, .in_info_servicebt li.F a:hover { width: 100%; }

	.service_info_pic { float: none; margin: 0 0 10px; text-align: center; }
	.service_info_pic img { margin: 0 auto; }

	.contact_info_txt01 { font-size: 15px; }

	/* google maps embeds keep a 4:3 box instead of a fixed 705x305 */
	.product_pic iframe {
		width: 100%;
		height: 260px;
	}

	#logo { padding-top: 12px; }
}


/* =============================================================================
   5. download.html (文件公示)
   ========================================================================== */
@media screen and (max-width: 1023px) {
	#in_banner .pdf-list { padding: 0 10px; }
	#in_banner .pdf-list div { line-height: 1.6 !important; padding: 8px 0; }
	#in_banner .pdf-list img { vertical-align: middle; margin-right: 6px; }
	#in_banner .pdf-list a { display: inline-block; max-width: 78%; vertical-align: middle; }
}
