/*
 * ============================================
 * EBOOK GLOBAL STYLES - CÉSAR MACHADO
 * ============================================
 * Arquivo compartilhado por todos os 6 ebooks
 * Alterações aqui refletem em TODOS os ebooks
 * ============================================
 */

/* ============================================
   VARIÁVEIS CSS (DESIGN TOKENS)
   ============================================ */
:root {
    /* Cores Primárias */
    --color-primary: #8B0000;
    --color-primary-dark: #5C0000;
    --color-primary-light: #C41E3A;

    /* Cores de Destaque */
    --color-accent: #FFD700;
    --color-accent-dark: #B8860B;

    /* Cores de Fundo */
    --color-dark: #0A0A0A;
    --color-dark-light: #1A1A1A;
    --color-dark-lighter: #2A2A2A;

    /* Cores de Feedback */
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-danger: #EF4444;

    /* BOTÃO DE COMPRA - VERDE */
    --color-cta-buy: #10B981;
    --color-cta-buy-hover: #059669;

    /* Fontes */
    --font-display: 'DM Serif Display', serif;
    --font-body: 'Poppins', sans-serif;

    /* Espaçamentos */
    --spacing-section: 100px;
    /* Entre capítulos */
    --spacing-block: 48px;
    /* Entre blocos de conteúdo */
    --spacing-element: 24px;
    /* Entre elementos */
    --spacing-card: 32px;
    /* Padding interno de cards */

    /* Bordas */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
}

/* ============================================
   RESET E BASE
   ============================================ */
body {
    font-family: var(--font-body);
    background: linear-gradient(180deg, var(--color-dark) 0%, #1A0A0A 100%) !important;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.7;
    min-height: 100vh;
}

/* ============================================
   TIPOGRAFIA
   ============================================ */
.font-display {
    font-family: var(--font-display);
}

.ebook-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    color: white;
    margin-bottom: 16px;
}

.ebook-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-block);
}

/* ============================================
   CAPÍTULOS - ESPAÇAMENTO GRANDE
   ============================================ */
.ebook-chapter {
    margin-bottom: var(--spacing-section);
    scroll-margin-top: 80px;
    padding-left: 1.5rem;
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.ebook-chapter.visible {
    opacity: 1;
    transform: translateY(0);
}

.chapter-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.4);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 8px;
}

.chapter-title {
    font-family: var(--font-display);
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    color: white;
    margin-bottom: 12px;
}

.chapter-subtitle {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: var(--spacing-block);
}

.chapter-content {
    max-width: 100%;
}

.chapter-content p {
    margin-bottom: var(--spacing-element);
}

/* ============================================
   CARDS E HIGHLIGHT BOXES
   ============================================ */
.highlight-box {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.15), var(--color-dark-lighter));
    border: 1px solid rgba(196, 30, 58, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-card);
    margin-bottom: var(--spacing-block);
}

.info-card {
    background: var(--color-dark-lighter);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    padding: var(--spacing-card);
    margin-bottom: var(--spacing-block);
}

.accent-card {
    background: var(--color-dark-lighter);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-card);
    margin-bottom: var(--spacing-block);
    text-align: center;
}

.warning-card {
    background: rgba(139, 0, 0, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-card);
    margin-bottom: var(--spacing-block);
}

.success-card {
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.3);
    border-radius: var(--radius-lg);
    padding: var(--spacing-card);
    margin-bottom: var(--spacing-block);
}

.quote-box {
    border-left: 4px solid var(--color-accent);
    background: rgba(26, 26, 26, 0.5);
    padding: 1rem 1.5rem;
}

.spiritual-glow {
    box-shadow: 0 0 30px rgba(255, 215, 0, 0.2);
}

/* Card com borda lateral */
.side-border-card {
    background: var(--color-dark-lighter);
    border-left: 4px solid var(--color-accent);
    padding: 1rem 1.5rem;
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin-bottom: var(--spacing-element);
}

/* ============================================
   LISTAS
   ============================================ */
.ebook-list {
    list-style: none;
    padding: 0;
    margin: var(--spacing-element) 0;
}

.ebook-list li {
    margin-bottom: 12px;
    padding-left: 0;
}

.ebook-list li::before {
    content: none;
}

/* ============================================
   FLAGS (RED/GREEN)
   ============================================ */
.flag-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 16px;
}

.flag-icon {
    flex-shrink: 0;
    font-size: 1.25rem;
}

.flag-icon.red {
    color: var(--color-danger);
}

.flag-icon.green {
    color: var(--color-success);
}

/* ============================================
   BOTÕES
   ============================================ */
/* Botão Primário (Identidade - Vermelho) */
.btn-primary {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-primary), var(--color-primary-light));
    color: white;
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(139, 0, 0, 0.4);
}

/* BOTÃO DE COMPRA - VERDE */
.btn-buy {
    display: inline-block;
    background: linear-gradient(135deg, var(--color-cta-buy), var(--color-cta-buy-hover));
    color: white;
    font-weight: 700;
    font-size: 1.125rem;
    padding: 1.25rem 2.5rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: none;
    cursor: pointer;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.btn-buy:hover {
    transform: scale(1.05);
    box-shadow: 0 10px 30px rgba(16, 185, 129, 0.4);
}

/* Botão Secundário (Outline) */
.btn-secondary {
    display: inline-block;
    background: transparent;
    color: var(--color-accent);
    font-weight: 600;
    padding: 1rem 2rem;
    border-radius: var(--radius-md);
    text-decoration: none;
    border: 2px solid var(--color-accent);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    background: var(--color-accent);
    color: var(--color-dark);
}

/* ============================================
   CTA SECTION
   ============================================ */
.cta-section {
    background: linear-gradient(135deg, rgba(139, 0, 0, 0.2), var(--color-dark-lighter));
    border: 1px solid rgba(139, 0, 0, 0.3);
    border-radius: var(--radius-xl);
    padding: 3rem 2rem;
    text-align: center;
    margin-top: var(--spacing-section);
}

.cta-section .price-original {
    color: rgba(255, 255, 255, 0.5);
    text-decoration: line-through;
    font-size: 1rem;
}

.cta-section .price-current {
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-accent);
    margin-left: 1rem;
}

.cta-section .price-installment {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.875rem;
    margin-top: 0.5rem;
}

/* ============================================
   ANIMAÇÕES
   ============================================ */
.animate-on-scroll {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.animate-on-scroll.visible {
    opacity: 1;
}

.fade-up {
    transform: translateY(30px);
}

.fade-up.visible {
    transform: translateY(0);
}

.slide-left {
    transform: translateX(-30px);
}

.slide-left.visible {
    transform: translateX(0);
}

.slide-right {
    transform: translateX(30px);
}

.slide-right.visible {
    transform: translateX(0);
}

.scale-in {
    transform: scale(0.95);
}

.scale-in.visible {
    transform: scale(1);
}

/* ============================================
   HEADER DO EBOOK
   ============================================ */
.ebook-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 50;
    background: rgba(10, 10, 10, 0.9);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(139, 0, 0, 0.1);
}

.ebook-header-inner {
    max-width: 800px;
    margin: 0 auto;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

/* Barra de Progresso de Leitura */
.reading-progress {
    position: fixed;
    top: 52px;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--color-dark-light);
    z-index: 40;
}

.reading-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--color-primary), var(--color-primary-light), var(--color-accent));
    width: 0%;
    transition: width 0.2s ease;
    border-radius: 0 2px 2px 0;
}

/* ============================================
   HERO SECTION
   ============================================ */
.ebook-hero {
    padding-top: 100px;
    padding-bottom: var(--spacing-section);
    text-align: center;
}

.hero-emoji {
    font-size: 4rem;
    margin-bottom: 1.5rem;
}

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

.hero-meta-item {
    text-align: center;
}

.hero-meta-value {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--color-accent);
}

.hero-meta-label {
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.5);
    text-transform: uppercase;
}

/* ============================================
   TABLE OF CONTENTS
   ============================================ */
.toc {
    background: var(--color-dark-lighter);
    border-radius: var(--radius-lg);
    padding: var(--spacing-card);
    margin-bottom: var(--spacing-section);
}

.toc-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    margin-bottom: 1rem;
    color: white;
}

.toc-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 0.75rem;
}

.toc-item {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    padding: 0.5rem;
    border-radius: var(--radius-sm);
    transition: all 0.2s ease;
    font-size: 0.875rem;
}

.toc-item:hover {
    background: rgba(196, 30, 58, 0.2);
    color: white;
}

/* ============================================
   MOBILE RESPONSIVE
   ============================================ */
@media (max-width: 768px) {
    :root {
        --spacing-section: 80px;
        --spacing-block: 36px;
        --spacing-element: 20px;
        --spacing-card: 24px;
    }

    .ebook-chapter {
        padding-left: 1rem;
    }

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

    .hero-meta {
        gap: 1rem;
    }
}

@media (max-width: 480px) {
    :root {
        --spacing-section: 64px;
        --spacing-block: 28px;
        --spacing-card: 20px;
    }

    .btn-buy {
        padding: 1rem 1.5rem;
        font-size: 1rem;
    }
}

/* ============================================
   UTILITIES
   ============================================ */
.text-accent {
    color: var(--color-accent);
}

.text-primary {
    color: var(--color-primary-light);
}

.text-success {
    color: var(--color-success);
}

.text-danger {
    color: var(--color-danger);
}

.text-muted {
    color: rgba(255, 255, 255, 0.6);
}

.mt-section {
    margin-top: var(--spacing-section);
}

.mb-section {
    margin-bottom: var(--spacing-section);
}

.mt-block {
    margin-top: var(--spacing-block);
}

.mb-block {
    margin-bottom: var(--spacing-block);
}

.text-center {
    text-align: center;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}