/* Blog: index card grid and single post layout. Loaded after site.css. */

/* ---------- Blog hero (index + posts) ---------- */
.blog-hero {
  padding: 59px 0 100px;
  background: var(--white) var(--hero-gradient) left top / 100% 965px no-repeat;
  text-align: center;
}
.blog-hero h1 { max-width: 792px; margin: 0 auto; font-size: 60px; line-height: 1; }
.post-info { margin: 20px 0 0; font-size: 13px; line-height: 1.5; color: #000; }
.post-info__time { margin-left: 8px; }
.blog-hero--index { padding-bottom: 114px; }
.blog-hero--index h1 { text-transform: uppercase; }
.blog-hero--index h1 span { color: var(--orange); }
.blog-hero__intro { max-width: 792px; margin: 20px auto 0; color: var(--text); }

/* ---------- Index: card grid ---------- */
.blog-list { padding: 100px 0; }
.blog-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 35px 30px; }
.post-card {
  position: relative;
  display: flex; flex-direction: column;
  background: var(--white);
  border-radius: 3px;
  box-shadow: 0 0 10px rgba(0, 0, 0, .15);
  overflow: hidden;
}
.post-card__media { position: relative; display: block; aspect-ratio: 1 / .46; margin-bottom: 20px; overflow: hidden; }
.post-card__media::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0, 0, 0, .35), transparent 75%); transition: opacity .3s ease-out; }
.post-card:hover .post-card__media::after { opacity: .5; }
.post-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card__badge {
  position: absolute; top: 20px; right: 20px;
  margin: 0; padding: 7.2px 14.4px;
  border-radius: 999px;
  background: #69727D; color: var(--white);
  font-size: 12px; line-height: 1; text-transform: uppercase;
}
.post-card__body { display: flex; flex-direction: column; flex: 1; margin-top: 20px; padding: 0 30px 20px; }
.post-card__title { margin-bottom: 25px; color: var(--text); font-size: 21px; line-height: 1.2; font-weight: 600; }
.post-card__title a { color: var(--orange); }
.post-card__title a:hover { color: var(--orange-hover); }
.post-card__excerpt { margin: 0 0 29px; color: #69727D; font-size: 14px; line-height: 1.5; }
.post-card__more { margin-top: auto; align-self: flex-start; font-size: 12px; line-height: 1.5; font-weight: 700; text-transform: uppercase; }

/* ---------- Post: three-column layout ---------- */
.post-layout {
  display: grid;
  grid-template-columns: 210px minmax(0, 1fr) 210px;
  gap: 20px;
  width: 80%; max-width: 1152px;
  margin: 0 auto;
  padding: 43px 0 28px;
}
.post-toc, .post-sidebar { padding: 0 20px; }
.toc, .post-sidebar__inner { position: sticky; top: 100px; }
.post-toc .toc { margin-top: 20px; }
.post-sidebar__inner { padding-top: 20px; }
.post { min-width: 0; padding: 10px; }

/* Table of contents */
.toc__title {
  margin: 0; padding: 20px;
  background: var(--navy); color: var(--white);
  border-bottom: 1px solid #9DA5AE;
  font: 700 18px/1.2 Roboto, Arial, sans-serif;
}
.toc__list { margin: 0; padding: 20px; list-style: none; }
.toc__list li { margin-bottom: 7px; font-size: 14px; line-height: 1.5; }
.toc__list a { color: var(--text); }
.toc__list a:hover { color: var(--orange); }

/* Post body typography */
.post-body { overflow-wrap: break-word; }
.post-body p { margin: 0 0 14.4px; }
.post-body p a, .post-body li a { text-decoration: underline; } /* orange on gray text is under 3:1, so in-text links need the underline */
.post-body h2, .post-body h3, .post-body h4, .post-body h5, .post-body h6 { margin: 8px 0 16px; }
.post-body h2 { font-size: 50px; line-height: 1.1; }
.post-body h3 { color: var(--text); font-size: 28px; line-height: 1.2; font-weight: 600; }
.post-body h4 { color: var(--text); font-size: 24px; line-height: 1.2; font-weight: 700; }
.post-body h5, .post-body h6 { color: var(--text); font-size: 20px; line-height: 1.2; }
.post-body ul, .post-body ol { margin: 0; padding-left: 40px; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body figure { margin: 0 0 16px; }
.post-body img { width: 100%; height: auto; }
.post-body figcaption { margin: 8px 0 16px; font-size: 16px; line-height: 1.4; font-style: italic; }
.post-body blockquote { margin: 0 0 16px; padding-left: 20px; border-left: 4px solid var(--line); }
.post-body table { width: 100%; margin: 0 0 16px; border-collapse: collapse; }
.post-body th, .post-body td { padding: 8px; border: 1px solid var(--line); text-align: left; }
.post-body iframe { max-width: 100%; border: 0; }

/* Share links */
.post-share {
  display: flex; align-items: flex-start; justify-content: space-between; gap: 10px;
  margin-top: 34px; padding: 20px;
}
.post-share__title { color: #000; font-size: 24px; line-height: 1; font-weight: 700; text-transform: uppercase; }
.share-links { display: flex; gap: 10px; margin-right: 1px; }
.share-links a { display: flex; align-items: center; justify-content: center; width: 36px; height: 36px; color: var(--white); }
.share-links svg { width: 12px; height: 12px; fill: currentColor; }
.share-links a:hover { color: var(--white); opacity: .9; }
.share-links__facebook { background: #3B5998; }
.share-links__linkedin { background: #0077B5; }
.share-links__x { background: #000; }
.share-links__email { background: #EA4335; }
.post-divider { margin: 50px 0 0; border: 0; border-top: 1px dotted #000; }

/* Sidebar form */
.post-sidebar h3 { color: var(--text); font-size: 28px; line-height: 1; font-weight: 600; }
.post-sidebar .form-embed { margin-top: 20px; }
.post-sidebar .form-placeholder { padding: 20px; }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
  .post-body h2 { font-size: 30px; }
  .post-body h3, .post-sidebar h3 { font-size: 22px; }
}
@media (max-width: 1024px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 20px; width: 100%; max-width: 790px; padding: 12px 20px 40px; }
  .post-toc, .post-sidebar { padding: 0 10px; }
  .toc, .post-sidebar__inner { position: static; }
  .post-toc .toc, .post-sidebar__inner { margin-top: 10px; padding-top: 0; }
}
@media (max-width: 880px) {
  .post-body h2 { font-size: 26px; }
  .post-body h3, .post-sidebar h3 { font-size: 20px; }
  .post-body h4 { font-size: 20px; }
}
@media (max-width: 767px) {
  .blog-hero { padding: 18px 0 35px; }
  .blog-hero h1 { font-size: 35px; line-height: 1; }
  .blog-hero--index h1 { font-size: 30px; }
  .blog-hero--index { padding-bottom: 52px; }
  .blog-hero__intro { font-size: 13px; }
  .blog-list { padding: 35px 0 60px; }
  .blog-grid { grid-template-columns: 1fr; }
  .post-card__media { aspect-ratio: 2 / 1; }
  .post-layout { font-size: 13px; line-height: 1.5; }
  .post-body p { margin-bottom: 17px; }
  .post-share { flex-direction: column; gap: 30px; margin-top: 10px; padding: 20px 20px 10px; }
  .share-links { align-self: center; }
  .post-divider { margin-top: 38px; }
  .post-sidebar { margin-top: 30px; }
}
