/* Steelhead homepage News only. Existing Drupal View, links and fields retained. */

/* The observed News section has a full-width band and a padded container.
   Keep those gutters; change only the band that contains this specific block. */
body.path-frontpage .node__main-content > .region--accent-background:has(> .container > .layout > .col-12 > .sh-home-news) {
  background-color: #f2f6f8;
}

/* Include .block to outrank Cleanplus .region .block:last-child. */
body.path-frontpage .block.sh-home-news {
  --sh-news-ink: #123343;
  --sh-news-muted: #526876;
  --sh-news-teal: #007a98;
  --sh-news-hover: #005f78;
  padding-top: clamp(44px, 4.5vw, 72px);
  padding-bottom: clamp(48px, 4vw, 64px);
  color: var(--sh-news-ink);
  text-align: left;
}

body.path-frontpage .sh-home-news > h2.title {
  margin: 0 0 12px;
  padding: 0;
  color: var(--sh-news-ink);
  font-size: clamp(30px, 2.8vw, 44px);
  line-height: 1.15;
  font-weight: 700;
  letter-spacing: -.025em;
  text-align: left;
  text-transform: none;
}

body.path-frontpage .sh-home-news > .mt-view-header {
  max-width: 65ch;
  margin: 0 0 30px;
  color: var(--sh-news-muted);
  font-size: clamp(16px, 1.2vw, 19px);
  line-height: 1.6;
  text-align: left;
  text-transform: none;
}

/* Cleanplus already prints the View header above its content. */
body.path-frontpage .sh-home-news .view > .view-header {
  display: none;
}

body.path-frontpage .sh-home-news .view-content ul.row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  align-items: stretch;
  gap: clamp(20px, 2vw, 32px);
  margin: 0;
  padding: 0;
  list-style: none;
}

body.path-frontpage .sh-home-news .view-content ul.row::before,
body.path-frontpage .sh-home-news .view-content ul.row::after {
  content: none;
}

body.path-frontpage .sh-home-news .view-content li.views-row {
  display: flex;
  float: none;
  width: auto;
  min-width: 0;
  max-width: none;
  margin: 0;
  padding: 0;
}

body.path-frontpage .sh-home-news .node--view-mode-mt-teaser-tile {
  display: flex;
  flex-direction: column;
  width: 100%;
  min-width: 0;
  margin: 0;
  border: 1px solid #d6e2e8;
  border-radius: 8px;
  background: #fff;
  color: var(--sh-news-ink);
  box-shadow: 0 5px 18px rgb(18 51 67 / 5%);
  transition: border-color .18s ease, box-shadow .18s ease;
}

body.path-frontpage .sh-home-news .node--view-mode-mt-teaser-tile:hover,
body.path-frontpage .sh-home-news .node--view-mode-mt-teaser-tile:focus-within {
  border-color: var(--sh-news-teal);
  box-shadow: 0 8px 24px rgb(18 51 67 / 10%);
}

body.path-frontpage .sh-home-news .teaser-tile-image-container {
  flex: 0 0 auto;
  overflow: hidden;
  border-radius: 7px 7px 0 0;
  background: #e6eef2;
}

body.path-frontpage .sh-home-news .teaser-tile-image,
body.path-frontpage .sh-home-news .teaser-tile-image .field,
body.path-frontpage .sh-home-news .teaser-tile-image .field__item,
body.path-frontpage .sh-home-news .teaser-tile-image .image-preview,
body.path-frontpage .sh-home-news .teaser-tile-image .image-wrapper,
body.path-frontpage .sh-home-news .teaser-tile-image .overlay-container {
  margin: 0;
  padding: 0;
  border-radius: 0;
}

body.path-frontpage .sh-home-news .teaser-tile-image img {
  display: block;
  width: 100%;
  height: auto;
  max-width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  object-position: center;
  border-radius: 0;
}

body.path-frontpage .sh-home-news .teaser-tile-image .overlay-container {
  float: none;
  width: 100%;
}

/* Retain the theme's image link, without its heavy color wash. */
body.path-frontpage .sh-home-news .teaser-tile-image .overlay {
  background: transparent;
}

body.path-frontpage .sh-home-news .teaser-tile-image .overlay:focus-within {
  opacity: 1;
}

body.path-frontpage .sh-home-news .teaser-tile-image .overlay-target-link:focus-visible {
  outline: 3px solid var(--sh-news-teal);
  outline-offset: -5px;
  background: rgb(255 255 255 / 12%);
}

body.path-frontpage .sh-home-news .node--view-mode-mt-teaser-tile > .p-4 {
  display: flex;
  flex: 1 1 auto;
  flex-direction: column;
  min-width: 0;
  padding: clamp(22px, 2vw, 32px) !important;
}

body.path-frontpage .sh-home-news .node--view-mode-mt-teaser-tile > .p-4 > .row {
  flex: 0 0 auto;
  margin: 0 0 24px !important;
}

body.path-frontpage .sh-home-news .node__title {
  margin: 0 !important;
  padding: 0;
  font-size: clamp(19px, 1.35vw, 24px);
  line-height: 1.4;
  font-weight: 700;
  letter-spacing: -.015em;
  overflow-wrap: anywhere;
}

body.path-frontpage .sh-home-news .node__title a,
body.path-frontpage .sh-home-news .node__title a:visited {
  color: var(--sh-news-ink);
  background: transparent;
  text-decoration: none;
}

body.path-frontpage .sh-home-news .node__title a:hover,
body.path-frontpage .sh-home-news .node__title a:focus {
  color: var(--sh-news-hover);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: .18em;
}

body.path-frontpage .sh-home-news .teaser-tile-pre-content {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 16px;
  margin: auto 0 0;
  padding-top: 18px;
  border-top: 1px solid #e2eaee;
  color: var(--sh-news-muted);
  font-size: 14px;
  line-height: 1.5;
  font-weight: 500;
}

body.path-frontpage .sh-home-news .teaser-tile-pre-content-item {
  display: block;
  margin: 0;
}

body.path-frontpage .sh-home-news .teaser-tile-pre-content-item::after {
  content: none;
}

body.path-frontpage .sh-home-news .teaser-tile-pre-content .field {
  display: inline;
  margin: 0;
  padding: 0;
}

body.path-frontpage .sh-home-news .teaser-tile-pre-content a,
body.path-frontpage .sh-home-news .teaser-tile-pre-content a:visited {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 4px;
  background: #eaf3f6;
  color: var(--sh-news-hover);
  font-size: 13px;
  line-height: 1.5;
  font-weight: 600;
  text-decoration: none;
}

body.path-frontpage .sh-home-news .teaser-tile-pre-content a:hover,
body.path-frontpage .sh-home-news .teaser-tile-pre-content a:focus {
  background: #dbeaf0;
  color: var(--sh-news-ink);
  text-decoration: underline;
  text-underline-offset: .15em;
}

/* Keep optional content visible if an editor later enables extra fields. */
body.path-frontpage .sh-home-news .node__content:not(:empty) {
  color: var(--sh-news-muted);
  font-size: 16px;
  line-height: 1.6;
}

body.path-frontpage .sh-home-news .view > .more-link {
  margin: 30px 0 0;
  text-align: left;
}

body.path-frontpage .sh-home-news .view > .more-link > a,
body.path-frontpage .sh-home-news .view > .more-link > a:visited {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 48px;
  max-width: 100%;
  margin: 0;
  padding: 12px 22px;
  border: 1px solid var(--sh-news-teal);
  border-radius: 4px;
  background: var(--sh-news-teal);
  color: #fff;
  font-size: 15px;
  line-height: 1.5;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
  text-decoration: none;
  white-space: normal;
  transition: background-color .18s ease, border-color .18s ease;
}

body.path-frontpage .sh-home-news .view > .more-link > a:hover,
body.path-frontpage .sh-home-news .view > .more-link > a:focus {
  border-color: var(--sh-news-hover);
  background: var(--sh-news-hover);
  color: #fff;
}

body.path-frontpage .sh-home-news .view > .more-link > a::before {
  content: none;
}

body.path-frontpage .sh-home-news .view > .more-link > a::after {
  position: static;
  display: inline-block;
  width: auto;
  height: auto;
  margin: 0;
  background: none;
  color: inherit;
  font-family: inherit;
  font-size: 20px;
  line-height: 1;
  opacity: 1;
  transform: none;
  transition: none;
  content: "\2192";
}

body.path-frontpage .sh-home-news a:focus-visible {
  outline: 3px solid var(--sh-news-teal);
  outline-offset: 4px;
}

@media (max-width: 991px) {
  body.path-frontpage .sh-home-news .view-content ul.row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 639px) {
  body.path-frontpage .block.sh-home-news {
    padding-bottom: 32px;
  }
  body.path-frontpage .sh-home-news .view-content ul.row {
    grid-template-columns: minmax(0, 1fr);
    gap: 24px;
  }
  body.path-frontpage .sh-home-news .view > .more-link > a {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  body.path-frontpage .sh-home-news *,
  body.path-frontpage .sh-home-news *::after {
    transition: none !important;
  }
}

@media (forced-colors: active) {
  body.path-frontpage .sh-home-news a:focus-visible {
    outline-color: Highlight;
  }
}
