/* ============================================
   A GRANDE CALIBRAÇÃO - CSS
   Matching main site aesthetics
   ============================================ */

:root {
    --primary-blue: #2563eb;
    --accent-orange: #ea580c;
    --accent-green: #059669;
    --text-dark: #1e293b;
    --text-light: #64748b;
    --text-muted: #94a3b8;
    --bg-white: #ffffff;
    --bg-light: #f8fafc;
    --bg-lighter: #f1f5f9;
    --bg-dark: #0f172a;
    --bg-dark-secondary: #1e293b;
    --border-light: #e2e8f0;
    --content-max-width: 800px;
    --sidebar-width: 280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Crimson Text', Georgia, serif;
    background: var(--bg-white);
    color: var(--text-dark);
    line-height: 1.7;
    font-size: 1.125rem;
}

/* Progress Bar */
.progress-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--bg-lighter);
    z-index: 1001;
}

.progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green));
    width: 0%;
    transition: width 0.1s ease-out;
}

/* Header */
.ebook-header {
    position: fixed;
    top: 4px;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    padding: 0.75rem 2rem;
}

.header-inner {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.back-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-light);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.back-link:hover { color: var(--primary-blue); }

.header-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
}

.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.reading-time {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
}

.download-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1.2rem;
    background: var(--primary-blue);
    color: white;
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    border-radius: 6px;
    transition: all 0.3s ease;
}

.download-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
}

/* Sidebar Navigation */
.sidebar-nav {
    position: fixed;
    left: 2rem;
    top: 50%;
    transform: translateY(-50%);
    width: var(--sidebar-width);
    z-index: 100;
    display: none;
}

@media (min-width: 1400px) {
    .sidebar-nav { display: block; }
}

.nav-list {
    list-style: none;
    border-left: 2px solid var(--border-light);
    padding-left: 1rem;
}

.nav-item { margin-bottom: 0.5rem; }

.nav-link {
    display: block;
    padding: 0.4rem 0;
    color: var(--text-muted);
    text-decoration: none;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    left: -1rem;
    top: 50%;
    transform: translateY(-50%) translateX(-1px);
    width: 2px;
    height: 0;
    background: var(--primary-blue);
    transition: height 0.3s ease;
}

.nav-link:hover, .nav-link.active { color: var(--primary-blue); }
.nav-link.active::before { height: 100%; }

.nav-time {
    display: block;
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

/* Main Content */
.main-content {
    max-width: var(--content-max-width);
    margin: 0 auto;
    padding: 6rem 2rem 4rem;
}

/* Hero Section */
.hero-section {
    padding: 4rem 0 5rem;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 4rem;
}

.hero-badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    background: linear-gradient(135deg, var(--primary-blue), var(--accent-green));
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    border-radius: 50px;
    margin-bottom: 2rem;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    color: var(--text-dark);
    margin-bottom: 1rem;
    letter-spacing: -0.03em;
}

.hero-subtitle {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    font-weight: 400;
    color: var(--text-light);
    margin-bottom: 2.5rem;
}

.hero-meta {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 2rem;
    flex-wrap: wrap;
    margin-bottom: 2rem;
}

.meta-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.meta-icon {
    width: 18px;
    height: 18px;
    color: var(--primary-blue);
}

.hero-author {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border-light);
}

.author-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--border-light);
}

.author-info { text-align: left; }

.author-name {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
    font-size: 1rem;
}

.author-role {
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Sections */
.ebook-section {
    padding: 3rem 0;
    border-bottom: 1px solid var(--border-light);
}

.ebook-section:last-child { border-bottom: none; }

.section-header { margin-bottom: 2rem; }

.section-number {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary-blue);
    font-weight: 500;
    margin-bottom: 0.5rem;
    display: block;
}

.section-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    color: var(--text-dark);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.section-reading-time {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
}

.section-content p {
    margin-bottom: 1.5rem;
    color: var(--text-dark);
}

.section-content p:last-child { margin-bottom: 0; }

/* Highlight Boxes */
.highlight-box {
    background: var(--bg-light);
    border-left: 4px solid var(--primary-blue);
    padding: 1.5rem 2rem;
    margin: 2rem 0;
    border-radius: 0 8px 8px 0;
}

.highlight-box.orange { border-left-color: var(--accent-orange); }
.highlight-box.green { border-left-color: var(--accent-green); }
.highlight-box p { margin: 0; font-style: italic; }

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1.5rem;
    margin: 2.5rem 0;
}

@media (max-width: 768px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
}

.stat-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.1);
}

.donut-chart {
    width: 100px;
    height: 100px;
    margin: 0 auto 1rem;
    position: relative;
}

.donut-chart svg {
    width: 100%;
    height: 100%;
    transform: rotate(-90deg);
}

.donut-chart circle { fill: none; stroke-width: 8; }
.donut-bg { stroke: var(--bg-lighter); }

.donut-progress {
    stroke-linecap: round;
    transition: stroke-dashoffset 1s ease-out;
}

.donut-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-dark);
}

.stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-light);
    line-height: 1.4;
}

/* Timeline */
.timeline {
    position: relative;
    padding: 2rem 0;
    margin: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 20px;
    top: 0;
    bottom: 0;
    width: 2px;
    background: linear-gradient(to bottom, var(--primary-blue), var(--accent-green));
}

@media (min-width: 768px) {
    .timeline::before {
        left: 50%;
        transform: translateX(-50%);
    }
}

.timeline-item {
    position: relative;
    padding-left: 60px;
    margin-bottom: 2rem;
}

@media (min-width: 768px) {
    .timeline-item {
        width: 50%;
        padding-left: 0;
        padding-right: 40px;
    }
    
    .timeline-item:nth-child(even) {
        margin-left: 50%;
        padding-left: 40px;
        padding-right: 0;
    }
}

.timeline-dot {
    position: absolute;
    left: 12px;
    top: 0;
    width: 18px;
    height: 18px;
    background: var(--bg-white);
    border: 3px solid var(--primary-blue);
    border-radius: 50%;
}

@media (min-width: 768px) {
    .timeline-dot {
        left: auto;
        right: -9px;
    }
    
    .timeline-item:nth-child(even) .timeline-dot {
        right: auto;
        left: -9px;
    }
}

.timeline-date {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.75rem;
    color: var(--primary-blue);
    font-weight: 600;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.timeline-content {
    background: var(--bg-light);
    padding: 1.25rem;
    border-radius: 8px;
    border: 1px solid var(--border-light);
}

.timeline-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.timeline-desc {
    font-size: 0.95rem;
    color: var(--text-light);
    margin: 0;
}

.timeline-tag {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    background: var(--primary-blue);
    color: white;
    font-family: 'Inter', sans-serif;
    font-size: 0.65rem;
    font-weight: 600;
    border-radius: 4px;
    margin-top: 0.75rem;
}

.timeline-tag.orange { background: var(--accent-orange); }
.timeline-tag.green { background: var(--accent-green); }

/* Bar Chart */
.bar-chart { margin: 2rem 0; }
.bar-item { margin-bottom: 1.25rem; }

.bar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.bar-label {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.bar-icon {
    width: 32px;
    height: 32px;
    background: var(--bg-lighter);
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1rem;
}

.bar-name {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-dark);
}

.bar-sublabel {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.bar-value {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.bar-track {
    height: 10px;
    background: var(--bg-lighter);
    border-radius: 5px;
    overflow: hidden;
}

.bar-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-blue), var(--accent-green));
    border-radius: 5px;
    transition: width 1s ease-out;
}

/* Use Cases Grid */
.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

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

.use-case-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    transition: all 0.3s ease;
}

.use-case-card:hover {
    border-color: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(37, 99, 235, 0.08);
}

.use-case-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 1rem;
}

.use-case-stat { margin-bottom: 0.75rem; }

.use-case-stat-value {
    font-family: 'Inter', sans-serif;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-blue);
}

.use-case-stat-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* Regulation Grid */
.regulation-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
    margin: 2rem 0;
}

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

.regulation-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.regulation-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
}

.regulation-card.eu::before { background: #003399; }
.regulation-card.usa::before { background: #B22234; }
.regulation-card.china::before { background: #DE2910; }
.regulation-card.brazil::before { background: #009739; }

.regulation-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.regulation-flag { font-size: 1.5rem; }

.regulation-country {
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: var(--text-dark);
}

.regulation-approach {
    font-size: 0.8rem;
    color: var(--accent-orange);
    font-weight: 500;
}

.regulation-list {
    list-style: none;
    margin-bottom: 1rem;
}

.regulation-list li {
    font-size: 0.9rem;
    color: var(--text-light);
    padding: 0.4rem 0;
    padding-left: 1.25rem;
    position: relative;
}

.regulation-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--text-muted);
}

.regulation-badge {
    display: inline-block;
    padding: 0.3rem 0.75rem;
    background: var(--bg-dark);
    color: white;
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.7rem;
    border-radius: 4px;
}

.complexity-bar { margin-top: 1rem; }

.complexity-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    color: var(--text-muted);
    margin-bottom: 0.25rem;
}

.complexity-track {
    height: 6px;
    background: var(--bg-lighter);
    border-radius: 3px;
    overflow: hidden;
}

.complexity-fill { height: 100%; border-radius: 3px; }
.complexity-fill.high { background: #dc2626; width: 90%; }
.complexity-fill.medium { background: var(--accent-orange); width: 60%; }
.complexity-fill.low { background: var(--accent-green); width: 30%; }
.complexity-fill.building { background: var(--primary-blue); width: 70%; }

/* Evolution Timeline */
.evolution-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin: 2rem 0;
}

@media (max-width: 768px) {
    .evolution-timeline { grid-template-columns: repeat(2, 1fr); }
}

.evolution-card {
    background: var(--bg-white);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: 1.5rem;
    text-align: center;
}

.evolution-card.highlight {
    border-color: var(--primary-blue);
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.02), rgba(5, 150, 105, 0.02));
}

.evolution-year {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    color: var(--primary-blue);
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.evolution-title {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 0.75rem;
}

.evolution-desc {
    font-size: 0.85rem;
    color: var(--text-light);
    line-height: 1.5;
}

.evolution-icon {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

/* Energy Chart */
.energy-chart {
    background: var(--bg-dark);
    border-radius: 12px;
    padding: 2rem;
    margin: 2rem 0;
    color: white;
}

.energy-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.energy-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 600;
}

.energy-legend {
    display: flex;
    gap: 1.5rem;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
}

.legend-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.legend-dot.current { background: var(--primary-blue); }
.legend-dot.projected { background: var(--accent-orange); }

.energy-bars {
    display: flex;
    align-items: flex-end;
    gap: 3rem;
    height: 200px;
    padding-bottom: 2rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    justify-content: center;
}

.energy-bar-group {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.energy-bar {
    width: 60px;
    border-radius: 6px 6px 0 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 0.5rem;
    transition: height 1s ease-out;
}

.energy-bar.current { background: linear-gradient(to top, var(--primary-blue), #60a5fa); }
.energy-bar.projected { background: linear-gradient(to top, var(--accent-orange), #fb923c); }

.energy-bar-value {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    color: white;
}

.energy-bar-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    color: rgba(255,255,255,0.7);
    margin-top: 0.75rem;
}

.energy-note {
    margin-top: 1.5rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    font-family: 'Inter', sans-serif;
    font-size: 0.85rem;
    color: rgba(255,255,255,0.8);
    text-align: center;
}

.energy-note strong { color: var(--accent-green); }

/* Recommendations */
.recommendations-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
    margin: 2rem 0;
}

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

.recommendations-column {
    background: var(--bg-light);
    border-radius: 12px;
    padding: 2rem;
}

.recommendations-column h4 {
    font-family: 'Inter', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-dark);
    margin-bottom: 1.5rem;
    padding-bottom: 0.75rem;
    border-bottom: 2px solid var(--primary-blue);
}

.recommendation-item { margin-bottom: 1.25rem; }
.recommendation-item:last-child { margin-bottom: 0; }

.recommendation-title {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--primary-blue);
    margin-bottom: 0.25rem;
}

.recommendation-desc {
    font-size: 0.9rem;
    color: var(--text-light);
    line-height: 1.5;
}

/* Conclusion */
.conclusion-section {
    background: linear-gradient(135deg, var(--bg-dark), var(--bg-dark-secondary));
    border-radius: 16px;
    padding: 3rem;
    margin: 3rem 0;
    color: white;
    text-align: center;
}

.conclusion-quote {
    font-family: 'Crimson Text', Georgia, serif;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-style: italic;
    line-height: 1.4;
    margin-bottom: 1.5rem;
}

.conclusion-quote span { color: var(--primary-blue); }

.conclusion-author {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

/* Footer CTA */
.footer-cta {
    text-align: center;
    padding: 3rem 0;
    border-top: 1px solid var(--border-light);
    margin-top: 3rem;
}

.footer-cta-title {
    font-family: 'Inter', sans-serif;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-dark);
    margin-bottom: 0.5rem;
}

.footer-cta-desc {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.footer-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: var(--primary-blue);
    color: white;
}

.btn-primary:hover {
    background: #1d4ed8;
    transform: translateY(-2px);
}

.btn-secondary {
    background: transparent;
    color: var(--text-dark);
    border: 2px solid var(--border-light);
}

.btn-secondary:hover {
    border-color: var(--primary-blue);
    color: var(--primary-blue);
}

/* Site Footer */
.site-footer {
    background: var(--bg-white);
    border-top: 1px solid var(--border-light);
    padding: 2rem;
    text-align: center;
}

.site-footer p {
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* Utilities */
.text-highlight { color: var(--primary-blue); font-weight: 600; }
.text-orange { color: var(--accent-orange); }
.text-green { color: var(--accent-green); }
strong { font-weight: 600; }

/* Animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Mobile adjustments */
@media (max-width: 768px) {
    .main-content { padding: 5rem 1.25rem 3rem; }
    .ebook-header { padding: 0.6rem 1rem; }
    .header-title { display: none; }
    .reading-time { display: none; }
    .hero-section { padding: 2rem 0 3rem; }
    .hero-meta { gap: 1rem; }
    .ebook-section { padding: 2rem 0; }
    .conclusion-section { padding: 2rem 1.5rem; }
}