*, *:before, *:after {
  box-sizing: border-box;
}

html {
  color: #444;
  font: 16px/1.5 'Nunito Sans','微软雅黑', sans-serif;
}
@media screen and (max-width: 800px) {
  html {
    font-size: 14px;
  }
}

body {
  background: #f8f8f8;
  margin: 0;
  padding: 0;
}

h2 {
  position: relative;
  line-height: 2;
  margin: 1em 0;
}
h2:after {
  position: absolute;
  display: block;
  content: '';
  height: 4px;
  width: 80px;
  background: #08f;
}

h3 {
  color: #111;
  margin-top: 0;
  line-height: 2;
  margin-bottom: .5rem;
}
h3:after {
  position: absolute;
  display: block;
  content: '';
  height: 2px;
  width: 40px;
  background: #ddd;
}

p {
  margin: 1rem 0;
  font-size: 14px;
  color: #aaa;
}

header {
  padding-left: 1em;
  font: bold 16px/48px sans-serif;

  color: #eee;
  background: #222;
}

.container {
  padding: 2rem;
  margin: 0 auto;
  max-width: 1000px;
}

.grid {
  display: flex;
  flex-wrap: wrap;
  margin: -0.8rem;
}

.card {
  /*width: calc(25% - 1.6rem);*//*25%是一行4格,33.33%是一行3格*/
  /*margin: 0.8rem;*/
  width: calc(25% - 3rem);
  margin: 1.5rem;
  background: #fff;
  overflow: hidden;
  border-radius: .5rem;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05), 0 2px 5px rgba(0, 0, 0, 0.05);
  /*transition: box-shadow 300ms;*/
  transition: all 250ms cubic-bezier(0.02, 0.01, 0.47, 1);
  cursor: pointer;
}
@media screen and (max-width: 800px) {
  .card {
    display: flex;
    width: calc(100% - 1.6rem);
  }
}





.card:hover {
  /*box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05), 0 5px 15px rgba(0, 0, 0, 0.05);*/
  box-shadow: 0 20px 20px rgba(0, 0, 0, 0.16);
  transform: translate(0, -5px);
  transition-delay: 0s !important;
}
.card--image {
  position: relative;
  width: 100%;
  padding-bottom: 60%;
  overflow: hidden;
}
@media screen and (max-width: 800px) {
  .card--image {
    width: 25%;
    min-width: 25%;
    padding-bottom: 25%;
  }
}
.card--image img {
  position: absolute;
  width: 100%;
  height: auto;
}
@media screen and (max-width: 800px) {
  .card--image img {
    height: 100%;
    width: auto;
  }
}



.card--content {
  padding: 0 1.5rem;
}
.card--category {
  font-size: .8em;
  letter-spacing: .1ch;
  padding-top: 1em;
  font-weight: bold;
  color: #999;
  text-transform: uppercase;
}




