/* =========================================================
   It's Your Idea — Blog styles (listing + article)
   Builds on css/styles.css design tokens.
   ========================================================= */

.blog-hero { padding: 56px 0 26px; }

/* ---- Listing grid ---- */
.post-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; margin-top: 10px; }
.post-card {
  position: relative;            /* anchor the stretched title link */
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 24px; cursor: pointer;
  transition: transform .15s ease, border-color .15s ease, box-shadow .2s ease;
}
.post-card:hover { transform: translateY(-3px); border-color: var(--blue); box-shadow: var(--shadow-sm); }
.post-card:focus-within { border-color: var(--cyan); box-shadow: var(--shadow-sm); }
.post-card--feature { grid-column: 1 / -1; }
.post-card__cat { font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.post-card h2 { font-size: 1.22rem; margin: 10px 0 8px; line-height: 1.25; }
.post-card h2 a { color: var(--ink); text-decoration: none; }
.post-card h2 a:hover { color: var(--cyan); }
/* Stretch the title link over the whole card so the entire card is clickable. */
.post-card h2 a::after { content: ""; position: absolute; inset: 0; border-radius: var(--radius); }
.post-card h2 a:focus-visible { outline: none; }
.post-card p { color: var(--muted); font-size: .94rem; line-height: 1.6; margin: 0 0 16px; flex: 1; }
.post-card__meta { font-size: .82rem; color: var(--muted); }
.post-card__more {
  margin-top: 16px; align-self: flex-start; font-weight: 700; font-size: .9rem;
  color: var(--cyan); display: inline-flex; align-items: center; gap: 6px;
}
.post-card:hover .post-card__more { gap: 10px; }
.post-card__more::after { content: "→"; transition: transform .15s ease; }
.post-card:hover .post-card__more::after { transform: translateX(3px); }

/* ---- Article ---- */
.article { max-width: 760px; margin: 0 auto; padding: 48px 0 8px; }
.article__head { margin-bottom: 26px; }
.article__cat { font-size: .74rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--cyan); }
.article h1 { font-size: clamp(1.8rem, 3.6vw, 2.55rem); line-height: 1.16; margin: 10px 0 14px; letter-spacing: -.01em; }
.article__meta { display: flex; gap: 14px; align-items: center; color: var(--muted); font-size: .9rem; flex-wrap: wrap; }
.article__meta .by { color: var(--ink); font-weight: 600; }
.article__lead { font-size: 1.18rem; color: #c6dbec; line-height: 1.7; margin: 0 0 8px; }
.article__body { color: #cfe0ee; line-height: 1.8; font-size: 1.05rem; }
.article__body h2 { margin: 34px 0 12px; font-size: 1.42rem; color: var(--ink); letter-spacing: -.01em; }
.article__body h3 { margin: 24px 0 8px; font-size: 1.12rem; color: var(--ink); }
.article__body p { margin: 0 0 18px; }
.article__body ul { margin: 0 0 18px; padding-left: 22px; }
.article__body li { margin: 0 0 9px; }
.article__body a { color: var(--cyan); }
.article__body blockquote { margin: 22px 0; padding: 4px 18px; border-left: 3px solid var(--cyan); color: #dbe8f3; font-style: italic; }
.article__cta {
  margin-top: 38px; padding: 24px; border: 1px solid var(--line);
  border-radius: var(--radius); background: var(--surface);
  display: flex; gap: 16px; align-items: center; justify-content: space-between; flex-wrap: wrap;
}
.article__cta p { margin: 0; color: var(--ink); font-weight: 600; }
.article__back { display: inline-block; margin: 30px 0 8px; color: var(--cyan); font-weight: 600; }

/* Two columns through tablet; single column (more readable) on phones. */
@media (max-width: 520px) { .post-grid { grid-template-columns: 1fr; } .post-card { padding: 20px; } }
