/* ============================================================
   guides.css — Styles for the Guides & Tutorials page
   Uses the same CSS variables as main.css
   ============================================================ */

/* ── Page hero ── */
.guides-hero {
    background: var(--bg-muted);
    padding: 4rem 0 3rem;
    border-bottom: 1px solid var(--border);
}

.guides-hero h1 {
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 800;
    margin: 0.5rem 0 1rem;
    color: var(--text-primary);
}

.guides-hero-description {
    max-width: 720px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-bottom: 1rem;
}

.breadcrumb a {
    color: var(--c-blue);
    text-decoration: none;
}

.breadcrumb a:hover { text-decoration: underline; }

/* ── Table of Contents ── */
.guides-toc {
    padding: 2.5rem 0;
    border-bottom: 1px solid var(--border);
}

.toc-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

.toc-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 0.4rem 2rem;
}

.toc-list li a {
    color: var(--c-blue);
    text-decoration: none;
    font-size: 0.95rem;
    line-height: 1.6;
    display: block;
    padding: 0.2rem 0;
    transition: color var(--t-fast);
}

.toc-list li a:hover {
    color: var(--c-blue-dark);
    text-decoration: underline;
}

/* ── Guides content wrapper ── */
.guides-content { padding: 3rem 0; }

/* ── Individual article ── */
.guide-article {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 2.5rem;
    margin-bottom: 2.5rem;
    scroll-margin-top: 80px;
}

.guide-article-header {
    display: flex;
    align-items: flex-start;
    gap: 1.25rem;
    flex-wrap: wrap;
    margin-bottom: 1.75rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
}

.guide-icon {
    font-size: 2.5rem;
    line-height: 1;
    flex-shrink: 0;
}

.guide-article-header > div { flex: 1; min-width: 0; }

.guide-article-header h2 {
    font-size: 1.6rem;
    font-weight: 800;
    margin: 0 0 0.25rem;
    color: var(--text-primary);
}

.guide-subtitle {
    color: var(--text-muted);
    font-size: 1rem;
    margin: 0;
}

.btn-sm {
    padding: 0.45rem 1rem;
    font-size: 0.875rem;
    white-space: nowrap;
    align-self: center;
}

.guide-article h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 1.75rem 0 0.6rem;
    color: var(--text-primary);
}

.guide-article h4 {
    font-size: 1rem;
    font-weight: 700;
    margin: 1.25rem 0 0.4rem;
    color: var(--text-primary);
}

.guide-article p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 1rem;
}

.guide-article ul,
.guide-article ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.guide-article ul li,
.guide-article ol li { margin-bottom: 0.4rem; }

.guide-article a { color: var(--c-blue); text-decoration: none; }
.guide-article a:hover { text-decoration: underline; }

/* ── Numbered steps ── */
.guide-steps {
    counter-reset: step;
    list-style: none;
    padding: 0;
}

.guide-steps li {
    position: relative;
    padding: 0.6rem 0.75rem 0.6rem 3rem;
    margin-bottom: 0.5rem;
    background: var(--bg-muted);
    border-radius: var(--r-md);
    border-left: 3px solid var(--c-blue);
    counter-increment: step;
    color: var(--text-secondary);
    line-height: 1.65;
}

.guide-steps li::before {
    content: counter(step);
    position: absolute;
    left: 0.75rem;
    top: 0.65rem;
    width: 1.4rem;
    height: 1.4rem;
    background: var(--c-blue);
    color: #fff;
    font-size: 0.8rem;
    font-weight: 700;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    line-height: 1.4rem;
}

/* ── Comparison table ── */
.guide-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    margin: 1rem 0;
    overflow-x: auto;
    display: block;
}

.guide-table thead { background: var(--bg-muted); }

.guide-table th,
.guide-table td {
    padding: 0.6rem 0.85rem;
    text-align: left;
    border: 1px solid var(--border);
    color: var(--text-secondary);
}

.guide-table th {
    font-weight: 700;
    color: var(--text-primary);
}

/* ── Code block ── */
.code-block {
    background: var(--bg-muted);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    padding: 1rem 1.25rem;
    overflow-x: auto;
    margin: 1rem 0;
}

.code-block code {
    background: none;
    border: none;
    padding: 0;
    font-size: 0.9rem;
    line-height: 1.6;
    color: var(--text-primary);
}

/* ── How-to section on homepage ── */
.howto {
    padding: 5rem 0;
    background: var(--bg-muted);
}

.howto-list {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2.5rem;
}

.howto-article {
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--r-xl);
    padding: 2rem;
}

.howto-header {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
    flex-wrap: wrap;
}

.howto-icon {
    font-size: 2rem;
    line-height: 1;
    flex-shrink: 0;
}

.howto-header h3 {
    font-size: 1.2rem;
    font-weight: 700;
    margin: 0 0 0.2rem;
    color: var(--text-primary);
}

.howto-meta {
    font-size: 0.82rem;
    color: var(--text-muted);
    margin: 0;
}

.howto-body p {
    color: var(--text-secondary);
    line-height: 1.75;
    margin-bottom: 0.75rem;
}

.howto-body ol {
    padding-left: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.75;
}

.howto-body ol li { margin-bottom: 0.4rem; }
.howto-body a { color: var(--c-blue); }

.howto-readmore {
    display: inline-block;
    margin-top: 1rem;
    color: var(--c-blue);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.95rem;
}

.howto-readmore:hover { text-decoration: underline; }

.howto-cta {
    text-align: center;
    margin-top: 2.5rem;
}

/* ── Guides page footer CTA ── */
.guides-footer-cta {
    padding: 3rem 0;
    text-align: center;
    border-top: 1px solid var(--border);
}

.guides-footer-cta p {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.guides-footer-cta .btn { margin: 0 0.5rem; }

/* ── Active nav link ── */
.nav-link-active {
    color: var(--c-blue) !important;
    font-weight: 600;
}

/* ── Responsive ── */
@media (max-width: 640px) {
    .guide-article { padding: 1.5rem 1.25rem; }
    .guide-article-header { flex-direction: column; }
    .btn-sm { align-self: flex-start; }
    .howto-article { padding: 1.25rem; }
}
