/* Blog MD2tech - folha de estilo compartilhada por todas as páginas do blog */

:root {
    --primary: #111827;
    --secondary: #e56c19;
    --dark: #0d1b2a;
    --light: #e5e5e5;
    --white: #ffffff;
    --paper: #f7f8fa;
    --ink: #1f2937;
    --muted: #5b6472;
    --line: #e2e6ec;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--paper);
    color: var(--ink);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}

.container-narrow {
    width: 90%;
    max-width: 760px;
    margin: 0 auto;
}

/* ---------- Header do site (não aplica ao <header> do artigo) ---------- */

body > header {
    background-color: var(--primary);
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 1000;
}

body > header nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    gap: 20px;
}

.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 28px;
    list-style: none;
}

.nav-links a {
    color: var(--white);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    padding: 4px 0;
    position: relative;
    transition: color 0.3s ease;
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background-color: var(--secondary);
    transition: width 0.3s ease;
}

.nav-links a:hover {
    color: var(--secondary);
}

.nav-links a:hover::after,
.nav-links a[aria-current="page"]::after {
    width: 100%;
}

.nav-links a[aria-current="page"] {
    color: var(--secondary);
}

/* ---------- Cabeçalho de página ---------- */

.page-head {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 70px 0 60px;
    position: relative;
    overflow: hidden;
}

.page-head::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(147, 197, 253, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(147, 197, 253, 0.06) 1px, transparent 1px);
    background-size: 64px 64px;
    -webkit-mask-image: radial-gradient(75% 70% at 40% 40%, #000 0%, transparent 82%);
    mask-image: radial-gradient(75% 70% at 40% 40%, #000 0%, transparent 82%);
}

.page-head > * {
    position: relative;
    z-index: 1;
}

.page-head h1 {
    font-size: 2.8rem;
    line-height: 1.15;
    margin-bottom: 16px;
    background: linear-gradient(105deg, var(--white) 0%, #dbeafe 40%, var(--secondary) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.page-head p {
    font-size: 1.15rem;
    color: #d7e3f4;
    max-width: 640px;
}

/* ---------- Breadcrumb ---------- */

.breadcrumb {
    padding: 18px 0;
    font-size: 0.88rem;
    color: var(--muted);
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.breadcrumb a {
    color: var(--muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.breadcrumb li + li::before {
    content: '/';
    margin-right: 8px;
    color: #b6bdc7;
}

.breadcrumb [aria-current="page"] {
    color: var(--ink);
    font-weight: 600;
}

/* ---------- Grade de posts ---------- */

.posts {
    padding: 50px 0 80px;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 28px;
}

.post-card {
    display: flex;
    flex-direction: column;
    background-color: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 28px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
}

.post-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 14px 34px rgba(17, 24, 39, 0.1);
    border-color: rgba(229, 108, 25, 0.4);
}

.post-card h2,
.post-card h3 {
    font-size: 1.3rem;
    line-height: 1.35;
    margin: 14px 0 12px;
}

.post-card h2 a,
.post-card h3 a {
    color: var(--primary);
    text-decoration: none;
}

.post-card h2 a:hover,
.post-card h3 a:hover {
    color: var(--secondary);
}

.post-card p {
    color: var(--muted);
    font-size: 0.97rem;
    flex-grow: 1;
}

.tag {
    display: inline-block;
    padding: 5px 13px;
    border-radius: 20px;
    background-color: rgba(229, 108, 25, 0.12);
    color: #a8500f;
    font-size: 0.76rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
}

.post-meta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    font-size: 0.85rem;
    color: var(--muted);
}

.post-meta .dot::before {
    content: '•';
    margin: 0 2px;
}

.read-more {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 18px;
    color: var(--secondary);
    font-weight: 600;
    font-size: 0.94rem;
    text-decoration: none;
}

.read-more:hover {
    gap: 12px;
}

/* ---------- Artigo ---------- */

.article {
    background-color: var(--white);
    padding: 8px 0 70px;
}

.article-header {
    position: relative;
    padding: 32px 28px 28px;
    margin-bottom: 36px;
    background:
        linear-gradient(135deg, rgba(229, 108, 25, 0.08) 0%, transparent 42%),
        linear-gradient(180deg, #ffffff 0%, #f4f6f9 100%);
    border: 1px solid var(--line);
    border-left: 4px solid var(--secondary);
    border-radius: 14px;
    box-shadow: 0 8px 28px rgba(17, 24, 39, 0.05);
}

.article-header h1 {
    font-size: 2.35rem;
    line-height: 1.18;
    letter-spacing: -0.02em;
    color: var(--dark);
    margin: 16px 0 14px;
}

.article-lead {
    font-size: 1.16rem;
    line-height: 1.55;
    color: var(--ink);
    max-width: 42em;
}

.article-header .post-meta {
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--line);
    color: #4b5563;
}

.article-header .tag {
    background-color: rgba(229, 108, 25, 0.16);
    color: #9a3f0a;
}

.article-body {
    font-size: 1.07rem;
}

.article-body h2 {
    font-size: 1.65rem;
    line-height: 1.3;
    color: var(--primary);
    margin: 44px 0 16px;
    padding-top: 6px;
}

.article-body h3 {
    font-size: 1.24rem;
    color: var(--primary);
    margin: 32px 0 12px;
}

.article-body p {
    margin-bottom: 20px;
}

.article-body ul,
.article-body ol {
    margin: 0 0 22px 22px;
}

.article-body li {
    margin-bottom: 10px;
}

.article-body a {
    color: #b3540f;
    text-decoration: underline;
    text-underline-offset: 2px;
}

.article-body a:hover {
    color: var(--secondary);
}

.article-body strong {
    color: var(--primary);
}

.callout {
    border-left: 4px solid var(--secondary);
    background-color: #fdf6f0;
    border-radius: 0 10px 10px 0;
    padding: 20px 24px;
    margin: 30px 0;
}

.callout p:last-child {
    margin-bottom: 0;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin: 26px 0;
    font-size: 0.96rem;
}

.data-table caption {
    text-align: left;
    color: var(--muted);
    font-size: 0.88rem;
    padding-bottom: 8px;
}

.data-table th,
.data-table td {
    border: 1px solid var(--line);
    padding: 11px 14px;
    text-align: left;
}

.data-table th {
    background-color: #f2f4f7;
    color: var(--primary);
    font-weight: 700;
}

.toc {
    background-color: var(--paper);
    border: 1px solid var(--line);
    border-radius: 12px;
    padding: 22px 26px;
    margin-bottom: 36px;
}

.toc h2 {
    font-size: 0.82rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--muted);
    margin: 0 0 12px;
}

.toc ol {
    margin-left: 18px;
}

.toc li {
    margin-bottom: 6px;
}

.toc a {
    color: var(--primary);
    text-decoration: none;
}

.toc a:hover {
    color: var(--secondary);
    text-decoration: underline;
}

.sources {
    margin-top: 46px;
    padding-top: 26px;
    border-top: 1px solid var(--line);
    font-size: 0.93rem;
    color: var(--muted);
}

.sources h2 {
    font-size: 1.05rem;
    color: var(--primary);
    margin-bottom: 12px;
}

.sources ul {
    margin-left: 20px;
}

/* ---------- Artigos relacionados ---------- */

.related {
    background-color: var(--paper);
    padding: 60px 0;
    border-top: 1px solid var(--line);
}

.related h2 {
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 26px;
}

/* ---------- CTA ---------- */

.cta {
    background: linear-gradient(135deg, var(--primary) 0%, var(--dark) 100%);
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.cta h2 {
    font-size: 1.9rem;
    margin-bottom: 14px;
}

.cta p {
    color: #d7e3f4;
    max-width: 620px;
    margin: 0 auto 28px;
}

.btn {
    display: inline-block;
    padding: 13px 32px;
    background-color: var(--secondary);
    color: var(--dark);
    text-decoration: none;
    border-radius: 30px;
    font-weight: 600;
    border: 2px solid var(--secondary);
    transition: transform 0.3s ease, box-shadow 0.3s ease, background-color 0.3s ease, color 0.3s ease;
}

.btn:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 20px rgba(229, 108, 25, 0.3);
}

.btn-outline {
    background-color: transparent;
    color: var(--secondary);
}

.btn-outline:hover {
    background-color: var(--secondary);
    color: var(--dark);
}

/* ---------- Footer ---------- */

footer {
    background-color: var(--primary);
    color: var(--white);
    padding: 60px 0 26px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h2 {
    font-size: 1.2rem;
    margin-bottom: 20px;
    padding-bottom: 10px;
    position: relative;
}

.footer-col h2::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 50px;
    height: 2px;
    background-color: var(--secondary);
}

.footer-col > p {
    color: #ccc;
    margin-top: 20px;
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: #ccc;
    text-decoration: none;
    transition: color 0.3s ease, padding-left 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary);
    padding-left: 5px;
}

.footer-links i {
    color: var(--secondary);
    margin-right: 8px;
    font-size: 0.8rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 22px;
    text-align: center;
    font-size: 0.9rem;
    color: #999;
}

/* ---------- Responsivo ---------- */

@media (max-width: 860px) {
    .nav-links {
        gap: 18px;
        font-size: 0.9rem;
    }

    .page-head {
        padding: 50px 0 44px;
    }

    .page-head h1 {
        font-size: 2rem;
    }

    .article-header {
        padding: 26px 20px 22px;
    }

    .article-header h1 {
        font-size: 1.85rem;
    }

    .article-lead {
        font-size: 1.05rem;
    }

    .article-body h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 560px) {
    body > header nav {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .nav-links {
        flex-wrap: wrap;
        gap: 14px;
    }

    .article-header {
        padding: 22px 16px 20px;
        border-radius: 12px;
    }

    .article-header h1 {
        font-size: 1.6rem;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .data-table {
        display: block;
        overflow-x: auto;
    }
}
