/* =====================================================
   YUGANTIX — Blog & Blog Detail polish
   Fixes: images had no object-fit rule (could distort or, on
   blog-detail, render at native size with a huge layout gap
   since the cover image had no aspect-ratio wrapper at all).
   Adds: hover zoom on card images, a scroll-linked reading
   progress bar on the article page, consistent rounded corners.
   ===================================================== */

/* ---- Proper image containment everywhere on blog pages ---- */
.case-cover img,
.featured-post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform .5s cubic-bezier(.2,.8,.2,1);
}
.blog-card:hover .case-cover img,
.featured-post:hover .featured-post-cover img {
  transform: scale(1.045);
}

/* ---- Blog-detail cover image: give the bare <img> the same
   aspect-ratio / rounded / overflow-hidden treatment as
   .post-cover-art, applied directly since the markup has no
   wrapper div around it ---- */
.post-cover-banner img {
  width: 100%;
  aspect-ratio: 21 / 9;
  object-fit: cover;
  border-radius: var(--r-lg, 20px);
  display: block;
}

/* In-article inline images */
.post-content img {
  border-radius: var(--r-md, 14px);
  width: 100%;
  object-fit: cover;
}

/* ---- Reading progress bar (blog-detail only) ---- */
.read-progress {
  position: fixed;
  top: var(--header-h, 76px);
  left: 0;
  height: 3px;
  width: 0%;
  background: linear-gradient(90deg, var(--brand), var(--accent, var(--brand)));
  z-index: 95;
  transition: width .1s ease-out;
}

/* ---- Slightly livelier card lift on hover ---- */
.blog-card {
  transition: transform .25s ease, box-shadow .25s ease;
}
.blog-card:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px -20px rgba(13,18,32,.18);
}


/* =====================================================
   COMMENTS — Yugantix theme
   Matches the post-sidebar-card visual language.
   ===================================================== */

/* ── Wrapper ── */
.comments-section {
  max-width: 760px;
  margin: 0 auto;
  padding: 3rem 0 4rem;
}

/* ── "N comments" heading ── */
.comments-section .comments-title,
.comments-section h2 {
  font-family: var(--font-display);
  font-size: clamp(1.3rem, 1.1rem + .8vw, 1.75rem);
  font-weight: 600;
  color: var(--ink);
  letter-spacing: -.02em;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--line);
}
.comments-section .comments-title span { color: var(--brand); }

/* ── Comment list ── */
.comments-list {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ── Single comment item ── */
.comment-item { list-style: none; }

.comment-body {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-md, 16px);
  padding: 1.5rem 1.75rem;
  transition: border-color .2s ease;
}
.comment-item:hover .comment-body { border-color: var(--line-strong); }

/* ── Header row: avatar + meta + reply ── */
.comment-header {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.comment-avatar { flex-shrink: 0; }
.comment-avatar-img,
.comment-avatar img {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: block;
  object-fit: cover;
}

.comment-meta {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: .2rem;
}

.comment-author,
.comment-author a {
  font-family: var(--font-display);
  font-size: .95rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  font-style: normal;
}
.comment-author a:hover { color: var(--brand); }

.comment-date {
  font-family: var(--font-mono);
  font-size: var(--fs-xs, .72rem);
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

/* ── Reply link ── */
.comment-reply .comment-reply-link {
  font-family: var(--font-mono);
  font-size: var(--fs-xs, .72rem);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--brand);
  text-decoration: none;
  padding: .35rem .8rem;
  border: 1px solid var(--brand);
  border-radius: var(--r-full, 999px);
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.comment-reply .comment-reply-link:hover {
  background: var(--brand);
  color: #fff;
}

/* ── Awaiting moderation notice ── */
.comment-awaiting-moderation {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  background: var(--paper-deep, #F4F6FB);
  border-radius: var(--r-xs, 6px);
  padding: .4rem .75rem;
  margin-bottom: .75rem;
}

/* ── Comment body prose ── */
.comment-content p,
.comment-content { font-size: var(--fs-sm, .9rem); color: var(--ink-muted); line-height: 1.65; }
.comment-content p { margin: 0; }

/* ── Nested comments ── */
.children { list-style: none; padding-left: 2rem; margin-top: 1rem; display: flex; flex-direction: column; gap: 1rem; }

/* ── Comments pagination ── */
.comments-section .page-numbers {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  margin: 1.5rem 0 2rem;
  list-style: none;
  padding: 0;
}
.comments-section .page-numbers li a,
.comments-section .page-numbers li span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid var(--line-strong);
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  text-decoration: none;
  transition: all .15s ease;
}
.comments-section .page-numbers li .current,
.comments-section .page-numbers li a:hover {
  background: var(--brand);
  color: #fff;
  border-color: var(--brand);
}

/* ── Comment form heading ── */
.comment-form-title {
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + .8vw, 1.6rem);
  font-weight: 600;
  color: var(--ink);
  margin-bottom: 1.5rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}

/* ── Form fields — inherits .field rules from style.css ── */
.comment-form .form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-bottom: 1rem;
}
@media (max-width: 640px) { .comment-form .form-row { grid-template-columns: 1fr; } }

.comment-form .form-group,
.comment-form p {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  margin: 0 0 1rem;
}

.comment-form label {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  padding: .75rem 1rem;
  border: 1px solid var(--line-strong);
  border-radius: var(--r-sm, 10px);
  background: var(--surface);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  transition: border-color .2s ease, box-shadow .2s ease;
  outline: none;
  box-sizing: border-box;
}
.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--brand);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 12%, transparent);
}
.comment-form textarea { min-height: 120px; resize: vertical; font-family: var(--font-body); }

/* ── Submit button ── */
.comment-form .form-submit { margin: 0; }
.comment-form .form-submit .btn,
.comment-form .form-submit input[type="submit"] {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .8rem 2rem;
  background: var(--ink);
  color: #fff;
  border: none;
  border-radius: var(--r-full, 999px);
  font-family: var(--font-body);
  font-size: var(--fs-sm);
  font-weight: 600;
  cursor: pointer;
  transition: background .2s ease, transform .15s ease;
}
.comment-form .form-submit input[type="submit"]:hover { background: var(--brand); transform: translateY(-1px); }

/* ── Cookie consent note ── */
.comment-cookies-note {
  font-size: var(--fs-xs);
  color: var(--ink-muted);
  display: flex;
  align-items: center;
  gap: .5rem;
  margin: .5rem 0 1rem;
}

/* ── Comments closed ── */
.comments-closed {
  font-family: var(--font-mono);
  font-size: var(--fs-xs);
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  padding: 1.5rem 0;
  border-top: 1px solid var(--line);
}

/* ── "No comments" empty state ── */
.no-comments {
  font-size: var(--fs-sm);
  color: var(--ink-muted);
  padding: 1rem 0;
}
