/*
Theme Name: AI Credit Care Blog
Description: Blog theme for the AI Credit Care website. Reuses the main site's header and footer (../includes/) and styles the blog listing and articles to match the rest of the site.
Version: 1.0
Requires PHP: 7.4
Text Domain: aicreditcare
*/

/*
 * css/blog.css    — blog listing (scoped under .blog-page)
 * css/article.css — article page (scoped under .blog-post-page)
 * This file holds what WordPress adds on top of those two: links instead of buttons, pagination,
 * featured images, and the typography of content written in the editor.
 */

.screen-reader-text { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

/* Logged-in admin bar: keep the sticky site header and sidebars below it */
.admin-bar .site-header { top: 32px; }
.admin-bar .blog-page .side, .admin-bar .blog-post-page .side { top: 124px; }
@media (max-width: 782px) {
  .admin-bar .site-header { top: 46px; }
}
@media (max-width: 600px) {
  .admin-bar .site-header { top: 0; }
}

/* ---------- Listing ---------- */
.blog-page a.chip { display: inline-flex; align-items: center; }
.blog-page .cats a { width: 100%; display: flex; align-items: center; gap: 8px; border-radius: 6px; padding: 10px 6px; font-size: 12.5px; color: var(--ink); }
.blog-page .cats a:hover { background: #f5f8f7; color: var(--ink); }
.blog-page .cats a.is-on { background: #f3f6f5; font-weight: 700; }
.blog-page form.search { margin: 0; }
.blog-page .thumb--photo img { width: 100%; height: 100%; object-fit: cover; }
.blog-page .feat .thumb--photo { padding-top: 0; }

.blog-page .pager { display: flex; justify-content: center; align-items: center; gap: 8px; margin-top: 28px; }
.blog-page .pager .page-numbers { min-width: 34px; height: 34px; padding: 0 6px; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; color: var(--ink); border: 1px solid transparent; }
.blog-page .pager a.page-numbers:hover { border-color: var(--line); background: #fff; }
.blog-page .pager .page-numbers.current { background: var(--green); color: #fff; }

.blog-page .b-hero--plain { grid-template-columns: minmax(0,1fr); padding-bottom: 64px; }
.blog-page .b-hero--plain .search { max-width: 360px; margin-top: 8px; }
.blog-page .b-hero--plain .b-btn { align-self: flex-start; margin-top: 4px; }

@media (max-width: 640px) {
  .blog-page .pager { gap: 4px; margin-top: 22px; }
  .blog-page .pager .page-numbers { min-width: 36px; height: 36px; }
}

/* ---------- Article ---------- */
.blog-post-page a.pill:hover { color: var(--green-dark); }
.blog-post-page .article__hero { margin: 24px 0 0; border-radius: 16px; overflow: hidden; border: 1px solid #e1ece6; }
.blog-post-page .article__hero img { display: block; width: 100%; height: auto; }
.blog-post-page .layout--page { grid-template-columns: minmax(0,760px); }
.blog-post-page .rel__img--photo img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; }

/* Content written in the editor. Each <h2> gets a numbered chip; everything else is indented
   to line up with the heading text, except the wide components listed below. */
.blog-post-page .entry-content { counter-reset: section; margin-top: 24px; }
.blog-post-page .entry-content > * { margin: 14px 0 0 52px; }
.blog-post-page .entry-content > :first-child { margin-top: 0; }
.blog-post-page .entry-content > p,
.blog-post-page .entry-content > ul,
.blog-post-page .entry-content > ol { font-size: 13.5px; line-height: 1.6; color: var(--text); max-width: 600px; }
.blog-post-page .entry-content > p a,
.blog-post-page .entry-content > ul a,
.blog-post-page .entry-content > ol a,
.blog-post-page .entry-content > blockquote a { text-decoration: underline; text-underline-offset: 2px; }
.blog-post-page .entry-content strong, .blog-post-page .entry-content b { color: var(--ink); font-weight: 600; }

.blog-post-page .entry-content > h2 { counter-increment: section; display: flex; align-items: center; gap: 16px; margin: 32px 0 0; font-size: clamp(19px,2.1vw,22px); line-height: 1.25; font-weight: 800; letter-spacing: -.02em; scroll-margin-top: 96px; }
.blog-post-page .entry-content > h2::before { content: counter(section); width: 36px; height: 36px; border-radius: 50%; background: var(--mint-2); color: var(--green); font-size: 15px; font-weight: 800; letter-spacing: 0; display: flex; align-items: center; justify-content: center; flex: none; }
.blog-post-page .entry-content > h2 + * { margin-top: 10px; }
.blog-post-page .entry-content > h3 { font-size: 15px; font-weight: 700; margin-top: 22px; }
.blog-post-page .entry-content > h3 + * { margin-top: 8px; }

.blog-post-page .entry-content > ul { list-style: none; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.blog-post-page .entry-content > ul > li { position: relative; padding-left: 30px; font-size: 13px; line-height: 1.5; }
.blog-post-page .entry-content > ul > li::before { content: ""; position: absolute; left: 0; top: 1px; width: 18px; height: 18px; border-radius: 50%; background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5 12l5 5L19 7'/%3E%3C/svg%3E") center / 9px no-repeat; }
.blog-post-page .entry-content > ol { padding-left: 20px; display: flex; flex-direction: column; gap: 8px; }

.blog-post-page .entry-content > blockquote { border-left: 3px solid var(--green-2); background: var(--mint); border-radius: 0 10px 10px 0; padding: 14px 18px; font-size: 14px; line-height: 1.6; color: var(--ink); max-width: 600px; }
.blog-post-page .entry-content > blockquote p + p { margin-top: 10px; }
.blog-post-page .entry-content > blockquote cite { display: block; margin-top: 8px; font-size: 12px; font-style: normal; color: var(--muted); }
.blog-post-page .entry-content figure { max-width: 100%; }
.blog-post-page .entry-content img { max-width: 100%; height: auto; border-radius: 12px; }
.blog-post-page .entry-content figcaption { margin-top: 8px; font-size: 11.5px; color: var(--muted); text-align: center; }
.blog-post-page .entry-content table { width: 100%; border-collapse: collapse; font-size: 13px; }
.blog-post-page .entry-content th, .blog-post-page .entry-content td { padding: 10px 12px; border: 1px solid var(--line); text-align: left; }
.blog-post-page .entry-content th { background: var(--mint); font-weight: 700; }
.blog-post-page .entry-content .wp-block-table thead { border-bottom: 0; }
.blog-post-page .entry-content .wp-block-table table { border-radius: 10px; overflow: hidden; }
.blog-post-page .entry-content > hr { border: 0; border-top: 1px solid var(--line); margin-top: 28px; }

/* Wide components (inserted from the "AI Credit Care" block patterns) */
.blog-post-page .entry-content > .scorecard { margin: 24px 0 0; }
.blog-post-page .entry-content > .scorecard:first-child { margin-top: 0; }
.blog-post-page .entry-content > .ranges,
.blog-post-page .entry-content > .factors { margin: 16px 0 0; }
.blog-post-page .entry-content > .callout { margin: 20px 0 0; }
.blog-post-page .entry-content > .preview { margin-top: 16px; }
.blog-post-page .entry-content > .faq { margin: 36px 0 0; }
.blog-post-page .faq__head h2::before { content: "?"; width: 28px; height: 28px; border-radius: 50%; background: var(--green-2); color: #fff; font-size: 14px; font-weight: 800; display: flex; align-items: center; justify-content: center; flex: none; }
.blog-post-page .faq__head h2 { scroll-margin-top: 96px; }
.blog-post-page .next-cta .bp-btn { margin-top: 2px; }

/* Pages: plain content, no numbered headings or indent */
.blog-post-page .entry-content--plain > * { margin-left: 0; }
.blog-post-page .entry-content--plain > h2::before { display: none; }

@media (max-width: 760px) {
  .blog-post-page .entry-content > * { margin-left: 0; }
}
@media (max-width: 640px) {
  .blog-post-page .next-cta .bp-btn { width: 100%; }
}
