/*
Theme Name: THCXR
Theme URI: https://example.com/
Author: THCXR
Description: A polished, responsive WordPress theme with an accessible sticky toolbar, editorial layouts, and a professional visual system.
Version: 1.0.0
Text Domain: thcxr
Requires at least: 6.0
Requires PHP: 7.4
License: GPL-2.0-or-later
*/

:root {
  --thcxr-ink: #101828;
  --thcxr-muted: #667085;
  --thcxr-surface: #ffffff;
  --thcxr-soft: #f7f9fc;
  --thcxr-border: #e4e7ec;
  --thcxr-primary: #6d28d9;
  --thcxr-primary-dark: #4c1d95;
  --thcxr-accent: #14b8a6;
  --thcxr-shadow: 0 18px 50px rgba(16, 24, 40, .10);
  --thcxr-radius: 18px;
  --thcxr-container: 1200px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--thcxr-soft); color: var(--thcxr-ink); font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; font-size: 16px; line-height: 1.7; }
a { color: var(--thcxr-primary); text-decoration: none; }
a:hover { color: var(--thcxr-primary-dark); }
img { max-width: 100%; height: auto; }
button, input, textarea, select { font: inherit; }

.thcxr-container { width: min(calc(100% - 40px), var(--thcxr-container)); margin: 0 auto; }
.screen-reader-text { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }
.screen-reader-text:focus { clip: auto; width: auto; height: auto; margin: 1rem; padding: .75rem 1rem; background: #fff; color: var(--thcxr-ink); z-index: 99999; }

.thcxr-toolbar { background: #0b1020; color: #d0d5dd; font-size: .86rem; }
.thcxr-toolbar__inner { min-height: 42px; display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.thcxr-toolbar__message { margin: 0; }
.thcxr-toolbar__nav, .thcxr-menu { display: flex; align-items: center; gap: .35rem; list-style: none; margin: 0; padding: 0; }
.thcxr-toolbar__nav a { display: inline-flex; padding: .35rem .55rem; color: #e4e7ec; border-radius: 7px; }
.thcxr-toolbar__nav a:hover { background: rgba(255,255,255,.12); color: #fff; }

.thcxr-site-header { position: sticky; top: 0; z-index: 1000; background: rgba(255,255,255,.93); backdrop-filter: blur(14px); border-bottom: 1px solid rgba(228,231,236,.85); }
.admin-bar .thcxr-site-header { top: 32px; }
.thcxr-header__inner { min-height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 1.25rem; }
.thcxr-branding { display: flex; align-items: center; min-width: 0; }
.custom-logo-link { display: inline-flex; align-items: center; }
.custom-logo { width: auto; max-height: 48px; }
.thcxr-site-title { margin: 0; font-size: 1.35rem; letter-spacing: -.04em; font-weight: 800; }
.thcxr-site-title a { color: var(--thcxr-ink); }
.thcxr-site-description { margin: .1rem 0 0; color: var(--thcxr-muted); font-size: .82rem; }

.thcxr-primary-nav { margin-left: auto; }
.thcxr-primary-nav .menu { display: flex; align-items: center; gap: .25rem; list-style: none; padding: 0; margin: 0; }
.thcxr-primary-nav a { display: block; padding: .6rem .8rem; border-radius: 9px; color: #344054; font-size: .94rem; font-weight: 650; }
.thcxr-primary-nav a:hover, .thcxr-primary-nav .current-menu-item > a { background: #f0ebff; color: var(--thcxr-primary-dark); }
.thcxr-menu-toggle { display: none; appearance: none; border: 1px solid var(--thcxr-border); background: #fff; color: var(--thcxr-ink); border-radius: 9px; padding: .55rem .75rem; font-weight: 700; cursor: pointer; }
.thcxr-header-cta { display: inline-flex; align-items: center; justify-content: center; padding: .65rem 1rem; border-radius: 10px; color: #fff; background: var(--thcxr-primary); font-size: .9rem; font-weight: 750; white-space: nowrap; }
.thcxr-header-cta:hover { color: #fff; background: var(--thcxr-primary-dark); transform: translateY(-1px); }

.thcxr-main { padding: 3.5rem 0 4.5rem; min-height: 55vh; }
.thcxr-page-header { max-width: 800px; margin: 0 0 2.25rem; }
.thcxr-page-header h1 { margin: 0; font-size: clamp(2rem, 5vw, 3.5rem); line-height: 1.08; letter-spacing: -.055em; }
.thcxr-page-header p { margin: .9rem 0 0; color: var(--thcxr-muted); }

.thcxr-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.4rem; }
.thcxr-card { overflow: hidden; background: var(--thcxr-surface); border: 1px solid var(--thcxr-border); border-radius: var(--thcxr-radius); box-shadow: 0 4px 12px rgba(16,24,40,.03); transition: transform .2s ease, box-shadow .2s ease; }
.thcxr-card:hover { transform: translateY(-4px); box-shadow: var(--thcxr-shadow); }
.thcxr-card__image { display: block; aspect-ratio: 16 / 9; overflow: hidden; background: #eaecf0; }
.thcxr-card__image img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease; }
.thcxr-card:hover .thcxr-card__image img { transform: scale(1.035); }
.thcxr-card__body { padding: 1.35rem; }
.thcxr-card__meta, .thcxr-entry-meta { color: var(--thcxr-muted); font-size: .82rem; }
.thcxr-card h2 { margin: .45rem 0 .5rem; font-size: 1.25rem; line-height: 1.25; letter-spacing: -.025em; }
.thcxr-card h2 a { color: var(--thcxr-ink); }
.thcxr-card h2 a:hover { color: var(--thcxr-primary); }
.thcxr-card p { margin: 0; color: #475467; font-size: .95rem; }

.thcxr-content-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 3rem; align-items: start; }
.thcxr-entry { background: #fff; border: 1px solid var(--thcxr-border); border-radius: var(--thcxr-radius); padding: clamp(1.3rem, 4vw, 3rem); box-shadow: 0 4px 12px rgba(16,24,40,.025); }
.thcxr-entry__header { border-bottom: 1px solid var(--thcxr-border); margin-bottom: 1.75rem; padding-bottom: 1.35rem; }
.thcxr-entry__title { margin: 0 0 .75rem; font-size: clamp(2rem, 5vw, 3.3rem); line-height: 1.1; letter-spacing: -.055em; }
.thcxr-entry__featured { margin: 0 0 1.8rem; border-radius: 14px; overflow: hidden; }
.thcxr-entry__content { font-size: 1.05rem; }
.thcxr-entry__content > *:first-child { margin-top: 0; }
.thcxr-entry__content h2, .thcxr-entry__content h3, .thcxr-entry__content h4 { line-height: 1.2; letter-spacing: -.03em; margin: 2rem 0 .8rem; }
.thcxr-entry__content blockquote { margin: 1.5rem 0; padding: 1rem 1.25rem; border-left: 4px solid var(--thcxr-accent); background: #f0fdfa; color: #134e4a; border-radius: 0 10px 10px 0; }
.thcxr-entry__content pre { overflow: auto; padding: 1rem; background: #101828; color: #f9fafb; border-radius: 10px; }
.thcxr-entry__content table { display: block; width: 100%; overflow-x: auto; border-collapse: collapse; }
.thcxr-entry__content th, .thcxr-entry__content td { padding: .7rem; border: 1px solid var(--thcxr-border); text-align: left; }

.thcxr-sidebar .widget { padding: 1.3rem; background: #fff; border: 1px solid var(--thcxr-border); border-radius: 14px; margin-bottom: 1.2rem; }
.thcxr-sidebar .widget-title { margin: 0 0 .8rem; font-size: 1rem; }
.thcxr-sidebar ul { padding-left: 1.1rem; margin: 0; }
.thcxr-sidebar li + li { margin-top: .35rem; }

.thcxr-pagination { display: flex; flex-wrap: wrap; gap: .4rem; margin-top: 2.5rem; }
.thcxr-pagination .page-numbers { min-width: 38px; padding: .4rem .65rem; text-align: center; border: 1px solid var(--thcxr-border); border-radius: 8px; background: #fff; color: #344054; }
.thcxr-pagination .current { background: var(--thcxr-primary); color: #fff; border-color: var(--thcxr-primary); }

.thcxr-site-footer { background: #0b1020; color: #98a2b3; }
.thcxr-footer__inner { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 2rem 0; }
.thcxr-site-footer p { margin: 0; font-size: .9rem; }
.thcxr-site-footer a { color: #d0d5dd; }
.thcxr-site-footer a:hover { color: #fff; }

.thcxr-comments { margin-top: 2.5rem; }
.comment-list { list-style: none; padding: 0; }
.comment-body { margin: 1rem 0; padding: 1rem; border: 1px solid var(--thcxr-border); border-radius: 12px; background: #fff; }
.comment-form input, .comment-form textarea, .search-form input { width: 100%; border: 1px solid #d0d5dd; border-radius: 8px; padding: .7rem .8rem; background: #fff; }
.comment-form input:focus, .comment-form textarea:focus, .search-form input:focus { outline: 3px solid rgba(109,40,217,.15); border-color: var(--thcxr-primary); }
.comment-form .submit, .search-form button { width: auto; margin-top: .7rem; padding: .65rem 1rem; border: 0; border-radius: 8px; background: var(--thcxr-primary); color: #fff; font-weight: 700; cursor: pointer; }

@media (max-width: 920px) {
  .thcxr-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .thcxr-content-grid { grid-template-columns: 1fr; }
  .thcxr-sidebar { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
  .thcxr-sidebar .widget { margin: 0; }
  .thcxr-menu-toggle { display: inline-flex; }
  .thcxr-primary-nav { display: none; position: absolute; top: 100%; right: 20px; left: 20px; padding: .7rem; background: #fff; border: 1px solid var(--thcxr-border); border-radius: 12px; box-shadow: var(--thcxr-shadow); }
  .thcxr-primary-nav.is-open { display: block; }
  .thcxr-primary-nav .menu { display: block; }
  .thcxr-primary-nav a { padding: .75rem; }
}

@media (max-width: 620px) {
  .admin-bar .thcxr-site-header { top: 46px; }
  .thcxr-container { width: min(calc(100% - 28px), var(--thcxr-container)); }
  .thcxr-toolbar__inner { padding: .45rem 0; align-items: flex-start; flex-direction: column; gap: .1rem; }
  .thcxr-toolbar__nav { display: none; }
  .thcxr-header__inner { min-height: 66px; }
  .thcxr-site-description, .thcxr-header-cta { display: none; }
  .thcxr-grid, .thcxr-sidebar { grid-template-columns: 1fr; }
  .thcxr-main { padding: 2.2rem 0 3rem; }
  .thcxr-footer__inner { align-items: flex-start; flex-direction: column; }
}