/* ============================================================
   Heropost Blog — layered on the site design system (style.css).
   Everything runs on the same CSS variables, so light/dark
   theming works with zero extra rules. Ports to the WP theme
   for heropost.io as-is.
   ============================================================ */

/* ---------- Blog hero (dark, centered, featured slider) ---------- */
.blog-hero {
    text-align: center;
    padding: 90px 0 72px;
}
.blog-hero h1 { max-width: none; }
.blog-hero .lead { max-width: 560px; margin: 18px auto 0; }

/* ---------- Hero slider (CSS-only: radios drive the track) ---------- */
.hero-slider { margin-top: 52px; }
.hs-radio { position: absolute; opacity: 0; pointer-events: none; }
.hs-window { overflow: hidden; border-radius: var(--radius-lg); }
.hs-track {
    display: flex;
    width: 300%;
    transition: transform 0.55s var(--ease);
}
#hs2:checked ~ .hs-window .hs-track { transform: translateX(-33.3333%); }
#hs3:checked ~ .hs-window .hs-track { transform: translateX(-66.6667%); }

.hs-slide {
    width: 33.3333%;
    flex: none;
    display: grid;
    grid-template-columns: 1.15fr 1fr;
    gap: 40px;
    align-items: center;
    text-align: left;
    background: var(--dark-card);
    border: 1px solid var(--line-dark);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: inherit;
}
.hs-slide:hover { color: inherit; }
.hs-media {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16 / 9;
}
.hs-media img { width: 100%; height: 100%; object-fit: cover; display: block; }
.hs-copy h2 { font-size: clamp(22px, 2.6vw, 30px); margin: 14px 0 12px; }
.hs-copy p { font-size: 15px; margin-bottom: 18px; }
.hs-copy .post-meta { color: var(--paper-faint); }

/* Dots */
.hs-nav { display: flex; justify-content: center; gap: 10px; margin-top: 24px; }
.hs-nav label {
    width: 9px; height: 9px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.22);
    cursor: pointer;
    transition: background-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.hs-nav label:hover { background: rgba(255, 255, 255, 0.45); }
#hs1:checked ~ .hs-nav label[for="hs1"],
#hs2:checked ~ .hs-nav label[for="hs2"],
#hs3:checked ~ .hs-nav label[for="hs3"] {
    background: var(--paper);
    transform: scale(1.25);
}

/* ---------- Toolbar: category pills + search ---------- */
.blog-index { padding-top: 56px; }
.blog-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 36px;
}
.blog-toolbar .cat-pills { margin-bottom: 0; }
.blog-search {
    position: relative;
    flex: none;
}
.blog-search svg {
    position: absolute;
    left: 13px; top: 50%;
    transform: translateY(-50%);
    width: 15px; height: 15px;
    fill: none;
    stroke: var(--ink-faint);
    stroke-width: 2;
    stroke-linecap: round;
    pointer-events: none;
}
.blog-search input {
    width: 220px;
    font-family: inherit;
    font-size: 13.5px;
    color: var(--ink);
    background: var(--tan-card);
    border: none;
    border-radius: 100px;
    padding: 8px 16px 8px 38px;
    outline: none;
    transition: box-shadow 0.2s var(--ease), width 0.25s var(--ease);
}
.blog-search input::placeholder { color: var(--ink-faint); }
.blog-search input:focus { box-shadow: 0 0 0 2px var(--accent); width: 260px; }

/* ---------- Category chip (shared: cards, featured, post head) ---------- */
.post-cat {
    display: inline-block;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--accent);
    background: var(--accent-tint);
    padding: 4px 10px;
    border-radius: 100px;
}
/* chips on dark surfaces follow the site convention: teal */
.dark-section .post-cat { color: #47ffaa; background: rgba(71, 255, 170, 0.14); }

/* ---------- Meta row ---------- */
.post-meta {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: var(--ink-faint);
}
.post-meta i { font-style: normal; opacity: 0.6; }
.pm-avatar {
    width: 26px; height: 26px;
    border-radius: 50%;
    object-fit: cover;
    object-position: 50% 20%;
}

/* ---------- Category pills / pagination ---------- */
.cat-pills, .blog-pagination { display: flex; flex-wrap: wrap; gap: 8px; }
.blog-pagination { justify-content: center; margin-top: 44px; }
.pill {
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-dim);
    padding: 6px 14px;
    border-radius: 100px;
    box-shadow: inset 0 0 0 1px var(--line-light);
    transition: background-color 0.2s var(--ease), color 0.2s var(--ease);
}
.pill:hover { color: var(--ink); background: var(--line-light); }
.pill.active { color: var(--cream); background: var(--ink); box-shadow: none; }

/* ---------- Post cards grid ---------- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}
.post-card { display: block; color: inherit; }
.post-card:hover { color: inherit; }
.pc-media {
    border-radius: var(--radius-md);
    overflow: hidden;
    aspect-ratio: 16 / 10;
    margin-bottom: 16px;
    background: var(--tan-card);
}
.pc-media img {
    width: 100%; height: 100%;
    object-fit: cover; display: block;
    transition: transform 0.35s var(--ease);
}
.post-card:hover .pc-media img { transform: scale(1.04); }
.post-card h3 { font-size: 18px; margin: 12px 0 8px; }
.post-card p { font-size: 14px; line-height: 1.55; margin-bottom: 10px; }

/* ---------- Single post ---------- */
.post-narrow { max-width: 760px; }
.post-head { padding: 120px 0 0; }
.post-back {
    display: inline-block;
    font-size: 13px;
    font-weight: 500;
    color: var(--ink-faint);
    margin-bottom: 26px;
}
.post-back:hover { color: var(--ink); }
.post-head h1 { font-size: clamp(30px, 4.2vw, 46px); margin: 16px 0 18px; }
.post-hero-media {
    border-radius: var(--radius-lg);
    overflow: hidden;
    aspect-ratio: 21 / 9;
    margin-top: 40px;
    box-shadow: var(--shadow-media);
}
.post-hero-media img { width: 100%; height: 100%; object-fit: cover; display: block; }

.post-body { padding: 48px 0 8px; }
.post-body p { font-size: 16px; line-height: 1.75; margin-bottom: 22px; }
.post-body .lead { font-size: 19px; line-height: 1.6; color: var(--ink); }
.post-body h2 { font-size: 27px; margin: 40px 0 16px; }
.post-body h3 { font-size: 19px; margin: 28px 0 10px; }
.post-body ul, .post-body ol { margin: 0 0 22px 22px; }
.post-body li { font-size: 16px; line-height: 1.7; color: var(--ink-dim); margin-bottom: 10px; }
.post-body li strong { color: var(--ink); }
.post-body blockquote {
    font-size: 21px;
    font-weight: 500;
    line-height: 1.45;
    letter-spacing: -0.02em;
    color: var(--ink);
    border-left: 3px solid var(--accent);
    padding: 6px 0 6px 22px;
    margin: 32px 0;
}
.post-body img { max-width: 100%; border-radius: var(--radius-md); }

/* ---------- In-article CTA ---------- */
.post-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: var(--tan-card);
    border-radius: var(--radius-lg);
    padding: 28px 32px;
    margin: 24px 0 56px;
}
.post-cta h3 { font-size: 19px; margin-bottom: 4px; }
.post-cta p { font-size: 14px; }
.post-cta .btn { flex: none; }

/* ---------- Related ---------- */
.related { padding-bottom: 80px; }
.related-title { font-size: 26px; margin-bottom: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1024px) {
    .blog-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 810px) {
    .blog-hero { padding: 72px 0 56px; }
    .hs-slide { grid-template-columns: 1fr; gap: 20px; padding: 16px 16px 22px; }
    .blog-toolbar { flex-direction: column; align-items: stretch; }
    .blog-search input { width: 100%; }
    .blog-search input:focus { width: 100%; }
    .blog-grid { grid-template-columns: 1fr; gap: 36px; }
    .post-head { padding-top: 100px; }
    .post-hero-media { aspect-ratio: 16 / 9; margin-top: 28px; }
    .post-cta { flex-direction: column; align-items: flex-start; }
}
