html {
  font-size: 100%;
}

.mag-wrap {
    margin: 0 auto;
    padding-bottom: 0px;
}

.mag-full-width {
    margin: 0 auto;
    max-width: 100%;
    padding-bottom: 0px;
}

.mag-stamp {
}

.mag-block-bkg {
  opacity: 1;
}

.mag-txt-only {
}

/* ---- grid ---- */

.mason-grid {
  background: #fff;
  overflow: hidden;
}

/* clearfix */
.mason-grid:after {
  content: '';
  display: block;
  clear: both;
}

/* ---- grid-item ---- */

.mason-grid-sizer {
  width: 12.5%; /* in % */
}

.mason-gutter-sizer {
  width: 0;
}

.mason-grid-item {
  height: auto;
  float: left;
  /* width: 50%; */
  margin-bottom: 0px;
}

.mason-grid-item-w100 { width:  100%; }
.mason-grid-item-w75 { width:  75%; }
.mason-grid-item-w50 { width:  50%; }
.mason-grid-item-w25 { width:  25%; }
.mason-grid-item-w66 { width:  66%; }
.mason-grid-item-w33 { width:  33%; }
.mason-grid-item-w80 { width:  80%; }
.mason-grid-item-w60 { width:  60%; }
.mason-grid-item-w40 { width:  40%; }
.mason-grid-item-w20 { width:  20%; }

/* The headings: */
.mag-tiles-block h5#block-sub-title{
    color: #fff;
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0;
    width: 100%;
    position: absolute;
    bottom: 0;
    /* border-left: 3px solid rgba(32, 49, 61, 0.85) !important; */
    /* white-space: pre-wrap; */

}
.mag-tiles-block h3 strong {
    font-weight: normal;
    padding: 5px 0px;
}
.mag-tiles-block h3#block-title {
    /*
    color: #fff;
    font-size: 1.4rem;
    font-weight: 300;
    margin-top: 0;
    width: 100%;
    position: absolute;
    top: 0;
    */
    color: #fff;
    font-size: 1.4rem;
    font-weight: 300;
    margin-top: 0;
    /* width: 100%; */
    position: absolute;
    top: 0;
    padding: 10px;
    width: 50%;
    text-align: left;
    line-height: 1.1;
    /* border-left: 3px solid rgba(32, 49, 61, 0.85) !important; */
    /* white-space: pre-wrap; */
}
.mag-tiles-block h5 strong {
    font-weight: normal;
    line-height: 1;
    padding: 10px;
    position: absolute;
    bottom: 0;
}
.cat-name {
    /*
    padding: 0.2rem;
    color: white;
    bottom: 0;
    position: absolute;
    right: 0;
    */
    color: white;
    bottom: 0;
    position: absolute;
    right: 0;
    display: inline-block !important;
    height: initial !important;
    width: initial !important;

}
.cat-name a {
    padding: 0.3rem;
    color: white;
}
#block-slide-text {
    color: white;
    padding: 15px;
    vertical-align: middle;
    position: absolute;
    top: -300px;
    width: 50%;
    right: 0;
    transition: top 0.3s ease-out, opacity 0.3s ease-out;
    opacity: 0;
  line-height: 1.2rem;
    font-size: 1.09rem;
}

#block-slide-text a {
    color: white;
    font-weight: bold;
}


#block-slide-text:hover ~ .mag-internal > a {

}

.mag-internal > a:hover + #block-slide-text, #block-slide-text:hover {
    transition: top 0.3s ease-out, opacity 0.3s ease-out;
    top: 0;
    opacity: 1;
}

.mag-internal > a {
    display: block;
    height: 100%;
    width:100%;
    /* padding: 0 0 10px 10px; */
    transition: background 0.4s ease-out;
    transform: translateY(0) rotate(0.0001deg); /* This is a hack to fix the issue of Firefox sub-pixel rendering issue messing up the child transitions */
}

.mag-internal > a:hover {
  
}

/* For heights relative to widths - aspect ratio */

.mag-content {
    height: 0;
    border: 0;
    position: relative;
    padding-top: 50%;
}

.mag-content.h100 {
    padding-top: 100%;
}

.mag-content.h50 {
    padding-top: 50%;
}

.mag-content.h33 {
    padding-top: 33.3%;
}

.mag-content.h25 {
    padding-top: 25%;
}

.mag-img-cover {
  background-size: cover;
}

.mag-internal {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

/* Responsive behaviour */

@media only screen and (max-width: 93.75em) {

/* Tiles 33% width and below go 100% height */
  .mason-grid-item-w25 .mag-content,
  .mason-grid-item-w33 .mag-content,
  .mason-grid-item-w20 .mag-content { padding-top: 100% }

}

@media only screen and (max-width: 72.063em) {

  /*
  .mag-tiles-block h3 {
      font-size: 1.875rem;
      width: 80%;
  }
  */

  .mag-tiles-block h3#block-title {
      max-width: 55%;
      line-height:1.1;
      padding: 5px;
  }
  .mag-tiles-block h3 strong {
      line-height: 1.1;
      font-size: 1.3rem;
  }
  .mag-tiles-block h5#block-sub-title {
      max-width: 55%;
  }
  .mag-tiles-block h5 strong, #block-slide-text, .cat-name a {
      line-height: 1.1;
      font-size: 1.1rem;
  }
  .mag-tiles-block h5 strong {
    padding: 0.4rem;
  }
  span.cat-name {
      width: 50%;
  }
  #block-slide-text {
    top: 0;
    opacity: 1;
    width: 45%;
  }

/* Tiles 50% width and above go full width and 50% height, smaller go half width and 100% height */
  .mason-grid-item-w75,
  .mason-grid-item-w66,
  .mason-grid-item-w80,
  .mason-grid-item-w60,
  .mason-grid-item-w50 { width:  100%;}
  .mason-grid-item-w25,
  .mason-grid-item-w33,
  .mason-grid-item-w40,
  .mason-grid-item-w20 { width:  50%; }
  .mason-grid-item-w75 .mag-content,
  .mason-grid-item-w66 .mag-content,
  .mason-grid-item-w80 .mag-content,
  .mason-grid-item-w60 .mag-content,
  .mason-grid-item-w50 .mag-content { padding-top: 50%}
  .mason-grid-item-w25 .mag-content,
  .mason-grid-item-w33 .mag-content,
  .mason-grid-item-w40 .mag-content,
  .mason-grid-item-w20 .mag-content { padding-top: 100% }

}


@media only screen and (max-width: 48em) {

 /* All tiles full width, with 50% height */
  .mason-grid-item-w75,
  .mason-grid-item-w66,
  .mason-grid-item-w80,
  .mason-grid-item-w60,
  .mason-grid-item-w50,
  .mason-grid-item-w25,
  .mason-grid-item-w33,
  .mason-grid-item-w40,
  .mason-grid-item-w20 { width:  100%;}
  .mason-grid-item-w75 .mag-content,
  .mason-grid-item-w66 .mag-content,
  .mason-grid-item-w80 .mag-content,
  .mason-grid-item-w60 .mag-content,
  .mason-grid-item-w50 .mag-content,
  .mason-grid-item-w25 .mag-content,
  .mason-grid-item-w33 .mag-content,
  .mason-grid-item-w40 .mag-content,
  .mason-grid-item-w20 .mag-content { padding-top: 50%}

}
