/**
 * Single blog / case study article layout (Drupal node markup).
 */

:root {
  --article-content-max: 82rem;
  --article-content-pad-x: 1rem;
}

@media (min-width: 768px) {
  :root {
    --article-content-pad-x: 1.5rem;
  }
}

.node--type-blog,
.node--type-case-study,
.node--type-listing-page {
  --article-content-max: var(--hero-content-max, 82rem);
  --article-content-pad-x: var(--hero-content-pad-x, 1rem);
}

/* Body components */
.node--type-blog .field--name-field-page-components .fw-container,
.node--type-case-study .field--name-field-page-components .fw-container {
  padding-top: 2rem;
  padding-bottom: 2.5rem;
}

.node--type-blog .field--name-field-page-components .fw-container > .container,
.node--type-case-study .field--name-field-page-components .fw-container > .container,
.node--type-blog .field--name-field-page-components > .container,
.node--type-case-study .field--name-field-page-components > .container {
  width: 100%;
  max-width: var(--article-content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--article-content-pad-x);
  padding-right: var(--article-content-pad-x);
}

.node--type-blog .paragraph--type--image-and-text,
.node--type-case-study .paragraph--type--image-and-text {
  margin: 0 !important;
  padding: 0 !important;
}

.node--type-blog .paragraph--type--image-and-text > .row,
.node--type-case-study .paragraph--type--image-and-text > .row {
  align-items: center;
  row-gap: 1.5rem;
  margin-left: 0;
  margin-right: 0;
}

.node--type-blog .paragraph--type--image-and-text .content-image,
.node--type-case-study .paragraph--type--image-and-text .content-image {
  padding-left: 0;
  padding-right: 0;
}

.node--type-blog .paragraph--type--image-and-text .content-image img,
.node--type-case-study .paragraph--type--image-and-text .content-image img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 0.375rem;
}

.node--type-blog .paragraph--type--image-and-text .content-text,
.node--type-case-study .paragraph--type--image-and-text .content-text {
  padding-left: 0;
  padding-right: 0;
  text-align: start;
}

.node--type-blog .paragraph--type--image-and-text .content-text p,
.node--type-case-study .paragraph--type--image-and-text .content-text p {
  margin-top: 0 !important;
  margin-bottom: 1rem !important;
  color: #373737 !important;
  font-size: 0.9375rem !important;
  font-weight: 300;
  line-height: 1.55 !important;
  text-align: start !important;
  background-color: transparent !important;
}

.node--type-blog .paragraph--type--image-and-text .content-text p:last-child,
.node--type-case-study .paragraph--type--image-and-text .content-text p:last-child {
  margin-bottom: 0 !important;
}

.node--type-blog .paragraph--type--text-panel,
.node--type-case-study .paragraph--type--text-panel {
  max-width: var(--article-content-max);
  margin-left: auto !important;
  margin-right: auto !important;
  padding-left: var(--article-content-pad-x) !important;
  padding-right: var(--article-content-pad-x) !important;
}

.node--type-blog .paragraph--type--text-panel .text-paragraph,
.node--type-case-study .paragraph--type--text-panel .text-paragraph {
  text-align: start;
}

.node--type-blog .paragraph--type--text-panel .text-paragraph h2,
.node--type-case-study .paragraph--type--text-panel .text-paragraph h2 {
  margin-bottom: 1rem;
  color: #00509e;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  line-height: 1.35;
  text-align: start;
}

.node--type-blog .paragraph--type--text-panel .text-paragraph p,
.node--type-case-study .paragraph--type--text-panel .text-paragraph p {
  text-align: start;
}

/* “Other blog posts” block below the article */
.block-views-blockblog-block-3 > .container,
.block-views-blockcase-studies-block-3 > .container {
  width: 100%;
  max-width: var(--article-content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--article-content-pad-x);
  padding-right: var(--article-content-pad-x);
}

.block-views-blockblog-block-3 > .container > .row,
.block-views-blockcase-studies-block-3 > .container > .row {
  margin-left: 0;
  margin-right: 0;
}

.block-views-blockblog-block-3 .view-header h2,
.block-views-blockcase-studies-block-3 .view-header h2 {
  margin: 0 0 1.25rem;
  color: #00509e;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 600;
  line-height: 1.3;
  text-align: start !important;
}

.block-views-blockblog-block-3,
.block-views-blockcase-studies-block-3 {
  padding-top: 0.5rem;
  padding-bottom: 2.5rem;
}

/* Case study body (simple two-column Drupal layout) */
.node--type-case-study .node__content > .container {
  width: 100%;
  max-width: var(--article-content-max);
  margin-left: auto;
  margin-right: auto;
  padding-left: var(--article-content-pad-x);
  padding-right: var(--article-content-pad-x);
  padding-bottom: 2.5rem;
}

.node--type-case-study .node__content > .container > .row {
  align-items: flex-start;
  row-gap: 1.5rem;
}

.node--type-case-study .node__content > .container h2,
.node--type-case-study .node__content > .container h3 {
  margin-top: 1.5rem;
  margin-bottom: 0.75rem;
  color: #00509e;
  text-align: start;
}

.node--type-case-study .node__content > .container h2:first-child,
.node--type-case-study .node__content > .container .col > h2:first-child {
  margin-top: 0;
}

.node--type-case-study .node__content > .container p,
.node--type-case-study .node__content > .container ul:not(.services-provided) li {
  text-align: start;
  font-weight: 300;
  color: #373737;
}

.node--type-case-study .node__content > .container .col-12.col-md-4 {
  margin-top: 0.5rem;
}

@media (min-width: 768px) {
  .node--type-case-study .node__content > .container .col-12.col-md-4 {
    margin-top: 0;
  }
}

.node--type-case-study .node__content > .container .col-12.col-md-4 h3 {
  margin-top: 0;
}

.node--type-case-study .node__content > .container ul.services-provided {
  margin: 0;
  padding: 0;
  list-style: none;
}

.node--type-case-study .node__content > .container ul.services-provided li {
  list-style: none;
  margin: 0 0 0.75rem;
  padding: 0;
  color: inherit;
  font-weight: 400;
}

.node--type-case-study .node__content > .container ul.services-provided li:last-child {
  margin-bottom: 0;
}

.node--type-case-study .node__content > .container ul.services-provided a {
  display: inline-block;
  max-width: 100%;
  padding: 0.625rem 1.125rem;
  border: 0;
  border-radius: 50px;
  background-color: #00509e;
  color: #fff !important;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.35;
  text-align: start;
  text-decoration: none;
  transition: filter 0.2s ease-out;
}

@media (min-width: 992px) {
  .node--type-case-study .node__content > .container ul.services-provided a {
    padding: 0.75rem 1.25rem;
    font-size: 0.9375rem;
  }
}

.node--type-case-study .node__content > .container ul.services-provided a:hover,
.node--type-case-study .node__content > .container ul.services-provided a:focus-visible {
  color: #fff !important;
  filter: brightness(0.92);
  text-decoration: none;
}
