/* ==================================================================
   BLOG VITT HOST - Estilos do frontend público
   ================================================================== */

.blog-hero {
    padding: 80px 0 60px;
    background: linear-gradient(180deg, #0a0e1a 0%, #050810 100%);
    color: #fff;
    text-align: center;
}
.blog-hero-slim { padding: 60px 0 40px; text-align: left; }
.blog-hero-badge {
    display: inline-block;
    background-color: rgba(124, 58, 237, 0.15);
    color: #b794f6;
    font-size: 13px;
    padding: 6px 14px;
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 999px;
    margin-bottom: 14px;
    font-weight: 600;
}
.blog-hero h1 { font-weight: 700; font-size: 42px; color: #fff; margin-bottom: 10px; }
.blog-hero p  { font-size: 17px; color: #94a3b8; max-width: 640px; margin: 0 auto 24px; }
.blog-hero-slim h1 { font-size: 32px; }
.blog-hero-slim p  { margin: 0; max-width: none; }
.blog-back-link { color: #7c3aed; font-size: 13px; text-decoration: none; margin-bottom: 12px; display: inline-block; }
.blog-back-link:hover { color: #b794f6; text-decoration: none; }

.blog-search {
    display: flex;
    max-width: 520px;
    margin: 0 auto;
    background: #0f1424;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 10px;
    overflow: hidden;
}
.blog-hero-slim .blog-search { margin: 14px 0 0; max-width: 480px; }
.blog-search input {
    flex: 1;
    padding: 12px 16px;
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 15px;
    outline: none;
}
.blog-search input::placeholder { color: #64748b; }
.blog-search button {
    background: #7c3aed;
    color: #fff;
    border: 0;
    padding: 0 20px;
    font-weight: 600;
    cursor: pointer;
    font-size: 14px;
}
.blog-search button:hover { background: #6d28d9; }

.blog-section {
    padding: 60px 0 80px;
    background-color: #050810;
    color: #cbd5e1;
    min-height: 60vh;
}
.blog-layout {
    display: grid;
    grid-template-columns: 1fr 300px;
    gap: 40px;
    margin-top: 40px;
}
@media (max-width: 991px) { .blog-layout { grid-template-columns: 1fr; } }

/* ── Featured (post em destaque) ────────────────────────────────── */
.blog-featured {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    background: #0f1424;
    border: 1px solid rgba(124, 58, 237, 0.3);
    border-radius: 14px;
    overflow: hidden;
    margin-bottom: 40px;
    transition: transform .2s ease, border-color .2s ease;
}
.blog-featured:hover { transform: translateY(-2px); border-color: rgba(124, 58, 237, 0.6); }
@media (max-width: 767px) { .blog-featured { grid-template-columns: 1fr; } }
.blog-featured-cover {
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #0a0e1a;
    min-height: 300px;
    position: relative;
    display: block;
    overflow: hidden;
}
.blog-featured-cover::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 40%, rgba(5,8,16,0.85) 100%);
    pointer-events: none;
}
.blog-featured-body { padding: 30px; }
.blog-featured-body h2 { margin: 14px 0; }
.blog-featured-body h2 a { color: #fff; text-decoration: none; }
.blog-featured-body h2 a:hover { color: #b794f6; }
.blog-featured-body p { color: #94a3b8; font-size: 15px; line-height: 1.6; margin-bottom: 20px; }

/* ── Grid de posts ──────────────────────────────────────────────── */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 24px;
}
.blog-card {
    background: #0f1424;
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}
.blog-card:hover {
    transform: translateY(-4px);
    border-color: rgba(124, 58, 237, 0.4);
    box-shadow: 0 12px 30px rgba(0,0,0,0.4);
}
.blog-card-cover {
    height: 180px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #0a0e1a;
    display: block;
    position: relative;
    overflow: hidden;
}
.blog-card-cover--logo { background-size: auto 70%; }
.blog-card-cover--logo::before {
    background: radial-gradient(circle at center, rgba(124,58,237,0.15) 0%, transparent 60%);
}
.blog-card-cover::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 45%, rgba(5,8,16,0.75) 100%);
    pointer-events: none;
}
.blog-card-featured, .blog-card-official {
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 2;
    background: #7c3aed;
    color: #fff;
    font-size: 11px;
    padding: 3px 10px;
    border-radius: 999px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.blog-card-official { background: #f59e0b; left: auto; right: 12px; }
.blog-card-body { padding: 20px; flex-grow: 1; display: flex; flex-direction: column; }
.blog-card-cat {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    text-decoration: none;
    width: fit-content;
    margin-bottom: 10px;
}
.blog-card-title { margin: 0 0 10px; font-size: 18px; font-weight: 700; line-height: 1.35; }
.blog-card-title a { color: #fff; text-decoration: none; }
.blog-card-title a:hover { color: #b794f6; }
.blog-card-excerpt { color: #94a3b8; font-size: 13.5px; line-height: 1.55; margin-bottom: 14px; flex-grow: 1; }
.blog-card-meta {
    display: flex; flex-wrap: wrap; gap: 12px;
    font-size: 12px; color: #64748b;
    border-top: 1px solid rgba(255,255,255,0.05);
    padding-top: 12px;
}
.blog-card-meta i { color: #7c3aed; margin-right: 4px; }

/* ── Sidebar ────────────────────────────────────────────────────── */
.blog-sidebar { display: flex; flex-direction: column; gap: 24px; }
.blog-widget {
    background: #0f1424;
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    padding: 20px;
}
.blog-widget h4 {
    color: #fff;
    font-size: 15px;
    font-weight: 700;
    margin-bottom: 16px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.blog-widget p { font-size: 13.5px; color: #94a3b8; line-height: 1.55; }
.blog-cat-list { list-style: none; padding: 0; margin: 0; }
.blog-cat-list li { margin-bottom: 8px; }
.blog-cat-list a {
    display: flex; justify-content: space-between; align-items: center;
    padding: 8px 10px; border-radius: 6px; text-decoration: none;
    font-size: 14px; font-weight: 500;
    transition: background .15s ease;
}
.blog-cat-list a:hover { background: rgba(255,255,255,0.03); text-decoration: none; }
.blog-cat-list span { color: #64748b; font-size: 12px; }

.blog-tag-cloud { display: flex; flex-wrap: wrap; gap: 6px; }
.blog-tag {
    display: inline-block;
    padding: 4px 10px;
    background: rgba(124, 58, 237, 0.08);
    color: #b794f6;
    border-radius: 999px;
    font-size: 12px;
    text-decoration: none;
    transition: background .15s ease;
}
.blog-tag:hover { background: rgba(124, 58, 237, 0.2); color: #d8b4fe; text-decoration: none; }

.blog-cta-btn {
    display: inline-block;
    background: #7c3aed;
    color: #fff !important;
    padding: 10px 20px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    font-size: 14px;
    margin-top: 12px;
    transition: background .15s ease, transform .15s ease;
}
.blog-cta-btn:hover { background: #6d28d9; transform: translateY(-1px); text-decoration: none; color: #fff; }

/* ── Paginação ──────────────────────────────────────────────────── */
.blog-pagination {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.blog-page-btn {
    background: #0f1424;
    color: #cbd5e1;
    padding: 8px 16px;
    border-radius: 8px;
    text-decoration: none;
    font-size: 14px;
    border: 1px solid rgba(255,255,255,0.08);
}
.blog-page-btn:hover { background: #7c3aed; color: #fff; text-decoration: none; }
.blog-page-info { color: #64748b; font-size: 13px; }

/* ── Empty state ────────────────────────────────────────────────── */
.blog-empty {
    text-align: center;
    padding: 60px 20px;
    color: #64748b;
}
.blog-empty i { color: #7c3aed; margin-bottom: 20px; }
.blog-empty h3 { color: #cbd5e1; font-size: 20px; margin-bottom: 8px; }
.blog-empty a { color: #7c3aed; }

/* ── Post individual ────────────────────────────────────────────── */
.blog-post-cover {
    height: 380px;
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    background-color: #0a0e1a;
    margin-bottom: 40px;
    position: relative;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}
/* Small logo mode: quando cover é um logo pequeno (ex.: painéis) e não wallpaper */
.blog-post-cover--logo {
    height: 200px;
    background-size: auto 120px;
}
.blog-post-cover::before {
    content: '';
    position: absolute; inset: 0;
    background: linear-gradient(180deg, transparent 60%, rgba(5,8,16,0.7) 100%);
    pointer-events: none;
}
.blog-post-inner { max-width: 780px; margin: 0 auto; padding: 0 20px; }
.blog-post-header { margin-bottom: 30px; padding-bottom: 20px; border-bottom: 1px solid rgba(255,255,255,0.06); }
.blog-post-header h1 { color: #fff; font-size: 40px; font-weight: 800; line-height: 1.2; margin: 16px 0; }
.blog-post-meta {
    display: flex; flex-wrap: wrap; gap: 20px;
    font-size: 13px; color: #64748b;
}
.blog-post-meta a { color: #cbd5e1; text-decoration: none; }
.blog-post-meta a:hover { color: #b794f6; }
.blog-post-meta i { color: #7c3aed; margin-right: 4px; }

.blog-post-body {
    color: #cbd5e1;
    font-size: 17px;
    line-height: 1.75;
}
.blog-post-body h2 { color: #fff; font-size: 28px; font-weight: 700; margin: 40px 0 16px; }
.blog-post-body h3 { color: #fff; font-size: 22px; font-weight: 700; margin: 30px 0 14px; }
.blog-post-body h4 { color: #fff; font-size: 18px; font-weight: 700; margin: 24px 0 12px; }
.blog-post-body p  { margin-bottom: 18px; }
.blog-post-body a  { color: #7c3aed; text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 3px; }
.blog-post-body a:hover { color: #b794f6; }
.blog-post-body ul, .blog-post-body ol { margin: 0 0 18px 24px; padding: 0; }
.blog-post-body li { margin-bottom: 6px; }
.blog-post-body strong { color: #fff; }
.blog-post-body img { max-width: 100%; height: auto; border-radius: 10px; margin: 20px 0; }
.blog-post-body blockquote {
    border-left: 4px solid #7c3aed;
    padding: 4px 20px;
    background: rgba(124, 58, 237, 0.06);
    border-radius: 6px;
    margin: 20px 0;
    color: #94a3b8;
    font-style: italic;
}
.blog-post-body code {
    background: #0f1424;
    color: #10b981;
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 90%;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
}
.blog-post-body pre {
    background: #030509;
    color: #cbd5e1;
    padding: 18px 20px;
    border-radius: 10px;
    overflow-x: auto;
    margin: 20px 0;
    border: 1px solid rgba(255,255,255,0.06);
    font-size: 14px;
    line-height: 1.5;
    position: relative;
}
.blog-post-body pre code { background: transparent; color: inherit; padding: 0; }
.blog-post-body hr { border: 0; border-top: 1px solid rgba(255,255,255,0.08); margin: 30px 0; }
.blog-post-body table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    font-size: 14px;
}
.blog-post-body th, .blog-post-body td {
    padding: 10px 14px;
    text-align: left;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.blog-post-body th { color: #fff; background: #0f1424; font-weight: 700; }

.blog-code-copy {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #7c3aed;
    color: #fff;
    border: 0;
    padding: 4px 10px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    font-weight: 600;
    opacity: 0;
    transition: opacity .15s ease;
}
.blog-post-body pre:hover .blog-code-copy { opacity: 1; }
.blog-code-copy:hover { background: #6d28d9; }

.blog-post-tags {
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.06);
    display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
    font-size: 14px;
}
.blog-post-tags strong { color: #cbd5e1; }

.blog-post-share {
    margin-top: 30px;
    display: flex; gap: 10px; align-items: center; flex-wrap: wrap;
    font-size: 14px;
}
.blog-post-share span { color: #64748b; margin-right: 8px; }
.blog-post-share a {
    padding: 6px 14px; border-radius: 6px; font-size: 13px; font-weight: 600;
    text-decoration: none; color: #fff;
}
.share-wa { background: #25D366; }
.share-tw { background: #000; }
.share-li { background: #0A66C2; }
.blog-post-share a:hover { opacity: 0.9; }

.blog-related { margin-top: 60px; padding-top: 30px; border-top: 1px solid rgba(255,255,255,0.06); }
.blog-related h3 { color: #fff; font-size: 22px; margin-bottom: 24px; }

.blog-cta-final {
    margin-top: 60px;
    padding: 40px 30px;
    background: linear-gradient(135deg, #7c3aed 0%, #4f46e5 100%);
    border-radius: 14px;
    text-align: center;
    color: #fff;
}
.blog-cta-final h3 { color: #fff; font-size: 24px; margin-bottom: 8px; }
.blog-cta-final p { color: #e0e7ff; margin-bottom: 20px; }
.blog-cta-final .blog-cta-btn { background: #fff; color: #7c3aed !important; }
.blog-cta-final .blog-cta-btn:hover { background: #f5f3ff; }

/* ── Autor hero ─────────────────────────────────────────────────── */
.blog-author-hero { display: flex; align-items: center; gap: 24px; }
.blog-author-avatar {
    width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
    border: 3px solid rgba(124, 58, 237, 0.4);
}

.blog-featured-cover--logo { background-size: auto 60% !important; }
.blog-featured-cover--logo::before {
    background: radial-gradient(circle at center, rgba(124,58,237,0.18) 0%, transparent 65%);
}

/* ── Fase 4: Newsletter widget ───────────────────────────────── */
.blog-widget--newsletter {
    background: linear-gradient(135deg, #1e1b4b 0%, #0f1424 100%);
    border-color: rgba(124, 58, 237, 0.4);
}
.blog-nl-form {
    display: flex;
    gap: 6px;
    margin-top: 12px;
}
.blog-nl-form input[type=email] {
    flex: 1;
    padding: 8px 12px;
    background: #050810;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    border-radius: 6px;
    font-size: 13px;
    min-width: 0;
}
.blog-nl-form button {
    background: #7c3aed;
    color: #fff;
    border: 0;
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
}
.blog-nl-form button:hover { background: #6d28d9; }
.blog-nl-form button:disabled { opacity: 0.5; cursor: wait; }
.blog-nl-msg { margin-top: 8px; font-size: 12px; }
.blog-nl-msg.ok  { color: #6ee7b7; }
.blog-nl-msg.err { color: #fca5a5; }

/* ── Fase 4: Giscus comments container ───────────────────────── */
.blog-comments {
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid rgba(255,255,255,0.06);
}
.blog-comments h3 {
    color: #fff;
    font-size: 22px;
    margin-bottom: 20px;
}

/* ── Fase 4: Analytics dashboard chart ───────────────────────── */
.admin-chart { min-height: 220px; margin: 12px 0; }
.admin-chart-bars {
    display: flex; align-items: flex-end;
    gap: 4px; height: 180px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
}
.admin-chart-bar {
    flex: 1;
    background: linear-gradient(180deg, #7c3aed, #4f46e5);
    border-radius: 4px 4px 0 0;
    min-height: 2px;
    position: relative;
    transition: opacity .2s ease;
}
.admin-chart-bar:hover { opacity: 0.8; }
.admin-chart-bar span {
    position: absolute; top: -18px; left: 50%; transform: translateX(-50%);
    font-size: 11px; color: #94a3b8; white-space: nowrap;
    display: none;
}
.admin-chart-bar:hover span { display: block; }
.admin-chart-labels {
    display: flex; justify-content: space-between;
    font-size: 10px; color: #64748b; margin-top: 6px;
}

/* ── Fase 4: IA botão ──────────────────────────────────────── */
.admin-btn-ai {
    background: linear-gradient(135deg, #7c3aed, #ec4899);
    color: #fff !important;
    border: 0;
}
.admin-btn-ai:hover { background: linear-gradient(135deg, #6d28d9, #db2777); }
.admin-btn-ai i { color: #fff !important; }

.ai-modal-content textarea {
    background: #050810;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 10px;
    border-radius: 6px;
    font-family: inherit;
    font-size: 13px;
    width: 100%;
    resize: vertical;
}
.ai-loading {
    text-align: center; padding: 40px 20px; color: #94a3b8;
}
.ai-loading i { font-size: 32px; color: #7c3aed; }

/* ── Bloco C: Trending widget ─────────────────────────────── */
.blog-widget--trending {
    background: linear-gradient(135deg, #dc2626, #7c3aed);
    border-color: rgba(255,255,255,0.15);
}
.blog-trending-link { display: block; color: inherit; text-decoration: none; }
.blog-trending-link:hover { color: inherit; text-decoration: none; }
.blog-trending-cover {
    height: 100px;
    background-size: cover;
    background-position: center;
    background-color: rgba(0,0,0,0.2);
    border-radius: 8px;
    margin-bottom: 10px;
}
.blog-trending-title {
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    line-height: 1.35;
    margin-bottom: 6px;
}
.blog-widget--trending small { color: rgba(255,255,255,0.7); font-size: 12px; }

/* ── Bloco C: Countdown bar ───────────────────────────────── */
.blog-countdown {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    background: linear-gradient(90deg, #dc2626, #7c3aed);
    color: #fff;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 16px;
    z-index: 9998;
    font-size: 14px;
    box-shadow: 0 -4px 20px rgba(0,0,0,0.4);
}
.blog-countdown-label { font-weight: 700; }
.blog-countdown-timer {
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-weight: 700;
    font-size: 16px;
    background: rgba(0,0,0,0.3);
    padding: 4px 12px;
    border-radius: 6px;
}
.blog-countdown-btn {
    background: #fff;
    color: #dc2626 !important;
    padding: 6px 16px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 700;
    font-size: 13px;
}
.blog-countdown-btn:hover { background: #fee; text-decoration: none; }
.blog-countdown-close {
    background: transparent;
    border: 0;
    color: #fff;
    font-size: 24px;
    cursor: pointer;
    padding: 0 8px;
    opacity: 0.7;
}
.blog-countdown-close:hover { opacity: 1; }
@media (max-width: 640px) {
    .blog-countdown { flex-wrap: wrap; text-align: center; padding: 10px; font-size: 12px; }
    .blog-countdown-btn { flex: 1; }
}

/* ── Bloco C: Exit-intent popup ───────────────────────────── */
.blog-exit-popup {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(5,8,16,0.85);
    backdrop-filter: blur(6px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    animation: fadeIn 0.3s ease;
}
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.blog-exit-content {
    background: #0f1424;
    border: 1px solid rgba(124, 58, 237, 0.4);
    border-radius: 14px;
    padding: 40px 30px;
    max-width: 480px;
    width: 100%;
    text-align: center;
    position: relative;
    box-shadow: 0 20px 60px rgba(0,0,0,0.6);
}
.blog-exit-emoji { font-size: 56px; margin-bottom: 10px; }
.blog-exit-content h3 { color: #fff; font-size: 26px; margin-bottom: 8px; }
.blog-exit-content p { color: #94a3b8; margin-bottom: 20px; }
.blog-exit-content form { display: flex; gap: 8px; flex-wrap: wrap; }
.blog-exit-content input[type=email] {
    flex: 1;
    min-width: 200px;
    background: #050810;
    border: 1px solid rgba(255,255,255,0.1);
    color: #fff;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
}
.blog-exit-content button[type=submit] {
    background: #7c3aed;
    color: #fff;
    border: 0;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    font-size: 14px;
}
.blog-exit-content button[type=submit]:hover { background: #6d28d9; }
.blog-exit-close {
    position: absolute;
    top: 14px; right: 18px;
    background: none; border: 0;
    color: #64748b;
    font-size: 28px;
    cursor: pointer;
}
.blog-exit-close:hover { color: #fff; }
