/* =========================================
   BLOG
   Covers:
   - Blog archive / index
   - Single blog post
   ========================================= */

/* ---------- Blog archive ---------- */

.lh-news-grid{
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  align-items: stretch;
}

.lh-news-card{
  display: flex;
  flex-direction: column;
  height: 100%;
  background: var(--panel);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow);
}

.lh-news-card__media{
  display: block;
  text-decoration: none;
  color: inherit;
}

.lh-news-card__img,
.lh-news-card__ph{
  width: 100%;
  height: 230px;
  display: block;
}

.lh-news-card__img{
  object-fit: cover;
}

.lh-news-card__ph{
  background: linear-gradient(135deg, rgba(16,185,129,.10), rgba(37,99,235,.08));
}

.lh-news-card__body{
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 12px;
  padding: 16px;
}

.lh-news-card__title{
  margin: 0;
  font-size: 1.2rem;
  line-height: 1.2;
  font-weight: 900;
}

.lh-news-card__title a{
  color: var(--text);
  text-decoration: none;
}

.lh-news-card__title a:hover{
  text-decoration: underline;
}

.lh-news-card__text{
  margin: 0;
  color: var(--muted);
  line-height: 1.65;
}

.lh-news-card__actions{
  margin-top: auto;
  display: flex;
  justify-content: flex-start;
}

/* ---------- Single blog post ---------- */

.lh-blog-single-shell{
  padding-top: 16px;
  padding-bottom: 32px;
}

.lh-blog-single{
  display: grid;
  gap: 20px;
}

.lh-blog-single__hero{
  padding: 0;
  overflow: hidden;
}

.lh-blog-single__media{
  width: 100%;
}

.lh-blog-single__image{
  width: 100%;
  height: min(48vh, 520px);
  object-fit: cover;
  display: block;
}

.lh-blog-single__hero-content{
  display: grid;
  gap: 12px;
  padding: 20px;
}

.lh-blog-back{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  width: fit-content;
  color: var(--muted);
  text-decoration: none;
  font-weight: 700;
}

.lh-blog-back:hover{
  color: var(--text);
  text-decoration: none;
}

.lh-blog-single__meta{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--muted);
  font-size: .95rem;
}

.lh-blog-meta-sep{
  opacity: .6;
}

.lh-blog-single__title{
  margin: 0;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.05;
  font-weight: 900;
  color: var(--text);
}

.lh-blog-single__excerpt{
  margin: 0;
  max-width: 760px;
  font-size: 1.05rem;
  line-height: 1.7;
  color: var(--muted);
}

.lh-blog-single__content-wrap{
  display: grid;
}

.lh-blog-single__content{
  padding: 0;
  overflow: hidden;
}

.lh-prose{
  padding: 24px;
  color: var(--text);
}

.lh-prose > *:first-child{
  margin-top: 0;
}

.lh-prose > *:last-child{
  margin-bottom: 0;
}

.lh-prose h2,
.lh-prose h3,
.lh-prose h4{
  line-height: 1.2;
  color: var(--text);
  margin-top: 1.5em;
  margin-bottom: .55em;
  font-weight: 900;
}

.lh-prose h2{
  font-size: 1.8rem;
}

.lh-prose h3{
  font-size: 1.4rem;
}

.lh-prose h4{
  font-size: 1.15rem;
}

.lh-prose p,
.lh-prose ul,
.lh-prose ol,
.lh-prose blockquote{
  margin-top: 0;
  margin-bottom: 1rem;
  line-height: 1.8;
}

.lh-prose ul,
.lh-prose ol{
  padding-left: 1.2rem;
}

.lh-prose li{
  margin-bottom: .45rem;
}

.lh-prose a{
  word-break: break-word;
}

.lh-prose img{
  border-radius: 14px;
  margin: 1rem 0;
}

.lh-prose figure{
  margin: 1.2rem 0;
}

.lh-prose figcaption{
  margin-top: .5rem;
  font-size: .92rem;
  color: var(--muted);
}

.lh-prose blockquote{
  padding: 14px 16px;
  border-left: 4px solid var(--accent);
  background: rgba(0,0,0,.03);
  border-radius: 0 12px 12px 0;
  color: var(--text);
}

.lh-prose table{
  width: 100%;
  border-collapse: collapse;
  margin: 1.2rem 0;
  display: block;
  overflow-x: auto;
}

.lh-prose table th,
.lh-prose table td{
  border: 1px solid var(--border);
  padding: 10px 12px;
  text-align: left;
}

.lh-prose table th{
  background: var(--panel-muted);
}

.lh-prose hr{
  margin: 1.5rem 0;
}

.lh-prose iframe{
  width: 100%;
  max-width: 100%;
  border: 0;
  border-radius: 12px;
}

/* WordPress alignments */
.lh-prose .aligncenter{
  margin-left: auto;
  margin-right: auto;
}

.lh-prose .alignleft{
  float: left;
  margin-right: 1rem;
  margin-bottom: .75rem;
}

.lh-prose .alignright{
  float: right;
  margin-left: 1rem;
  margin-bottom: .75rem;
}

.lh-prose::after{
  content: "";
  display: block;
  clear: both;
}

/* ---------- Pagination ---------- */

.pagination,
.nav-links{
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.page-numbers{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 12px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-decoration: none;
  font-weight: 700;
}

.page-numbers.current{
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.page-numbers:hover{
  text-decoration: none;
  background: var(--panel-muted);
}

/* ---------- Responsive ---------- */

@media (max-width: 1100px){
  .lh-news-grid{
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 640px){
  .lh-news-grid{
    grid-template-columns: 1fr;
  }

  .lh-news-card__img,
  .lh-news-card__ph{
    height: 210px;
  }

  .lh-blog-single-shell{
    padding-top: 12px;
    padding-bottom: 24px;
  }

  .lh-blog-single__hero-content{
    padding: 16px;
  }

  .lh-prose{
    padding: 18px;
  }

  .lh-prose .alignleft,
  .lh-prose .alignright{
    float: none;
    margin-left: 0;
    margin-right: 0;
  }
}