/* ========================================
   FastHiring Blog Styles
   - Listing index (blog.html)
   - Individual posts (post/<slug>.html)
   ======================================== */

/* --- Outline button (used on post pages) --- */
.btn--outline {
  background: transparent;
  color: var(--text-dark);
  border: 2px solid var(--border);
}
.btn--outline:hover {
  border-color: var(--orange);
  color: var(--orange);
  transform: translateY(-1px);
}

/* --- Blog index hero --- */
.blog-hero {
  padding: 96px 0 64px;
  background: var(--orange-light);
}
.blog-hero h1 {
  margin-bottom: 16px;
}
.blog-hero__subtitle {
  font-size: 1.15rem;
  color: var(--control-grey);
  max-width: 640px;
  margin: 0 auto;
}

/* --- Post grid --- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 28px;
}

.post-card {
  display: flex;
  flex-direction: column;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  color: inherit;
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--orange-dark);
}

.post-card__cover {
  aspect-ratio: 16 / 10;
  background: var(--bg-grey);
  overflow: hidden;
}
.post-card__cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-card__body {
  display: flex;
  flex-direction: column;
  flex: 1;
  padding: 22px 24px 24px;
  gap: 10px;
}
.post-card__title {
  font-size: 1.2rem;
  line-height: 1.3;
  color: var(--black);
}
.post-card__excerpt {
  font-size: 0.95rem;
  color: var(--control-grey);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.post-card__meta {
  margin-top: auto;
  padding-top: 8px;
  font-size: 0.85rem;
  color: var(--control-grey);
}

/* --- Individual post page --- */
.post {
  padding: 56px 0 80px;
  background: var(--white);
}

.post__container {
  max-width: 760px;
}

.post__back {
  display: inline-block;
  margin-bottom: 24px;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--orange);
}
.post__back:hover {
  color: var(--orange-hover);
}

.post__header {
  margin-bottom: 32px;
}

.post__title {
  font-size: clamp(2rem, 4.5vw, 2.75rem);
  line-height: 1.2;
  margin-bottom: 16px;
}

.post__meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 0.95rem;
  color: var(--control-grey);
}
.post__author {
  font-weight: 600;
  color: var(--text-dark);
}
.post__sep {
  color: var(--border);
}

.post__cover {
  margin: 0 0 36px;
  border-radius: var(--radius-md);
  overflow: hidden;
}
.post__cover img {
  width: 100%;
  height: auto;
  display: block;
}

/* --- Body content typography --- */
.post__body {
  font-size: 1.1rem;
  line-height: 1.75;
  color: var(--text-dark);
}

.post__body p {
  font-size: 1.1rem;
  margin-bottom: 1.25em;
  color: var(--text-dark);
}

.post__body h2,
.post__body h3,
.post__body h4 {
  color: var(--black);
  margin-top: 2em;
  margin-bottom: 0.6em;
  line-height: 1.3;
}
.post__body h2 { font-size: 1.7rem; }
.post__body h3 { font-size: 1.35rem; }
.post__body h4 { font-size: 1.15rem; }

.post__body a {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.post__body a:hover {
  color: var(--orange-hover);
}

.post__body ul,
.post__body ol {
  margin: 0 0 1.25em 1.5em;
  padding-left: 0.5em;
}
.post__body ul { list-style: disc; }
.post__body ol { list-style: decimal; }
.post__body li {
  margin-bottom: 0.5em;
  padding-left: 0.25em;
}
.post__body li::marker {
  color: var(--orange);
}
.post__body li p {
  margin: 0;
}

.post__body strong { font-weight: 700; color: var(--black); }
.post__body em { font-style: italic; }

.post__body blockquote {
  margin: 1.5em 0;
  padding: 16px 20px;
  border-left: 4px solid var(--orange);
  background: var(--orange-light);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-style: italic;
  color: var(--text-dark);
}

.post__body img {
  width: 100%;
  height: auto;
  margin: 1.5em 0;
  border-radius: var(--radius-md);
}

.post__body figure {
  margin: 1.5em 0;
}
.post__body figcaption {
  font-size: 0.9rem;
  color: var(--control-grey);
  text-align: center;
  margin-top: 8px;
}

.post__body code {
  font-family: "SFMono-Regular", Menlo, Consolas, monospace;
  font-size: 0.92em;
  background: var(--bg-grey);
  padding: 2px 6px;
  border-radius: 4px;
}
.post__body pre {
  background: var(--bg-grey);
  padding: 16px 20px;
  border-radius: var(--radius-sm);
  overflow-x: auto;
  margin: 1.5em 0;
}
.post__body pre code {
  background: transparent;
  padding: 0;
}

.post__body hr {
  border: 0;
  height: 1px;
  background: var(--border);
  margin: 2.5em 0;
}

.post__body table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.5em 0;
}
.post__body th,
.post__body td {
  border: 1px solid var(--border);
  padding: 10px 14px;
  text-align: left;
}
.post__body th {
  background: var(--bg-grey);
  font-weight: 700;
}

.post__cta {
  margin-top: 64px;
  padding-top: 40px;
  border-top: 1px solid var(--border);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  justify-content: center;
}

/* --- Responsive --- */
@media (max-width: 640px) {
  .post {
    padding: 32px 0 56px;
  }
  .post__cta {
    flex-direction: column;
  }
  .post__cta .btn {
    width: 100%;
  }
  .blog-hero {
    padding: 64px 0 40px;
  }
}
