/* ==========================================================================
   1. RESET & VARIÁVEIS DE TEMA
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg-primary: #ffffff;
    --bg-secondary: #f9fafb;
    --bg-header: rgba(255, 255, 255, 0.85);
    --text-primary: #1f2937;
    --text-muted: #4b5563;
    --border-color: rgba(0, 0, 0, 0.1);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    
    --primary-color: #d97706; /* Âmbar / Dourado */
    --accent-red: #991b1b;     /* Tom destacado das estatísticas */
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Inter', sans-serif;
}

[data-theme="dark"] {
    --bg-primary: #0a0a0a;
    --bg-secondary: #121212;
    --bg-header: rgba(10, 10, 10, 0.85);
    --text-primary: #f3f4f6;
    --text-muted: #9ca3af;
    --border-color: rgba(255, 255, 255, 0.12);
    --card-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);

    --primary-color: #f59e0b;
    --accent-red: #ef4444;
}

/* ==========================================================================
   2. ESTILOS GERAIS
   ========================================================================== */
html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

.destaque {
    color: var(--primary-color);
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 2rem;
}

/* ==========================================================================
   3. CABEÇALHO
   ========================================================================== */
.cabecalho {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.8rem 5%;
    background: var(--bg-header);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
}

.cabecalho-logo {
    max-height: 45px;
    display: block;
}

.menu {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.menu-item {
    text-decoration: none;
    color: var(--text-primary);
    font-weight: 500;
    transition: color 0.2s ease;
}

.menu-item:hover {
    color: var(--primary-color);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.btn-theme {
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.3rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-theme:hover {
    color: var(--primary-color);
    transform: scale(1.1);
}

.btn-social {
    color: var(--text-primary);
    font-size: 1.2rem;
    transition: color 0.2s ease, transform 0.2s ease;
}

.btn-social:hover {
    color: var(--primary-color);
    transform: translateY(-2px);
}

/* ==========================================================================
   4. HERO SECTION
   ========================================================================== */
.hero {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 4rem 5%;
    max-width: 1200px;
    margin: 0 auto;
    gap: 2rem;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    color: var(--text-muted);
    margin-bottom: 2rem;
}

.hero-cta {
    display: flex;
    gap: 1rem;
}

.btn {
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary {
    background-color: var(--primary-color);
    color: #ffffff;
}

.btn-primary:hover {
    opacity: 0.9;
    transform: translateY(-2px);
}

.btn-outline {
    border: 2px solid var(--primary-color);
    color: var(--primary-color);
}

.btn-outline:hover {
    background-color: var(--primary-color);
    color: #ffffff;
}

.hero-image {
    max-width: 380px;
    height: auto;
}

/* ==========================================================================
   5. SOBRE & ESTATÍSTICAS
   ========================================================================== */
.about-section, .categories-section {
    padding: 4rem 5%;
    max-width: 1000px;
    margin: 0 auto;
    text-align: center;
}

.about-text p {
    margin-bottom: 1.2rem;
    font-size: 1.1rem;
}

.about-text .quote {
    font-style: italic;
    color: var(--text-muted);
}

/* Card de Estatísticas do Autor */
.stats-card {
    max-width: 300px;
    margin: 2.5rem auto 0 auto;
    padding: 1.25rem 1.5rem;
    text-align: left;
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: var(--card-shadow);
}

.stats-author {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 2px;
    color: var(--accent-red);
    text-transform: uppercase;
    margin-bottom: .075rem;
}

.stats-quote {
    font-family: var(--font-heading);
    font-style: italic;
    font-size: 1rem;
    line-height: 1;
    color: var(--text-primary);
    margin-bottom: 1.25rem;
}

.stats-list {
    display: flex;
    flex-direction: column;
}

.stats-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.6rem 0;
    border-bottom: 1px solid var(--border-color);
}

.stats-item:last-child {
    border-bottom: none;
}

.stats-label {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.stats-value {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* ==========================================================================
   6. CATEGORIAS
   ========================================================================== */
.categories-grid {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.category-card {
    position: relative;
    display: block;
    width: 340px;
    height: 240px;
    border-radius: 16px;
    overflow: hidden;
    text-decoration: none;
    box-shadow: var(--card-shadow);
    transition: transform 0.3s ease;
}

.category-card:hover {
    transform: translateY(-6px);
}

.category-card-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.category-card-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.9));
    padding: 25px 15px 15px 15px;
}

.category-card-title {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 600;
}

/* ==========================================================================
   7. NEWSLETTER
   ========================================================================== */
.newsletter-section {
    padding: 2rem 5%;
    max-width: 460px;
    margin: 2rem auto;
}

.newsletter-card {
    background-color: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--card-shadow);
}

.newsletter-icon {
    font-size: 2rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.newsletter-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: var(--text-primary);
    margin-bottom: 0.4rem;
}

.newsletter-subtitle {
    color: var(--text-muted);
    font-size: .85rem;
    margin-bottom: 1.25rem;
}

.newsletter-form {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    max-width: 100%;
    margin: 0 auto;
}

.newsletter-input {
    flex: 1;
    padding: 0.7rem 0.9rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    outline: none;
}

.newsletter-input:focus {
    border-color: var(--primary-color);
}

.btn-newsletter {
    padding: 0.65rem 1rem;
    font-size: 0.8rem;
    border: none;
    cursor: pointer;
    white-space: nowrap;
}

/* ==========================================================================
   8. RODAPÉ
   ========================================================================== */
.rodape {
    text-align: center;
    padding: 2rem 1rem;
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    margin-top: 2rem;
}

.rodape-image {
    max-width: 100px;
    margin-bottom: 1rem;
}

.direitos {
    font-size: 0.7rem;
    color: var(--text-muted);
}

/* ==========================================================================
   9. RESPONSIVIDADE & AJUSTE DARK MODE
   ========================================================================== */
@media (max-width: 768px) {
    .cabecalho, .hero {
        flex-direction: column;
        text-align: center;
    }

    .hero-cta {
        justify-content: center;
    }

    .newsletter-form {
        flex-direction: column;
    }
}

/* Inversão do traçado das ilustrações no Modo Escuro */
[data-theme="dark"] .hero-image,
[data-theme="dark"] .cabecalho-logo,
[data-theme="dark"] .rodape-image {
    filter: invert(1) brightness(1.8);
    transition: filter 0.3s ease;
}
