/* Prevent homepage sections from overlapping */

.home section,

.home .wp-block-group,

.home .wp-block-cover {

  position: relative;

  clear: both;

  margin-bottom: 40px;

}

.home .wp-block-post-template {

  display: grid;

  grid-template-columns: repeat(2, minmax(0, 1fr));

  gap: 32px;

}

.home .wp-block-post-template img {

  display: block;

  width: 100%;

  height: auto;

}

.home .wp-block-post-template > li {

  min-width: 0;

}

@media (max-width: 700px) {

  .home .wp-block-post-template {

    grid-template-columns: 1fr;

  }

} 

/* iPhone and mobile homepage fix */
@media screen and (max-width: 700px) {
  .home h1,
  .home h2,
  .home h3,
  .home p {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    height: auto !important;
    max-width: 100% !important;
    overflow-wrap: break-word;
  }

  .home article,
  .home section,
  .home .wp-block-group,
  .home .wp-block-post-template,
  .home .wp-block-post-template > li {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    height: auto !important;
    min-width: 0 !important;
    margin-bottom: 32px !important;
  }

  .home .wp-block-post-template {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 24px !important;
  }

  .home img {
    max-width: 100%;
    height: auto;
  }
}

/* Tablet homepage layout fix */
@media screen and (min-width: 701px) and (max-width: 1024px) {
  .home h1,
  .home h2,
  .home h3,
  .home p {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    height: auto !important;
    max-width: 100% !important;
    overflow-wrap: break-word;
  }

  .home article,
  .home section,
  .home .wp-block-group,
  .home .wp-block-post-template,
  .home .wp-block-post-template > li {
    position: relative !important;
    inset: auto !important;
    transform: none !important;
    float: none !important;
    height: auto !important;
    min-width: 0 !important;
    margin-bottom: 32px !important;
  }

  .home .wp-block-post-template {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 24px !important;
  }

  .home img {
    max-width: 100%;
    height: auto;
  }
}

/* Fix mobile homepage section overlap */
@media screen and (max-width: 700px) {
  .home .wp-block-post-template,
  .home .wp-block-post-template > li,
  .home article {
    position: static !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    margin-bottom: 40px !important;
  }

  .home .wp-block-post-template {
    display: block !important;
  }

  .home .wp-block-post-title,
  .home .wp-block-post-date,
  .home .wp-block-post-excerpt,
  .home .wp-block-post-content {
    position: static !important;
    height: auto !important;
    overflow: visible !important;
    transform: none !important;
    margin: 16px 0 !important;
    line-height: 1.5 !important;
  }

  .home h1,
  .home h2,
  .home h3,
  .home p {
    max-width: 100% !important;
    overflow-wrap: anywhere;
  }
}


/* Fix homepage article overlap on mobile */
@media screen and (max-width: 700px) {
  body.home .wp-block-post-template,
  body.home .wp-block-post-template > li,
  body.home article {
    position: relative !important;
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    margin-bottom: 40px !important;
    padding-bottom: 20px !important;
  }

  body.home .wp-block-post-title,
  body.home .wp-block-post-title a {
    display: block !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    line-height: 1.4 !important;
  }

  body.home .wp-block-post-template + *,
  body.home .wp-block-post-template ~ * {
    clear: both !important;
    position: relative !important;
    margin-top: 40px !important;
  }
}


/* Fix article titles being cut off on the homepage */
@media screen and (max-width: 1024px) {
  .home .wp-block-post-template > li,
  .home .wp-block-post-template li,
  .home article {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
  }

  .home .wp-block-post-title,
  .home .wp-block-post-title a,
  .home .wp-block-post-excerpt,
  .home .wp-block-post-date {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    text-overflow: clip !important;
    overflow-wrap: anywhere;
    display: block;
  }
}

/* Fix homepage story title clipping on tablet and desktop */
@media screen and (min-width: 701px) {
  .home .wp-block-query,
  .home .wp-block-post-template,
  .home .wp-block-post-template > li,
  .home .wp-block-post-template > li > *,
  .home .wp-block-post-template .wp-block-group,
  .home article,
  .home .wp-block-post-title,
  .home .wp-block-post-title a {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    position: relative !important;
  }

  .home .wp-block-post-title,
  .home .wp-block-post-title a {
    display: block !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    padding-bottom: 12px !important;
  }

  .home .wp-block-post-template > li {
    align-self: start !important;
  }
}

/* Fix homepage article title clipping on desktop and tablet */
@media screen and (min-width: 701px) {

  body.home .wp-block-query,
  body.home .wp-block-post-template,
  body.home .wp-block-post-template > li,
  body.home .wp-block-post-template > li > *,
  body.home .wp-block-post-template .wp-block-group,
  body.home .wp-block-post-template article {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    box-sizing: border-box !important;
  }

  body.home .wp-block-post-template {
    grid-auto-rows: auto !important;
    align-items: start !important;
  }

  body.home .wp-block-post-title,
  body.home .wp-block-post-title a,
  body.home .wp-block-post-template .wp-block-post-title,
  body.home .wp-block-post-template .wp-block-post-title a {
    display: block !important;
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    white-space: normal !important;
    overflow-wrap: anywhere !important;
    word-break: normal !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
  }
}

/* Final fix for homepage story title clipping */
@media screen and (min-width: 701px) {
  body.home .wp-block-post-title,
  body.home .wp-block-post-title a,
  body.home .wp-block-post-template,
  body.home .wp-block-post-template li,
  body.home .wp-block-query,
  body.home article {
    height: auto !important;
    min-height: 0 !important;
    max-height: none !important;
    overflow: visible !important;
    -webkit-line-clamp: unset !important;
    line-clamp: unset !important;
    text-overflow: clip !important;
  }

  body.home .wp-block-post-title,
  body.home .wp-block-post-title a {
    display: block !important;
    white-space: normal !important;
    overflow-wrap: break-word !important;
    word-break: normal !important;
  }
}


  
