/* ==========================================================================
   TAILOR BLOG TEMPLATE
   CSS centralizado para todos os artigos do blog
   ========================================================================== */

/* ==========================================================================
   Variables
   ========================================================================== */
:root {
    --primary: #FF4E20;
    --primary-dark: #B83312;
    --primary-light: #FF6B42;
    --accent: #FF8A65;
    --dark: #0A0A0A;
    --gray-900: #1A1A1A;
    --gray-800: #2A2A2A;
    --gray-700: #3A3A3A;
    --gray-600: #555555;
    --gray-500: #757575;
    --gray-400: #9E9E9E;
    --gray-300: #BDBDBD;
    --gray-200: #E0E0E0;
    --gray-100: #FFF8F5;
    --white: #FFFFFF;
    --warm-bg: #FFF5F0;
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --container-max: 1280px;
    --article-max: 720px;
}

/* ==========================================================================
   Base
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-sans);
    background: var(--white);
    color: var(--dark);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* ==========================================================================
   Article Hero
   ========================================================================== */
.article-hero {
    padding: 8rem 2rem 3rem;
    background: var(--white);
}

.article-hero-container {
    max-width: 800px;
    margin: 0 auto;
}

/* ==========================================================================
   Breadcrumb
   ========================================================================== */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.breadcrumb a {
    color: var(--gray-400);
    text-decoration: none;
    transition: color 0.2s;
}

.breadcrumb a:hover {
    color: var(--primary);
}

.breadcrumb-separator {
    color: var(--gray-300);
}

/* ==========================================================================
   Article Tag
   ========================================================================== */
.article-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(255, 78, 32, 0.1);
    color: var(--primary);
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 1rem;
}

/* ==========================================================================
   Article Title
   ========================================================================== */
.article-title {
    font-size: clamp(2rem, 5vw, 2.75rem);
    font-weight: 800;
    color: var(--dark);
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
}

/* ==========================================================================
   Article Meta
   ========================================================================== */
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.5rem;
    font-size: 0.875rem;
    color: var(--gray-500);
}

.article-meta-item {
    display: flex;
    align-items: center;
    gap: 0.375rem;
}

.article-meta-item svg {
    color: var(--gray-400);
    width: 15px;
    height: 15px;
}

.article-meta-author {
    font-weight: 500;
    color: var(--gray-700);
}

/* ==========================================================================
   Article Wrapper & Content
   ========================================================================== */
.article-wrapper {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 4rem;
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 3rem 2rem 6rem;
}

.article-content {
    max-width: var(--article-max);
}

.article-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--dark);
    margin: 2.5rem 0 1rem;
    letter-spacing: -0.02em;
}

.article-content h3 {
    font-size: 1.375rem;
    font-weight: 600;
    color: var(--dark);
    margin: 2rem 0 0.75rem;
}

.article-content p {
    font-size: 1.0625rem;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 1.25rem;
}

.article-content ul,
.article-content ol {
    margin: 1.25rem 0;
    padding-left: 1.5rem;
}

.article-content li {
    font-size: 1.0625rem;
    color: var(--gray-700);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.article-content strong {
    color: var(--dark);
    font-weight: 600;
}

.article-content a:not(.cta-inline-button):not(.sidebar-cta-button) {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.article-content a:not(.cta-inline-button):not(.sidebar-cta-button):hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ==========================================================================
   Component: Article Summary (Resumo para AI agents)
   ========================================================================== */
.article-summary {
    background: linear-gradient(135deg, var(--gray-100) 0%, var(--warm-bg) 100%);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
    margin: 0 0 2rem 0;
    font-size: 1.0625rem;
    line-height: 1.7;
    color: var(--gray-700);
}

.article-summary strong {
    color: var(--dark);
}

/* ==========================================================================
   Component: Highlight Box
   ========================================================================== */
.highlight-box {
    background: var(--warm-bg);
    border-left: 4px solid var(--primary);
    padding: 1.5rem;
    border-radius: 0 12px 12px 0;
    margin: 2rem 0;
}

.highlight-box p {
    margin: 0;
    font-size: 1rem;
    color: var(--gray-700);
}

.highlight-box strong {
    color: var(--primary);
}

/* ==========================================================================
   Component: Stats Box
   ========================================================================== */
.stats-box {
    background: var(--dark);
    color: var(--white);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
    text-align: center;
}

.stats-box-number {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stats-box-label {
    font-size: 1rem;
    color: var(--gray-400);
}

.stats-box-source {
    font-size: 0.75rem;
    color: var(--gray-500);
    margin-top: 0.5rem;
}

/* ==========================================================================
   Component: Checklist
   ========================================================================== */
.checklist {
    background: var(--gray-100);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.checklist-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.checklist-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--gray-200);
}

.checklist-item:last-child {
    border-bottom: none;
}

.checklist-icon {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 0.75rem;
}

.checklist-text {
    font-size: 1rem;
    color: var(--gray-700);
}

/* ==========================================================================
   Component: CTA Inline
   ========================================================================== */
.cta-inline {
    background: linear-gradient(135deg, var(--dark) 0%, var(--gray-900) 100%);
    padding: 2.5rem;
    border-radius: 16px;
    margin: 3rem 0;
    text-align: center;
}

.cta-inline h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--white);
    margin: 0 0 0.75rem;
}

.cta-inline p {
    color: var(--gray-400);
    margin-bottom: 1.5rem;
}

.cta-inline-button {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--white);
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.cta-inline-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 40px -10px rgba(255, 78, 32, 0.5);
}

/* ==========================================================================
   Component: Compare Box (usado em crm-generico-atacado)
   ========================================================================== */
.compare-box {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin: 2rem 0;
}

.compare-item {
    padding: 1.5rem;
    border-radius: 12px;
}

.compare-item.bad {
    background: #FEE2E2;
    border: 1px solid #FECACA;
}

.compare-item.good {
    background: #DCFCE7;
    border: 1px solid #BBF7D0;
}

.compare-item-title {
    font-size: 0.875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.75rem;
}

.compare-item.bad .compare-item-title {
    color: #DC2626;
}

.compare-item.good .compare-item-title {
    color: #16A34A;
}

.compare-item p {
    font-size: 0.9375rem;
    margin: 0;
}

.compare-item.bad p {
    color: #7F1D1D;
}

.compare-item.good p {
    color: #14532D;
}

/* ==========================================================================
   Component: Video Box
   ========================================================================== */
.video-box {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
    background: var(--dark);
}

.video-box-wrapper {
    position: relative;
    padding-bottom: 56.25%; /* 16:9 aspect ratio */
    height: 0;
}

.video-box-wrapper iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

.video-box-caption {
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    font-size: 0.875rem;
    color: var(--gray-600);
    text-align: center;
}

/* ==========================================================================
   Component: Article Image
   ========================================================================== */
.article-image {
    margin: 2rem 0;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--gray-200);
}

.article-image img {
    width: 100%;
    height: auto;
    display: block;
}

.article-image figcaption {
    padding: 0.75rem 1rem;
    background: var(--gray-100);
    font-size: 0.875rem;
    color: var(--gray-600);
    text-align: center;
}

/* ==========================================================================
   Component: Math Box (usado em pos-venda-manual)
   ========================================================================== */
.math-box {
    background: var(--gray-100);
    border: 2px solid var(--gray-200);
    padding: 2rem;
    border-radius: 16px;
    margin: 2rem 0;
}

.math-box-title {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 1rem;
}

.math-box-row {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    border-bottom: 1px dashed var(--gray-300);
}

.math-box-row:last-child {
    border-bottom: none;
    padding-top: 1rem;
    margin-top: 0.5rem;
    border-top: 2px solid var(--primary);
}

.math-box-label {
    color: var(--gray-600);
}

.math-box-value {
    font-weight: 600;
    color: var(--dark);
}

.math-box-row:last-child .math-box-value {
    color: var(--primary);
    font-size: 1.25rem;
}

/* ==========================================================================
   Author Box
   ========================================================================== */
.author-box {
    display: flex;
    gap: 1.5rem;
    padding: 2rem;
    background: var(--gray-100);
    border-radius: 16px;
    margin: 3rem 0;
}

.author-avatar {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    font-weight: 700;
    font-size: 1.5rem;
    flex-shrink: 0;
}

.author-info h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.25rem;
}

.author-info p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin: 0;
}

/* ==========================================================================
   Sidebar
   ========================================================================== */
.article-sidebar {
    position: sticky;
    top: 100px;
    align-self: start;
}

.sidebar-toc {
    background: var(--gray-100);
    padding: 1.5rem;
    border-radius: 12px;
    margin-bottom: 2rem;
}

.sidebar-toc-title {
    font-size: 0.875rem;
    font-weight: 700;
    color: var(--dark);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.sidebar-toc-list {
    list-style: none;
}

.sidebar-toc-list li {
    margin-bottom: 0.5rem;
}

.sidebar-toc-list a {
    font-size: 0.9375rem;
    color: var(--gray-600);
    text-decoration: none;
    transition: color 0.2s;
    display: block;
    padding: 0.25rem 0;
}

.sidebar-toc-list a:hover,
.sidebar-toc-list a.active {
    color: var(--primary);
}

.sidebar-cta {
    background: var(--dark);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
}

.sidebar-cta h4 {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--white);
    margin-bottom: 0.5rem;
}

.sidebar-cta p {
    font-size: 0.875rem;
    color: var(--gray-400);
    margin-bottom: 1rem;
}

.sidebar-cta-button {
    display: block;
    padding: 0.875rem 1.5rem;
    background: var(--primary);
    color: var(--white);
    border-radius: 8px;
    font-size: 0.9375rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-cta-button:hover {
    background: var(--primary-dark);
}

/* ==========================================================================
   Related Articles (opcional)
   ========================================================================== */
.related-articles {
    padding: 4rem 2rem;
    background: var(--gray-100);
}

.related-articles-container {
    max-width: var(--container-max);
    margin: 0 auto;
}

.related-articles h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 2rem;
    text-align: center;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    padding: 3rem 2rem;
    background: var(--gray-900);
    text-align: center;
}

.footer-logo img {
    height: 32px;
    margin-bottom: 1rem;
}

.footer p {
    color: var(--gray-500);
    font-size: 0.875rem;
}

.footer-links {
    display: flex;
    justify-content: center;
    gap: 2rem;
    margin-top: 1.5rem;
}

.footer-links a {
    color: var(--gray-400);
    text-decoration: none;
    font-size: 0.875rem;
    transition: color 0.2s;
}

.footer-links a:hover {
    color: var(--primary);
}

/* ==========================================================================
   Component: Stats Grid
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

.stats-grid .stats-box {
    margin: 0;
    padding: 1.5rem;
}

.stats-grid .stats-box-number {
    font-size: 2.25rem;
}

.stats-grid .stats-box-label {
    font-size: 0.875rem;
}

/* Variante 2 colunas */
.stats-grid.cols-2 {
    grid-template-columns: repeat(2, 1fr);
}

/* ==========================================================================
   Component: Process Step
   ========================================================================== */
.process-step {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    padding: 1.5rem;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: 12px;
}

.process-step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.125rem;
    flex-shrink: 0;
}

.process-step-content h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.process-step-content p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin: 0;
}

/* ==========================================================================
   Component: Highlight Box Challenger (dark variant)
   ========================================================================== */
.highlight-box.challenger {
    background: linear-gradient(135deg, var(--dark) 0%, var(--gray-900) 100%);
    border-left: 4px solid var(--primary);
}

.highlight-box.challenger p {
    color: var(--gray-300);
}

.highlight-box.challenger strong {
    color: var(--primary);
}

/* ==========================================================================
   Component: Comparison Table
   ========================================================================== */
.comparison-table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
}

.comparison-table th,
.comparison-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--gray-200);
}

.comparison-table th {
    background: var(--gray-100);
    font-weight: 600;
    color: var(--dark);
}

.comparison-table td {
    color: var(--gray-700);
}

.comparison-table tr:hover td {
    background: var(--warm-bg);
}

/* ==========================================================================
   Component: Glossary Term
   ========================================================================== */
.glossary-term {
    background: var(--white);
    border-radius: 12px;
    padding: 1.5rem;
    margin: 1.25rem 0;
    border: 1px solid var(--gray-200);
}

.glossary-term-name {
    font-size: 1.125rem;
    font-weight: 700;
    color: var(--dark);
    margin: 0 0 0.75rem 0;
}

.glossary-term-name span {
    font-weight: 400;
    color: var(--gray-500);
    font-size: 0.9375rem;
}

.glossary-term-definition {
    font-size: 1rem;
    color: var(--gray-700);
    line-height: 1.7;
    margin-bottom: 0;
}

.glossary-term-example {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-top: 1rem;
    padding: 0.875rem 1rem;
    background: var(--gray-100);
    border-radius: 8px;
}

.glossary-term-example strong {
    color: var(--primary);
    font-weight: 600;
}

/* ==========================================================================
   Component: Moment Card
   ========================================================================== */
.moment-card {
    background: var(--white);
    border: 2px solid var(--gray-200);
    border-radius: 16px;
    padding: 2rem;
    margin: 1.5rem 0;
    position: relative;
}

.moment-card:hover {
    border-color: var(--primary);
}

.moment-card-number {
    position: absolute;
    top: -15px;
    left: 20px;
    background: var(--primary);
    color: var(--white);
    width: 30px;
    height: 30px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.875rem;
}

.moment-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.moment-card-timing {
    font-size: 0.875rem;
    color: var(--primary);
    font-weight: 500;
    margin-bottom: 1rem;
}

.moment-card p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin: 0;
}

.moment-card ul {
    margin: 1rem 0 0;
    padding-left: 1.25rem;
}

.moment-card li {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin-bottom: 0.5rem;
}

/* ==========================================================================
   Component: Timeline
   ========================================================================== */
.timeline {
    position: relative;
    padding-left: 30px;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: var(--gray-200);
}

.timeline-item {
    position: relative;
    padding-bottom: 2rem;
}

.timeline-item:last-child {
    padding-bottom: 0;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 5px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--primary);
}

.timeline-item h4 {
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.timeline-item p {
    font-size: 0.9375rem;
    color: var(--gray-600);
    margin: 0;
}

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 1024px) {
    .article-wrapper {
        grid-template-columns: 1fr;
    }

    .article-sidebar {
        display: none;
    }
}

@media (max-width: 768px) {
    .article-hero {
        padding: 6.5rem 1.5rem 2rem;
    }

    .article-title {
        font-size: 1.625rem;
    }

    .article-meta {
        gap: 1rem;
    }

    .article-wrapper {
        padding: 2rem 1.5rem 4rem;
    }

    .article-content h2 {
        font-size: 1.5rem;
    }

    .article-content h3 {
        font-size: 1.25rem;
    }

    .author-box {
        flex-direction: column;
        text-align: center;
        align-items: center;
    }

    .cta-inline {
        padding: 2rem 1.5rem;
    }

    .compare-box {
        grid-template-columns: 1fr;
    }

    .math-box-row {
        flex-direction: column;
        gap: 0.25rem;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stats-grid.cols-2 {
        grid-template-columns: 1fr;
    }

    .process-step {
        flex-direction: column;
        align-items: center;
        text-align: center;
    }

    .glossary-term {
        padding: 1.25rem 1.5rem;
    }

    .moment-card {
        padding: 1.5rem;
    }

    .comparison-table {
        font-size: 0.8125rem;
    }

    .comparison-table th,
    .comparison-table td {
        padding: 0.75rem 0.5rem;
    }
}
