@import url('https://fonts.googleapis.com/css?family=Open+Sans:300,400&display=swap');

body {
  margin: 0;
  padding: 0;
  background-color: #f4f4f4;
  color: #3c484e;
  font-family: 'Open Sans', sans-serif;
}

.header-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.header a {
  text-decoration: none;
  color: #15302C;
}

.main {
  padding: 10px;
  grid-template-columns: minmax(auto, 976px);
  display: grid;
  justify-content: center;
}

.characters {
  grid-template-columns: repeat(3, 1fr);
  grid-gap: 1.5rem;
  grid-row-gap: 1.5em;
  display: grid;
}

.characters-inner {
  grid-template-columns: 1fr 2fr;
  grid-gap: 1.5rem;
  grid-row-gap: 1.5em;
  display: grid;
}

.characters-card {
  text-decoration: none;
  box-shadow: 8px 14px 38px rgba(39,44,49,.06), 1px 3px 8px rgba(39,44,49,.03);
  border-radius: 5px;
  margin: 0 0 20px 0;
  display: block;
  animation-duration: 2s;
  animation-name: fade;
}

.characters-card img {
  width: 100%;
  height: auto;
  border-radius: 5px 5px 0 0;
}

.characters-card h2 {
  font-size: 18px;
  font-weight: 400;
  text-align: center;
}

.characters-card h3 {
  font-size: 18px;
  font-weight: 400;
  text-align: left;
  margin: 20px;
}

.characters-item {
  text-decoration: none;
  box-shadow: 8px 14px 38px rgba(39,44,49,.06), 1px 3px 8px rgba(39,44,49,.03);
  border-radius: 5px;
  margin: 0 0 20px 0;
  display: block;
  animation-duration: 2s;
  animation-name: fade;
}

.characters-item img {
  width: 100%;
  height: auto;
  border-radius: 5px 5px 0 0;
}

.characters-item h2 {
  font-size: 18px;
  font-weight: 300;
  padding: 5px 10px;
  display: flex;
  justify-content: space-between;
}

.characters-item a {
  text-decoration: none;
  color: #026C86;
}

@keyframes fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}

.main-loading {
  border: 4px solid #f3f3f3;
  border-top: 4px solid #3498db;
  border-radius: 50%;
  width: 20px;
  height: 20px;
  animation: spin 2s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}