/* Shared blog section for the homepage and service pages. */
.landing-blog--dark {
  background: var(--section-bg-dark);
  --blog-heading: var(--section-text-light);
  --blog-subtitle: #d5d7df;
  --blog-link: var(--section-accent);
  --blog-card-bg: #fff;
  --blog-card-text: var(--section-text);
  --blog-muted: #626777;
}

.landing-blog--light {
  --blog-heading: var(--section-text);
  --blog-subtitle: #626777;
  --blog-link: var(--section-text);
  --blog-card-bg: var(--section-bg-dark);
  --blog-card-text: var(--section-text-light);
  --blog-muted: #d5d7df;
}

.landing-blog__header {
  margin-bottom: calc(32px * var(--landing-scale));
}

.landing-blog__header-row {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: calc(16px * var(--landing-scale));
  flex-wrap: wrap;
}

.landing-blog__title {
  color: var(--blog-heading);
}

.landing-blog__subtitle {
  color: var(--blog-subtitle);
  margin: calc(12px * var(--landing-scale)) 0 0;
}

.landing-blog__all-link {
  color: var(--blog-link);
  font-size: calc(18px * var(--landing-font-scale));
  font-weight: 600;
  text-underline-offset: calc(5px * var(--landing-scale));
  white-space: nowrap;
}

.landing-blog__all-link:hover,
.landing-blog__all-link:focus-visible {
  color: var(--blog-heading);
}

.landing-blog__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--section-gap);
  align-items: stretch;
}

.landing-blog__grid--1 {
  grid-template-columns: minmax(0, 1fr);
  max-width: calc(480px * var(--landing-scale));
  margin-left: auto;
  margin-right: auto;
}

.landing-blog__grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: calc(992px * var(--landing-scale));
  margin-left: auto;
  margin-right: auto;
}

.landing-blog__card {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: var(--blog-card-bg);
  color: var(--blog-card-text);
  border-radius: var(--section-radius);
  box-shadow: 0 calc(4px * var(--landing-scale)) calc(16px * var(--landing-scale)) rgba(0, 0, 0, 0.12);
}

.landing-blog__media {
  display: flex;
  min-height: 0;
  align-items: center;
  justify-content: center;
  aspect-ratio: 8 / 5;
  overflow: hidden;
  background: #e9eaf0;
}

.landing-blog__image {
  position: static;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.landing-blog__placeholder {
  width: calc(80px * var(--landing-scale));
  height: calc(80px * var(--landing-scale));
}

.landing-blog__body {
  padding: calc(26px * var(--landing-scale));
  display: flex;
  flex-direction: column;
  gap: calc(20px * var(--landing-scale));
  flex: 1;
}

.landing-blog__author {
  display: flex;
  align-items: center;
  gap: calc(12px * var(--landing-scale));
}

.landing-blog__avatar {
  width: calc(48px * var(--landing-scale));
  height: calc(48px * var(--landing-scale));
  flex-shrink: 0;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  background: #e9eaf0;
}

.landing-blog__avatar--placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
}

.landing-blog__avatar--placeholder img {
  width: calc(24px * var(--landing-scale));
  height: calc(24px * var(--landing-scale));
}

.landing-blog__author-name {
  color: var(--blog-card-text);
  font-size: calc(17px * var(--landing-font-scale));
  font-weight: 600;
  line-height: 1.4;
}

.landing-blog__author-date {
  display: block;
  color: var(--blog-muted);
  font-size: calc(15px * var(--landing-font-scale));
  margin-top: calc(3px * var(--landing-scale));
}

.landing-blog__post-title {
  margin: 0;
  font-size: calc(24px * var(--landing-font-scale));
  font-weight: 800;
  line-height: 1.4;
  overflow-wrap: break-word;
}

.landing-blog__post-title a {
  color: var(--blog-card-text);
  text-decoration: none;
}

.landing-blog__post-title a:hover,
.landing-blog__post-title a:focus-visible {
  text-decoration: underline;
  text-underline-offset: calc(4px * var(--landing-scale));
}

.landing-blog__excerpt {
  margin: 0;
  font-size: calc(18px * var(--landing-font-scale));
  line-height: 1.6;
  color: var(--blog-muted);
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  overflow: hidden;
}

.landing-blog__footer {
  display: flex;
  margin-top: auto;
  padding-top: calc(4px * var(--landing-scale));
}

.landing-blog__btn {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: calc(16px * var(--landing-scale));
  width: 100%;
  padding: calc(14px * var(--landing-scale)) calc(20px * var(--landing-scale));
  background: var(--section-accent);
  color: var(--section-text);
  font-size: calc(18px * var(--landing-font-scale));
  font-weight: 700;
  line-height: 1.4;
  border-radius: var(--section-radius-sm);
  text-decoration: none;
}

.landing-blog__btn:hover,
.landing-blog__btn:focus-visible {
  color: var(--section-text);
  filter: brightness(1.05);
}

.landing-blog a:focus-visible {
  outline: calc(3px * var(--landing-scale)) solid var(--blog-heading);
  outline-offset: calc(4px * var(--landing-scale));
}

.landing-blog__card a:focus-visible {
  outline-color: var(--blog-card-text);
}

@media (max-width: 991.98px) {
  .landing-blog__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .landing-blog__grid--1 {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 767.98px) {
  .landing-blog__grid {
    grid-template-columns: minmax(0, 1fr);
    max-width: none;
  }

  .landing-blog__body {
    padding: calc(24px * var(--landing-scale));
  }
}
