/**
 * Define color variables ...
 **/
.ccchildpages {
  -moz-box-sizing: content-box;
  -webkit-box-sizing: content-box;
  box-sizing: content-box;
  margin: 0 !important;
  padding: 0 !important;
  clear: both;
  display: block;
  width: 100%;
}

.ccchildpage {
  -moz-box-sizing: content-box;
  -webkit-box-sizing: content-box;
  box-sizing: content-box;
  margin: 1em 1%;
  padding: 0.75em 2%;
  border: none;
}

.ccfirst {
  clear: both;
}

.cclast {
  margin: 1em 1% 1em 0;
  float: right;
}

.onecol .ccchildpage {
  width: 94%;
}

.twocol .ccchildpage {
  width: 44%;
}

.threecol .ccchildpage {
  width: 27.333%;
}

.fourcol .ccchildpage {
  width: 19%;
}

/*
 * Media Queries
 */
@media screen and (min-width: 481px) and (max-width: 760px) {
  /* Undo rules we are not interested in for lower resolutions */
  .fourcol .cclast {
    margin: 1em 1%;
    float: left;
  }
  .fourcol .ccfirst {
    clear: none !important;
  }
  /* Add new rules for lower resolutions */
  .fourcol .ccchildpage {
    width: 27.333%;
  }
  .fourcol .ccchildpage:nth-child(3n) {
    margin: 1em 1% 1em 0;
    float: right;
  }
  .fourcol .ccchildpage:nth-child(3n+1) {
    clear: both !important;
  }
}
@media screen and (min-width: 321px) and (max-width: 480px) {
  /* Undo rules we are not interested in for lower resolutions */
  .threecol .cclast,
  .fourcol .cclast {
    margin: 1em 1%;
    float: left;
  }
  .threecol .ccfirst,
  .fourcol .ccfirst {
    clear: none !important;
  }
  /* Add new rules for lower resolutions */
  .threecol .ccchildpage,
  .fourcol .ccchildpage {
    width: 44%;
  }
  .threecol .ccchildpage:nth-child(2n),
  .fourcol .ccchildpage:nth-child(2n) {
    margin: 1em 1% 1em 0;
    float: right;
  }
  .threecol .ccchildpage:nth-child(2n+1),
  .fourcol .ccchildpage:nth-child(2n+1) {
    clear: both !important;
  }
}
@media screen and (max-width: 320px) {
  /* Undo rules we are not interested in for lower resolutions */
  .twocol .cclast,
  .threecol .cclast,
  .fourcol .cclast {
    margin: 1em 1%;
    float: left;
  }
  .twocol .ccfirst,
  .threecol .ccfirst,
  .fourcol .ccfirst {
    clear: none !important;
  }
  /* Add new rules for lower resolutions */
  .twocol .ccchildpage,
  .threecol .ccchildpage,
  .fourcol .ccchildpage {
    width: 94%;
    float: none;
  }
}
