/**
 * Elite+ Guide & Article Content Styling System
 * ═══════════════════════════════════════════════════════════════════════════
 * Premium editorial styling for coaching guides, blog articles, and long-form content
 * Designed for readability, hierarchy, and the Elite+ dark theme aesthetic
 * ═══════════════════════════════════════════════════════════════════════════
 */

/* ═══════════════════════════════════════════════════════════════════════════
   CSS VARIABLES FOR GUIDE CONTENT
   ═══════════════════════════════════════════════════════════════════════════ */
:root {
  /* Typography Scale */
  --guide-font-body: ui-serif, Georgia, Cambria, "Times New Roman", Times, serif;
  --guide-font-heading:
    "Inter", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --guide-font-mono: "JetBrains Mono", "Fira Code", Consolas, monospace;

  /* Content Width */
  --guide-content-width: 740px;
  --guide-wide-width: 900px;

  /* Spacing */
  --guide-section-gap: 3rem;
  --guide-paragraph-gap: 1.5rem;
  --guide-heading-gap: 2.5rem;

  /* Colors - Guide Specific */
  --guide-accent: #a855f7;
  --guide-accent-secondary: #6366f1;
  --guide-accent-glow: rgba(168, 85, 247, 0.15);
  --guide-text-body: rgba(255, 255, 255, 0.84);
  --guide-text-lead: rgba(255, 255, 255, 0.92);
  --guide-text-muted: rgba(255, 255, 255, 0.55);
  --guide-border: rgba(255, 255, 255, 0.08);
  --guide-surface: rgba(255, 255, 255, 0.03);
  --guide-surface-hover: rgba(255, 255, 255, 0.06);

  /* Callout Colors */
  --callout-tip-bg: linear-gradient(
    135deg,
    rgba(34, 197, 94, 0.12) 0%,
    rgba(16, 185, 129, 0.06) 100%
  );
  --callout-tip-border: rgba(34, 197, 94, 0.4);
  --callout-tip-accent: #22c55e;

  --callout-note-bg: linear-gradient(
    135deg,
    rgba(59, 130, 246, 0.12) 0%,
    rgba(99, 102, 241, 0.06) 100%
  );
  --callout-note-border: rgba(59, 130, 246, 0.4);
  --callout-note-accent: #3b82f6;

  --callout-warning-bg: linear-gradient(
    135deg,
    rgba(245, 158, 11, 0.12) 0%,
    rgba(234, 179, 8, 0.06) 100%
  );
  --callout-warning-border: rgba(245, 158, 11, 0.4);
  --callout-warning-accent: #f59e0b;

  --callout-key-bg: linear-gradient(
    135deg,
    rgba(168, 85, 247, 0.12) 0%,
    rgba(139, 92, 246, 0.06) 100%
  );
  --callout-key-border: rgba(168, 85, 247, 0.4);
  --callout-key-accent: #a855f7;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE CONTAINER
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-content,
.article-body {
  max-width: var(--guide-content-width);
  margin: 0 auto;
  font-family: var(--guide-font-body);
  font-size: 1.0625rem;
  line-height: 1.85;
  color: var(--guide-text-body);
  letter-spacing: 0.01em;
  text-wrap: pretty;
  hyphens: auto;
}

.guide-content > *:first-child,
.article-body > *:first-child {
  margin-top: 0;
}

.guide-content > *:last-child,
.article-body > *:last-child {
  margin-bottom: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HEADINGS — Clear Hierarchy
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-content h1,
.article-body h1,
.guide-title {
  font-family: var(--guide-font-heading);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 800;
  line-height: 1.15;
  letter-spacing: -0.03em;
  color: #fff;
  margin: 0 0 1.5rem;
  background: linear-gradient(135deg, #fff 0%, rgba(255, 255, 255, 0.85) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.guide-content h2,
.article-body h2 {
  font-family: var(--guide-font-heading);
  font-size: clamp(1.5rem, 2.5vw, 1.75rem);
  font-weight: 700;
  line-height: 1.25;
  letter-spacing: -0.02em;
  color: #fff;
  margin: var(--guide-heading-gap) 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1px solid var(--guide-accent-glow);
  position: relative;
}

.guide-content h2::before,
.article-body h2::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -1px;
  width: 60px;
  height: 2px;
  background: var(--guide-accent);
  border-radius: 2px;
}

.guide-content h3,
.article-body h3 {
  font-family: var(--guide-font-heading);
  font-size: clamp(1.2rem, 2vw, 1.375rem);
  font-weight: 600;
  line-height: 1.35;
  letter-spacing: -0.01em;
  color: rgba(255, 255, 255, 0.95);
  margin: 2rem 0 0.75rem;
}

.guide-content h4,
.article-body h4 {
  font-family: var(--guide-font-heading);
  font-size: 1.1rem;
  font-weight: 600;
  line-height: 1.4;
  color: rgba(255, 255, 255, 0.9);
  margin: 1.5rem 0 0.5rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PARAGRAPHS — Comfortable Reading
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-content p,
.article-body p {
  margin: 0 0 var(--guide-paragraph-gap);
  max-width: 70ch;
}

/* Lead paragraph */
.guide-content > p:first-of-type,
.article-body > p:first-of-type,
.guide-content .lead,
.article-body .lead {
  font-size: 1.15rem;
  line-height: 1.75;
  color: var(--guide-text-lead);
}

/* Drop cap effect for first paragraph (optional class) */
.guide-content .dropcap::first-letter,
.article-body .dropcap::first-letter {
  float: left;
  font-family: var(--guide-font-heading);
  font-size: 3.5rem;
  font-weight: 800;
  line-height: 0.8;
  padding-right: 0.75rem;
  color: var(--guide-accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   STYLED LISTS — Custom Bullets & Numbers
   ═══════════════════════════════════════════════════════════════════════════ */

/* Unordered Lists */
.guide-content ul,
.article-body ul {
  list-style: none;
  margin: 1.25rem 0 1.75rem;
  padding: 0;
}

.guide-content ul li,
.article-body ul li {
  position: relative;
  padding-left: 1.75rem;
  margin-bottom: 0.65rem;
  line-height: 1.7;
}

.guide-content ul li::before,
.article-body ul li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.65rem;
  width: 6px;
  height: 6px;
  background: var(--guide-accent);
  border-radius: 50%;
  box-shadow: 0 0 8px rgba(168, 85, 247, 0.4);
}

/* Nested lists */
.guide-content ul ul,
.article-body ul ul {
  margin: 0.5rem 0 0.75rem;
}

.guide-content ul ul li::before,
.article-body ul ul li::before {
  width: 4px;
  height: 4px;
  background: rgba(168, 85, 247, 0.6);
  box-shadow: none;
}

/* Ordered Lists */
.guide-content ol,
.article-body ol {
  list-style: none;
  counter-reset: guide-counter;
  margin: 1.25rem 0 1.75rem;
  padding: 0;
}

.guide-content ol li,
.article-body ol li {
  position: relative;
  padding-left: 2.5rem;
  margin-bottom: 0.85rem;
  line-height: 1.7;
  counter-increment: guide-counter;
}

.guide-content ol li::before,
.article-body ol li::before {
  content: counter(guide-counter);
  position: absolute;
  left: 0;
  top: 0.1rem;
  width: 1.75rem;
  height: 1.75rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--guide-accent-glow);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 8px;
  font-family: var(--guide-font-heading);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--guide-accent);
}

/* Check list style */
.guide-content ul.checklist li::before,
.article-body ul.checklist li::before {
  content: "✓";
  width: auto;
  height: auto;
  background: transparent;
  font-size: 1rem;
  font-weight: 700;
  color: #22c55e;
  box-shadow: none;
  top: 0;
}

/* ═══════════════════════════════════════════════════════════════════════════
   BLOCKQUOTES — Visually Distinct
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-content blockquote,
.article-body blockquote {
  position: relative;
  margin: 2rem 0;
  padding: 1.5rem 1.75rem 1.5rem 2rem;
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.08) 0%, rgba(99, 102, 241, 0.04) 100%);
  border-left: 4px solid var(--guide-accent);
  border-radius: 0 16px 16px 0;
  font-style: italic;
  color: rgba(255, 255, 255, 0.88);
}

.guide-content blockquote::before,
.article-body blockquote::before {
  content: "\201C";
  position: absolute;
  top: -10px;
  left: 14px;
  font-family: Georgia, serif;
  font-size: 4rem;
  line-height: 1;
  color: rgba(168, 85, 247, 0.25);
  pointer-events: none;
}

.guide-content blockquote p,
.article-body blockquote p {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.75;
}

.guide-content blockquote cite,
.article-body blockquote cite,
.guide-content blockquote footer,
.article-body blockquote footer {
  display: block;
  margin-top: 1rem;
  font-style: normal;
  font-size: 0.9rem;
  color: var(--guide-text-muted);
}

.guide-content blockquote cite::before,
.article-body blockquote cite::before {
  content: "— ";
}

/* ═══════════════════════════════════════════════════════════════════════════
   CALLOUT BOXES — Tips, Notes, Warnings, Key Takeaways
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-callout,
.callout-box,
.guide-content .callout,
.article-body .callout {
  position: relative;
  margin: 2rem 0;
  padding: 1.25rem 1.5rem 1.25rem 3.5rem;
  border-radius: 14px;
  background: var(--callout-note-bg);
  border: 1px solid var(--callout-note-border);
  overflow: hidden;
}

.guide-callout::before,
.callout-box::before,
.guide-content .callout::before,
.article-body .callout::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 4px;
  background: var(--callout-note-accent);
}

/* Callout Icon */
.guide-callout::after,
.callout-box::after {
  position: absolute;
  left: 1rem;
  top: 1.25rem;
  font-size: 1.25rem;
  line-height: 1;
}

/* Pro Tip */
.guide-callout.tip,
.callout-box.tip,
.guide-content .callout-tip,
.article-body .callout-tip {
  background: var(--callout-tip-bg);
  border-color: var(--callout-tip-border);
}

.guide-callout.tip::before,
.callout-box.tip::before,
.guide-content .callout-tip::before,
.article-body .callout-tip::before {
  background: var(--callout-tip-accent);
}

.guide-callout.tip::after,
.callout-box.tip::after {
  content: "💡";
}

/* Coaching Note */
.guide-callout.note,
.callout-box.note,
.guide-content .callout-note,
.article-body .callout-note {
  background: var(--callout-note-bg);
  border-color: var(--callout-note-border);
}

.guide-callout.note::before,
.callout-box.note::before,
.guide-content .callout-note::before,
.article-body .callout-note::before {
  background: var(--callout-note-accent);
}

.guide-callout.note::after,
.callout-box.note::after {
  content: "📝";
}

/* Warning */
.guide-callout.warning,
.callout-box.warning,
.guide-content .callout-warning,
.article-body .callout-warning {
  background: var(--callout-warning-bg);
  border-color: var(--callout-warning-border);
}

.guide-callout.warning::before,
.callout-box.warning::before,
.guide-content .callout-warning::before,
.article-body .callout-warning::before {
  background: var(--callout-warning-accent);
}

.guide-callout.warning::after,
.callout-box.warning::after {
  content: "⚠️";
}

/* Key Takeaway */
.guide-callout.key,
.callout-box.key,
.guide-content .callout-key,
.article-body .callout-key {
  background: var(--callout-key-bg);
  border-color: var(--callout-key-border);
}

.guide-callout.key::before,
.callout-box.key::before,
.guide-content .callout-key::before,
.article-body .callout-key::before {
  background: var(--callout-key-accent);
}

.guide-callout.key::after,
.callout-box.key::after {
  content: "🎯";
}

/* Callout Title */
.guide-callout-title,
.callout-title,
.guide-callout strong:first-child,
.callout-box strong:first-child {
  display: block;
  font-family: var(--guide-font-heading);
  font-weight: 700;
  font-size: 0.95rem;
  color: #fff;
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.guide-callout p,
.callout-box p {
  margin: 0;
  font-family: var(--guide-font-heading);
  font-size: 0.95rem;
  line-height: 1.65;
  color: rgba(255, 255, 255, 0.85);
}

/* ═══════════════════════════════════════════════════════════════════════════
   INLINE ACCENTS — Highlight Key Phrases
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-content strong,
.article-body strong {
  font-weight: 600;
  color: #fff;
}

.guide-content em,
.article-body em {
  font-style: italic;
  color: rgba(255, 255, 255, 0.9);
}

/* Accent highlight */
.guide-content mark,
.article-body mark,
.guide-highlight {
  background: linear-gradient(135deg, rgba(168, 85, 247, 0.25) 0%, rgba(99, 102, 241, 0.15) 100%);
  color: #fff;
  padding: 0.1em 0.35em;
  border-radius: 4px;
  font-weight: 500;
}

/* Arrow accent */
.guide-arrow,
.article-body .arrow {
  color: var(--guide-accent);
  font-weight: 800;
  margin: 0 0.15em;
}

/* Inline code */
.guide-content code,
.article-body code {
  font-family: var(--guide-font-mono);
  font-size: 0.9em;
  padding: 0.2em 0.5em;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.25);
  border-radius: 6px;
  color: #a5b4fc;
}

/* Links */
.guide-content a,
.article-body a {
  color: var(--guide-accent);
  text-decoration: none;
  border-bottom: 1px solid rgba(168, 85, 247, 0.3);
  transition: all 0.2s ease;
}

.guide-content a:hover,
.article-body a:hover {
  color: #c084fc;
  border-bottom-color: #c084fc;
}

/* ═══════════════════════════════════════════════════════════════════════════
   HORIZONTAL RULES — Section Dividers
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-content hr,
.article-body hr {
  border: none;
  height: 1px;
  background: linear-gradient(
    90deg,
    transparent 0%,
    var(--guide-border) 20%,
    var(--guide-accent-glow) 50%,
    var(--guide-border) 80%,
    transparent 100%
  );
  margin: var(--guide-section-gap) 0;
}

/* Decorative divider */
.guide-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  margin: var(--guide-section-gap) 0;
  color: var(--guide-text-muted);
}

.guide-divider::before,
.guide-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--guide-border);
}

/* ═══════════════════════════════════════════════════════════════════════════
   IMAGES & MEDIA
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-content img,
.article-body img {
  max-width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 1.5rem 0;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

.guide-content figure,
.article-body figure {
  margin: 2rem 0;
}

.guide-content figcaption,
.article-body figcaption {
  margin-top: 0.75rem;
  font-family: var(--guide-font-heading);
  font-size: 0.875rem;
  color: var(--guide-text-muted);
  text-align: center;
}

/* ═══════════════════════════════════════════════════════════════════════════
   TABLES
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-content table,
.article-body table {
  width: 100%;
  margin: 1.5rem 0;
  border-collapse: collapse;
  font-family: var(--guide-font-heading);
  font-size: 0.9rem;
}

.guide-content th,
.article-body th {
  padding: 0.75rem 1rem;
  background: var(--guide-surface);
  border: 1px solid var(--guide-border);
  font-weight: 600;
  color: #fff;
  text-align: left;
}

.guide-content td,
.article-body td {
  padding: 0.75rem 1rem;
  border: 1px solid var(--guide-border);
  color: var(--guide-text-body);
}

.guide-content tr:hover td,
.article-body tr:hover td {
  background: var(--guide-surface-hover);
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE META & TAGS
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-meta {
  display: flex;
  align-items: center;
  gap: 1.5rem;
  flex-wrap: wrap;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--guide-border);
  font-family: var(--guide-font-heading);
  font-size: 0.9rem;
  color: var(--guide-text-muted);
}

.guide-meta-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.guide-meta-item svg {
  width: 16px;
  height: 16px;
  opacity: 0.7;
}

.guide-category {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.35rem 0.85rem;
  background: var(--guide-accent-glow);
  border: 1px solid rgba(168, 85, 247, 0.3);
  border-radius: 50px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--guide-accent);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

/* Article Tags */
.guide-tags {
  display: flex;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-top: 2rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--guide-border);
}

.guide-tag {
  display: inline-block;
  padding: 0.4rem 0.85rem;
  background: var(--guide-surface);
  border: 1px solid var(--guide-border);
  border-radius: 50px;
  font-family: var(--guide-font-heading);
  font-size: 0.8rem;
  font-weight: 500;
  color: var(--guide-text-muted);
  transition: all 0.2s ease;
}

.guide-tag:hover {
  background: var(--guide-surface-hover);
  border-color: var(--guide-accent-glow);
  color: #fff;
}

/* ═══════════════════════════════════════════════════════════════════════════
   ARTICLE FOOTER
   ═══════════════════════════════════════════════════════════════════════════ */
.guide-footer {
  margin-top: 3rem;
  padding-top: 2rem;
  border-top: 1px solid var(--guide-border);
}

.guide-author {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.guide-author-avatar {
  width: 48px;
  height: 48px;
  background: linear-gradient(135deg, var(--guide-accent) 0%, var(--guide-accent-secondary) 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--guide-font-heading);
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.guide-author-info {
  font-family: var(--guide-font-heading);
}

.guide-author-name {
  font-weight: 600;
  color: #fff;
}

.guide-author-role {
  font-size: 0.85rem;
  color: var(--guide-text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE ADJUSTMENTS
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 768px) {
  .guide-content,
  .article-body {
    font-size: 1rem;
    line-height: 1.8;
  }

  .guide-content h2,
  .article-body h2 {
    font-size: 1.4rem;
    margin-top: 2rem;
  }

  .guide-content h3,
  .article-body h3 {
    font-size: 1.2rem;
  }

  .guide-content blockquote,
  .article-body blockquote {
    padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  }

  .guide-content blockquote::before,
  .article-body blockquote::before {
    font-size: 3rem;
    top: -5px;
    left: 10px;
  }

  .guide-callout,
  .callout-box {
    padding: 1rem 1.25rem 1rem 3rem;
  }

  .guide-callout::after,
  .callout-box::after {
    left: 0.85rem;
    top: 1rem;
    font-size: 1.1rem;
  }

  .guide-meta {
    gap: 1rem;
  }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */
@media print {
  .guide-content,
  .article-body {
    color: #000;
    font-size: 12pt;
  }

  .guide-content h1,
  .guide-content h2,
  .guide-content h3,
  .article-body h1,
  .article-body h2,
  .article-body h3 {
    color: #000;
    background: none;
    -webkit-text-fill-color: #000;
  }

  .guide-callout,
  .callout-box,
  .guide-content blockquote,
  .article-body blockquote {
    background: #f5f5f5;
    border-color: #333;
  }
}
