/* ==========================================================================
   PragmaSoft Blog — public frontend
   ========================================================================== */

:root {
    --primary: #54AA32;
    --primary-dark: #408524;
    --primary-soft: #eaf6e3;
    --text: #1f2937;
    --text-soft: #374151;
    --muted: #6b7280;
    --bg: #ffffff;
    --bg-soft: #f9fafb;
    --bg-section: #f3f6f4;
    --border: #e5e7eb;
    --border-soft: #f1f5f9;
    --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
    --shadow: 0 4px 18px rgba(15, 23, 42, 0.06);
    --shadow-lg: 0 18px 40px rgba(15, 23, 42, 0.08);
    --radius: 14px;
    --radius-sm: 8px;
    --font-body: 'Inter', system-ui, -apple-system, Segoe UI, Roboto, sans-serif;
    --font-heading: 'Poppins', 'Inter', system-ui, sans-serif;
    --container: 1280px;
    --header-h: 72px;
}

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

html { -webkit-text-size-adjust: 100%; }
body {
    margin: 0;
    font-family: var(--font-body);
    color: var(--text);
    background: var(--bg);
    font-size: 16px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: #0f172a;
    margin: 0 0 0.6em;
    line-height: 1.25;
    font-weight: 700;
    letter-spacing: -0.01em;
}

p { margin: 0 0 1em; }
a { color: var(--primary); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--primary-dark); }
img { max-width: 100%; height: auto; display: block; }

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

.container {
    width: 100%;
    max-width: var(--container);
    margin: 0 auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* --------------------------------------------------------------------------
   Header
   -------------------------------------------------------------------------- */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: saturate(180%) blur(10px);
    -webkit-backdrop-filter: saturate(180%) blur(10px);
    border-bottom: 1px solid transparent;
    z-index: 50;
    transition: box-shadow .2s ease, border-color .2s ease, background .2s ease;
}
.site-header.is-scrolled {
    box-shadow: var(--shadow);
    border-bottom-color: var(--border);
}
.site-header__inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: var(--header-h);
}

.site-logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.35rem;
    color: #0f172a;
    letter-spacing: -0.02em;
    display: inline-flex;
    align-items: baseline;
}
.site-logo__mark { color: #0f172a; }
.site-logo__accent { color: var(--primary); }
.site-logo--footer { color: #fff; font-size: 1.4rem; margin-bottom: 1rem; }
.site-logo--footer .site-logo__mark { color: #fff; }

.site-nav {
    display: flex;
    align-items: center;
    gap: 1.6rem;
}
.site-nav a {
    color: var(--text-soft);
    font-weight: 500;
    font-size: 0.95rem;
    padding: 0.3rem 0;
    position: relative;
    transition: color .15s ease;
}
.site-nav a:hover { color: var(--primary); }
.site-nav a.is-active {
    color: var(--primary);
}
.site-nav a.is-active::after {
    content: "";
    position: absolute;
    left: 0; right: 0; bottom: -4px;
    height: 2px;
    background: var(--primary);
    border-radius: 2px;
}
.site-nav .nav-cta {
    background: var(--primary);
    color: #fff !important;
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(84, 170, 50, 0.3);
}
.site-nav .nav-cta:hover {
    background: var(--primary-dark);
    color: #fff !important;
    box-shadow: 0 6px 16px rgba(84, 170, 50, 0.4);
}

.nav-toggle {
    display: none;
    width: 42px; height: 42px;
    padding: 0;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 8px;
    cursor: pointer;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 4px;
}
.nav-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: #0f172a;
    border-radius: 2px;
}

.site-main {
    padding-top: var(--header-h);
    min-height: calc(100vh - var(--header-h));
}

/* --------------------------------------------------------------------------
   Blog hero
   -------------------------------------------------------------------------- */
.blog-hero {
    padding: 5rem 0 3.5rem;
    background:
        radial-gradient(60% 60% at 80% 0%, rgba(84, 170, 50, 0.10), transparent 60%),
        linear-gradient(180deg, var(--primary-soft) 0%, #ffffff 100%);
    border-bottom: 1px solid var(--border-soft);
}
.blog-hero__eyebrow {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1rem;
}
.blog-hero__title {
    font-size: clamp(2rem, 5vw, 3.4rem);
    margin: 0 0 0.6rem;
    color: #0f172a;
}
.blog-hero__title .accent { color: var(--primary); }
.blog-hero__sub {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--muted);
    max-width: 720px;
    margin: 0;
}

.blog-hero--cat {
    background:
        linear-gradient(180deg, rgba(84,170,50,0.06) 0%, #ffffff 100%);
}
.blog-hero--cat .blog-hero__eyebrow {
    background: var(--cat-color, var(--primary));
}

/* --------------------------------------------------------------------------
   Layout principal
   -------------------------------------------------------------------------- */
.blog-wrap { padding: 3rem 0 4rem; }
.blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 8fr) minmax(0, 4fr);
    gap: 3rem;
    align-items: start;
}
.blog-main { min-width: 0; }

.section-title {
    font-size: clamp(1.5rem, 2.6vw, 1.9rem);
    margin: 2.5rem 0 1.5rem;
}

/* --------------------------------------------------------------------------
   Cards
   -------------------------------------------------------------------------- */
.cat-badge {
    display: inline-block;
    color: #fff;
    font-size: 0.74rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    padding: 0.3rem 0.7rem;
    border-radius: 999px;
    text-decoration: none;
    background-color: var(--primary);
    line-height: 1;
}
.cat-badge:hover { color: #fff; opacity: 0.92; }
.cat-badge--overlay {
    position: absolute;
    top: 1rem;
    left: 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.18);
}

.featured-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow);
    margin-bottom: 3rem;
    display: grid;
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
}
.featured-card__media {
    position: relative;
    display: block;
    aspect-ratio: 16/10;
    background: var(--bg-soft);
    overflow: hidden;
}
.featured-card__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .4s ease;
}
.featured-card__media:hover img { transform: scale(1.03); }

.featured-card__body {
    padding: 2rem 2rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.featured-card__title {
    font-size: clamp(1.4rem, 2.3vw, 1.9rem);
    margin: 0.8rem 0 0.6rem;
    line-height: 1.2;
}
.featured-card__title a { color: #0f172a; }
.featured-card__title a:hover { color: var(--primary); }
.featured-card__excerpt {
    color: var(--text-soft);
    margin: 0 0 1rem;
}
.featured-card__meta {
    color: var(--muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 1.25rem;
}

/* Grid */
.post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 2rem;
}

.post-card {
    background: #fff;
    border: 1px solid var(--border-soft);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    transition: transform .25s ease, box-shadow .25s ease;
}
.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}
.post-card__media {
    display: block;
    aspect-ratio: 16/9;
    overflow: hidden;
    background: var(--bg-soft);
}
.post-card__media img {
    width: 100%; height: 100%; object-fit: cover;
    transition: transform .35s ease;
}
.post-card:hover .post-card__media img { transform: scale(1.05); }

.post-card__body {
    padding: 1.25rem 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    flex: 1;
}
.post-card__title {
    font-size: 1.15rem;
    margin: 0.4rem 0 0;
    line-height: 1.3;
}
.post-card__title a { color: #0f172a; }
.post-card__title a:hover { color: var(--primary); }
.post-card__excerpt {
    color: var(--text-soft);
    font-size: 0.93rem;
    margin: 0;
    flex: 1;
}
.post-card__meta {
    color: var(--muted);
    font-size: 0.84rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

/* --------------------------------------------------------------------------
   Botões
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    padding: 0.75rem 1.35rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.95rem;
    border: 1px solid transparent;
    cursor: pointer;
    text-decoration: none;
    transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
    line-height: 1;
}
.btn--primary {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 6px 16px rgba(84, 170, 50, 0.28);
}
.btn--primary:hover {
    background: var(--primary-dark);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(84, 170, 50, 0.34);
}
.btn--outline {
    background: #fff;
    color: var(--primary);
    border-color: var(--primary);
}
.btn--outline:hover {
    background: var(--primary-soft);
    color: var(--primary-dark);
}
.btn--block { width: 100%; }

/* --------------------------------------------------------------------------
   Paginação
   -------------------------------------------------------------------------- */
.pagination {
    margin: 3rem 0 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}
.pagination a {
    background: #fff;
    border: 1px solid var(--border);
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    color: var(--text-soft);
    font-weight: 600;
}
.pagination a:hover {
    border-color: var(--primary);
    color: var(--primary);
}
.pagination .is-disabled {
    padding: 0.55rem 1.1rem;
    color: #cbd5e1;
    font-weight: 600;
}
.pagination__current {
    color: var(--muted);
    font-size: 0.95rem;
}

/* --------------------------------------------------------------------------
   Sidebar
   -------------------------------------------------------------------------- */
.blog-sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: calc(var(--header-h) + 1.5rem);
    align-self: start;
}
.sidebar-card {
    background: #fff;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.sidebar-card__title {
    font-size: 1.05rem;
    margin: 0 0 1rem;
    color: #0f172a;
}

.cat-list {
    list-style: none;
    margin: 0; padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}
.cat-list a {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.55rem 0.7rem;
    border-radius: 8px;
    color: var(--text-soft);
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
.cat-list a:hover {
    background: var(--bg-soft);
    color: var(--primary);
}
.cat-list__dot {
    width: 10px; height: 10px; border-radius: 50%; flex: 0 0 10px;
    box-shadow: 0 0 0 2px rgba(0,0,0,0.04);
}
.cat-list__name { flex: 1; }
.cat-list__count {
    color: var(--muted);
    background: var(--bg-soft);
    padding: 0.15rem 0.55rem;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

.popular-list {
    list-style: none;
    margin: 0; padding: 0;
    counter-reset: pop;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}
.popular-list li {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}
.popular-list__rank {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--primary);
    line-height: 1;
    width: 1.6rem;
    flex: 0 0 1.6rem;
}
.popular-list a {
    color: var(--text-soft);
    font-weight: 500;
    font-size: 0.95rem;
    line-height: 1.35;
}
.popular-list a:hover { color: var(--primary); }

.cta-card {
    background:
        radial-gradient(80% 80% at 0% 0%, rgba(84,170,50,0.18), transparent 65%),
        linear-gradient(140deg, #ffffff 0%, var(--primary-soft) 100%);
    border-color: rgba(84,170,50,0.25);
}
.cta-card__pill {
    display: inline-block;
    background: var(--primary);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.25rem 0.7rem;
    border-radius: 999px;
    margin-bottom: 0.75rem;
}
.cta-card h3 {
    font-size: 1.15rem;
    line-height: 1.25;
    margin: 0 0 0.6rem;
}
.cta-card p { color: var(--text-soft); font-size: 0.93rem; }
.cta-card .btn {
    margin-top: 0.4rem;
    animation: cta-pulse 2.6s ease-in-out infinite;
}
@keyframes cta-pulse {
    0%, 100% { box-shadow: 0 6px 16px rgba(84, 170, 50, 0.28); }
    50% { box-shadow: 0 6px 22px rgba(84, 170, 50, 0.5); }
}

.newsletter-card p { color: var(--text-soft); font-size: 0.92rem; }
.newsletter-form {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}
.newsletter-form input {
    width: 100%;
    padding: 0.7rem 0.9rem;
    border: 1px solid var(--border);
    border-radius: 8px;
    font: inherit;
    background: #fff;
    color: var(--text);
}
.newsletter-form input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(84, 170, 50, 0.18);
}
.newsletter-form__msg {
    font-size: 0.85rem;
    color: var(--muted);
    margin: 0.3rem 0 0;
    min-height: 1.2em;
}

/* --------------------------------------------------------------------------
   Post page
   -------------------------------------------------------------------------- */
.post-page { background: #fff; }
.post-header {
    padding: 2.5rem 0 1.5rem;
    background: linear-gradient(180deg, var(--primary-soft) 0%, #ffffff 100%);
}
.breadcrumbs {
    font-size: 0.85rem;
    color: var(--muted);
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-bottom: 1.2rem;
}
.breadcrumbs a { color: var(--text-soft); font-weight: 500; }
.breadcrumbs a:hover { color: var(--primary); }
.breadcrumbs .is-current { color: #0f172a; font-weight: 600; }

.post-title {
    font-size: clamp(1.9rem, 4.2vw, 3rem);
    line-height: 1.15;
    margin: 1rem 0 1.25rem;
    color: #0f172a;
    max-width: 980px;
}
.post-meta {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
    color: var(--muted);
    font-size: 0.95rem;
}
.post-meta strong { color: #0f172a; }

.post-hero-image {
    margin: 2rem auto 1rem;
    aspect-ratio: 16/8;
    overflow: hidden;
    border-radius: var(--radius);
    background: var(--bg-soft);
}
.post-hero-image img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* Post content typography */
.post-content {
    font-size: 1.07rem;
    line-height: 1.85;
    color: var(--text-soft);
    max-width: 100%;
}
.post-content > * { max-width: 760px; margin-left: auto; margin-right: auto; }
.post-content > .inline-cta, .post-content > figure, .post-content > img, .post-content > .full-width {
    max-width: 100%;
}
.post-content h2 {
    font-size: clamp(1.45rem, 2.4vw, 1.85rem);
    margin: 2.2rem auto 1rem;
    color: #0f172a;
}
.post-content h3 {
    font-size: clamp(1.2rem, 1.8vw, 1.5rem);
    margin: 1.8rem auto 0.8rem;
    color: #0f172a;
}
.post-content h4 { font-size: 1.15rem; margin: 1.5rem auto 0.6rem; color: #0f172a; }
.post-content p { margin: 0 auto 1.4em; }
.post-content a {
    color: var(--primary);
    text-decoration: none;
    border-bottom: 1px solid rgba(84, 170, 50, 0.35);
    transition: color .15s ease, border-color .15s ease;
}
.post-content a:hover { color: var(--primary-dark); border-bottom-color: var(--primary-dark); }
.post-content ul, .post-content ol {
    padding-left: 1.4rem;
    margin: 0 auto 1.4em;
}
.post-content ul { list-style: disc; }
.post-content ol { list-style: decimal; }
.post-content li { margin-bottom: 0.5em; }
.post-content blockquote {
    margin: 1.6em auto;
    padding: 1rem 1.25rem;
    border-left: 4px solid var(--primary);
    background: var(--primary-soft);
    border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
    color: var(--text-soft);
    font-style: italic;
}
.post-content blockquote p:last-child { margin-bottom: 0; }
.post-content img {
    border-radius: var(--radius);
    margin: 1.5em auto;
    box-shadow: var(--shadow);
}
.post-content figure { margin: 1.5em auto; }
.post-content figcaption { color: var(--muted); font-size: 0.88rem; text-align: center; margin-top: 0.5rem; }
.post-content pre {
    background: #0f172a;
    color: #e2e8f0;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-sm);
    overflow-x: auto;
    font-size: 0.92rem;
    line-height: 1.55;
    margin: 1.5em auto;
}
.post-content code {
    background: var(--bg-soft);
    color: #0f172a;
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-size: 0.92em;
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
}
.post-content pre code { background: transparent; color: inherit; padding: 0; }
.post-content hr {
    border: none;
    border-top: 1px solid var(--border);
    margin: 2em auto;
    max-width: 760px;
}
.post-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 1.5em auto;
    font-size: 0.95rem;
}
.post-content th, .post-content td {
    border: 1px solid var(--border);
    padding: 0.6rem 0.8rem;
    text-align: left;
}
.post-content th { background: var(--bg-soft); }

/* Inline CTA dentro do post */
.inline-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 1.75rem 2rem;
    background:
        radial-gradient(60% 100% at 0% 0%, rgba(84,170,50,0.20), transparent 60%),
        linear-gradient(120deg, #ffffff 0%, var(--primary-soft) 100%);
    border: 1px solid rgba(84,170,50,0.25);
    border-radius: var(--radius);
    margin: 2.5em auto !important;
    max-width: 100% !important;
    box-shadow: var(--shadow);
}
.inline-cta__body { flex: 1 1 320px; min-width: 0; }
.inline-cta h3 { font-size: 1.25rem; margin: 0 0 0.4rem; color: #0f172a; line-height: 1.25; }
.inline-cta p { margin: 0; color: var(--text-soft); font-size: 0.97rem; }
.inline-cta .btn { animation: cta-pulse 2.6s ease-in-out infinite; flex: 0 0 auto; }
.inline-cta--final { margin-top: 3rem !important; }

/* --------------------------------------------------------------------------
   Related
   -------------------------------------------------------------------------- */
.related-section {
    background: var(--bg-section);
    padding: 4rem 0 5rem;
    margin-top: 2rem;
    border-top: 1px solid var(--border-soft);
}
.related-section .section-title { margin: 0 0 2rem; }

/* --------------------------------------------------------------------------
   Empty state
   -------------------------------------------------------------------------- */
.empty-state {
    text-align: center;
    padding: 4rem 1rem;
    background: #fff;
    border: 1px dashed var(--border);
    border-radius: var(--radius);
    color: var(--muted);
}
.empty-state h1, .empty-state h2 { color: #0f172a; }

/* --------------------------------------------------------------------------
   Footer
   -------------------------------------------------------------------------- */
.site-footer {
    background: #0f172a;
    color: #cbd5e1;
    padding: 4rem 0 1.5rem;
    margin-top: 5rem;
}
.site-footer a { color: #cbd5e1; }
.site-footer a:hover { color: var(--primary); }
.site-footer__grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}
.site-footer__brand p {
    max-width: 380px;
    color: #94a3b8;
    font-size: 0.95rem;
}
.site-footer__col h4 {
    color: #fff;
    font-size: 1rem;
    margin-bottom: 1rem;
}
.site-footer__col ul {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    font-size: 0.93rem;
}
.site-footer__bottom {
    border-top: 1px solid #1e293b;
    padding-top: 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: #64748b;
    font-size: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* --------------------------------------------------------------------------
   Responsivo
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .blog-layout {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
    .blog-sidebar {
        position: static;
        flex-direction: column;
    }
    .featured-card {
        grid-template-columns: 1fr;
    }
    .featured-card__media { aspect-ratio: 16/9; }
    .featured-card__body { padding: 1.5rem; }
}

@media (max-width: 860px) {
    .nav-toggle { display: inline-flex; }
    .site-nav {
        position: absolute;
        top: var(--header-h);
        left: 0; right: 0;
        flex-direction: column;
        align-items: stretch;
        background: #fff;
        border-bottom: 1px solid var(--border);
        padding: 1rem 1.5rem 1.25rem;
        gap: 0.25rem;
        box-shadow: var(--shadow);
        display: none;
    }
    .site-nav.is-open { display: flex; }
    .site-nav a {
        padding: 0.7rem 0;
        border-bottom: 1px solid var(--border-soft);
    }
    .site-nav a:last-child { border-bottom: none; }
    .site-nav a.is-active::after { display: none; }
    .site-nav .nav-cta { text-align: center; margin-top: 0.5rem; }

    .site-footer__grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }
}

@media (max-width: 768px) {
    .post-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
    }
    .blog-hero { padding: 3.5rem 0 2.5rem; }
    .blog-wrap { padding: 2rem 0 3rem; }
    .post-header { padding: 1.5rem 0 1rem; }
    .inline-cta { padding: 1.5rem; }
    .related-section { padding: 3rem 0 3.5rem; }
}

@media (max-width: 640px) {
    .post-grid {
        grid-template-columns: 1fr;
        gap: 1.25rem;
    }
    .container { padding-left: 1rem; padding-right: 1rem; }
    .featured-card__body { padding: 1.25rem; }
    .post-title { font-size: 1.9rem; }
    .pagination { justify-content: center; }
    .pagination__current { order: -1; width: 100%; text-align: center; }
}

/* Focus accessibility */
a:focus-visible, button:focus-visible, input:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* Correção: links de conteúdo não devem sobrescrever botões (verde sobre verde) */
.post-content a.btn,
.post-content .inline-cta a {
    color: #fff;
    border-bottom: none;
}
.post-content a.btn:hover,
.post-content .inline-cta a:hover {
    color: #fff;
    border-bottom: none;
}
