/* ── Learn Article Pages ── */

.learn-main {
    padding: 3rem 0 4rem;
    background: #fff;
    min-height: 60vh;
}

.learn-hero {
    text-align: center;
    margin-bottom: 3rem;
    padding-bottom: 2rem;
    border-bottom: 1px solid #e2e8f0;
}

.learn-breadcrumb {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    font-size: 0.85rem;
    color: #64748b;
    margin-bottom: 1.25rem;
}

.learn-breadcrumb a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

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

.learn-breadcrumb .sep {
    color: #cbd5e1;
}

.learn-hero h1 {
    font-size: clamp(1.8rem, 3.5vw, 2.8rem);
    font-weight: 800;
    color: #0f172a;
    margin: 0 0 1rem;
    line-height: 1.15;
}

.learn-hero-meta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1.5rem;
    color: #64748b;
    font-size: 0.9rem;
    flex-wrap: wrap;
}

.learn-hero-meta span {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.learn-hero-meta .lucide-icon {
    width: 15px;
    height: 15px;
}

.learn-content {
    max-width: 100%;
    margin: 0 auto;
}

/* ── TLDR Box ── */
.learn-tldr {
    background: linear-gradient(135deg, #eef2ff 0%, #f5f3ff 100%);
    border: 1px solid #e0e7ff;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.learn-tldr::before {
    content: 'TL;DR';
    position: absolute;
    top: -0.65rem;
    left: 1.5rem;
    background: #4f46e5;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.learn-tldr p {
    color: #1e293b;
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 500;
}

/* ── Direct Answer Box ── */
.learn-direct-answer {
    background: #fff;
    border: 2px solid #4f46e5;
    border-radius: 16px;
    padding: 1.75rem 2rem;
    margin-bottom: 3rem;
    position: relative;
}

.learn-direct-answer::before {
    content: 'Direct Answer';
    position: absolute;
    top: -0.65rem;
    left: 1.5rem;
    background: #4f46e5;
    color: #fff;
    font-size: 0.7rem;
    font-weight: 700;
    padding: 0.2rem 0.75rem;
    border-radius: 999px;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.learn-direct-answer p {
    color: #0f172a;
    font-size: 1.05rem;
    line-height: 1.7;
    margin: 0;
    font-weight: 500;
}

/* ── Tables ── */
.learn-table-wrap {
    overflow-x: auto;
    margin: 1.5rem 0;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

.learn-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.92rem;
    line-height: 1.6;
}

.learn-table thead {
    background: #0f172a;
}

.learn-table thead th {
    padding: 0.85rem 1.1rem;
    font-weight: 600;
    color: #fff;
    text-align: left;
    white-space: nowrap;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.learn-table thead th:first-child {
    border-radius: 11px 0 0 0;
}

.learn-table thead th:last-child {
    border-radius: 0 11px 0 0;
}

.learn-table tbody td {
    padding: 0.75rem 1.1rem;
    color: #334155;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: top;
}

.learn-table tbody tr:last-child td {
    border-bottom: none;
}

.learn-table tbody tr:hover td {
    background: #f8fafc;
}

.learn-table tbody td:first-child {
    font-weight: 600;
    color: #0f172a;
    white-space: nowrap;
}

.learn-table tbody td strong {
    color: #4f46e5;
}

@media (max-width: 600px) {
    .learn-direct-answer {
        padding: 1.5rem;
    }
    .learn-table {
        font-size: 0.85rem;
    }
    .learn-table thead th,
    .learn-table tbody td {
        padding: 0.6rem 0.75rem;
    }
}

/* ── Article Sections ── */
.learn-section {
    margin-bottom: 3rem;
}

.learn-section-label {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4f46e5;
    background: #eef2ff;
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}

.learn-section-label .lucide-icon {
    width: 14px;
    height: 14px;
}

.learn-section h2 {
    font-size: 1.5rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1rem;
    line-height: 1.3;
}

.learn-section h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #1e293b;
    margin: 1.5rem 0 0.5rem;
}

.learn-section p {
    color: #475569;
    line-height: 1.8;
    margin: 0 0 0.85rem;
    font-size: 1rem;
}

.learn-section ul,
.learn-section ol {
    color: #475569;
    line-height: 1.8;
    padding-left: 1.5rem;
    margin: 0.5rem 0 1.25rem;
}

.learn-section ul li,
.learn-section ol li {
    margin-bottom: 0.4rem;
}

.learn-section a {
    color: #4f46e5;
    text-decoration: none;
    font-weight: 500;
}

.learn-section a:hover {
    text-decoration: underline;
}

.learn-section strong {
    color: #1e293b;
}

/* ── Example Box ── */
.learn-example {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-left: 4px solid #4f46e5;
    border-radius: 0 12px 12px 0;
    padding: 1.5rem 1.75rem;
    margin: 1.25rem 0;
}

.learn-example-label {
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #4f46e5;
    margin-bottom: 0.5rem;
}

.learn-example p {
    margin: 0;
    color: #334155;
}

.learn-example code {
    background: #e0e7ff;
    color: #3730a3;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.9rem;
}

/* ── Checklist ── */
.learn-checklist {
    list-style: none;
    padding: 0;
    margin: 1rem 0 1.5rem;
    display: grid;
    gap: 0.65rem;
}

.learn-checklist li {
    display: flex;
    align-items: flex-start;
    gap: 0.65rem;
    color: #334155;
    line-height: 1.6;
    padding: 0.6rem 1rem;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: border-color 0.2s;
}

.learn-checklist li:hover {
    border-color: #a5b4fc;
}

.learn-checklist li .lucide-icon {
    width: 18px;
    height: 18px;
    color: #4f46e5;
    flex-shrink: 0;
    margin-top: 2px;
}

/* ── FAQ Accordion ── */
.learn-faq-list {
    display: grid;
    gap: 0.75rem;
}

.learn-faq-item {
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    overflow: hidden;
    transition: border-color 0.2s;
}

.learn-faq-item:hover {
    border-color: #c7d2fe;
}

.learn-faq-q {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    background: none;
    border: none;
    padding: 1rem 1.25rem;
    font-size: 1rem;
    font-weight: 600;
    color: #0f172a;
    cursor: pointer;
    text-align: left;
    font-family: inherit;
}

.learn-faq-q .lucide-icon {
    width: 18px;
    height: 18px;
    color: #94a3b8;
    flex-shrink: 0;
    transition: transform 0.25s;
}

.learn-faq-item.open .learn-faq-q .lucide-icon {
    transform: rotate(180deg);
    color: #4f46e5;
}

.learn-faq-a {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.learn-faq-item.open .learn-faq-a {
    max-height: 500px;
}

.learn-faq-a-inner {
    padding: 0 1.25rem 1.25rem;
    color: #475569;
    line-height: 1.7;
}

/* ── CTA Banner ── */
.learn-cta {
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    color: #fff;
    border-radius: 16px;
    padding: 2.5rem;
    text-align: center;
    margin-top: 3rem;
}

.learn-cta h3 {
    font-size: 1.4rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
    color: #fff;
}

.learn-cta p {
    color: #94a3b8;
    margin: 0 0 1.5rem;
    font-size: 1rem;
}

.learn-cta-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ── Related Articles ── */
.learn-related {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid #e2e8f0;
}

.learn-related h3 {
    font-size: 1.1rem;
    font-weight: 700;
    color: #0f172a;
    margin: 0 0 1rem;
}

.learn-related-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.learn-related-card {
    display: block;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.25rem;
    text-decoration: none;
    color: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.learn-related-card:hover {
    border-color: #a5b4fc;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.08);
}

.learn-related-card strong {
    display: block;
    color: #0f172a;
    margin-bottom: 0.3rem;
    font-size: 0.95rem;
}

.learn-related-card span {
    color: #64748b;
    font-size: 0.85rem;
    line-height: 1.5;
}

/* Pipeline steps */
.learn-pipeline {
    display: flex;
    flex-direction: column;
    gap: 0;
    margin: 1.5rem 0 2rem;
    position: relative;
}

.learn-pipeline::before {
    content: '';
    position: absolute;
    left: 22px;
    top: 32px;
    bottom: 32px;
    width: 3px;
    background: linear-gradient(to bottom, var(--primary, #6366f1), #a78bfa, #c4b5fd);
    border-radius: 2px;
}

.learn-step {
    display: flex;
    gap: 18px;
    align-items: flex-start;
    padding: 14px 0;
    position: relative;
}

.learn-step-num {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary, #6366f1);
    color: #fff;
    font-weight: 700;
    font-size: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    z-index: 1;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.3);
}

.learn-step-body {
    flex: 1;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 16px 20px;
    transition: box-shadow 0.2s;
}

.learn-step-body:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.06);
}

.learn-step-body strong {
    display: block;
    color: #0f172a;
    font-size: 0.95rem;
    margin-bottom: 4px;
}

.learn-step-body p {
    margin: 0;
    color: #475569;
    font-size: 0.88rem;
    line-height: 1.6;
}

.learn-step-body .step-tags {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-top: 8px;
}

.learn-step-body .step-tag {
    display: inline-block;
    padding: 2px 10px;
    background: #ede9fe;
    color: #6366f1;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
}

@media (max-width: 600px) {
    .learn-main {
        padding: 2rem 0 3rem;
    }
    .learn-tldr {
        padding: 1.5rem;
    }
    .learn-example {
        padding: 1.25rem;
    }
    .learn-cta {
        padding: 2rem 1.5rem;
    }
    .learn-pipeline::before {
        left: 18px;
    }
    .learn-step-num {
        width: 38px;
        height: 38px;
        font-size: 0.9rem;
    }
    .learn-step {
        gap: 12px;
    }
    .learn-step-body {
        padding: 12px 14px;
    }
}

/* ── AI Answers Q&A Grid ── */
.ai-qa-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
    margin-top: 2rem;
}

@media (max-width: 768px) {
    .ai-qa-grid { grid-template-columns: 1fr; }
}

.ai-qa-card {
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    padding: 1.5rem;
    transition: border-color 0.2s, box-shadow 0.2s;
    display: flex;
    flex-direction: column;
}

.ai-qa-card:hover {
    border-color: #c7d2fe;
    box-shadow: 0 4px 16px rgba(99, 102, 241, 0.08);
}

.ai-qa-q {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 700;
    color: #1e293b;
    margin: 0 0 0.75rem 0;
    line-height: 1.4;
}

.ai-qa-q .lucide-icon {
    width: 18px;
    height: 18px;
    color: #6366f1;
    flex-shrink: 0;
}

.ai-qa-a {
    font-size: 0.9rem;
    color: #475569;
    line-height: 1.7;
    margin: 0;
    flex: 1;
}

.ai-qa-a strong {
    color: #1e293b;
    font-weight: 600;
}

.ai-qa-link {
    display: inline-block;
    margin-top: 0.75rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #6366f1;
    text-decoration: none;
    transition: color 0.15s;
}

.ai-qa-link:hover {
    color: #4f46e5;
    text-decoration: underline;
}
