/* Existing post order, thumbnails, text and pagination remain server-rendered. */
body.bk-modern-design.home #content.home #grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  columns: auto;
  margin: 0;
  min-width: 0;
}

body.bk-modern-design.home #content.home #grid::before,
body.bk-modern-design.home #content.home #grid::after {
  display: none;
}

body.bk-modern-design.home #content.home #grid > .post {
  display: block;
  float: none;
  width: 100%;
  max-width: none;
  min-width: 0;
  margin: 0;
  padding: 0;
  flex: none;
}

body.bk-modern-design.home #content.home #grid > .col-md-12 {
  grid-column: 1 / -1;
  width: 100%;
  margin: 12px 0 0;
  padding: 0;
}

body.bk-modern-design.home #content.home #grid > .bk-news-heading {
  grid-column: 1 / -1;
  margin: 0 0 8px;
  padding: 0 0 22px;
  border-bottom: 1px solid #496b80;
  background: none;
  box-shadow: none;
}

body.bk-modern-design.home #content.home .bk-news-heading > span {
  display: block;
  margin-bottom: 8px;
  color: #a9d9e2;
  font-size: 10px;
  line-height: 1.5;
  letter-spacing: .14em;
  font-weight: 750;
  text-transform: uppercase;
}

body.bk-modern-design.home #content.home .bk-news-heading > h2 {
  margin: 0;
  color: #f7fbfd;
  font-size: clamp(28px, 3vw, 38px);
  line-height: 1.16;
  font-weight: 800;
  letter-spacing: -.035em;
}

body.bk-modern-design.home #content.home #grid > .post .mg-blog-post-box {
  --bk-tile-surface: #203f55;
  --bk-tile-title: #f1f8fa;
  --bk-tile-copy: #d1e2e9;
  position: relative;
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  margin: 0;
  overflow: hidden;
  border: 1px solid #4a6b80 !important;
  border-radius: 22px;
  background: var(--bk-tile-surface) !important;
  box-shadow: none !important;
  transform: none !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
  transition: border-color 180ms ease;
}

body.bk-modern-design.home #content.home #grid > .post:nth-of-type(3n) .mg-blog-post-box {
  --bk-tile-surface: #d5eaf0;
  --bk-tile-title: #19384e;
  --bk-tile-copy: #345668;
  border-color: #bddde6 !important;
}

body.bk-modern-design.home #content.home #grid > .post .mg-blog-post-box > [class*="col-"] {
  display: block;
  width: 100%;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.bk-modern-design.home #content.home #grid > .post .mg-post-thumb {
  position: relative;
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  border-radius: 0;
}

body.bk-modern-design.home #content.home #grid > .post .mg-post-thumb a {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: 0;
}

body.bk-modern-design.home #content.home #grid > .post .mg-post-thumb a::after {
  content: "\2197";
  position: absolute;
  top: 14px;
  right: 14px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 1px solid #bddde6;
  border-radius: 50%;
  color: #19384e;
  background: #e4f3f7;
  font: 500 22px/1 sans-serif;
}

body.bk-modern-design.home #content.home #grid > .post .mg-post-thumb img {
  display: block;
  width: 100%;
  height: auto;
  min-height: 0;
  max-height: none;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
  filter: none !important;
  transform: none !important;
  transition: none;
}

/* Posters often contain text; keep the complete PNG artwork in the frame. */
body.bk-modern-design.home #content.home #grid > .post .mg-post-thumb img[src$=".png"] {
  object-fit: contain;
  background: #ffffff;
}

body.bk-modern-design.home #content.home #grid > .post article.small {
  position: static;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  flex: 1;
  min-width: 0;
  margin: 0;
  padding: 22px !important;
  border: 0;
  border-radius: 0;
  color: var(--bk-tile-copy) !important;
  background: transparent !important;
  box-shadow: none !important;
}

body.bk-modern-design.home #content.home #grid > .post article.small .entry-title {
  position: static;
  margin: 0 0 12px;
  font-size: clamp(20px, 1.55vw, 23px);
  line-height: 1.25;
  font-weight: 800;
  letter-spacing: -.025em;
}

body.bk-modern-design.home #content.home #grid > .post article.small .entry-title a {
  position: static;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 4;
  overflow: hidden;
  color: var(--bk-tile-title) !important;
  text-decoration: none;
}

/* Stretch the existing title link to make the entire tile an easy target. */
body.bk-modern-design.home #content.home #grid > .post article.small .entry-title a::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
}

body.bk-modern-design.home #content.home #grid > .post article.small p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  color: var(--bk-tile-copy) !important;
  font-size: 14px;
  line-height: 1.65;
}

body.bk-modern-design.home #content.home #grid > .post article.small .mg-blog-meta:empty {
  display: none;
}

/* A wide opening story and periodic horizontal cards establish a clear rhythm. */
body.bk-modern-design.home #content.home #grid > .post:first-of-type,
body.bk-modern-design.home #content.home #grid > .post:nth-of-type(3n + 1) {
  grid-column: 1 / -1;
}

body.bk-modern-design.home #content.home #grid > .post:first-of-type .mg-blog-post-box,
body.bk-modern-design.home #content.home #grid > .post:nth-of-type(3n + 1) .mg-blog-post-box {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: stretch;
}

body.bk-modern-design.home #content.home #grid > .post:first-of-type .mg-blog-post-box {
  --bk-tile-surface: #b7dfe8;
  --bk-tile-title: #17364b;
  --bk-tile-copy: #2d5366;
  border-color: #badde6 !important;
}

body.bk-modern-design.home #content.home #grid > .post:first-of-type article.small {
  justify-content: center;
  padding: 28px !important;
}

body.bk-modern-design.home #content.home #grid > .post:first-of-type article.small .entry-title {
  font-size: clamp(24px, 2.1vw, 32px);
  line-height: 1.15;
  letter-spacing: -.035em;
}

body.bk-modern-design.home #content.home #grid > .post:first-of-type .mg-post-thumb img,
body.bk-modern-design.home #content.home #grid > .post:nth-of-type(3n + 1) .mg-post-thumb img {
  height: 100%;
  min-height: 300px;
  aspect-ratio: auto;
}

body.bk-modern-design.home #content.home #grid > .post:first-of-type .mg-post-thumb img {
  min-height: 370px;
}

body.bk-modern-design.home #content.home #grid > .post:not(.has-post-thumbnail) .mg-blog-post-box {
  display: block;
}

body.bk-modern-design.home #content.home #grid > .post .mg-blog-post-box:focus-within {
  outline: 3px solid #b7e8f0;
  outline-offset: 3px;
}

body.bk-modern-design.home #content.home #grid > .post .entry-title a:focus-visible {
  outline: none;
  text-decoration: underline;
  text-underline-offset: 4px;
}

@media (hover: hover) and (pointer: fine) and (min-width: 1025px) and (prefers-reduced-motion: no-preference) {
  body.bk-modern-design.home #content.home #grid > .post .mg-post-thumb img {
    transition: transform 240ms ease;
  }
  body.bk-modern-design.home #content.home #grid > .post .mg-blog-post-box:hover {
    border-color: #a2dce5 !important;
  }
  body.bk-modern-design.home #content.home #grid > .post .mg-blog-post-box:hover .mg-post-thumb img {
    transform: scale(1.025) !important;
  }
}

@media (max-width: 700px) {
  body.bk-modern-design.home #content.home #grid {
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-inline: 16px;
  }
  body.bk-modern-design.home #content.home #grid > .post:first-of-type .mg-blog-post-box,
  body.bk-modern-design.home #content.home #grid > .post:nth-of-type(3n + 1) .mg-blog-post-box {
    display: flex;
    flex-direction: column;
  }
  body.bk-modern-design.home #content.home #grid > .post .mg-blog-post-box {
    border-radius: 19px;
  }
  body.bk-modern-design.home #content.home #grid > .post .mg-post-thumb img,
  body.bk-modern-design.home #content.home #grid > .post:first-of-type .mg-post-thumb img,
  body.bk-modern-design.home #content.home #grid > .post:nth-of-type(3n + 1) .mg-post-thumb img {
    height: auto;
    min-height: 0;
    max-height: none;
    aspect-ratio: 4 / 3;
  }
  body.bk-modern-design.home #content.home #grid > .post article.small,
  body.bk-modern-design.home #content.home #grid > .post:first-of-type article.small {
    padding: 20px !important;
  }
  body.bk-modern-design.home #content.home #grid > .post article.small .entry-title,
  body.bk-modern-design.home #content.home #grid > .post:first-of-type article.small .entry-title {
    font-size: 22px;
    line-height: 1.22;
  }
  body.bk-modern-design.home #content.home #grid > .post article.small .entry-title a {
    -webkit-line-clamp: 4;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.bk-modern-design.home #content.home #grid > .post .mg-blog-post-box {
    transition: none;
  }
}


/* Let the homepage content sit directly on the page background. */
body.bk-modern-design.home #content.container-fluid.home {
  background: none !important;
  border-radius: 0 !important;
}
