/* type selectors 
 * some property imported from normalize.css
 */

article, aside, details, figcaption, figure, footer, header, hgroup, nav, section, summary { display: block; }

body {
  font-family: sans-serif;
  font-size: 100%;
  margin: 0;
  padding: 0;
  -webkit-text-size-adjust: 100%;
  -moz-text-size-adjust: 100%;
  -ms-text-size-adjust: 100%;
}

img { border: 0; -ms-interpolation-mode: bicubic; }
form { margin: 0; }

/* layout tweaks */

#banner{
  max-width: 645px;
  padding: 20px;
  margin: 0 auto;
  text-align: center;
}

.photos {
  margin: 0 auto;
  /* max-width: 645px; */
  max-width: 680px;
  background: #fff;
  border-radius: 5px;
  box-shadow: 1px 1px 5px rgba(0,0,0,0.1)
}

.photos-inner {
  margin: 0 auto;
  padding: 10px;
  overflow: hidden;
}

.layout-thumbs-description .photos-inner{ padding: 4px 0; }

/* reset list style */
.item-footer-list,
.page-navigation-list,
.photos-list { 
  list-style-type:none;
  padding:0;
  margin:0; 
}

.item-footer-item,
.page-navigation-list-item {
  display: inline; 
}

/* base font style (and margin) */
.title {
  font-size: 1.125em; /* 18/16 */
  font-weight: normal;
  margin: 0;
}

#banner-header{
  font-size: 1.375em; /* 22/16 */
  margin: 0;
  font-weight: normal;
}

#banner-description{
  font-size: 0.75em; /* 12/16 */
  font-weight: normal;
  margin: 0;
  font-weight: normal;
}

.item-content,
.gallery-intro-description{
  font-size: 0.875em; /* 14/16 */
  line-height: 1.8em;
}

.item-container .item-content {
  color: #666;
}

.item-footer {
  font-size: 0.8125em; /* 13/16 */
  color: #999;
}

.gallery-pages .item-footer{
  text-align: center;
  color: #666;
}

.gallery-pages .item-footer-item{
  display: inline
}

.photo-exif {
  border:1px solid #ddd;
  padding: 10px;
  margin: 10px 0;
}

/* separator */
.page-navigation-list-item:after { content: ' | '; }
.page-navigation-list-item:last-child:after { content: ''; }

/** IE8 can't recognized :last-child; **/
.page-navigation-next:after{ content: ''; }

/* navigation */
.page-navigation {
  margin: 10px 0;
  text-align: center;
  font-size: 0.875em;
}

.main {
  margin: 0 0 20px 0;
}

.emoticon {
  border: 0;
  padding: 0 1px;
  background-color: transparent;
}

/* banner */
.banner-container:link,
.banner-container:visited,
.banner-container:hover,
.banner-container:active,
.item-container,
.gallery-cover-link{ 
  text-decoration:none;
  display:block;
  color: inherit;
}

/* acound item-container */
.item-container{ padding: 0 10px; }
.item-container .item-content p{ margin:0.2em 0 0.8em; }

/** arrow style **/
.item-container {
  display: block;
  position: relative;
  overflow: hidden;
}

.item-container:after {
  content: "";
  position: absolute;
  right: 10px;
  top: 50%;
  display: block;
  width: 5px;
  height: 5px;
  margin-top: -4px;
  border-top: solid 2px #999;
  border-right: solid 2px #999;
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
}

/** avoid footer contents are on the arrow **/
.item-container .item-content,
.item-container .item-footer { margin-right: 16px; } 

/* photos list */
.photos-list-item{
  float: left; 
  width: 33%;
  max-width: 125px;
  padding: 5px;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.photo-thumbnail{
  width:100%;
  display:block;
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}
.photo-thumbnail-wrapper{ width: 70px; float:left; margin-right:10px; }
.layout-thumbs-description .item{
  clear: both;
  border-bottom: 1px solid #ddd;
  padding: 6px 0;
}
.layout-thumbs-description .item:last-child{ border-bottom: none; }
.layout-thumbs-description .item-wrapper{ overflow:hidden; }

.gallery-intro-image-wrapper,
.photo-image-wrapper { padding: 10px 0; }

.gallery-intro-image,
.photo-image-wrapper img{
  display: block;
  margin: 0 auto;
  max-width: 100%;
  border: 10px solid #fff;
  box-shadow: 1px 1px 3px rgba(0,0,0,0.4);
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
  box-sizing: border-box;
}

.gallery-intro-description,
.gallery-pages .item-wrapper{
  max-width: 640px;
  padding: 0;
  margin: 0 auto;
}

.gallery-intro-description p{
  margin-top: 0;
}

.gallery-intro-entrance-link{
  display:block;
  text-align: center;
  margin: 1em auto;
  padding: 10px;
  background: #d22630;
  color: #fff;
  width: 10em;
  border-radius: 5px;
}

.gallery-intro-entrance-link:link,
.gallery-intro-entrance-link:visited,
.gallery-intro-entrance-link:hover,
.gallery-intro-entrance-link:active {
  color: #fff;
}

.gallery-intro-entrance-link:hover{
  background-color: #ffcd00;
}

.gallery-pages .photo-header {
  text-align: center;
  margin: 0.4em;
}

.layout-thumbs-only .photos-inner{ max-width: 395px; }
.photos-list-item:nth-child(4n+1){ clear: none; }
.photos-list-item:nth-child(5n+1){ clear: none; }
.photos-list-item:nth-child(3n+1){ clear: both; }

@media screen and (min-width:535px){
  .layout-thumbs-only .photos-inner{ max-width: 520px; }
  .layout-thumbs-only .photos-list-item:nth-child(3n+1){ clear: none; }
  .layout-thumbs-only .photos-list-item:nth-child(5n+1){ clear: none; }
  .layout-thumbs-only .photos-list-item:nth-child(4n+1){ clear: both; }
}

@media screen and (min-width:660px){
  .layout-thumbs-only .photos-inner{ max-width: 625px; }
  .layout-thumbs-only .photos-list-item:nth-child(3n+1){ clear: none; }
  .layout-thumbs-only .photos-list-item:nth-child(4n+1){ clear: none; }
  .layout-thumbs-only .photos-list-item:nth-child(5n+1){ clear: both; }
}

/* clearfix */
.clearfix:after {
  content: " ";
  display: block;
  visibility: hidden;
  clear: both;
  height: 0;
  font-size: 0;
  line-height: 0;
}

.clearfix {
  zoom: 1;
}