/* ═══════════════════════════════════════════════════
   ClickTests.net — Guides & Editorial Section Stylesheet
   ═══════════════════════════════════════════════════ */

/* ─── VARIABLES (Inherit and extend) ─── */
:root {
  --guide-max-w: 1240px;
  --guide-content-w: 800px;
  --guide-code-bg: #1e1b18;
  --guide-border: #d8d2c6;
  --guide-callout-bg: #f9f8f5;
  --guide-card-hover: rgba(200, 75, 47, 0.12);
}

/* ─── HUB STYLES (/guides/) ─── */
.hub-hero {
  background: var(--nav-bg);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: clamp(32px, 5vw, 56px) clamp(20px, 4vw, 48px);
  margin-bottom: 36px;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.hub-hero::before {
  content: '';
  position: absolute;
  top: -40%;
  right: -10%;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(200,75,47,0.22) 0%, transparent 70%);
  pointer-events: none;
}
.hub-hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.18);
  color: var(--accent2);
  font-family: var(--font-head);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 5px 12px;
  border-radius: 20px;
  margin-bottom: 16px;
}
.hub-hero h1 {
  font-family: var(--font-head);
  font-size: clamp(1.8rem, 4vw, 2.7rem);
  font-weight: 800;
  line-height: 1.18;
  letter-spacing: -0.025em;
  color: #fff;
  max-width: 820px;
  margin-bottom: 14px;
}
.hub-hero p {
  font-size: clamp(0.95rem, 1.6vw, 1.08rem);
  color: rgba(244, 242, 238, 0.78);
  line-height: 1.7;
  max-width: 760px;
  margin-bottom: 22px;
}
.hub-hero-stats {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(255,255,255,0.12);
}
.hub-hero-stat {
  display: flex;
  flex-direction: column;
}
.hub-hero-stat strong {
  font-family: var(--font-head);
  font-size: 1.35rem;
  font-weight: 800;
  color: var(--accent2);
}
.hub-hero-stat span {
  font-size: 0.76rem;
  color: rgba(244, 242, 238, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Category Filter Bar */
.guide-filter-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  overflow-x: auto;
  padding-bottom: 14px;
  margin-bottom: 28px;
  scrollbar-width: none;
}
.guide-filter-wrap::-webkit-scrollbar { display: none; }
.guide-filter-btn {
  background: var(--surface);
  border: 1.5px solid var(--border);
  color: var(--text-muted);
  font-family: var(--font-body);
  font-size: 0.84rem;
  font-weight: 600;
  padding: 8px 18px;
  border-radius: 24px;
  cursor: pointer;
  white-space: nowrap;
  transition: all var(--tr);
}
.guide-filter-btn:hover {
  border-color: var(--accent);
  color: var(--accent);
}
.guide-filter-btn.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

/* Featured Article Card */
.featured-guide-card {
  display: grid;
  grid-template-columns: 1fr;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  box-shadow: var(--shadow);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}
@media (min-width: 900px) {
  .featured-guide-card {
    grid-template-columns: 1.1fr 1fr;
  }
}
.featured-guide-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 32px rgba(200, 75, 47, 0.14);
  border-color: var(--accent);
}
.fg-media {
  background: #111;
  position: relative;
  min-height: 240px;
  overflow: hidden;
}
.fg-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}
.featured-guide-card:hover .fg-media img {
  transform: scale(1.03);
}
.fg-body {
  padding: clamp(20px, 3.5vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.fg-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.74rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 10px;
}
.fg-title {
  font-family: var(--font-head);
  font-size: clamp(1.25rem, 2.2vw, 1.7rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.25;
  margin-bottom: 12px;
}
.fg-desc {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.7;
  margin-bottom: 18px;
}
.fg-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid var(--border);
}

/* Guides Grid */
.guides-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
  margin-bottom: 48px;
}
@media (max-width: 680px) {
  .guides-grid {
    grid-template-columns: 1fr;
  }
}
.guide-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow);
  transition: transform var(--tr), box-shadow var(--tr), border-color var(--tr);
}
.guide-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 8px 28px rgba(200, 75, 47, 0.12);
}
.gc-thumb {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #1a1714;
  overflow: hidden;
  position: relative;
}
.gc-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.35s ease;
}
.guide-card:hover .gc-thumb img {
  transform: scale(1.04);
}
.gc-body {
  padding: 22px;
  display: flex;
  flex-direction: column;
  flex: 1;
}
.gc-badge-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 10px;
}
.gc-category {
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
}
.gc-time {
  font-size: 0.75rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 4px;
}
.gc-title {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.35;
  margin-bottom: 10px;
}
.gc-desc {
  font-size: 0.84rem;
  color: var(--text-muted);
  line-height: 1.65;
  margin-bottom: 16px;
  flex: 1;
}
.gc-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.78rem;
  color: var(--text-muted);
  padding-top: 14px;
  border-top: 1px solid var(--border);
  margin-top: auto;
}
.gc-read-btn {
  color: var(--accent);
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* ─── ARTICLE SINGLE PAGE STYLES ─── */
.article-header {
  margin-bottom: 30px;
}
.article-meta-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 18px;
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 14px;
}
.article-cat-badge {
  background: var(--accent-light);
  color: var(--accent);
  border: 1px solid rgba(200, 75, 47, 0.2);
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 4px 10px;
  border-radius: 16px;
}
.article-title {
  font-family: var(--font-head);
  font-size: clamp(1.7rem, 4vw, 2.6rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.2;
  letter-spacing: -0.025em;
  margin-bottom: 14px;
}
.article-subtitle {
  font-size: clamp(0.98rem, 1.8vw, 1.15rem);
  color: var(--text-muted);
  line-height: 1.65;
  max-width: 860px;
  margin-bottom: 22px;
}
.article-byline-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 20px;
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.abc-author {
  display: flex;
  align-items: center;
  gap: 12px;
}
.abc-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-head);
  font-weight: 800;
  font-size: 1.05rem;
  flex-shrink: 0;
}
.abc-info strong {
  display: block;
  font-size: 0.92rem;
  color: var(--text);
  font-weight: 700;
}
.abc-info span {
  font-size: 0.78rem;
  color: var(--text-muted);
}
.abc-badges {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.abc-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: var(--surface2);
  border: 1px solid var(--border);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--text);
  padding: 4px 10px;
  border-radius: 14px;
}
.abc-badge.verified {
  background: #e6f9f0;
  border-color: #2d9b5a;
  color: #1a7a40;
}

/* Article Hero Graphic / Screenshot */
.article-hero-media {
  background: #111;
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: 36px;
  border: 1px solid var(--border);
  box-shadow: var(--shadow);
}
.article-hero-media img {
  width: 100%;
  max-height: 480px;
  object-fit: cover;
}
.article-hero-caption {
  background: var(--surface);
  padding: 10px 18px;
  font-size: 0.8rem;
  color: var(--text-muted);
  border-top: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Article 2-Column Layout */
.article-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 36px;
  align-items: start;
}
@media (min-width: 1024px) {
  .article-layout {
    grid-template-columns: 1fr 310px;
  }
}

/* Article Main Content */
.article-content {
  font-size: 1rem;
  color: #2d2925;
  line-height: 1.85;
}
.article-content h2 {
  font-family: var(--font-head);
  font-size: clamp(1.3rem, 2.4vw, 1.65rem);
  font-weight: 800;
  color: var(--text);
  line-height: 1.3;
  margin: 38px 0 16px;
  padding-bottom: 8px;
  border-bottom: 2px solid var(--border);
}
.article-content h3 {
  font-family: var(--font-head);
  font-size: clamp(1.05rem, 1.8vw, 1.25rem);
  font-weight: 700;
  color: var(--text);
  margin: 28px 0 12px;
}
.article-content h4 {
  font-family: var(--font-head);
  font-size: 0.98rem;
  font-weight: 700;
  color: var(--text);
  margin: 20px 0 8px;
}
.article-content p {
  margin-bottom: 18px;
}
.article-content ul, .article-content ol {
  padding-left: 24px;
  margin-bottom: 20px;
}
.article-content li {
  margin-bottom: 8px;
  line-height: 1.75;
}
.article-content strong {
  color: var(--text);
  font-weight: 700;
}
.article-content a {
  color: var(--accent);
  text-decoration: underline;
  text-underline-offset: 3px;
  font-weight: 500;
}
.article-content a:hover {
  color: #b83d22;
}

/* Callout Boxes */
.guide-callout {
  background: var(--guide-callout-bg);
  border-left: 4px solid var(--border);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 18px 22px;
  margin: 26px 0;
  box-shadow: 0 1px 4px rgba(0,0,0,0.02);
}
.guide-callout.highlight {
  border-left-color: var(--accent);
  background: var(--accent-light);
}
.guide-callout.tip {
  border-left-color: var(--accent2);
  background: #fff8f0;
}
.guide-callout.methodology {
  border-left-color: #2563eb;
  background: #f0f6ff;
}
.guide-callout-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-family: var(--font-head);
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.guide-callout.highlight .guide-callout-title { color: var(--accent); }
.guide-callout.tip .guide-callout-title { color: var(--accent2); }
.guide-callout.methodology .guide-callout-title { color: #2563eb; }
.guide-callout p:last-child { margin-bottom: 0; }

/* Interactive Tool Launch Box */
.tool-launch-card {
  background: var(--nav-bg);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 24px 28px;
  margin: 32px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 18px;
  box-shadow: var(--shadow-lg);
  border: 1px solid rgba(255,255,255,0.08);
}
.tlc-text h4 {
  font-family: var(--font-head);
  font-size: 1.15rem;
  font-weight: 800;
  color: #fff;
  margin-bottom: 4px;
}
.tlc-text p {
  font-size: 0.86rem;
  color: rgba(244, 242, 238, 0.72);
  margin: 0;
}
.tlc-btn {
  background: var(--accent);
  color: #fff !important;
  font-family: var(--font-body);
  font-size: 0.88rem;
  font-weight: 700;
  padding: 10px 22px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  text-decoration: none !important;
  transition: all var(--tr);
}
.tlc-btn:hover {
  background: #b83d22;
  transform: translateY(-2px);
  box-shadow: 0 4px 16px rgba(200,75,47,0.4);
}

/* Diagram / Waveform Container */
.diagram-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  margin: 28px 0;
  box-shadow: var(--shadow);
}
.diagram-card-title {
  font-family: var(--font-head);
  font-size: 0.92rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 6px;
  display: flex;
  align-items: center;
  gap: 8px;
}
.diagram-card-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-bottom: 16px;
}
.diagram-canvas-wrap {
  width: 100%;
  overflow-x: auto;
  text-align: center;
  border-radius: var(--radius);
  background: #faf9f6;
  padding: 14px 10px;
}
.diagram-canvas-wrap svg {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}
.diagram-caption {
  font-size: 0.78rem;
  color: var(--text-muted);
  margin-top: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--border);
}

/* Responsive Table */
.guide-table-wrap {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 22px 0 28px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  box-shadow: 0 1px 4px rgba(0,0,0,0.03);
}
.guide-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
  font-size: 0.875rem;
}
.guide-table th {
  background: var(--nav-bg);
  color: var(--nav-text);
  padding: 12px 16px;
  text-align: left;
  font-family: var(--font-head);
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  border-bottom: 1px solid var(--nav-bg);
}
.guide-table td {
  padding: 12px 16px;
  border-bottom: 1px solid #e8e3da;
  color: #3a3530;
  line-height: 1.55;
  background: var(--surface);
}
.guide-table tr:last-child td { border-bottom: none; }
.guide-table tr:hover td { background: var(--accent-light); }

/* Sticky Sidebar (Table of Contents & Quick Tool) */
.article-sidebar {
  position: sticky;
  top: 76px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}
.sidebar-widget {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow);
}
.sidebar-widget-title {
  font-family: var(--font-head);
  font-size: 0.88rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--text);
  margin-bottom: 14px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  gap: 8px;
}
.toc-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 7px;
}
.toc-link {
  font-size: 0.835rem;
  color: var(--text-muted);
  line-height: 1.45;
  display: block;
  padding: 4px 0;
  transition: color var(--tr), transform var(--tr);
  text-decoration: none !important;
}
.toc-link:hover {
  color: var(--accent);
  transform: translateX(3px);
}
.toc-link.sub {
  padding-left: 14px;
  font-size: 0.79rem;
  color: #8c827a;
}

/* Tool Spotlight (Below Test Canvas on Tools) */
.tool-guide-spotlight {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-left: 5px solid var(--accent);
  border-radius: var(--radius-lg);
  padding: 22px 24px;
  margin: 26px 0;
  box-shadow: var(--shadow);
  transition: transform var(--tr), box-shadow var(--tr);
}
.tool-guide-spotlight:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 24px rgba(200, 75, 47, 0.12);
}
.tgs-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-head);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--accent);
  margin-bottom: 8px;
}
.tgs-content {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
@media (min-width: 768px) {
  .tgs-content {
    grid-template-columns: 1fr auto;
    align-items: center;
  }
}
.tgs-text h3 {
  font-family: var(--font-head);
  font-size: 1.05rem;
  font-weight: 800;
  color: var(--text);
  margin-bottom: 6px;
}
.tgs-text p {
  font-size: 0.855rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin-bottom: 10px;
}
.tgs-link {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 5px;
  text-decoration: none !important;
}
.tgs-link:hover {
  text-decoration: underline !important;
}
.tgs-stats {
  display: flex;
  gap: 16px;
  border-top: 1px solid var(--border);
  padding-top: 12px;
}
@media (min-width: 768px) {
  .tgs-stats {
    border-top: none;
    border-left: 1px solid var(--border);
    padding-top: 0;
    padding-left: 18px;
    flex-direction: column;
    gap: 8px;
  }
}
.tgs-stat strong {
  display: block;
  font-family: var(--font-head);
  font-size: 0.95rem;
  color: var(--text);
}
.tgs-stat span {
  font-size: 0.72rem;
  color: var(--text-muted);
  text-transform: uppercase;
}
