/* ==========================================================================
   BLOG / RESOURCES / CONTACT
   Phase 3 additions. Uses only the tokens already defined in main.css
   (--q-blue, --q-accent, --q-mist, --q-border, --q-grad-*, --radius-*),
   so a palette change in one place still propagates everywhere.
   ========================================================================== */

/* ---------- Featured article (Resources hero card) ---------- */
.resource-featured {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
  background: #fff;
  border: 1px solid var(--q-border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  transition: box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.resource-featured:hover { box-shadow: var(--shadow-lg); border-color: transparent; }
.resource-featured-media { aspect-ratio: 4 / 3; height: 100%; overflow: hidden; background: var(--q-grad-brand); }
.resource-featured-media img { width: 100%; height: 100%; object-fit: cover; }
.resource-featured-fallback { display: block; width: 100%; height: 100%; background: var(--q-grad-deep); }
.resource-featured-body { padding: 40px 40px 40px 0; }
.resource-featured-body h2 { font-size: clamp(1.4rem, 2.4vw, 1.9rem); margin-bottom: 12px; }
.resource-featured-body p { margin-bottom: 18px; }
.resource-featured .btn-ghost { display: inline-flex; align-items: center; gap: 8px; }
.resource-featured .btn-ghost svg { width: 16px; height: 16px; }

.resource-meta {
  display: flex; flex-wrap: wrap; gap: 8px 16px;
  font-size: 0.875rem; color: var(--q-gray);
  margin-bottom: 20px;
}
.resource-meta > * { display: inline-flex; align-items: center; gap: 8px; }
.resource-meta > *:not(:first-child)::before {
  content: ""; width: 4px; height: 4px; border-radius: 50%;
  background: var(--q-accent); flex: none;
}

@media (max-width: 860px) {
  .resource-featured { grid-template-columns: 1fr; gap: 0; }
  .resource-featured-media { aspect-ratio: 16 / 9; }
  .resource-featured-body { padding: 32px; }
}

/* ---------- Topic filter ---------- */
.resource-filter {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin-bottom: 40px; padding-bottom: 28px;
  border-bottom: 1px solid var(--q-border);
}
.resource-filter a {
  font-size: 0.9375rem; font-weight: 600;
  color: var(--q-gray);
  background: #fff;
  border: 1px solid var(--q-border);
  border-radius: var(--radius-pill);
  padding: 8px 18px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.resource-filter a:hover,
.resource-filter a.is-active {
  color: var(--q-blue);
  border-color: var(--q-blue);
  background: rgba(13, 61, 118, 0.04);
}
[data-theme="dark"] .resource-filter a { background: var(--q-mist); }
[data-theme="dark"] .resource-filter a:hover,
[data-theme="dark"] .resource-filter a.is-active { color: var(--q-accent); border-color: var(--q-accent); }

/* ---------- Article card additions (base lives in home.css) ---------- */
.article-card {
  display: flex; flex-direction: column;
  background: #fff;
  border: 1px solid var(--q-border);
  border-radius: var(--radius-md);
  padding: 20px;
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), border-color 0.4s var(--ease);
}
.article-card:hover { transform: translateY(-6px); box-shadow: var(--shadow-lg); border-color: transparent; }
.article-card .article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.article-card .article-meta { margin-bottom: 16px; }
.article-card .article-foot {
  margin-top: auto;
  display: flex; align-items: center; gap: 14px;
  font-size: 0.8125rem; color: var(--q-gray);
  padding-top: 14px; border-top: 1px solid var(--q-border);
}
.article-card .article-foot span::before {
  content: ""; display: inline-block;
  width: 4px; height: 4px; border-radius: 50%;
  background: var(--q-accent); margin-right: 10px;
  vertical-align: middle;
}
[data-theme="dark"] .article-card,
[data-theme="dark"] .resource-featured { background: var(--q-mist); }

/* ---------- Empty states ---------- */
.resource-empty {
  max-width: 620px; margin: 0 auto; text-align: center;
}
.resource-empty .svc-icon { margin: 0 auto 20px; }
.resource-empty .btn { margin-top: 8px; }

/* ---------- Pagination ---------- */
.qlyvion-pagination {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center;
  margin-top: 56px;
}
.qlyvion-pagination .page-numbers {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 42px; height: 42px; padding: 0 14px;
  border: 1px solid var(--q-border); border-radius: var(--radius-pill);
  font-size: 1rem; font-weight: 600; color: var(--q-gray);
  background: #fff;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.qlyvion-pagination .page-numbers:hover { color: var(--q-blue); border-color: var(--q-blue); }
.qlyvion-pagination .page-numbers.current {
  background: var(--q-grad-brand); color: #fff; border-color: transparent;
}
[data-theme="dark"] .qlyvion-pagination .page-numbers { background: var(--q-mist); }

/* ---------- Single article ---------- */
.article-byline {
  display: flex; align-items: center; gap: 10px;
  color: #C6D2E4; font-size: 1rem; margin: 0;
}
.article-byline span[aria-hidden] { opacity: 0.5; }

.article-hero-media {
  margin: 0 0 48px;
  border-radius: var(--radius-lg);
  overflow: hidden;
  max-width: 900px;
  margin-inline: auto;
}

.article-body {
  max-width: 720px;
  margin: 0 auto;
  font-size: 1.125rem;
  line-height: 1.75;
}
.article-body > * { margin-bottom: 1.15em; }
.article-body h2 { font-size: 1.6rem; margin-top: 2.2em; margin-bottom: 0.6em; }
.article-body h3 { font-size: 1.25rem; margin-top: 1.8em; margin-bottom: 0.5em; }
.article-body p { color: var(--q-gray); }
.article-body a { color: var(--q-blue); font-weight: 500; text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--q-accent); }
[data-theme="dark"] .article-body a { color: var(--q-accent-2); }
.article-body ul, .article-body ol { padding-left: 1.35em; margin-bottom: 1.4em; color: var(--q-gray); }
.article-body ul { list-style: disc; }
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.5em; }
.article-body li::marker { color: var(--q-accent); }
.article-body img, .article-body figure { border-radius: var(--radius-md); margin-block: 2em; }
.article-body figcaption { font-size: 0.875rem; color: var(--q-gray); text-align: center; margin-top: 10px; }
.article-body blockquote {
  margin: 2em 0; padding: 4px 0 4px 28px;
  border-left: 3px solid var(--q-accent);
  font-size: 1.2rem; line-height: 1.6; color: var(--q-ink);
}
.article-body blockquote p { color: inherit; }
.article-body code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em; background: var(--q-mist);
  border-radius: 6px; padding: 0.15em 0.45em; color: var(--q-blue);
}
.article-body pre {
  background: var(--q-ink); color: #E8EEF7;
  padding: 24px; border-radius: var(--radius-md);
  overflow-x: auto; font-size: 0.9375rem; line-height: 1.6;
}
.article-body pre code { background: none; color: inherit; padding: 0; }
.article-body table { width: 100%; border-collapse: collapse; font-size: 1rem; }
.article-body th, .article-body td { text-align: left; padding: 12px 16px; border-bottom: 1px solid var(--q-border); }
.article-body th { font-family: var(--font-heading); color: var(--q-ink); font-weight: 600; }

.article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 40px; }
.article-tags a {
  font-size: 0.875rem; font-weight: 600; color: var(--q-gray);
  background: var(--q-mist); border-radius: var(--radius-pill); padding: 6px 14px;
}
.article-tags a:hover { color: var(--q-blue); }

.article-cta {
  max-width: 720px; margin: 56px auto 0;
  display: flex; align-items: center; justify-content: space-between;
  gap: 28px; flex-wrap: wrap;
}
.article-cta h3 { margin-bottom: 6px; font-size: 1.2rem; }
.article-cta p { margin: 0; max-width: 46ch; }
.article-cta .btn { flex: none; }

.article-nav {
  max-width: 720px; margin: 40px auto 0;
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
.article-nav-link {
  border: 1px solid var(--q-border); border-radius: var(--radius-md);
  padding: 20px 24px;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}
.article-nav-link:hover { border-color: var(--q-blue); background: var(--q-mist); }
.article-nav-link span { display: block; font-size: 0.8125rem; font-weight: 600; letter-spacing: 0.05em; text-transform: uppercase; color: var(--q-gray); margin-bottom: 6px; }
.article-nav-link strong { font-family: var(--font-heading); font-size: 1rem; line-height: 1.35; color: var(--q-ink); }
.article-nav-link--next { text-align: right; }
@media (max-width: 640px) {
  .article-nav { grid-template-columns: 1fr; }
  .article-nav-link--next { text-align: left; }
}

/* ---------- Search ---------- */
.search-again { max-width: 560px; margin: 0 auto 48px; }
.qlyvion-searchform { display: flex; gap: 10px; }
.qlyvion-searchform input {
  flex: 1; padding: 13px 18px;
  border: 1px solid var(--q-border); border-radius: var(--radius-pill);
  background: var(--q-mist); color: var(--q-ink);
  font-family: var(--font-body); font-size: 1rem; outline: none;
  transition: border-color 0.25s var(--ease), background 0.25s var(--ease);
}
.qlyvion-searchform input:focus { border-color: var(--q-blue); background: #fff; }

.search-results { display: flex; flex-direction: column; gap: 12px; max-width: 820px; margin: 0 auto; }
.search-result {
  display: block; padding: 24px 28px;
  border: 1px solid var(--q-border); border-radius: var(--radius-md);
  background: #fff;
  transition: border-color 0.3s var(--ease), box-shadow 0.3s var(--ease);
}
.search-result:hover { border-color: var(--q-blue); box-shadow: var(--shadow-sm); }
.search-result-type {
  font-size: 0.8125rem; font-weight: 600; text-transform: uppercase;
  letter-spacing: 0.05em; color: var(--q-blue);
}
.search-result h3 { font-size: 1.1875rem; margin: 6px 0 8px; }
.search-result p { margin: 0; font-size: 1rem; }
[data-theme="dark"] .search-result { background: var(--q-mist); }

/* ---------- Contact page ---------- */
.contact-channels { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.contact-channel h3 { font-size: 1.1875rem; margin-bottom: 10px; }
.contact-channel p { font-size: 1rem; margin-bottom: 18px; }
.contact-value {
  display: flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: 1rem;
  color: var(--q-blue);
  padding: 9px 0;
  border-top: 1px solid var(--q-border);
}
.contact-value:hover { color: var(--q-accent); }
.contact-value svg { width: 15px; height: 15px; }
.contact-value--plain { color: var(--q-gray); font-weight: 500; }
.contact-value--plain:hover { color: var(--q-gray); }
[data-theme="dark"] .contact-value { color: var(--q-accent-2); }
@media (max-width: 900px) { .contact-channels { grid-template-columns: 1fr; } }

.contact-tips { display: flex; flex-direction: column; gap: 10px; }
.contact-tips li { display: flex; align-items: flex-start; gap: 10px; font-size: 1rem; color: var(--q-gray); }
.contact-tips svg { width: 17px; height: 17px; color: var(--q-accent); flex: none; margin-top: 3px; }

/* Honeypot — off-screen rather than display:none, which some bots detect. */
.qlyvion-hp { position: absolute; left: -9999px; top: -9999px; }

/* ---------- Comments ---------- */
.comment-list { list-style: none; padding: 0; margin: 0 0 40px; }
.comment-list ul.children { list-style: none; padding-left: 28px; }
.comment-body { padding: 20px 0; border-bottom: 1px solid var(--q-border); }
.comment-author img { border-radius: 50%; }
.comment-form input[type="text"], .comment-form input[type="email"],
.comment-form input[type="url"], .comment-form textarea {
  width: 100%; padding: 12px 16px; margin-top: 6px;
  border: 1px solid var(--q-border); border-radius: var(--radius-sm);
  background: var(--q-mist); font-family: var(--font-body); font-size: 1rem;
  color: var(--q-ink); outline: none;
}
.comment-form .submit {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 14px 28px; border: 0; border-radius: var(--radius-pill);
  background: var(--q-grad-brand); color: #fff;
  font-family: var(--font-body); font-weight: 600; font-size: 1rem; cursor: pointer;
}

/* ---------- WordPress core alignment classes ---------- */
.alignleft { float: left; margin: 0.4em 1.75em 1.25em 0; }
.alignright { float: right; margin: 0.4em 0 1.25em 1.75em; }
.aligncenter { margin-inline: auto; }
.alignwide { max-width: 1100px; margin-inline: auto; }
.alignfull { width: 100vw; max-width: 100vw; margin-left: calc(50% - 50vw); border-radius: 0; }
.wp-caption-text { font-size: 0.875rem; color: var(--q-gray); text-align: center; }
.screen-reader-text {
  position: absolute !important; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.sticky, .gallery-caption, .bypostauthor { display: block; }
