﻿/* ---- Blog Grid ---- */
.blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 32px;
}
.blog-card {
  display: flex;
  flex-direction: column;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: #fff;
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}
.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}
.blog-card__image-wrap {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}
.blog-card__image-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.blog-card__content {
  padding: 24px;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
}
.blog-card__content h3 {
  font-size: 1.1rem;
  margin: 8px 0 12px;
  line-height: 1.4;
}
.blog-card__content p {
  font-size: 0.9rem;
  color: var(--text-light);
  line-height: 1.6;
  margin-bottom: 20px;
}
.blog-card__author {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: auto;
  font-size: .8rem;
  font-weight: 600;
}
.blog-card__author img {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  object-fit: cover;
}

/* ---- Blog Post ---- */
.post-hero {
  padding: 160px 0 80px;
  background-size: cover;
  background-position: center;
  color: #fff;
}
.post-hero__content { text-align: center; max-width: 720px; margin: 0 auto; }
.post-hero .label { color: rgba(255,255,255,.8); }
.post-hero h1 { color: #fff; margin: 12px 0 24px; }
.post-hero__meta { display: flex; align-items: center; justify-content: center; gap: 12px; font-size: .85rem; opacity: .85; }
.post-hero .blog-card__author { margin-top: 0; }

.post-content { max-width: 720px; margin: 0 auto; }
.post-content h1, .post-content h2, .post-content h3, .post-content h4 { margin: 2.5rem 0 1rem; }
.post-content p { margin-bottom: 1.25rem; font-size: 1.05rem; line-height: 1.8; }
.post-content a { color: var(--blue); text-decoration: underline; }
.post-content ul, .post-content ol { margin: 0 0 1.5rem 1.5rem; }
.post-content li { margin-bottom: 0.5rem; }
.post-content blockquote {
  border-left: 3px solid var(--blue);
  padding-left: 24px;
  margin: 2rem 0;
  font-style: italic;
  font-size: 1.1rem;
  color: var(--text-mid);
}
.post-content img { border-radius: var(--radius); margin: 2rem 0; }
.post-content figure { margin: 2rem 0; }
.post-content figure img { margin: 0; }
.post-content figcaption {
  color: var(--text-light);
  font-size: .85rem;
  line-height: 1.5;
  margin-top: .65rem;
}
.post-content table {
  border-collapse: collapse;
  display: block;
  margin: 2rem 0;
  max-width: 100%;
  overflow-x: auto;
  width: 100%;
}
.post-content th,
.post-content td {
  border: 1px solid var(--border);
  padding: .75rem .9rem;
  text-align: left;
  vertical-align: top;
}
.post-content th { background: var(--bg-off); color: var(--text); }
.post-content .video-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 */
    height: 0;
    overflow: hidden;
    max-width: 100%;
    background: #000;
    margin: 2rem 0;
}
.post-content .video-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}
.post-gallery .gallery__grid {
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
}

/* ---- Post Navigation ---- */
.post-nav-section#post-nav-bottom {
  border-top: 1px solid var(--border);
}
.post-nav-section#post-nav-top {
  border-bottom: 1px solid var(--border);
}
.post-nav__inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  gap: 20px;
  align-items: center;
}
.post-nav__link {
  display: flex;
  flex-direction: column;
  min-height: 92px;
  padding: 18px 20px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  color: var(--text);
  background: #fff;
  box-shadow: none;
  transition: border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease), background .22s var(--ease);
}
.post-nav__link:hover {
  border-color: var(--green-mid);
  background: var(--surface-soft);
  color: var(--blue);
  transform: translateY(-2px);
  box-shadow: var(--shadow-card-hover);
}
.post-nav__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin-bottom: 8px;
  color: var(--text-light);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .08em;
  line-height: 1.2;
  text-transform: uppercase;
  transition: color .22s var(--ease);
}
.post-nav__link:hover .post-nav__eyebrow {
  color: var(--mineral);
}
.post-nav__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: var(--green-light);
  color: var(--blue);
  font-size: .86rem;
  line-height: 1;
  transition: background .22s var(--ease), color .22s var(--ease), transform .22s var(--ease);
}
.post-nav__link:hover .post-nav__icon {
  background: var(--blue);
  color: var(--mint);
}
.post-nav__link--prev:hover .post-nav__icon {
  transform: translateX(-2px);
}
.post-nav__link--next:hover .post-nav__icon {
  transform: translateX(2px);
}
.post-nav__title {
  color: inherit;
  font-size: .95rem;
  font-weight: 600;
  line-height: 1.38;
  white-space: normal;
}
.post-nav__link--next {
  align-items: flex-end;
  text-align: right;
}
.post-nav__overview {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 40px;
  padding: 6px 16px;
  border-radius: var(--radius);
  border: 1px solid var(--blue);
  color: var(--blue);
  background: transparent;
  font-size: .86rem;
  font-weight: 600;
  white-space: nowrap;
  transition: background .22s var(--ease), color .22s var(--ease), border-color .22s var(--ease), box-shadow .22s var(--ease), transform .22s var(--ease);
}
.post-nav__overview:hover {
  border-color: var(--blue);
  background: var(--blue);
  color: var(--mint);
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(20,36,52,.16);
}
.post-nav__overview-icon {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
  opacity: .8;
  transition: opacity .22s var(--ease), transform .22s var(--ease);
}
.post-nav__overview:hover .post-nav__overview-icon {
  opacity: 1;
  transform: scale(.96);
}

/* ---- Blog Refinements ---- */
.blog-grid {
  gap: 28px;
}

.blog-card {
  border-radius: var(--radius);
  box-shadow: none;
}

.blog-card:hover {
  border-color: var(--green-mid);
  box-shadow: var(--shadow-card-hover);
}

.blog-card__image-wrap {
  background: var(--surface-muted);
}

.blog-card__content {
  padding: 26px;
}

.post-hero {
  padding: calc(var(--nav-h) + 92px) 0 92px;
}

.post-content {
  max-width: 760px;
}

.post-content p {
  white-space: normal;
}

.post-content figure,
.post-content [data-rt-embed-type] {
  max-width: 100%;
}

.post-content [data-rt-embed-type] {
  margin: 2rem 0;
  overflow-x: auto;
}

.post-content .post-image-link {
  cursor: zoom-in;
  position: relative;
}

.post-content .post-image-link img {
  transition: transform .25s var(--ease), box-shadow .25s var(--ease);
}

.post-content .post-image-link:hover img {
  box-shadow: var(--shadow-card-hover);
  transform: translateY(-2px);
}

.post-gallery {
  margin-top: 3rem;
}

.post-gallery h2 {
  margin-bottom: 1.25rem;
}

.post-gallery .gallery__grid {
  gap: 18px;
}

.post-gallery .gallery__item {
  aspect-ratio: 4 / 3;
  border-radius: var(--radius);
  box-shadow: var(--shadow-card);
}

.post-gallery .gallery__item img {
  height: 100%;
  margin: 0;
  object-fit: cover;
  width: 100%;
}
