/* ========================================
   Blog Matheus Santos — Community layout
   Paleta do portfólio (preto / branco / dourado)
   ======================================== */

:root {
    --color-black: #000000;
    --color-dark: #0a0a0a;
    --color-darker: #141414;
    --color-gray-900: #1a1a1a;
    --color-gray-800: #2a2a2a;
    --color-gray-700: #3a3a3a;
    --color-gray-500: #6a6a6a;
    --color-gray-400: #8a8a8a;
    --color-gray-300: #aaaaaa;
    --color-white: #ffffff;
    --color-gold: #FFD700;
    --color-gold-dim: #FFA500;

    --bg-primary: #000000;
    --bg-secondary: #0a0a0a;
    --bg-tertiary: #141414;
    --bg-muted: #1a1a1a;

    --text-primary: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #6a6a6a;
    --text-link: #FFD700;

    --border-color: #1a1a1a;
    --border-color-light: #2a2a2a;

    --font-primary: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-pill: 999px;

    --space-1: 2px;
    --space-2: 4px;
    --space-3: 6px;
    --space-4: 8px;
    --space-5: 10px;
    --space-6: 12px;
    --space-7: 16px;
    --space-8: 20px;
    --space-9: 24px;
    --space-10: 32px;
    --space-12: 48px;

    --transition: 150ms ease;
    --container: 1120px;
    --mobile-header-h: 64px;
    --mobile-nav-h: 64px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    scroll-behavior: smooth;
}

body.blog-body {
    font-family: var(--font-primary);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--text-link); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--color-white); }
ul { list-style: none; }

.visually-hidden {
    position: absolute !important;
    width: 1px; height: 1px;
    padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0,0,0,0);
    white-space: nowrap; border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    background: var(--color-gold);
    color: #000;
    padding: 8px 16px;
    z-index: 10000;
    font-weight: 600;
}
.skip-link:focus { left: 8px; top: 8px; }

:focus-visible {
    outline: 2px solid var(--color-gold);
    outline-offset: 2px;
}

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding: 0 var(--space-7);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-family: inherit;
    font-weight: 600;
    font-size: 14px;
    line-height: 1;
    border-radius: var(--radius-pill);
    border: 2px solid transparent;
    padding: 12px 20px;
    cursor: pointer;
    transition: background var(--transition), color var(--transition), border-color var(--transition), opacity var(--transition);
    text-decoration: none;
}
.btn:disabled, .btn[aria-disabled="true"] {
    opacity: 0.45;
    cursor: not-allowed;
    pointer-events: none;
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-primary {
    background: var(--color-white);
    color: var(--color-black);
    border-color: var(--color-white);
}
.btn-primary:hover { background: var(--color-gold); border-color: var(--color-gold); color: #000; }
.btn-outline {
    background: transparent;
    color: var(--color-white);
    border-color: var(--border-color-light);
}
.btn-outline:hover { border-color: var(--color-white); color: var(--color-white); }
.btn-danger {
    background: transparent;
    color: #ff6b6b;
    border-color: #ff6b6b;
}
.btn-danger:hover { background: #ff6b6b; color: #000; }

/* Logo */
.site-logo {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--color-white);
    text-decoration: none;
}
.site-logo:hover { color: var(--color-white); }
.site-logo__mark {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px;
    width: 22px;
    height: 22px;
}
.site-logo__mark span {
    display: block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--color-gold);
}
.site-logo__mark--sm { width: 18px; height: 18px; }
.site-logo__mark--sm span { width: 6px; height: 6px; }
.site-logo__text {
    display: flex;
    flex-direction: column;
    line-height: 1.15;
    font-size: 13px;
}
.site-logo__text strong { font-size: 15px; font-weight: 700; }
.site-logo__text span { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.site-logo--sm .site-logo__text { flex-direction: row; gap: 6px; align-items: baseline; }
.site-logo--sm .site-logo__text span { text-transform: none; letter-spacing: 0; color: var(--text-secondary); font-size: 14px; }

/* Header desktop */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(0,0,0,0.85);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 64px;
    gap: 16px;
}
.site-nav {
    display: flex;
    align-items: center;
    gap: 20px;
}
.site-nav > a:not(.btn) {
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}
.site-nav > a:not(.btn):hover,
.site-nav > a.is-active { color: var(--color-white); }

/* Mobile header / nav — hidden on desktop */
.mobile-app-header,
.mobile-app-nav { display: none; }

/* Page layout */
.page {
    padding: var(--space-10) 0 var(--space-12);
}
.page-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 300px;
    gap: 40px;
    align-items: start;
}
.page-main { min-width: 0; }

.page-hero {
    margin-bottom: var(--space-10);
}
.page-hero__eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--color-gold);
    margin-bottom: 12px;
}
.page-hero h1 {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.page-hero p {
    color: var(--text-secondary);
    font-size: 16px;
    max-width: 540px;
}

.breadcrumb {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 20px;
}
.breadcrumb a { color: var(--text-secondary); }
.breadcrumb a:hover { color: var(--color-gold); }
.breadcrumb__sep { opacity: 0.5; }

/* Post list (Community-style rows) */
.post-list { display: flex; flex-direction: column; gap: 12px; }

.post-card {
    display: grid;
    grid-template-columns: 72px minmax(0, 1fr);
    gap: 16px;
    padding: 16px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: border-color var(--transition), background var(--transition);
    text-decoration: none;
    color: inherit;
}
.post-card:hover {
    border-color: var(--border-color-light);
    background: var(--bg-tertiary);
    color: inherit;
}
.post-card__media {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}
.post-card__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.post-card__cat-badge {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-gold);
    text-align: center;
    padding: 8px;
    line-height: 1.3;
}
.post-card__title {
    font-size: 17px;
    font-weight: 700;
    line-height: 1.35;
    color: var(--color-white);
    margin-bottom: 8px;
}
.post-card:hover .post-card__title { color: var(--color-gold); }
.post-card__meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    font-size: 13px;
    color: var(--text-muted);
}
.post-card__meta .author { color: var(--color-gold); font-weight: 500; }
.post-card__excerpt {
    margin-top: 8px;
    font-size: 14px;
    color: var(--text-secondary);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.empty-state {
    padding: 40px 20px;
    text-align: center;
    color: var(--text-secondary);
    border: 1px dashed var(--border-color-light);
    border-radius: var(--radius-md);
}

/* Sidebar */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: sticky;
    top: 88px;
}
.sidebar-search__field {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-pill);
    padding: 10px 16px;
}
.sidebar-search__field:focus-within {
    border-color: var(--color-gold);
}
.sidebar-search__field i { color: var(--text-muted); font-size: 13px; }
.sidebar-search__field input {
    flex: 1;
    background: transparent;
    border: 0;
    outline: 0;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
}
.sidebar-search__field input::placeholder { color: var(--text-muted); }

.sidebar-widget__title {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.sidebar-list { display: flex; flex-direction: column; gap: 4px; }
.sidebar-list__link {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px;
    border-radius: var(--radius-sm);
    color: inherit;
    text-decoration: none;
    transition: background var(--transition);
}
.sidebar-list__link:hover { background: var(--bg-secondary); color: inherit; }
.sidebar-list__icon,
.sidebar-list__thumb {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-xs);
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    flex-shrink: 0;
    overflow: hidden;
    font-size: 13px;
}
.sidebar-list__thumb img { width: 100%; height: 100%; object-fit: cover; }
.sidebar-list__body {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.sidebar-list__body strong {
    font-size: 13px;
    font-weight: 600;
    color: var(--color-white);
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.sidebar-list__body span { font-size: 12px; color: var(--text-muted); }
.sidebar-empty { font-size: 13px; color: var(--text-muted); padding: 8px; }

.sidebar-cta {
    background: linear-gradient(160deg, #141414 0%, #0a0a0a 100%);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-md);
    padding: 20px;
}
.sidebar-cta__title {
    font-size: 16px;
    font-weight: 700;
    margin-bottom: 8px;
}
.sidebar-cta__text {
    font-size: 13px;
    color: var(--text-secondary);
    margin-bottom: 16px;
}
.sidebar-cta__link {
    display: inline-block;
    margin-top: 12px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}
.sidebar-cta__link:hover { color: var(--color-gold); }

/* Article */
.article-header {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 16px;
    margin-bottom: 24px;
}
.article-cat {
    width: 72px;
    height: 72px;
    padding: 8px 6px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    text-align: center;
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--color-gold);
    line-height: 1.3;
    align-self: start;
    display: flex;
    align-items: center;
    justify-content: center;
}
.article-thumb {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: var(--bg-muted);
    flex-shrink: 0;
    align-self: start;
}
.article-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.article-meta__cat {
    color: var(--color-gold);
    font-weight: 500;
}
.article-meta__cat:hover {
    color: var(--color-white);
}
.article-header h1 {
    font-size: clamp(1.6rem, 3.5vw, 2.4rem);
    font-weight: 800;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 12px;
}
.article-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 14px;
    font-size: 13px;
    color: var(--text-muted);
}
.article-meta .author { color: var(--color-gold); font-weight: 500; }

.article-callout {
    background: var(--bg-tertiary);
    border-left: 3px solid var(--color-gold);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    padding: 16px 20px;
    margin: 24px 0;
    font-style: italic;
    color: var(--text-secondary);
    font-size: 15px;
    line-height: 1.6;
}

.article-cover {
    margin: 24px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}
.article-cover img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.article-body {
    font-size: 16px;
    line-height: 1.75;
    color: var(--color-gray-300);
}
.article-body h2 {
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--color-white);
    margin: 2rem 0 0.75rem;
    letter-spacing: -0.01em;
}
.article-body h3 {
    font-size: 1.15rem;
    font-weight: 650;
    color: var(--color-white);
    margin: 1.5rem 0 0.5rem;
}
.article-body p { margin-bottom: 1.1rem; }
.article-body ul, .article-body ol {
    margin: 0 0 1.1rem 1.25rem;
    list-style: disc;
}
.article-body ol { list-style: decimal; }
.article-body li { margin-bottom: 0.4rem; }
.article-body a { color: var(--color-gold); text-decoration: underline; text-underline-offset: 3px; }
.article-body a:hover { color: var(--color-white); }
.article-body strong { color: var(--color-white); font-weight: 600; }
.article-body blockquote {
    border-left: 3px solid var(--color-gold);
    padding: 8px 16px;
    margin: 1.25rem 0;
    color: var(--text-secondary);
    font-style: italic;
}
.article-body img {
    border-radius: var(--radius-sm);
    margin: 1.25rem 0;
}
.article-body figure {
    margin: 1.5rem 0;
}
.article-body figure img {
    margin: 0;
    width: 100%;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.article-body figcaption {
    margin-top: 8px;
    font-size: 13px;
    color: var(--text-muted);
    line-height: 1.45;
}

.author-box {
    display: flex;
    gap: 16px;
    align-items: flex-start;
    margin-top: 40px;
    padding: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.author-box__avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: var(--bg-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-gold);
    font-weight: 700;
    flex-shrink: 0;
    overflow: hidden;
    border: 1px solid var(--border-color-light);
}
.author-box__avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center 18%;
    display: block;
}
.author-box h2 { font-size: 15px; margin-bottom: 4px; }
.author-box p { font-size: 13px; color: var(--text-secondary); margin: 0; }
.author-box a { font-size: 13px; font-weight: 500; }

.related {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid var(--border-color);
}
.related h2 {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.article-cta {
    margin-top: 32px;
    padding: 24px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-md);
    text-align: center;
}
.article-cta h2 { font-size: 1.25rem; margin-bottom: 8px; }
.article-cta p { color: var(--text-secondary); margin-bottom: 16px; font-size: 14px; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border-color);
    padding: 32px 0 40px;
    margin-top: auto;
}
.site-footer__top {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}
.site-footer__nav {
    display: flex;
    gap: 20px;
}
.site-footer__nav a {
    color: var(--text-secondary);
    font-size: 14px;
}
.site-footer__nav a:hover { color: var(--color-white); }
.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
    font-size: 13px;
    color: var(--text-muted);
}
.site-footer__note a { color: var(--text-secondary); }

/* Search page */
.search-form-lg {
    margin-bottom: 24px;
}
.search-form-lg .sidebar-search__field {
    padding: 14px 20px;
}

/* Category chips */
.cat-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 24px;
}
.cat-chip {
    display: inline-flex;
    align-items: center;
    padding: 8px 14px;
    border-radius: var(--radius-pill);
    border: 1px solid var(--border-color-light);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-secondary);
}
.cat-chip:hover, .cat-chip.is-active {
    border-color: var(--color-gold);
    color: var(--color-gold);
}

/* Admin */
.admin-body { background: var(--bg-primary); color: var(--text-primary); font-family: var(--font-primary); min-height: 100vh; }
.admin-wrap { max-width: 960px; margin: 0 auto; padding: 32px 16px 64px; }
.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
    flex-wrap: wrap;
}
.admin-header h1 { font-size: 1.5rem; }
.admin-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    margin-bottom: 20px;
}
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td {
    text-align: left;
    padding: 12px 8px;
    border-bottom: 1px solid var(--border-color);
    vertical-align: middle;
}
.admin-table th { color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; }
.admin-table a { color: var(--color-white); font-weight: 600; }
.admin-table a:hover { color: var(--color-gold); }
.badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    font-size: 11px;
    font-weight: 600;
}
.badge-published { background: rgba(255, 215, 0, 0.15); color: var(--color-gold); }
.badge-draft { background: var(--bg-muted); color: var(--text-muted); }

.form-group { margin-bottom: 16px; }
.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
    margin-bottom: 6px;
}
.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-primary);
    border: 1px solid var(--border-color-light);
    border-radius: var(--radius-sm);
    padding: 10px 12px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 14px;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: 2px solid var(--color-gold);
    outline-offset: 0;
    border-color: transparent;
}
.form-group textarea { min-height: 120px; resize: vertical; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 24px; }
.form-error {
    background: rgba(255, 80, 80, 0.12);
    border: 1px solid #ff6b6b;
    color: #ffb4b4;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}
.form-success {
    background: rgba(255, 215, 0, 0.1);
    border: 1px solid var(--color-gold);
    color: var(--color-gold);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 16px;
    font-size: 14px;
}
.login-box {
    max-width: 400px;
    margin: 10vh auto;
    padding: 32px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
}
.login-box h1 { font-size: 1.35rem; margin-bottom: 8px; }
.login-box p { color: var(--text-secondary); font-size: 14px; margin-bottom: 24px; }

#editor-container {
    background: #fff;
    color: #111;
    border-radius: var(--radius-sm);
    min-height: 280px;
}
#editor-container .ql-editor { min-height: 260px; font-size: 15px; }

/* ========================================
   Mobile app shell ≤768px
   ======================================== */
@media (max-width: 768px) {
    html.mobile-app-root {
        height: 100%;
        overflow: hidden;
    }

    body.blog-body.mobile-app {
        overflow: hidden;
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100%;
        max-height: 100dvh;
        display: flex;
        flex-direction: column;
    }

    .site-header,
    .site-footer { display: none !important; }

    .mobile-app-header {
        display: flex;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        z-index: 200;
        height: var(--mobile-header-h);
        background: rgba(0,0,0,0.92);
        backdrop-filter: blur(12px);
        border-bottom: 1px solid var(--border-color);
        padding-top: env(safe-area-inset-top, 0px);
    }
    .mobile-app-header__inner {
        display: flex;
        align-items: center;
        justify-content: space-between;
        width: 100%;
        padding: 0 16px;
        gap: 12px;
    }
    .mobile-app-header__brand {
        display: flex;
        align-items: center;
        gap: 10px;
        color: inherit;
        text-decoration: none;
        min-width: 0;
    }
    .mobile-app-header__info {
        display: flex;
        flex-direction: column;
        line-height: 1.2;
        min-width: 0;
    }
    .mobile-app-header__name {
        font-size: 14px;
        font-weight: 700;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .mobile-app-header__role {
        font-size: 11px;
        color: var(--text-muted);
    }
    .mobile-app-header__whatsapp {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: var(--color-white);
        color: #000;
        font-size: 12px;
        font-weight: 700;
        padding: 8px 12px;
        border-radius: var(--radius-pill);
        text-decoration: none;
        flex-shrink: 0;
    }
    .mobile-app-header__whatsapp:hover { background: var(--color-gold); color: #000; }
    .mobile-app-header__whatsapp-icon { font-size: 14px; }

    .mobile-app-nav {
        display: flex;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        z-index: 200;
        height: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px));
        padding-bottom: env(safe-area-inset-bottom, 0px);
        background: rgba(0,0,0,0.95);
        backdrop-filter: blur(12px);
        border-top: 1px solid var(--border-color);
        justify-content: space-around;
        align-items: stretch;
    }
    .mobile-app-nav__item {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 4px;
        color: var(--text-muted);
        font-size: 10px;
        font-weight: 500;
        text-decoration: none;
        min-height: var(--mobile-nav-h);
        -webkit-tap-highlight-color: transparent;
    }
    .mobile-app-nav__item i { font-size: 18px; }
    .mobile-app-nav__item.active,
    .mobile-app-nav__item:hover { color: var(--color-gold); }

    #main {
        flex: 1 1 auto;
        min-height: 0;
        width: 100%;
        padding-top: calc(var(--mobile-header-h) + env(safe-area-inset-top, 0px));
        padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 16px);
        overflow-x: hidden;
        overflow-y: auto;
        overscroll-behavior-y: contain;
        -webkit-overflow-scrolling: touch;
    }

    .page { padding: 20px 0 32px; }
    .page-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    .sidebar { position: static; }
    .post-card {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: 12px;
        padding: 12px;
    }
    .post-card__media { width: 56px; height: 56px; }
    .post-card__title { font-size: 15px; }
    .article-header { grid-template-columns: auto 1fr; }
    .article-cat,
    .article-thumb { width: 56px; height: 56px; }
    .form-row { grid-template-columns: 1fr; }
    .mobile-app-header__whatsapp-text { display: none; }
}

@media (min-width: 769px) {
    html.mobile-app-root { height: auto; overflow: auto; }
    body.blog-body.mobile-app {
        position: static;
        overflow: visible;
        height: auto;
        display: block;
    }
}

/* ========================================
   Ads (próprios) — slots estratégicos
   ======================================== */
.ad-slot {
    position: relative;
    margin: 16px 0;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    background: #0a0a0a;
}
.ad-slot__label {
    position: absolute;
    top: 6px;
    left: 6px;
    z-index: 2;
    font-size: 10px;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--text-muted);
    background: rgba(0, 0, 0, 0.65);
    padding: 2px 6px;
    border-radius: 4px;
    pointer-events: none;
}
.ad-slot__link {
    display: block;
    line-height: 0;
    background: #0a0a0a;
}
.ad-slot__img {
    width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
    border-radius: 0;
    border: 0;
    object-fit: contain;
    object-position: center;
}
.ad-slot--sidebar {
    max-width: 300px;
    width: 100%;
    margin: 8px auto 4px;
}
.ad-slot--sidebar .ad-slot__img {
    width: 100%;
    height: auto;
    max-height: 600px;
    object-fit: contain;
}
.ad-slot--in-article {
    max-width: min(100%, 336px);
    width: 100%;
    margin: 28px auto;
}
.ad-slot--in-article .ad-slot__img {
    width: 100%;
    height: auto;
    object-fit: contain;
}
.ad-slot--mobile-banner {
    margin: 0;
    border: 0;
    border-radius: 0;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    background: #000;
}
.ad-slot--mobile-banner .ad-slot__label { display: none; }
.ad-slot--mobile-banner .ad-slot__img {
    width: 100%;
    height: 56px;
    object-fit: contain;
    object-position: center;
    background: #000;
}
.ad-slot--popup {
    margin: 0;
    border: 0;
    background: transparent;
    max-width: 280px;
    overflow: visible;
}
.ad-slot--popup .ad-slot__img {
    width: 100% !important;
    max-width: 280px !important;
    height: auto !important;
    max-height: 70vh !important;
    margin: 0 auto;
    object-fit: contain !important;
}

/* Mobile sticky banner */
.ad-mobile-banner {
    display: none;
}
@media (max-width: 768px) {
    .ad-slot--sidebar { display: none; }

    .ad-slot--in-article {
        max-width: 100%;
        margin: 24px 0;
    }

    .ad-mobile-banner.is-open {
        display: flex;
        align-items: center;
        gap: 0;
        position: fixed;
        left: 10px;
        right: 10px;
        bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 10px);
        z-index: 190;
        background: linear-gradient(90deg, #111 0%, #1a1a1a 100%);
        border: 1px solid #2a2a2a;
        border-radius: 14px;
        box-shadow: 0 10px 28px rgba(0, 0, 0, 0.55);
        overflow: hidden;
        min-height: 56px;
        max-height: none;
        padding: 0;
    }
    .ad-mobile-cta {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        min-width: 0;
        padding: 12px 44px 12px 16px;
        text-decoration: none;
        color: #fff;
    }
    .ad-mobile-cta:hover { color: #fff; }
    .ad-mobile-cta__text {
        font-size: 15px;
        font-weight: 700;
        letter-spacing: -0.01em;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }
    .ad-mobile-cta__btn {
        flex-shrink: 0;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background: #25D366;
        color: #fff;
        font-size: 13px;
        font-weight: 700;
        padding: 10px 14px;
        border-radius: 999px;
        line-height: 1;
    }
    .ad-mobile-cta__btn i { font-size: 15px; }
    .ad-mobile-banner__close {
        position: absolute;
        top: 50%;
        right: 8px;
        transform: translateY(-50%);
        z-index: 3;
        width: 32px;
        height: 32px;
        border: 0;
        border-radius: 50%;
        background: rgba(255, 255, 255, 0.08);
        color: #ccc;
        font-size: 20px;
        cursor: pointer;
        line-height: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        flex: none;
    }
    .ad-mobile-banner__close:hover { color: var(--color-gold); background: rgba(255,255,255,0.14); }

    body.mobile-app #main {
        padding-bottom: calc(var(--mobile-nav-h) + env(safe-area-inset-bottom, 0px) + 90px);
    }
}
/* Popup modal — sempre fixed, nunca no fluxo da página */
.ad-popup {
    position: fixed !important;
    inset: 0;
    z-index: 9999;
    display: none !important;
    align-items: center;
    justify-content: center;
    padding: 16px;
    margin: 0;
    width: 100%;
    height: 100%;
    box-sizing: border-box;
    pointer-events: none;
}
.ad-popup.is-open {
    display: flex !important;
    pointer-events: auto;
}
.ad-popup__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.8);
}
.ad-popup__dialog {
    position: relative;
    z-index: 1;
    width: min(90vw, 280px);
    max-height: 85vh;
}
.ad-popup__close {
    position: absolute;
    top: -12px;
    right: -12px;
    z-index: 2;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid var(--border-color-light);
    background: #111;
    color: #fff;
    font-size: 22px;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}
.ad-popup__close:hover { background: var(--color-gold); color: #000; }
body.ad-popup-open {
    overflow: hidden !important;
}

@media (prefers-reduced-motion: reduce) {
    .ad-popup,
    .ad-mobile-banner { transition: none !important; }
}

/* Scrollbar */
::-webkit-scrollbar { width: 10px; }
::-webkit-scrollbar-track { background: #0a0a0a; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #FFD700 0%, #FFA500 100%);
    border-radius: 6px;
    border: 2px solid #0a0a0a;
}
* { scrollbar-width: thin; scrollbar-color: #FFD700 #0a0a0a; }
