/* Blog detail page */

.blog-details-layout {
  /* max-width: 860px; */
  margin: 0 auto;
}

.blog-details-desc .article-header {
  margin-bottom: 28px;
}

.blog-details-desc .article-title {
  margin: 0 0 12px;
  font-size: clamp(1.75rem, 2.4vw, 2.35rem);
  font-weight: 800;
  line-height: 1.25;
  color: var(--blackColor);
}

.blog-details-desc .article-dek {
  margin: 0 0 22px;
  font-size: 1.05rem;
  line-height: 1.65;
  color: var(--optionalColor);
  max-width: 42rem;
}

.blog-details-desc .article-header .entry-meta {
  margin-top: 8px;
}

.blog-details-desc .article-header .entry-meta ul {
  padding-left: 0;
  margin-bottom: 0;
  list-style-type: none;
}

.blog-details-desc .article-header .entry-meta ul li {
  margin-right: 20px;
  position: relative;
  display: inline-block;
  border-right: 1px solid #eeeeee;
  font-weight: 600;
  font-size: var(--fontSize);
  padding-right: 20px;
  padding-left: 45px;
  margin-bottom: 12px;
  color: var(--blackColor);
}

.blog-details-desc .article-header .entry-meta ul li i {
  font-size: 32px;
  color: #cfcfcf;
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
}

.blog-details-desc .article-header .entry-meta ul li span {
  display: block;
  color: var(--mainTextColor);
  text-transform: uppercase;
  margin-bottom: 2px;
  font-size: 14px;
  font-weight: 600;
}

.blog-details-desc .article-header .entry-meta ul li a {
  display: inline-block;
  font-size: var(--fontSize);
  font-weight: 700;
  color: var(--blackColor);
}

.blog-details-desc .article-header .entry-meta ul li a:hover,
.blog-details-desc .article-header .entry-meta ul li a:focus {
  color: var(--mainColor);
}

.blog-details-desc .article-header .entry-meta ul li:last-child {
  padding-right: 0;
  margin-right: 0;
  border-right: none;
}

.blog-details-desc .article-image {
  margin-bottom: 28px;
  overflow: hidden;
  border-radius: 8px;
}

.blog-details-desc .article-image img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
}

.blog-details-body {
  margin-top: 8px;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--optionalColor);
}

.blog-details-body > *:first-child {
  margin-top: 0;
}

.blog-details-body p {
  margin-bottom: 1.15em;
}

.blog-details-body h2,
.blog-details-body h3,
.blog-details-body h4 {
  color: var(--blackColor);
  margin-top: 1.6em;
  margin-bottom: 0.65em;
  line-height: 1.3;
  font-weight: 800;
}

.blog-details-body h2 { font-size: 1.55rem; }
.blog-details-body h3 { font-size: 1.3rem; }
.blog-details-body h4 { font-size: 1.1rem; }

.blog-details-body ul,
.blog-details-body ol {
  margin-bottom: 1.15em;
  padding-left: 1.35em;
}

.blog-details-body li {
  margin-bottom: 0.4em;
}

.blog-details-body img {
  max-width: 100%;
  height: auto;
  border-radius: 6px;
  margin: 1.25em 0;
}

.blog-details-body a {
  color: var(--mainColor);
  font-weight: 600;
}

.blog-details-desc .article-footer .article-share .social li a {
  transition: transform 0.2s ease, background-color 0.2s ease, color 0.2s ease;
}

.blog-details-desc .article-footer .article-share .social li a:hover,
.blog-details-desc .article-footer .article-share .social li a:focus {
  transform: translateY(-2px);
}

.blog-details-desc .article-footer .article-share .social li a.pinterest {
  background-color: #bd081c;
  border-color: #bd081c;
  color: var(--whiteColor);
}

.blog-details-desc .article-footer .article-share .social li a.pinterest:hover,
.blog-details-desc .article-footer .article-share .social li a.pinterest:focus {
  color: #bd081c;
  background-color: transparent;
}

/* Prev / next */
.article-post-nav {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid #eeeeee;
}

.article-post-nav__link {
  flex: 1 1 0;
  min-width: 0;
  text-decoration: none;
  padding: 14px 0;
  transition: color 0.2s ease, transform 0.2s ease;
}

.article-post-nav__link--empty {
  pointer-events: none;
}

.article-post-nav__link--next {
  text-align: right;
}

.article-post-nav__label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--optionalColor);
  margin-bottom: 6px;
}

.article-post-nav__title {
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
  font-size: 1rem;
  font-weight: 700;
  color: var(--blackColor);
  line-height: 1.4;
}

.article-post-nav__link:hover .article-post-nav__title,
.article-post-nav__link:focus .article-post-nav__title {
  color: var(--mainColor);
}

.article-post-nav__link--prev:hover {
  transform: translateX(-3px);
}

.article-post-nav__link--next:hover {
  transform: translateX(3px);
}

/* Related posts */
.blog-related-posts {
  margin-top: 40px;
  padding-top: 32px;
  border-top: 1px solid #eeeeee;
}

.blog-related-posts__title {
  margin: 0 0 22px;
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--blackColor);
}

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

.blog-related-card {
  display: flex;
  flex-direction: column;
  height: 100%;
  margin-bottom: 0;
  overflow: hidden;
  border: 1px solid #eceef2;
  border-radius: 10px;
  background: #fff;
}

.blog-related-card__image {
  display: block;
  position: relative;
  flex: 0 0 130px;
  width: 100%;
  height: 130px;
  overflow: hidden;
  margin-bottom: 0;
  border-radius: 0;
  line-height: 0;
}

.blog-related-card__image img {
  position: absolute;
  top: 0;
  left: 0;
  display: block;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  transition: transform 0.35s ease;
}

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

.blog-related-card__body {
  display: flex;
  flex-direction: column;
  flex: 1 1 auto;
  padding: 14px;
  min-width: 0;
}

.blog-related-card__category {
  display: block;
  min-height: 1.2em;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: var(--mainColor);
  margin-bottom: 6px;
}

.blog-related-card__title {
  margin: 0 0 8px;
  font-size: 0.95rem;
  font-weight: 700;
  line-height: 1.4;
}

.blog-related-card__title a {
  color: var(--blackColor);
  text-decoration: none;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  word-break: break-word;
}

.blog-related-card__title a:hover,
.blog-related-card__title a:focus {
  color: var(--mainColor);
}

.blog-related-card__date {
  display: block;
  margin-top: auto;
  font-size: 12px;
  color: var(--optionalColor);
}

/* Sidebar current post */
.widget_elearniv_posts_thumb .title a.is-current {
  color: var(--mainColor);
}

/* Entrance motion */
.blog-details-animate {
  animation: blogDetailsFadeUp 0.55s ease both;
}

.blog-details-animate--delay {
  animation-delay: 0.12s;
}

@keyframes blogDetailsFadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .blog-details-animate,
  .blog-details-animate--delay,
  .blog-related-card__image img,
  .article-post-nav__link,
  .blog-details-desc .article-footer .article-share .social li a {
    animation: none;
    transition: none;
  }
}

@media (max-width: 767px) {
  .blog-details-desc .article-image img {
    max-height: 260px;
  }

  .article-post-nav {
    flex-direction: column;
    gap: 8px;
  }

  .article-post-nav__link--next {
    text-align: left;
  }

  .blog-details-desc .article-footer {
    flex-direction: column;
    gap: 16px;
  }

  .blog-details-desc .article-footer .article-tags,
  .blog-details-desc .article-footer .article-share {
    flex: 0 0 100%;
    max-width: 100%;
  }

  .blog-details-desc .article-footer .article-share .social {
    text-align: start;
  }

  .blog-related-posts__grid {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 768px) and (max-width: 991px) {
  .blog-related-posts__grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
