/*! HTML5 Boilerplate v4.3.0 | MIT License | http://h5bp.com/ */

/*
 * What follows is the result of much research on cross-browser styling.
 * Credit left inline and big thanks to Nicolas Gallagher, Jonathan Neal,
 * Kroc Camen, and the H5BP dev community and team.
 */

/* ==========================================================================
   Base styles: opinionated defaults
   ========================================================================== */

html,
button,
input,
select,
textarea {
    color: #222;
}

html {
    font-size: 1em;
    line-height: 1.4;
}

/*
 * Remove text-shadow in selection highlight: h5bp.com/i
 * These selection rule sets have to be separate.
 * Customize the background color to match your design.
 */

::-moz-selection {
    background: #b3d4fc;
    text-shadow: none;
}

::selection {
    background: #b3d4fc;
    text-shadow: none;
}

/*
 * A better looking default horizontal rule
 */

hr {
    display: block;
    height: 1px;
    border: 0;
    border-top: 1px solid #ccc;
    margin: 1em 0;
    padding: 0;
}

/*
 * Remove the gap between images, videos, audio and canvas and the bottom of
 * their containers: h5bp.com/i/440
 */

audio,
canvas,
img,
video {
    vertical-align: middle;
}

/*
 * Remove default fieldset styles.
 */

fieldset {
    border: 0;
    margin: 0;
    padding: 0;
}

/*
 * Allow only vertical resizing of textareas.
 */

textarea {
    resize: vertical;
}

/* ==========================================================================
   Browse Happy prompt
   ========================================================================== */

.browsehappy {
    margin: 0.2em 0;
    background: #ccc;
    color: #000;
    padding: 0.2em 0;
}

/* ==========================================================================
   Author's custom styles
   ========================================================================== */





/* common */

body {
    color: #333;
    background-color: #3b4571;
	font-family: Arial, "文泉驛正黑", "WenQuanYi Zen Hei", "儷黑 Pro", "LiHei Pro", "微軟正黑體", "Microsoft JhengHei", "標楷體", DFKai-SB, sans-serif;
}

a { color: #3b4572; }

.wrap {
    width: 1000px;
    margin: 0 auto;
}


/* head */

#head-body {
	box-shadow: 0 0 20px #181c2f;
}

#head {
	background: url('../img/banner-flat.jpg') no-repeat;
	height: 288px;
	position: relative;
}

#head a {
    display: block;
	color: #dae9ff;
	position: absolute;
	top: 218px;
	right: 15px;
	font-size: 30px;
	font-weight: bold;
	text-shadow: 0px 0px 20px #181C2F;
}

#site-name {
    color: #2889aa;
    font-size: xx-large;
    text-decoration: none;
    padding: 10px 8px 5px;
}

#current-volume {
    color: #2889aa;
    padding: 5px 8px;
	text-decoration: none;
}


/* body & content */

#body {
    background-color: #fff;
    position: relative;
	min-height: 300px;
	padding-bottom: 40px;
}

#content {
    padding: 15px 25px;
    min-height: 200px;
}

#content.with-menu {
    width: 775px;
    float: left;
}

#content h1.title {
	color: #3b4572;
	border-bottom: 1px solid #3b4572;
	margin-top: 0px;
}

#content h2.author {
	margin: 5px 0 0px 0;
	font-size: 1.2em;
	color: #5c7bb0;
}


/* category list */

#category-list {
    display: block;
    width: 170px;
    list-style: none;
    padding: 20px 5px 20px 0;
	float: left;
}

#category-list ul {
    margin: 0;
    padding: 0;
}

#category-list li {
    margin: 0;
    padding: 0;
    list-style: none;
}

#category-list a {
    background-color: #364898;
    color: #cff3ff;
    display: block;
    margin: 2px 0;
    padding: 8px 12px;
    text-decoration: none;
    font-weight: normal;
	border-top-left-radius: 5px;
}

#category-list a:hover {
    background-color: #5b79ff;
    color: #fff;
    padding-bottom: 8px;
    margin-left: -10px;
}

#category-list li.active a {
    background-color: #ffb86d;
    color: #7d4d1d;
    margin-left: -10px;
}

#category-list li.active a:hover {
    background-color: #aa6926;
    color: #ffd09f;
}

#article-list {
    display: block;
    list-style: none;
    padding: 0;
}

#article-list .title {
    font-size: 1.5em;
    text-decoration: none;
}

#article-list .brief {
    margin: 0.4em 0;
    font-size: 0.95em;
    font-style: italic;
}

#article-list .readmore {
    display: block;
    padding-bottom: 1.5em;
    margin-bottom: 0.8em;
    border-bottom: 1px solid #666;
}


/* index category list */

.index-category-entry {
	background: #fff;
	margin: 5px 0;
	width: 50%;
	height: 160px;
	float: left;
	position: relative;
}

.index-category-entry .bg {
	display: block;
	width: 100%;
	height: 100%;
	background-size: cover;
	background-position: center center;
	opacity: 1.0; 
	filter: alpha(opacity=100); /* IE */
}

.index-category-entry:hover .bg {
	opacity: 0.6;
	filter: alpha(opacity=60); /* IE */
}

.index-category-entry a {
	position: absolute;
	top: 0px;
	left: 0px;
	width: 100%;
	height: 100%;
	background: -moz-linear-gradient(top,  rgba(0,0,0,0) 1%, rgba(0,0,0,0) 70%, rgba(0,0,0,0.65) 93%, rgba(0,0,0,0.65) 100%); /* FF3.6+ */
	background: -webkit-gradient(linear, left top, left bottom, color-stop(1%,rgba(0,0,0,0)), color-stop(70%,rgba(0,0,0,0)), color-stop(93%,rgba(0,0,0,0.65)), color-stop(100%,rgba(0,0,0,0.65))); /* Chrome,Safari4+ */
	background: -webkit-linear-gradient(top,  rgba(0,0,0,0) 1%,rgba(0,0,0,0) 70%,rgba(0,0,0,0.65) 93%,rgba(0,0,0,0.65) 100%); /* Chrome10+,Safari5.1+ */
	background: -o-linear-gradient(top,  rgba(0,0,0,0) 1%,rgba(0,0,0,0) 70%,rgba(0,0,0,0.65) 93%,rgba(0,0,0,0.65) 100%); /* Opera 11.10+ */
	background: -ms-linear-gradient(top,  rgba(0,0,0,0) 1%,rgba(0,0,0,0) 70%,rgba(0,0,0,0.65) 93%,rgba(0,0,0,0.65) 100%); /* IE10+ */
	background: linear-gradient(to bottom,  rgba(0,0,0,0) 1%,rgba(0,0,0,0) 70%,rgba(0,0,0,0.65) 93%,rgba(0,0,0,0.65) 100%); /* W3C */
	filter: progid:DXImageTransform.Microsoft.gradient( startColorstr='#00000000', endColorstr='#a6000000',GradientType=0 ); /* IE6-9 */
}

.index-category-entry a,
.index-category-entry a:hover,
.index-category-entry a:visited {
	text-decoration: none;
	color: #fff;
}
.index-category-entry .name {
	position: absolute;
	right: 5px;
	bottom: 3px;
	font-size: 24px;
}


/* index columns */

.index-column {
	margin: 5px 0;
	width: 33%;
	float: left;
}

.index-column .title {
    background-color: #364898;
    color: #cff3ff;
    display: block;
    margin: 0;
    padding: 8px 12px;
    text-decoration: none;
	font-size: 20px;
    font-weight: normal;
	border-top-left-radius: 5px;
}

.index-column .wrapper {
	position: relative;
}

.index-column .bg {
	width: 100%;
	height: 200px;
	background-size: cover;
	background-position: center center;
	opacity: 0.25; 
	filter: alpha(opacity=25); /* IE */
}

.index-column ul {
	position: absolute;
	top: 0;
	left: 0;
	padding-right: 20px;
}

.index-column-pad {
	width: 0.5%;
	margin: 5px 0;
	float: left;
}

#index-gallery {
    margin-top: 25px;
}

#index-gallery a {
    display: inline-block;
    border: 1px solid #aaa;
    border-radius: 5px;
    box-shadow: 4px 4px 3px #aaa;
    margin: 10px;
    padding: 6px;
    background: #eee;
}

#index-gallery a img {
    width: 216px;
}

#index-gallery-prepare {
    display: none;
}


/* footer */

#footer {
    color: #cff3ff;
    font-size: 14px;
	text-align: center;
	margin-top: 20px;
	margin-bottom: 60px;
}

#footer p {
    margin: 0;
    padding-top: 3px;
    padding-bottom: 3px;
}

#footer a,
#footer a:hover,
#footer a:visited {
	color: #cff3ff;
}





/* ==========================================================================
   Helper classes
   ========================================================================== */

/*
 * Image replacement
 */

.ir {
    background-color: transparent;
    border: 0;
    overflow: hidden;
    /* IE 6/7 fallback */
    *text-indent: -9999px;
}

.ir:before {
    content: "";
    display: block;
    width: 0;
    height: 150%;
}

/*
 * Hide from both screenreaders and browsers: h5bp.com/u
 */

.hidden {
    display: none !important;
    visibility: hidden;
}

/*
 * Hide only visually, but have it available for screenreaders: h5bp.com/v
 */

.visuallyhidden {
    border: 0;
    clip: rect(0 0 0 0);
    height: 1px;
    margin: -1px;
    overflow: hidden;
    padding: 0;
    position: absolute;
    width: 1px;
}

/*
 * Extends the .visuallyhidden class to allow the element to be focusable
 * when navigated to via the keyboard: h5bp.com/p
 */

.visuallyhidden.focusable:active,
.visuallyhidden.focusable:focus {
    clip: auto;
    height: auto;
    margin: 0;
    overflow: visible;
    position: static;
    width: auto;
}

/*
 * Hide visually and from screenreaders, but maintain layout
 */

.invisible {
    visibility: hidden;
}

/*
 * Clearfix: contain floats
 *
 * For modern browsers
 * 1. The space content is one way to avoid an Opera bug when the
 *    `contenteditable` attribute is included anywhere else in the document.
 *    Otherwise it causes space to appear at the top and bottom of elements
 *    that receive the `clearfix` class.
 * 2. The use of `table` rather than `block` is only necessary if using
 *    `:before` to contain the top-margins of child elements.
 */

.clearfix:before,
.clearfix:after {
    content: " "; /* 1 */
    display: table; /* 2 */
}

.clearfix:after {
    clear: both;
}

/*
 * For IE 6/7 only
 * Include this rule to trigger hasLayout and contain floats.
 */

.clearfix {
    *zoom: 1;
}

/* ==========================================================================
   EXAMPLE Media Queries for Responsive Design.
   These examples override the primary ('mobile first') styles.
   Modify as content requires.
   ========================================================================== */

@media only screen and (min-width: 35em) {
    /* Style adjustments for viewports that meet the condition */
}

@media print,
       (-o-min-device-pixel-ratio: 5/4),
       (-webkit-min-device-pixel-ratio: 1.25),
       (min-resolution: 120dpi) {
    /* Style adjustments for high resolution devices */
}

/* ==========================================================================
   Print styles.
   Inlined to avoid required HTTP connection: h5bp.com/r
   ========================================================================== */

@media print {
    * {
        background: transparent !important;
        color: #000 !important; /* Black prints faster: h5bp.com/s */
        box-shadow: none !important;
        text-shadow: none !important;
    }

    a,
    a:visited {
        text-decoration: underline;
    }

    a[href]:after {
        content: " (" attr(href) ")";
    }

    abbr[title]:after {
        content: " (" attr(title) ")";
    }

    /*
     * Don't show links for images, or javascript/internal links
     */

    .ir a:after,
    a[href^="javascript:"]:after,
    a[href^="#"]:after {
        content: "";
    }

    pre,
    blockquote {
        border: 1px solid #999;
        page-break-inside: avoid;
    }

    thead {
        display: table-header-group; /* h5bp.com/t */
    }

    tr,
    img {
        page-break-inside: avoid;
    }

    img {
        max-width: 100% !important;
    }

    @page {
        margin: 0.5cm;
    }

    p,
    h2,
    h3 {
        orphans: 3;
        widows: 3;
    }

    h2,
    h3 {
        page-break-after: avoid;
    }
}
