/* Phase 5: SEO, Print, and Final Polish */

/* === 1. SEO Meta Tags (via CSS) === */
.md-content article img {
  max-width: 100%;
  height: auto;
}

/* === 2. Print Styles (for cheat sheets) === */
@media print {
  .md-header, .md-sidebar, .md-footer, .md-tabs {
    display: none !important;
  }
  .md-content {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 1cm !important;
  }
  article, .md-content {
    font-size: 11pt !important;
    line-height: 1.4 !important;
  }
  h1 { font-size: 18pt !important; page-break-before: avoid; }
  h2 { font-size: 14pt !important; page-break-after: avoid; }
  h3 { font-size: 12pt !important; }
  a { color: #000 !important; text-decoration: underline !important; }
  a:after { content: " (" attr(href) ")"; font-size: 9pt; }
  table { page-break-inside: avoid; }
  pre, code { background: #f5f5f5 !important; color: #000 !important; }
  pre { page-break-inside: avoid; white-space: pre-wrap; }
}

/* === 3. Table of Contents Enhancement === */
.md-nav--secondary .md-nav__link {
  font-size: 0.9rem;
}
.md-nav--secondary .md-nav__link--active {
  font-weight: 700;
  color: #4CAF50;
}

/* === 4. Better Code Blocks === */
pre code {
  font-size: 0.9rem;
  line-height: 1.5;
}
.highlight pre {
  border-radius: 8px;
  padding: 1rem;
}

/* === 5. Admonition Enhancements === */
.admonition {
  border-radius: 8px;
  border-left-width: 4px;
  margin: 1.5em 0;
}
.admonition-title {
  font-weight: 700;
}

/* === 6. Better Tables === */
.md-typeset table:not([class]) {
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.md-typeset table:not([class]) th {
  background: #4CAF50;
  color: white;
  font-weight: 700;
}
.md-typeset table:not([class]) tr:hover {
  background: rgba(76, 175, 80, 0.05);
}

/* === 7. Skip-to-content Link (Accessibility) === */
.skip-link {
  position: absolute;
  top: -40px;
  left: 0;
  background: #4CAF50;
  color: white;
  padding: 8px 16px;
  z-index: 1000;
  text-decoration: none;
  border-radius: 0 0 8px 0;
}
.skip-link:focus {
  top: 0;
}

/* === 8. Better Image Captions === */
.md-typeset figure {
  margin: 2em 0;
  text-align: center;
}
.md-typeset figcaption {
  font-size: 0.9rem;
  color: #666;
  font-style: italic;
  margin-top: 0.5em;
}

/* === 9. Enhanced Blockquotes === */
.md-typeset blockquote {
  border-left: 4px solid #4CAF50;
  padding-left: 1em;
  margin: 1.5em 0;
  font-style: italic;
  color: #555;
}

/* === 10. Dark Mode Support (if user toggles) === */
[data-md-color-scheme="slate"] {
  /* Dark mode adjustments */
}
[data-md-color-scheme="slate"] .md-typeset blockquote {
  color: #ccc;
}