html {
  height: 100%;
}

*,
*:after,
*:before {
  -webkit-box-sizing: border-box;
  -moz-box-sizing: border-box;
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}

/* Clearfix hack by Nicolas Gallagher: http://nicolasgallagher.com/micro-clearfix-hack/ */
.clearfix:before,
.clearfix:after {
  content: " ";
  display: table;
}

.clearfix:after {
  clear: both;
}

.clearfix {
  *zoom: 1;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

body {
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont,
    "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", sans-serif,
    "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";
  background: #f4f4f4;
  font-weight: 300;
  font-size: 15px;
  color: #333;
  overflow: scroll;
  overflow-x: hidden;
}

p {
  margin-bottom: 21px;
}

a {
  color: #555;
  text-decoration: none;
}

.container {
  width: 100%;
  position: relative;
}

header,
.grid,
footer {
  max-width: 1250px;
  width: 100%;
  margin: 0 auto;
  position: relative;
  padding: 60px 30px 50px;
}

header h1 {
  font-size: 34px;
  line-height: 38px;
  margin: 0 auto;
  font-weight: 700;
  color: #333;
  float: left;
}

header h1 span {
  display: block;
  font-size: 20px;
  font-weight: 300;
}

header div {
  float: right;
  margin-top: 2px;
}

.social-fb,
.social-tw,
.social-in {
  display: inline-block;
  background: url(../img/fb-tw-in.png) no-repeat;
  height: 32px;
  width: 32px;
  margin: 2px;
}

.social-fb {
  background-position: 0px -32px;
}

.social-tw {
  background-position: -32px -32px;
}

.social-in {
  background-position: -64px -32px;
}

.social-fb:hover {
  background-position: 0px 0px;
}

.social-tw:hover {
  background-position: -32px 2px;
}

.social-in:hover {
  background-position: -64px 1px;
}

.container > footer {
  font-size: 14px;
  line-height: 16px;
  margin: 0 auto;
  font-weight: 300;
  color: #333;
  float: left;
}

.container > footer span {
  display: block;
}

.main > p {
  text-align: center;
  padding: 50px 20px;
}

.grid {
  list-style: none;
  padding: 20px 0;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
}

@media (min-width: 1265px) {
  .grid {
    justify-content: start;
  }
}

.grid li {
  display: inline-block;
  margin: 10px 5px 0 5px;
  vertical-align: top;
  height: 240px;
}

.grid li .grid-item,
.grid li .grid-item img {
  border: none;
  outline: none;
  display: block;
  position: relative;
}

.grid li .grid-item {
  width: 240px;
  height: 240px;
  text-align: left;
  padding: 20px;
}

.grid li .grid-item:hover {
  opacity: 0.9;
  cursor: pointer;
}

.data-title {
  color: #fff;
  font-weight: 300;
  font-size: 34px;
  text-shadow: 1px 1px 0 rgba(0, 0, 0, 0.3);
}

.data-description,
.data-link {
  text-indent: -9999px;
  display: block;
  height: 50px;
  overflow: hidden;
}

.grid li.expanded .grid-item::after {
  top: 240px;
  border: solid transparent;
  content: " ";
  height: 0;
  width: 0;
  position: absolute;
  pointer-events: none;
  border-bottom-color: #ddd;
  border-width: 15px;
  left: 50%;
  margin: -20px 0 0 -15px;
}

.expander {
  position: absolute;
  background: #ddd;
  top: auto;
  left: 0;
  width: 100%;
  margin-top: 10px;
  text-align: left;
  height: 0;
  overflow: hidden;
}

.expander-inner {
  padding: 50px 30px;
  height: 100%;
}

.close {
  position: absolute;
  width: 40px;
  height: 40px;
  top: 20px;
  right: 20px;
  cursor: pointer;
}

.close::before,
.close::after {
  content: "";
  position: absolute;
  width: 100%;
  top: 50%;
  height: 1px;
  background: #888;
  -webkit-transform: rotate(45deg);
  -moz-transform: rotate(45deg);
  transform: rotate(45deg);
}

.close::after {
  -webkit-transform: rotate(-45deg);
  -moz-transform: rotate(-45deg);
  transform: rotate(-45deg);
}

.close:hover::before,
.close:hover::after {
  background: #333;
}

.fullimg,
.details {
  width: 50%;
  float: left;
  height: 100%;
  overflow: hidden;
  position: relative;
}

.details {
  padding: 0 20px;
  float: none;
  margin: 0 auto;
}

.fullimg {
  text-align: center;
  display: none;
}

.fullimg img {
  display: inline-block;
  max-height: 100%;
  max-width: 100%;
}

.details h2 {
  font-weight: 300;
  font-size: 52px;
  padding: 40px 0 10px;
  margin-bottom: 10px;
}

.details p {
  font-weight: 400;
  font-size: 16px;
  line-height: 22px;
  color: #777;
}

.details a {
  font-weight: 700;
  font-size: 16px;
  color: #333;
  text-transform: uppercase;
  letter-spacing: 2px;
  padding: 10px 20px;
  border: 3px solid #333;
  display: inline-block;
  margin: 30px 0 0;
  outline: none;
}

.details a::before {
  content: "\2192";
  display: inline-block;
  margin-right: 10px;
}

.details a:hover {
  border-color: #999;
  color: #999;
}

.loading {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #ddd;
  box-shadow: 0 0 1px #ccc, 15px 30px 1px #ccc, -15px 30px 1px #ccc;
  position: absolute;
  top: 50%;
  left: 50%;
  margin: -25px 0 0 -25px;
  -webkit-animation: loader 0.5s infinite ease-in-out both;
  -moz-animation: loader 0.5s infinite ease-in-out both;
  animation: loader 0.5s infinite ease-in-out both;
  display: none !important;
}

@-webkit-keyframes loader {
  0% {
    background: #ddd;
  }
  33% {
    background: #ccc;
    box-shadow: 0 0 1px #ccc, 15px 30px 1px #ccc, -15px 30px 1px #ddd;
  }
  66% {
    background: #ccc;
    box-shadow: 0 0 1px #ccc, 15px 30px 1px #ddd, -15px 30px 1px #ccc;
  }
}

@-moz-keyframes loader {
  0% {
    background: #ddd;
  }
  33% {
    background: #ccc;
    box-shadow: 0 0 1px #ccc, 15px 30px 1px #ccc, -15px 30px 1px #ddd;
  }
  66% {
    background: #ccc;
    box-shadow: 0 0 1px #ccc, 15px 30px 1px #ddd, -15px 30px 1px #ccc;
  }
}

@keyframes loader {
  0% {
    background: #ddd;
  }
  33% {
    background: #ccc;
    box-shadow: 0 0 1px #ccc, 15px 30px 1px #ccc, -15px 30px 1px #ddd;
  }
  66% {
    background: #ccc;
    box-shadow: 0 0 1px #ccc, 15px 30px 1px #ddd, -15px 30px 1px #ccc;
  }
}

@media screen and (max-width: 830px) {
  .expander h3 {
    font-size: 32px;
  }
  .expander p {
    font-size: 13px;
  }
  .expander a {
    font-size: 12px;
  }
}

@media screen and (max-width: 650px) {
  .fullimg {
    display: none;
  }
  .details {
    float: none;
    width: 100%;
  }
}
