/*
   _      _            _                             
  / \  __| |__ _ _ _ _| |   __ __ __ __     ___ __ _ 
 / ^ \/ _` / _` | ' ' | |__/ _ \ V / -_) _ / __/ _` |
/_/ \_\__,_\__,_|_|_|_|____\___/\_/\___|(_)\___\__,_|

Adam Love - Chinese Abacus
 
*/

/* -----------------------------------------------------------------
   RESET - by Eric Meyer v2.0  http://cssreset.com
   ----------------------------------------------------------------- */
html, body, div, span, applet, object, iframe, h1, h2, h3, h4, h5, h6, 
p, blockquote, pre, a, abbr, acronym, address, big, cite, code, del, dfn, 
em, img, ins, kbd, q, s, samp, small, strike, strong, sub, sup, tt, var,
b, u, i, center, dl, dt, dd, ol, ul, li, fieldset, form, label, legend,
table, caption, tbody, tfoot, thead, tr, th, td, article, aside, canvas, 
details, embed, figure, figcaption, footer, header, hgroup, menu, nav, 
output, ruby, section, summary, time, mark, audio, video {
	margin:  0;	
	padding: 0;	
	border:  0;	
	font-size: 100%;	
	font: inherit;	
	vertical-align: baseline;
}
/* HTML5 display-role reset for older browsers */
article, aside, details, figcaption, figure, footer, header, hgroup, menu, 
nav, section {
	display: block;
}
body {
	line-height: 1;
}
ol, ul {
	list-style: none;
}
blockquote, q {
	quotes: none;
}
blockquote:before, blockquote:after, q:before, q:after {
	content: '';
	content: none;
}
table {
	border-collapse: collapse;
	border-spacing: 0;
}
a {
	color: #000;
}
/* resets contact form elements so textarea has same border as input */
input, textarea {
  -webkit-box-sizing: border-box;
     -moz-box-sizing: border-box;
          box-sizing: border-box;
}
/* -----------------------------------------------------------------
   SITE
   ----------------------------------------------------------------- */
body {
	margin: 0;
	line-height: 130%;
	background-color: #e8e6da;
	background-image:url(../images/ChineseBackground4.jpg);
	background-repeat: no-repeat;
}
img {
	display: block;
}
#site {
	max-width: 806px;
	min-width: 400px;
	height: 660px;
	position: relative;
	margin: 0 auto 0 auto;
	border: 3px solid #67936e;
	border-radius: 20px;
}
#container {
	width: 100%;
	height: 660px;
	display: table;
	position: relative;
	background-color: #fff;
	border-radius: 16px;
}
#bamboo {
	width: 388px;
	height: 660px;
	position: absolute;
	top: 0;
	left: 0;
	background-image:url(../images/bamboo2.png);
	border-radius: 16px;
}
#abacus_logo_box {
	width: 50%;
	height: 300px;
	position: absolute;
	top: 30px;
	right: 20px;
	background-image:url(../images/abacus_logo.png);
	background-size: contain;
	background-repeat: no-repeat;
}
#abacus_logo_chinese_box {
	width: 20%;
	height: 90px;
	position: absolute;
	z-index: 2;
	top: 30px;
	left: 110px;
	background-image:url(../images/abacus_logo_chinese.png);
	background-size: contain;
	background-repeat: no-repeat;
}
/* -----------------------------------------------------------------
   NAV
   ----------------------------------------------------------------- */
nav {
	width: 89px;
	height: 30px;
	position: absolute;
	left: 5px;
	top: 25px; 
	text-align: center;
}
nav a {
	display: block;
	width: 85px;
}
#home, #about, #history, #links {
	width: 85px;
	height: 26px; /* original: 30px */
	display: inline-block;
	padding-top: 4px;
	margin-bottom: -2px;
	font-family: 'OpenSansSemibold';
	font-size: .8em;
	color: #ffffff;
	background-color: #7bb444;
	border: 2px #1b6533 solid;
	border-radius: 15px;
	background-image:url(../images/button_bkg.png);
}
#page-home    #home, 
#page-about   #about, 
#page-history #history, 
#page-links   #links {
	background-color: #000000;
}
#home:hover, #about:hover, #history:hover, #links:hover { 	
	background-color: #96ca5f;
	background-image:url(../images/button_hi_bkg.png);
}
/* -----------------------------------------------------------------
   CONTENT
   ----------------------------------------------------------------- */
#content {
	width: 402px; /* 402px per content panel */
	height: 468px;
	position: absolute;
	z-index: 2;
	right: 25px;
	bottom: 25px;
	font-size: 1.2em;
	overflow: hidden;
	background-color: rgba(255,255,255,0.5);
	border-radius: 15px;
}
#inner_content {
	width: 1608px;
	height: 468px;
	position: absolute;
	background: transparent;
}
#home_content, #about_content, #history_content, #links_content {
	width: 372px;  /* original 402px  */
	height: 452px; /* original 468px  */
	position: absolute;
	top: 0;
	vertical-align: top;
	padding: 8px 15px 8px 15px;
  text-align: left;
  line-height: 130%;
	font-size: 0.8em;
	font-family: 'OpenSansRegular';
	background: transparent;
}
#home_content {
	left: 0;
}
#about_content {
	left: 402px;
}
#history_content {
	left: 804px;
}
#links_content {
	left: 1206px;
  text-align: center;
}
#links_content img {
  left: 50%;
  margin-left: 80px;
}
.heading1 {
	font-size: 1.3em;
	text-align: center;
	font-family: 'OpenSansSemibold';
}
/* -----------------------------------------------------------------
   ABACUS
   ----------------------------------------------------------------- */
#beadframe {
	width: 402px;
	height: 205px;
	position: absolute;
	right: 0;
	bottom: 5px;
	background-image: url(../images/beadframe.png);
	background-repeat: no-repeat;
}
.bead, .point, .over, #decvalue, #reset {
	position: absolute;
}
.over {
	width: 21px;
	height: 18px; /* original: 23px */
	padding-top: 5px;
	top: 187px;
	text-align: center;
	font-family: 'OpenSansBold';
	font-size: .8em;
	color: #af0000;
}
#in_out_box {
	width: 388px;
	height: 46px;
	position: absolute;
	margin: 0 7px 0 7px;
	bottom: 220px;
	right: 0;
}
#input, #output, #input_go {
	height: 26px;
	position: absolute;
	bottom: 0;
	padding: 6px 10px 0 10px;
	color: #3a6546;
	font-family: 'OpenSansSemibold';
	font-size: 1em;
	border: 2px solid #1b6533;
  background-repeat: no-repeat;
	border-radius: 15px;
}
#input {
	width: 140px;
	left: 0;
	text-align: center;
  font-size: .8em;
	background-color: #fff;
}
#output {
	width: 140px;
	right: 0;
	text-align: right;
	background-color: #a4e26e;
}
#input_go {
	width: 30px;
	left: 50%;
	margin-left: -20px;
	padding: 6px 3px 0 3px;
	text-align: center;
	cursor: pointer;
	background-color: #fff;
}
/* -----------------------------------------------------------------
   EMBEDDED FONTS
   ----------------------------------------------------------------- */
@font-face {
    font-family: 'OpenSansRegular';
    src: url('../fonts/OpenSans-Regular-webfont.eot');
    src: url('../fonts/OpenSans-Regular-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/OpenSans-Regular-webfont.woff') format('woff'),
         url('../fonts/OpenSans-Regular-webfont.ttf') format('truetype'),
         url('../fonts/OpenSans-Regular-webfont.svg#OpenSansRegular') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'OpenSansItalic';
    src: url('../fonts/OpenSans-Italic-webfont.eot');
    src: url('../fonts/OpenSans-Italic-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/OpenSans-Italic-webfont.woff') format('woff'),
         url('../fonts/OpenSans-Italic-webfont.ttf') format('truetype'),
         url('../fonts/OpenSans-Italic-webfont.svg#OpenSansItalic') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'OpenSansSemibold';
    src: url('../fonts/OpenSans-Semibold-webfont.eot');
    src: url('../fonts/OpenSans-Semibold-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/OpenSans-Semibold-webfont.woff') format('woff'),
         url('../fonts/OpenSans-Semibold-webfont.ttf') format('truetype'),
         url('../fonts/OpenSans-Semibold-webfont.svg#OpenSansSemibold') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'OpenSansSemiboldItalic';
    src: url('../fonts/OpenSans-SemiboldItalic-webfont.eot');
    src: url('../fonts/OpenSans-SemiboldItalic-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/OpenSans-SemiboldItalic-webfont.woff') format('woff'),
         url('../fonts/OpenSans-SemiboldItalic-webfont.ttf') format('truetype'),
         url('../fonts/OpenSans-SemiboldItalic-webfont.svg#OpenSansSemiboldItalic') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'OpenSansBold';
    src: url('../fonts/OpenSans-Bold-webfont.eot');
    src: url('../fonts/OpenSans-Bold-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/OpenSans-Bold-webfont.woff') format('woff'),
         url('../fonts/OpenSans-Bold-webfont.ttf') format('truetype'),
         url('../fonts/OpenSans-Bold-webfont.svg#OpenSansBold') format('svg');
    font-weight: normal;
    font-style: normal;
}
@font-face {
    font-family: 'OpenSansBoldItalic';
    src: url('../fonts/OpenSans-BoldItalic-webfont.eot');
    src: url('../fonts/OpenSans-BoldItalic-webfont.eot?#iefix') format('embedded-opentype'),
         url('../fonts/OpenSans-BoldItalic-webfont.woff') format('woff'),
         url('../fonts/OpenSans-BoldItalic-webfont.ttf') format('truetype'),
         url('../fonts/OpenSans-BoldItalic-webfont.svg#OpenSansBoldItalic') format('svg');
    font-weight: normal;
    font-style: normal;
}
/* Make content background semi-transparent as it overlaps the bamboo image */  
@media screen and (max-width: 650px) {
	#content {
		background-color: rgba(255,255,255,0.5);
		border-radius: 15px;
		bottom: 15px;
	}
}
/* Resize Chinese logo and center the content div */
@media screen and (max-width: 459px) {
	#abacus_logo_chinese_box {
		top: 107px;
		left: 50%;
		margin-left: -43px;
	}
	#content {
		right: 50%;
		margin-right: -201px;
	}
}
