/* grid 3 columns */

 * {
    margin: 0;
    padding: 0;
}

ul.grid3 {
  list-style: none; /* remove dots */
  margin-left: -0.25%; /* should match 1/2 of left li margin */
  
  width: 100%;
  margin-top: 10px;
}

ul.grid3 li {
  width: 49%; /* 33.333% - 0.5% margin */
  display: inline-block;
  background: #3a4c59;
  margin: 0 0 0.5% 0.5%;
  vertical-align: top;

  font-size: 10px;
  box-sizing: border-box; /* size includes border and padding */
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

a.gridLink {
  width: 100%;
  /* background: #ccc; */
  font-family: 'PT Sans', Arial, sans-serif;
  font-weight: bold;
  text-decoration: none;
  font-size: 15px;
  text-align: center !important;
  color:#01444c;
  display: block;
  text-overflow: ellipsis;  /* truncate text if too long */
  overflow: hidden;
  white-space: nowrap;
  margin: 0 auto;
}

a.gridLink:hover {
  text-decoration: none;
  color: #006975;
  background: none;
}

a.gridLink:active {
  text-decoration: none;
  color: #950404;
  background: none;
}


ul.grid3 li h3 {
  font-size: 15px;
  text-align: center !important;
}

ul.grid3 li p {
  font-size: 16px;
  font-weight: bold;
  text-align: center !important;
  margin-bottom: 1%;
}

ul.grid3 li img { 
  width: 100%; /* scale image to li size */
  border: 1px solid #748aa6;
}

/* grid 4 columns */

ul.grid4 {
  list-style: none; /* remove dots */
  margin-left: -0.25%; /* should match 1/2 of left li margin */
  font-size: 0;
  width: 100%;
  margin-top: 10px;
}

ul.grid4 li {
  width: 24.5%; /* 25% - 0.5% margin */
  display: inline-block;
  background: #fff;
  margin: 0 0 0.5% 0.5%;
  vertical-align: top;
  border: 1px solid #ccc;
  -webkit-border-radius: 5px;
  -moz-border-radius: 5px;
  -ms-border-radius: 5px;
  -o-border-radius: 5px;
  border-radius: 5px;

  padding: 10px;
  box-sizing: border-box; /* size includes border and padding */
  -moz-box-sizing: border-box;
  -webkit-box-sizing: border-box;
}

ul.grid4 li .gridLink {
  width: 100%;
  font-family: 'PT Sans', Arial, sans-serif;
  font-weight: bold;
  font-size: 15px;
  text-align: center !important;
  color:#01444c; 
}

ul.grid4 li h3 {
  font-size: 15px;
}

ul.grid4 li img { 
  width: 100%; /* scale image to li size */
}

.ellip {
  text-overflow: ellipsis;  /* truncate text if too long */
  overflow: hidden;
  white-space: nowrap;
}



@media (max-width: 640px) {
  ul.grid3 li {
    display: block;
    width: 100% !important;
    margin: 0 0 2% 0;
  }
  ul.grid3 {
    margin-left: 0;
  }
  ul.grid3 li .gridLink {
  font-size: 15px;
  }

  ul.grid4 li {
    display: block;
    width: 100% !important;
    margin: 0 0 5px 0;
  }
  ul.grid4 {
    margin-left: 0;
  }
  ul.grid4 li .gridLink {
  font-size: 15px;
  }

}