/*
Theme Name: Prochess Blog
Description: Matches the look of the prochess.online main site (same colors, fonts, header, side-menu, and footer) for the /blog/ section. Actual visual styling is loaded from the site's own /css/ files via functions.php — this file only carries the required WordPress theme header plus a handful of blog-only additions (post cards, pagination, meta line) that reuse the site's existing CSS variables.
Author: prochess.online
Version: 1.1
Text Domain: prochess-blog
*/

/* ---- Blog-only additions (reuse variables already defined in the
   main site's /css/style.css, which is enqueued before this file) ---- */

.blog-list {
  max-width: 760px;
  margin: 0 auto;
  padding: 48px 24px 60px;
}
.blog-list h1 {
  font-family: var(--display);
  font-size: clamp(28px, 4.5vw, 38px);
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 8px;
  letter-spacing: -0.3px;
}
.blog-list .blog-lede {
  font-size: 16px;
  color: var(--ivory-dim);
  line-height: 1.6;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--hair);
}

.post-card {
  background: var(--ink-2);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 22px 24px;
  margin-bottom: 18px;
  transition: var(--transition);
}
.post-card:hover { background: var(--ink-3); }
.post-card .post-thumb {
  width: 100%;
  height: auto;
  border-radius: 6px;
  margin-bottom: 14px;
  display: block;
}
.post-card h2 {
  font-family: var(--display);
  font-size: 20px;
  font-weight: 600;
  margin-bottom: 8px;
}
.post-card h2 a { color: var(--ivory); text-decoration: none; }
.post-card h2 a:hover { color: var(--brass-dim); }
.post-meta {
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ivory-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 10px;
}
.post-card p { font-size: 14.5px; line-height: 1.7; color: #384833; }
.post-card .read-more {
  display: inline-block;
  margin-top: 10px;
  font-size: 13.5px;
  font-weight: 700;
  color: var(--brass-dim);
  text-decoration: none;
}
.post-card .read-more:hover { text-decoration: underline; }

.blog-pagination {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 30px;
  padding-top: 20px;
  border-top: 1px solid var(--hair);
  font-size: 14px;
}
.blog-pagination a {
  color: var(--brass-dim);
  text-decoration: none;
  font-weight: 600;
}
.blog-pagination a:hover { text-decoration: underline; }

.single-post-thumb {
  width: 100%;
  height: auto;
  border-radius: 10px;
  margin-bottom: 28px;
  border: 1px solid var(--hair);
}
.single-post-meta {
  font-family: var(--mono);
  font-size: 12.5px;
  color: var(--ivory-dim);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 20px;
}

/* WordPress default gallery/caption/alignment classes, restyled to match */
.wp-caption { max-width: 100%; }
.wp-caption-text { font-size: 12.5px; color: var(--ivory-dim); text-align: center; margin-top: 6px; }
.alignleft { float: left; margin: 4px 20px 10px 0; }
.alignright { float: right; margin: 4px 0 10px 20px; }
.aligncenter { display: block; margin: 12px auto; }

.no-posts-msg { color: var(--ivory-dim); font-size: 15px; }

/* ---- Two-column layout (main content + sidebar) ---- */
.prochess-layout {
  display: flex;
  align-items: flex-start;
  gap: 36px;
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 24px 60px;
}
.prochess-main { flex: 1 1 0; min-width: 0; }
.prochess-main .blog-list,
.prochess-main .static-page { padding-left: 0; padding-right: 0; max-width: none; margin: 0; padding-top: 48px; }
.prochess-sidebar {
  width: 300px;
  flex-shrink: 0;
  padding-top: 48px;
}
@media (max-width: 860px) {
  .prochess-layout { flex-direction: column; padding: 0 20px 40px; gap: 0; }
  .prochess-sidebar { width: 100%; padding-top: 12px; }
}

/* ---- Sidebar widgets ---- */
.sidebar-widget {
  background: var(--ink-2);
  border: 1px solid var(--hair);
  border-radius: 10px;
  padding: 18px 20px;
  margin-bottom: 18px;
}
.sidebar-widget-title {
  font-family: var(--display);
  font-size: 16px;
  font-weight: 600;
  color: var(--ivory);
  margin-bottom: 12px;
}
.sidebar-post-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.sidebar-post-item a { display: flex; align-items: center; gap: 10px; text-decoration: none; }
.sidebar-post-thumb { flex-shrink: 0; width: 52px; height: 52px; border-radius: 6px; overflow: hidden; display: flex; align-items: center; justify-content: center; background: var(--ink-3); font-size: 20px; }
.sidebar-post-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.sidebar-post-title { font-size: 13.5px; font-weight: 600; color: var(--ivory); line-height: 1.4; }
.sidebar-post-item a:hover .sidebar-post-title { color: var(--brass-dim); }

/* ---- Search form (sidebar + blog index) ---- */
.search-form { display: flex; gap: 8px; }
.search-field {
  -webkit-appearance: none;
  appearance: none;
  flex: 1;
  min-width: 0;
  padding: 10px 14px;
  border-radius: var(--radius);
  border: 1px solid var(--hair);
  background: #FFFFFF;
  color: var(--ivory);
  font-family: var(--body);
  font-size: 14px;
}
.search-field::placeholder { color: #6B7A66; }
.search-field:focus { outline: none; border-color: var(--brass); box-shadow: 0 0 0 3px var(--brass-glow); }
.search-submit {
  -webkit-appearance: none;
  appearance: none;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius);
  background: var(--brass);
  color: #fff;
  font-weight: 700;
  font-size: 13px;
  cursor: pointer;
  transition: var(--transition);
  white-space: nowrap;
}
.search-submit:hover { background: var(--brass-dim); }
.blog-index-search { margin-bottom: 28px; max-width: 420px; }

/* ---- EEAT box ---- */
.eeat-box {
  display: flex;
  gap: 16px;
  margin-top: 40px;
  padding: 22px;
  background: var(--ink-2);
  border: 1px solid var(--hair);
  border-radius: 10px;
}
.eeat-avatar img { border-radius: 50%; display: block; }
.eeat-heading {
  font-family: var(--display);
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.6px;
  color: var(--brass-dim);
  margin-bottom: 4px;
}
.eeat-author-name { font-weight: 700; color: var(--ivory); margin-bottom: 6px; }
.eeat-bio { font-size: 14px; line-height: 1.65; color: #384833; }

/* ---- Reading progress bar ----
   .topnav itself is `position: sticky; top:0; z-index:1010` (see main
   site's style.css). This bar must sit ABOVE that, pinned to the true
   top of the viewport — not `sticky` (which put it at the same top:0
   spot as the nav and got hidden behind it once both were stuck). */
#reading-progress-track {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 1011;
  pointer-events: none;
}
#reading-progress-bar {
  height: 100%;
  width: 0%;
  background: var(--brass);
  transition: width 0.1s linear;
}
