/* ============================================================
   GRAFIG Blog — blog.css
   Estilos para páginas de listagem e artigos do blog.
   Carregado junto com style.css em todas as páginas do blog.
   ============================================================ */

/* ── BODY DA PÁGINA DE BLOG ──────────────────────────────── */
.blog-page {
    background-color: var(--bg-main);
    min-height: 100vh;
}

/* Header sempre no modo "scrolled" nas páginas do blog
   (sem vídeo de fundo, o header precisa ser opaco) */
.blog-page .header {
    background: rgba(20, 24, 30, 0.97);
    border-bottom-color: rgba(249, 115, 22, 0.3);
}

/* Link ativo do blog no nav */
.nav-link-active {
    color: var(--accent) !important;
}
.nav-link-active::after {
    width: 100% !important;
}

/* ── BLOG HERO (Listagem) ─────────────────────────────────── */
.blog-hero {
    padding: 160px 24px 80px;
    text-align: center;
    position: relative;
    background: radial-gradient(circle at center top, rgba(249, 115, 22, 0.07) 0%, transparent 60%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.blog-hero-tag {
    font-size: 0.72rem;
    letter-spacing: 4px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 16px;
    font-family: var(--font-heading);
}

.blog-hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: 2px;
    margin-bottom: 20px;
    font-family: var(--font-heading);
    line-height: 1.1;
}

.blog-hero-accent {
    color: var(--accent);
    filter: drop-shadow(0 0 20px rgba(249, 115, 22, 0.4));
}

.blog-hero-desc {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.55);
    max-width: 540px;
    margin: 0 auto;
    line-height: 1.7;
}

/* ── FILTROS POR CATEGORIA ───────────────────────────────── */
.blog-filters {
    padding: 48px 24px 0;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-filters-inner {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    justify-content: center;
}

.blog-filter-btn {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.07);
    padding: 8px 20px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 0.75rem;
    letter-spacing: 1px;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
}

.blog-filter-btn:hover,
.blog-filter-btn.active {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    box-shadow: 0 0 20px rgba(249, 115, 22, 0.25);
}

/* ── GRADE DE ARTIGOS ────────────────────────────────────── */
.blog-grid-section {
    padding: 56px 24px 100px;
    max-width: 1200px;
    margin: 0 auto;
}

.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

/* ── CARD DE ARTIGO ──────────────────────────────────────── */
.blog-card {
    background: var(--bg-secondary);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.04);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3), 0 0 0 1px rgba(249, 115, 22, 0.12);
    border-color: rgba(249, 115, 22, 0.12);
}

.blog-card-link {
    display: block;
    text-decoration: none;
    color: inherit;
}

.blog-card-img {
    position: relative;
    width: 100%;
    height: 200px;
    overflow: hidden;
}

.blog-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.6s ease;
}

.blog-card:hover .blog-card-img img {
    transform: scale(1.05);
}

.blog-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, transparent 30%, rgba(20, 24, 30, 0.75));
}

.blog-card-category {
    position: absolute;
    top: 14px;
    left: 14px;
    background: var(--accent);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 4px 12px;
    border-radius: 50px;
    font-family: var(--font-heading);
}

.blog-card-body {
    padding: 24px;
}

.blog-card-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 10px;
    line-height: 1.4;
    font-family: var(--font-heading);
    transition: color 0.3s ease;
}

.blog-card:hover .blog-card-title {
    color: var(--accent);
}

.blog-card-excerpt {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 20px;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.blog-card-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.78rem;
    color: rgba(255, 255, 255, 0.35);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 14px;
}

/* ── LAYOUT DO ARTIGO ────────────────────────────────────── */
.blog-main {
    padding: 120px 24px 80px;
    min-height: 100vh;
}

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

/* Breadcrumb */
.article-breadcrumb {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.35);
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
}

.article-breadcrumb a {
    color: rgba(255, 255, 255, 0.45);
    transition: color 0.3s ease;
    text-decoration: none;
}

.article-breadcrumb a:hover { color: var(--accent); }
.article-breadcrumb span   { color: rgba(255, 255, 255, 0.2); }

/* Badge de categoria */
.article-category-badge {
    display: inline-block;
    background: rgba(249, 115, 22, 0.12);
    color: var(--accent);
    font-size: 0.68rem;
    font-weight: 700;
    letter-spacing: 2px;
    text-transform: uppercase;
    padding: 5px 14px;
    border-radius: 50px;
    border: 1px solid rgba(249, 115, 22, 0.25);
    margin-bottom: 20px;
    font-family: var(--font-heading);
}

/* Título do artigo (H1) */
.article-title {
    font-size: 2.4rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 24px;
    font-family: var(--font-heading);
    letter-spacing: 0.3px;
}

/* Meta (autor, data, tempo de leitura) */
.article-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.84rem;
    color: rgba(255, 255, 255, 0.45);
    flex-wrap: wrap;
    padding-bottom: 36px;
    margin-bottom: 36px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.article-divider { color: rgba(255, 255, 255, 0.18); }

/* Imagem de Destaque */
.article-featured-image {
    margin: 40px 0;
    width: 100%;
}
.article-featured-image img {
    width: 100%;
    height: auto;
    border-radius: 16px;
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.4);
    object-fit: cover;
}
.article-featured-image figcaption {
    margin-top: 14px;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    text-align: left;
    font-style: italic;
}

/* ── CORPO DO ARTIGO (conteúdo gerado pelo Markdown) ─────── */
.article-body {
    font-size: 1.05rem;
    line-height: 1.85;
    color: rgba(255, 255, 255, 0.72);
}

.article-body h2 {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 52px 0 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: relative;
    font-family: var(--font-heading);
    line-height: 1.3;
}

.article-body h2::before {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 36px;
    height: 2px;
    background: var(--accent);
    border-radius: 2px;
}

.article-body h3 {
    font-size: 1.22rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 36px 0 14px;
    font-family: var(--font-heading);
    line-height: 1.35;
}

.article-body h4 {
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--accent);
    margin: 24px 0 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    font-family: var(--font-heading);
}

.article-body p { margin-bottom: 22px; }

/* Listas */
.article-body ul {
    list-style: none;
    padding: 0;
    margin: 0 0 24px;
}

.article-body ul li {
    position: relative;
    padding-left: 20px;
    margin-bottom: 10px;
}

.article-body ul li::before {
    content: '›';
    color: var(--accent);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
    line-height: 1.5;
    font-weight: 700;
}

.article-body ol {
    padding-left: 24px;
    margin-bottom: 24px;
}

.article-body ol li {
    margin-bottom: 10px;
    padding-left: 4px;
}

.article-body ol li::marker {
    color: var(--accent);
    font-weight: 700;
}

/* Tipografia inline */
.article-body strong { color: var(--text-primary); font-weight: 600; }
.article-body em     { color: rgba(255, 255, 255, 0.6); font-style: italic; }

.article-body a {
    color: var(--accent);
    text-decoration: underline;
    text-underline-offset: 3px;
    transition: opacity 0.2s ease;
}

.article-body a.btn-primary {
    color: var(--text-primary);
    text-decoration: none;
}
.article-body a:hover { opacity: 0.75; }

/* Citações */
.article-body blockquote {
    border-left: 3px solid var(--accent);
    padding: 16px 24px;
    margin: 36px 0;
    background: rgba(249, 115, 22, 0.05);
    border-radius: 0 8px 8px 0;
}

.article-body blockquote p {
    margin-bottom: 0;
    font-style: italic;
    color: rgba(255, 255, 255, 0.78);
}

/* Código inline */
.article-body code {
    background: rgba(255, 255, 255, 0.07);
    color: var(--accent);
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.88rem;
    font-family: 'Courier New', monospace;
}

/* Bloco de código */
.article-body pre {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 10px;
    padding: 20px;
    overflow-x: auto;
    margin: 28px 0;
}

.article-body pre code {
    background: none;
    padding: 0;
    color: var(--text-primary);
    font-size: 0.9rem;
}

/* Tabelas */
.article-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 36px 0;
    font-size: 0.9rem;
}

.article-body th {
    background: rgba(249, 115, 22, 0.12);
    color: var(--text-primary);
    font-weight: 700;
    padding: 12px 16px;
    text-align: left;
    border: 1px solid rgba(255, 255, 255, 0.07);
    font-family: var(--font-heading);
    letter-spacing: 0.5px;
    font-size: 0.82rem;
    text-transform: uppercase;
}

.article-body td {
    padding: 11px 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    color: rgba(255, 255, 255, 0.72);
}

.article-body tr:nth-child(even) td {
    background: rgba(255, 255, 255, 0.02);
}

/* Imagens */
.article-body img {
    max-width: 100%;
    height: auto;
    border-radius: 12px;
    margin: 28px 0;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
}

/* Linha horizontal */
.article-body hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    margin: 48px 0;
}

/* ── CTA DO ARTIGO ───────────────────────────────────────── */
.article-cta {
    margin: 64px 0 40px;
}

.article-cta-inner {
    background: rgba(249, 115, 22, 0.07);
    border: 1px solid rgba(249, 115, 22, 0.18);
    border-radius: 20px;
    padding: 52px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.article-cta-inner::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at center, rgba(249, 115, 22, 0.06), transparent 70%);
    pointer-events: none;
}

.article-cta-tag {
    font-size: 0.7rem;
    letter-spacing: 3px;
    color: var(--accent);
    font-weight: 700;
    text-transform: uppercase;
    margin-bottom: 12px;
    font-family: var(--font-heading);
}

.article-cta-title {
    font-size: 1.8rem;
    color: var(--text-primary);
    margin-bottom: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    line-height: 1.25;
}

.article-cta-desc {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.6);
    max-width: 460px;
    margin: 0 auto 28px;
    line-height: 1.6;
}

.article-cta-btn { font-size: 0.95rem; }

/* ── LINKS INTERNOS ──────────────────────────────────────── */
.article-internal-links {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    padding: 28px 32px;
    margin: 0 0 60px;
}

.article-internal-links > p {
    font-size: 0.72rem;
    letter-spacing: 2px;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.35);
    font-weight: 700;
    margin-bottom: 18px;
    font-family: var(--font-heading);
}

.article-internal-links ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.article-internal-links ul li::before { display: none; }

.article-internal-links ul li a {
    display: inline-block;
    background: rgba(249, 115, 22, 0.07);
    color: var(--accent);
    border: 1px solid rgba(249, 115, 22, 0.18);
    padding: 6px 18px;
    border-radius: 50px;
    font-size: 0.82rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-decoration: none;
}

.article-internal-links ul li a:hover {
    background: var(--accent);
    color: #fff;
    border-color: var(--accent);
    opacity: 1;
}

/* ── RESPONSIVIDADE ──────────────────────────────────────── */
@media (max-width: 768px) {
    .blog-hero {
        padding: 120px 20px 56px;
    }

    .blog-hero-title {
        font-size: 2.2rem;
    }

    .blog-hero-desc {
        font-size: 0.95rem;
    }

    .blog-grid-section {
        padding: 40px 16px 80px;
    }

    .blog-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }

    .blog-main {
        padding: 100px 16px 60px;
    }

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

    .article-body {
        font-size: 1rem;
    }

    .article-body h2 {
        font-size: 1.35rem;
        margin-top: 40px;
    }

    .article-body h3 {
        font-size: 1.1rem;
    }

    .article-cta-inner {
        padding: 36px 22px;
    }

    .article-cta-title {
        font-size: 1.4rem;
    }

    .article-internal-links {
        padding: 22px 18px;
    }

    .article-meta {
        font-size: 0.78rem;
        gap: 8px;
    }

    .article-body table {
        font-size: 0.8rem;
    }

    .article-body th,
    .article-body td {
        padding: 9px 10px;
    }
}

@media (max-width: 480px) {
    .blog-hero-title {
        font-size: 1.8rem;
    }

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

    .blog-filter-btn {
        font-size: 0.68rem;
        padding: 6px 14px;
    }

    .article-cta-title {
        font-size: 1.2rem;
    }
}


/* Estilos do Autor / Logo no final do artigo */
.article-footer {
    margin-top: 60px;
}
.article-author {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.05);
}
.article-author img {
    width: 140px !important;
    max-width: 140px !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    background: none !important;
    filter: drop-shadow(0 0 12px rgba(255, 255, 255, 0.15)) drop-shadow(0 0 25px rgba(249, 115, 22, 0.2)) !important;
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1), filter 0.4s ease !important;
}
.article-author img:hover {
    transform: scale(1.05) !important;
    filter: drop-shadow(0 0 15px rgba(255, 255, 255, 0.25)) drop-shadow(0 0 35px rgba(249, 115, 22, 0.4)) !important;
}
