/* =====================================================================
   BLOG - post list (blog.html), single post (blog-post.html) and the
   gallery lightbox. Colours come from the --brand-* variables in brand.css.
   ===================================================================== */

/* ---- sections ---- */
.site-blog-index-section,
.site-blog-detail-section {
  padding: 80px 0;
}

.site-blog-index-eyebrow {
  display: inline-block;
  margin-bottom: 10px;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand-accent);
}

.site-blog-index-intro {
  max-width: 760px;
  margin: 0 auto 42px;
  text-align: center;
}

.site-blog-index-intro h2,
.site-blog-related__head h2 {
  font-size: 36px;
  line-height: 1.2;
  margin: 0 0 12px;
}

.site-blog-related__head h2 {
  margin: 0;
}

.site-blog-index-intro p {
  max-width: 680px;
  margin: 0 auto;
  color: #5b5b5b;
}

.site-blog-index-layout,
.site-blog-detail-layout {
  align-items: flex-start;
}

/* ---- category sidebar ---- */
.site-blog-sidebar {
  position: sticky;
  top: 120px;
  padding-top: 0 !important;
}

.site-blog-category-block {
  margin-top: 0 !important;
}

.site-blog-category-items li {
  margin-top: 0 !important;
  padding: 14px 0;
  border-bottom: 1px solid #dbdbdb;
}

.site-blog-category-items li:last-child {
  border-bottom: 0;
}

.site-blog-category-link {
  position: relative;
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 20px;
  color: #303030;
  font-size: 14px;
  font-weight: 500;
}

.site-blog-category-link:hover,
.site-blog-category-link.is-active {
  color: var(--brand-dark);
}

.site-blog-category-radio {
  position: relative;
  width: 14px;
  height: 14px;
  flex: 0 0 14px;
  border: 1px solid #707070;
  border-radius: 50%;
  transition: all .3s linear;
}

.site-blog-category-radio::before {
  position: absolute;
  content: '';
  inset: 0;
  background: var(--brand-dark);
  border-radius: 50%;
  transform: scale(.7);
  opacity: 0;
  visibility: hidden;
  transition: all .3s linear;
}

.site-blog-category-link.is-active .site-blog-category-radio {
  border-color: var(--brand-dark);
}

.site-blog-category-link.is-active .site-blog-category-radio::before {
  opacity: 1;
  visibility: visible;
}

/* ---- post cards ---- */
.site-blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 28px;
}

.site-blog-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
  background: #fff;
  border: 2px solid var(--brand-primary);
  transition: border-color .2s ease;
}

.site-blog-card:hover {
  border-color: var(--brand-accent);
}

.site-blog-card__image {
  display: block;
  aspect-ratio: 16 / 9;
  overflow: hidden;
  background: #eef2f7;
}

.site-blog-card__image img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0;
  transition: transform .35s ease;
}

.site-blog-card:hover .site-blog-card__image img {
  transform: scale(1.04);
}

.site-blog-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
  padding: 24px;
}

.site-blog-card__meta {
  color: #667085;
  font-size: 14px;
}

.site-blog-card__category {
  display: block;
  margin-bottom: 5px;
  color: var(--brand-dark);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.4;
}

.site-blog-card__date {
  display: block;
  color: #667085;
  line-height: 1.4;
}

.site-blog-card h3 {
  font-size: 24px;
  line-height: 1.28;
  margin: 0;
}

.site-blog-grid--related .site-blog-card h3 {
  font-size: 22px;
}

.site-blog-card h3 a {
  color: #101828;
}

.site-blog-card h3 a:hover {
  color: var(--brand-accent);
}

.site-blog-card p {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 3;
  overflow: hidden;
  margin: 0;
  color: #5b5b5b;
  line-height: 1.55;
  min-height: calc(1.55em * 3);
  max-height: calc(1.55em * 3);
}

.site-blog-read-more {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  font-weight: 700;
  color: var(--brand-dark);
  transition: color .2s ease;
}

.site-blog-read-more i {
  transition: transform .2s ease;
}

.site-blog-read-more:hover {
  color: var(--brand-accent);
}

.site-blog-read-more:hover i {
  transform: translateX(3px);
}

/* ---- empty / not found ---- */
.site-blog-empty {
  grid-column: 1 / -1;
  padding: 48px 24px;
  text-align: center;
  border: 1px dashed #cbd5e1;
  background: #f8fafc;
}

.site-blog-empty strong {
  display: block;
  margin-bottom: 10px;
  font-size: 24px;
  color: var(--brand-dark);
}

.site-blog-empty p {
  margin: 0 0 22px;
}

.site-blog-empty p:last-child {
  margin-bottom: 0;
}

.site-blog-article .site-blog-empty {
  padding: 24px 0;
  border: 0;
  background: transparent;
}

.site-blog-pagination-wrap {
  margin-top: 34px;
}

/* ---- single post ---- */
.site-blog-detail-sidebar {
  position: sticky;
  top: 120px;
}

.site-blog-detail-sidebar__block,
.site-blog-social-block {
  background: #f4f4f4;
  padding: 28px 24px;
}

.site-blog-social-block {
  margin-top: 24px;
}

.site-blog-detail-sidebar .sidebar-title {
  margin-bottom: 18px;
}

.site-blog-detail-sidebar .sidebar-title .title {
  margin: 0;
}

.site-blog-detail-sidebar .site-blog-category-items {
  margin: 0;
}

.site-blog-social-links a {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 0;
  border-bottom: 1px solid #dbdbdb;
  color: #303030;
  font-weight: 600;
}

.site-blog-social-links a:last-child {
  border-bottom: 0;
}

.site-blog-social-links a i {
  display: grid;
  place-items: center;
  flex: 0 0 34px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--brand-dark);
  color: #fff;
}

.site-blog-social-links a:hover {
  color: var(--brand-dark);
}

.site-blog-social-links a:hover i {
  background: var(--brand-accent);
  color: var(--brand-accent-text);
}

.site-blog-article {
  padding: 36px;
  background: #fff;
  border: 1px solid #e8edf4;
}

.site-blog-article__header {
  padding-bottom: 24px;
  border-bottom: 1px solid #e5e7eb;
}

.site-blog-article__meta {
  color: #667085;
  font-size: 14px;
}

.site-blog-article__meta .site-blog-card__category {
  text-decoration: none;
}

.site-blog-article__date,
.site-blog-article__updated,
.site-blog-article__byline {
  display: block;
  color: #667085;
  line-height: 1.45;
}

.site-blog-article__updated,
.site-blog-article__byline {
  margin-top: 3px;
}

.site-blog-article__content {
  margin-top: 24px;
  color: #344054;
  font-size: 16px;
  line-height: 1.8;
}

.site-blog-article__content > *:first-child {
  margin-top: 0;
}

.site-blog-article__content > *:last-child {
  margin-bottom: 0;
}

.site-blog-article__content h2,
.site-blog-article__content h3,
.site-blog-article__content h4 {
  color: #101828;
  margin-top: 30px;
  margin-bottom: 14px;
}

.site-blog-article__content img {
  max-width: 100%;
  height: auto;
}

.site-blog-article__content a {
  color: var(--brand-primary);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.site-blog-article__content blockquote {
  margin: 26px 0;
  padding: 18px 22px;
  border-left: 4px solid var(--brand-accent);
  background: var(--brand-light);
  color: #334155;
}

.site-blog-article__content ul,
.site-blog-article__content ol {
  margin: 14px 0 18px;
  padding-left: 28px;
}

.site-blog-article__content ul {
  list-style: disc outside !important;
}

.site-blog-article__content ol {
  list-style: decimal outside !important;
}

.site-blog-article__content li {
  display: list-item !important;
  margin: 6px 0;
  padding: 0;
  line-height: 1.7;
}

.site-blog-article__content ul ul {
  list-style-type: circle !important;
}

.site-blog-article__content ol ol {
  list-style-type: lower-alpha !important;
}

/* ---- gallery (opens in the lightbox below) ---- */
.site-blog-gallery {
  margin-top: 34px;
  padding-top: 30px;
  border-top: 1px solid #e5e7eb;
}

.site-blog-gallery h3 {
  margin-bottom: 18px;
  font-size: 26px;
  color: var(--brand-dark);
}

.site-blog-gallery__grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.site-blog-gallery__item {
  display: block;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border: 1px solid #e5e7eb;
  background: #f7f7f7;
  cursor: zoom-in;
}

.site-blog-gallery__item img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  border-radius: 0;
}

.site-blog-gallery--count-1 .site-blog-gallery__grid {
  grid-template-columns: minmax(0, 1fr);
}

.site-blog-gallery--count-1 .site-blog-gallery__item {
  display: flex;
  align-items: center;
  justify-content: center;
  aspect-ratio: auto;
  overflow: visible;
  border: 0;
  background: transparent;
}

.site-blog-gallery--count-1 .site-blog-gallery__item img {
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 900px;
}

.site-blog-gallery--count-2 .site-blog-gallery__grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.site-blog-gallery--count-3 .site-blog-gallery__grid,
.site-blog-gallery--count-4 .site-blog-gallery__grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.site-blog-gallery--count-2 .site-blog-gallery__item,
.site-blog-gallery--count-3 .site-blog-gallery__item,
.site-blog-gallery--count-4 .site-blog-gallery__item {
  aspect-ratio: 4 / 3;
}

/* ---- related posts ---- */
.site-blog-related-section {
  background: #f9f9f9;
}

.site-blog-related {
  padding: 72px 0;
}

.site-blog-related__head {
  margin: 0 0 34px;
  text-align: center;
}

.site-blog-related__actions {
  margin-top: 34px;
  text-align: center;
}

/* ---- responsive ---- */
@media (max-width: 1199px) {
  .site-blog-grid,
  .site-blog-gallery__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 991px) {
  .site-blog-index-section,
  .site-blog-detail-section {
    padding: 70px 0;
  }

  .site-blog-sidebar {
    position: static;
    margin-bottom: 32px;
  }

  .site-blog-detail-sidebar {
    position: static;
    margin-top: 28px;
  }

  .site-blog-detail-sidebar__block,
  .site-blog-social-block {
    padding: 24px 20px;
  }
}

@media (max-width: 767px) {
  .site-blog-index-intro {
    margin-bottom: 32px;
  }

  .site-blog-index-intro h2,
  .site-blog-related__head h2 {
    font-size: 30px;
  }

  .site-blog-grid,
  .site-blog-gallery__grid,
  .site-blog-gallery--count-2 .site-blog-gallery__grid,
  .site-blog-gallery--count-3 .site-blog-gallery__grid,
  .site-blog-gallery--count-4 .site-blog-gallery__grid {
    grid-template-columns: 1fr;
  }

  .site-blog-gallery--count-2 .site-blog-gallery__item,
  .site-blog-gallery--count-3 .site-blog-gallery__item,
  .site-blog-gallery--count-4 .site-blog-gallery__item {
    aspect-ratio: 16 / 10;
  }

  .site-blog-card h3 {
    font-size: 22px;
  }

  .site-blog-article {
    padding: 24px 20px;
  }

  .site-blog-related {
    padding: 54px 0;
  }
}

/* Keep white space between the article and "Keep Reading" (after the 991px rule on purpose). */
.site-blog-detail-section--has-related {
  padding-bottom: 64px;
}

@media (max-width: 767px) {
  .site-blog-detail-section--has-related {
    padding-bottom: 44px;
  }
}

/* ---- gallery lightbox (Magnific Popup, mainClass site-blog-lightbox) ---- */
.mfp-bg.site-blog-lightbox {
  opacity: .9;
}

.site-blog-lightbox .mfp-image-holder .mfp-content {
  max-width: calc(100vw - 48px);
}

.site-blog-lightbox .mfp-figure img.mfp-img {
  width: auto;
  height: auto;
  max-width: calc(100vw - 80px);
  max-height: calc(100vh - 100px) !important;
  padding: 0;
  margin: 0 auto;
}

.site-blog-lightbox .mfp-figure::after {
  background: transparent;
  box-shadow: none;
}

.mfp-wrap.site-blog-lightbox .mfp-close,
.mfp-wrap.site-blog-lightbox .mfp-arrow {
  -webkit-appearance: none;
  appearance: none;
  display: flex;
  align-items: center;
  justify-content: center;
  box-sizing: border-box;
  padding: 0;
  border: 2px solid var(--brand-primary);
  border-radius: 50%;
  background: var(--brand-primary);
  color: #fff;
  opacity: 1;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .28);
  cursor: pointer;
  transition: background-color .18s ease, border-color .18s ease, color .18s ease, transform .18s ease;
}

.mfp-wrap.site-blog-lightbox .mfp-close {
  position: fixed;
  top: 22px;
  right: 22px;
  z-index: 1100;
  width: 48px;
  height: 48px;
  font-family: Arial, sans-serif;
  font-size: 32px;
  font-weight: 400;
  line-height: 1;
  text-align: center;
  text-indent: 0;
}

.mfp-wrap.site-blog-lightbox .mfp-arrow {
  width: 52px;
  height: 52px;
  margin-top: -26px;
}

.mfp-wrap.site-blog-lightbox .mfp-arrow-left { left: 22px; }
.mfp-wrap.site-blog-lightbox .mfp-arrow-right { right: 22px; }

/* Replace Magnific Popup's built-in double-triangle arrows with a centred chevron. */
.mfp-wrap.site-blog-lightbox .mfp-arrow::before,
.mfp-wrap.site-blog-lightbox .mfp-arrow::after {
  content: none !important;
  display: none !important;
  border: 0 !important;
}

.mfp-wrap.site-blog-lightbox .site-blog-lightbox__arrow-icon {
  display: block;
  width: 100%;
  text-align: center;
  font-family: Arial, sans-serif;
  font-size: 42px;
  font-weight: 400;
  line-height: 1;
  color: currentColor;
  transform: translateY(-1px);
  pointer-events: none;
}

.mfp-wrap.site-blog-lightbox .mfp-arrow-left .site-blog-lightbox__arrow-icon::before {
  content: '\2039';
}

.mfp-wrap.site-blog-lightbox .mfp-arrow-right .site-blog-lightbox__arrow-icon::before {
  content: '\203A';
}

.mfp-wrap.site-blog-lightbox .mfp-close:hover,
.mfp-wrap.site-blog-lightbox .mfp-close:focus,
.mfp-wrap.site-blog-lightbox .mfp-arrow:hover,
.mfp-wrap.site-blog-lightbox .mfp-arrow:focus {
  background: var(--brand-accent);
  border-color: var(--brand-accent);
  color: var(--brand-accent-text);
  outline: none;
}

.mfp-wrap.site-blog-lightbox .mfp-close:focus-visible,
.mfp-wrap.site-blog-lightbox .mfp-arrow:focus-visible {
  box-shadow: 0 0 0 3px rgba(var(--brand-accent-rgb), .35), 0 6px 18px rgba(0, 0, 0, .28);
}

.mfp-wrap.site-blog-lightbox .mfp-close:hover,
.mfp-wrap.site-blog-lightbox .mfp-arrow:hover {
  transform: scale(1.04);
}

@media (max-width: 767px) {
  .site-blog-lightbox .mfp-figure img.mfp-img {
    max-width: calc(100vw - 32px);
    max-height: calc(100vh - 80px) !important;
  }

  .mfp-wrap.site-blog-lightbox .mfp-close {
    top: 12px;
    right: 12px;
    width: 44px;
    height: 44px;
  }

  .mfp-wrap.site-blog-lightbox .mfp-arrow {
    width: 46px;
    height: 46px;
    margin-top: -23px;
  }

  .mfp-wrap.site-blog-lightbox .mfp-arrow-left { left: 10px; }
  .mfp-wrap.site-blog-lightbox .mfp-arrow-right { right: 10px; }

  .mfp-wrap.site-blog-lightbox .site-blog-lightbox__arrow-icon {
    font-size: 36px;
  }
}
