/*
Theme Name: Evonortio Blog
Theme URI: https://evonortio.com.br/blog/
Author: Evonortio
Author URI: https://evonortio.com.br/
Description: Tema oficial do blog da Evonortio.
Version: 1.0.0
Requires at least: 6.0
Requires PHP: 8.1
Text Domain: evonortio-blog
*/

:root {
    --ev-orange: #ff7a00;
    --ev-orange-light: #ffa51f;
    --ev-black: #111315;
    --ev-graphite: #2b2f33;
    --ev-gray: #8f969d;
    --ev-light: #f5f6f7;
    --ev-white: #ffffff;
    --ev-border: #e6e8ea;

    --ev-radius: 18px;
    --ev-container: 1180px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    background: var(--ev-white);
    color: var(--ev-black);
    font-family:
        Inter,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;
    line-height: 1.6;
}

img {
    max-width: 100%;
    height: auto;
}

a {
    color: inherit;
    text-decoration: none;
}

.ev-container {
    width: min(calc(100% - 40px), var(--ev-container));
    margin-inline: auto;
}

/* HEADER */

.site-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background: rgba(17, 19, 21, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.header-inner {
    min-height: 76px;
    display: flex;
    align-items: center;
    gap: 36px;
}

.brand {
    display: flex;
    align-items: center;
    margin-right: auto;
}

.brand img {
    width: 164px;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 28px;
}

.main-nav a {
    color: #d9dcdf;
    font-size: 15px;
    font-weight: 500;
    transition: 0.2s ease;
}

.main-nav a:hover {
    color: var(--ev-white);
}

.header-cta,
.cta-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 46px;
    padding: 0 22px;
    border-radius: 999px;
    background: var(--ev-orange);
    color: var(--ev-white);
    font-weight: 700;
    transition: 0.2s ease;
}

.header-cta:hover,
.cta-button:hover {
    transform: translateY(-1px);
    background: var(--ev-orange-light);
}

/* HERO */

.blog-hero {
    background:
        radial-gradient(
            circle at 75% 20%,
            rgba(255, 122, 0, 0.18),
            transparent 32%
        ),
        var(--ev-black);
    color: var(--ev-white);
    padding: 104px 0 112px;
}

.hero-content {
    max-width: 850px;
    margin-inline: auto;
    text-align: center;
}

.eyebrow {
    display: inline-block;
    margin-bottom: 18px;
    color: var(--ev-orange);
    font-size: 13px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: 0.11em;
}

.blog-hero h1 {
    max-width: 850px;
    margin: 0 auto;
    font-size: clamp(42px, 6vw, 70px);
    line-height: 1.02;
    letter-spacing: -0.04em;
}

.blog-hero p {
    max-width: 710px;
    margin: 24px auto 0;
    color: #b9bec3;
    font-size: 19px;
}

/* POSTS */

.posts-section {
    padding: 96px 0;
    background: var(--ev-light);
}

.section-heading {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 30px;
    margin-bottom: 38px;
}

.section-heading h2 {
    margin: 0;
    font-size: clamp(32px, 4vw, 48px);
    line-height: 1.08;
    letter-spacing: -0.035em;
}

.posts-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 26px;
}

.post-card {
    overflow: hidden;
    background: var(--ev-white);
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 18px 45px rgba(17, 19, 21, 0.08);
}

.card-image {
    display: block;
    aspect-ratio: 16 / 9;
    overflow: hidden;
    background: #e5e7e9;
}

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

.post-card:hover .card-image img {
    transform: scale(1.025);
}

.card-content {
    padding: 25px;
}

.card-meta {
    margin-bottom: 10px;
    color: var(--ev-orange);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.card-content h2 {
    margin: 0;
    font-size: 23px;
    line-height: 1.18;
    letter-spacing: -0.025em;
}

.card-content h2 a:hover {
    color: var(--ev-orange);
}

.card-excerpt {
    margin-top: 14px;
    color: #666c72;
    font-size: 15px;
}

.card-excerpt p {
    margin: 0;
}

.read-more {
    display: inline-flex;
    margin-top: 18px;
    color: var(--ev-black);
    font-weight: 700;
}

.read-more:hover {
    color: var(--ev-orange);
}

.empty-state {
    padding: 70px 30px;
    text-align: center;
    background: var(--ev-white);
    border: 1px solid var(--ev-border);
    border-radius: var(--ev-radius);
}

.empty-state h2 {
    margin-top: 0;
}

/* CTA */

.commercial-cta {
    padding: 90px 0;
    background: var(--ev-white);
}

.commercial-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 50px;
    padding: 52px;
    border-radius: 26px;
    background: var(--ev-black);
    color: var(--ev-white);
}

.commercial-box > div {
    max-width: 720px;
}

.commercial-box h2 {
    margin: 0;
    font-size: clamp(30px, 4vw, 46px);
    line-height: 1.07;
    letter-spacing: -0.035em;
}

.commercial-box p {
    margin: 18px 0 0;
    color: #b9bec3;
    font-size: 17px;
}

/* FOOTER */

.site-footer {
    background: var(--ev-black);
    color: var(--ev-white);
    padding-top: 68px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    gap: 70px;
    padding-bottom: 62px;
}

.footer-logo {
    width: 170px;
    margin-bottom: 20px;
}

.footer-grid p {
    max-width: 460px;
    margin: 0;
    color: #979da3;
}

.footer-grid strong {
    display: block;
    margin-bottom: 18px;
}

.footer-grid a {
    display: block;
    width: fit-content;
    margin-top: 10px;
    color: #aeb3b8;
}

.footer-grid a:hover {
    color: var(--ev-orange);
}

.footer-bottom {
    padding: 22px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    color: #7f858b;
    font-size: 14px;
}

/* PAGINATION */

.pagination {
    margin-top: 50px;
}

.pagination .nav-links {
    display: flex;
    gap: 8px;
}

.pagination .page-numbers {
    min-width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: var(--ev-white);
    border: 1px solid var(--ev-border);
}

.pagination .current {
    background: var(--ev-black);
    color: var(--ev-white);
}

/* MOBILE */

@media (max-width: 900px) {
    .main-nav {
        display: none;
    }

    .posts-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .commercial-box {
        align-items: flex-start;
        flex-direction: column;
    }

    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 640px) {
    .ev-container {
        width: min(calc(100% - 28px), var(--ev-container));
    }

    .header-inner {
        min-height: 68px;
    }

    .brand img {
        width: 144px;
    }

    .header-cta {
        min-height: 42px;
        padding-inline: 17px;
        font-size: 14px;
    }

    .blog-hero {
        padding: 76px 0 82px;
    }

    .blog-hero h1 {
        font-size: 42px;
    }

    .blog-hero p {
        font-size: 17px;
    }

    .posts-section {
        padding: 68px 0;
    }

    .posts-grid {
        grid-template-columns: 1fr;
    }

    .commercial-cta {
        padding: 60px 0;
    }

    .commercial-box {
        padding: 34px 26px;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 38px;
    }
}

/* =========================================
   ARTIGO INDIVIDUAL
   ========================================= */

.article-header {
    padding: 90px 0 54px;
    background: var(--ev-white);
}

.article-container {
    width: min(calc(100% - 40px), 820px);
    margin-inline: auto;
}

.article-meta {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 22px;
    color: var(--ev-gray);
    font-size: 14px;
}

.article-category {
    color: var(--ev-orange);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.07em;
}

.article-header h1 {
    margin: 0;
    color: var(--ev-black);
    font-size: clamp(42px, 6vw, 68px);
    line-height: 1.03;
    letter-spacing: -0.045em;
}

.article-description {
    margin: 24px 0 0;
    color: #666c72;
    font-size: 20px;
    line-height: 1.55;
}

.article-featured {
    margin: 0 0 62px;
    overflow: hidden;
    border-radius: 22px;
    background: var(--ev-light);
}

.article-featured img {
    width: 100%;
    display: block;
}

.article-layout {
    padding-bottom: 80px;
}

.article-content {
    color: #25292d;
    font-size: 18px;
    line-height: 1.78;
}

.article-content > *:first-child {
    margin-top: 0;
}

.article-content p {
    margin: 0 0 24px;
}

.article-content h2 {
    margin: 58px 0 20px;
    color: var(--ev-black);
    font-size: 34px;
    line-height: 1.16;
    letter-spacing: -0.03em;
}

.article-content h3 {
    margin: 42px 0 16px;
    color: var(--ev-black);
    font-size: 25px;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.article-content ul,
.article-content ol {
    margin: 0 0 26px;
    padding-left: 26px;
}

.article-content li {
    margin-bottom: 9px;
}

.article-content a {
    color: var(--ev-orange);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.article-content blockquote {
    margin: 38px 0;
    padding: 8px 0 8px 24px;
    border-left: 4px solid var(--ev-orange);
    color: #555b61;
    font-size: 20px;
}

.article-content img {
    border-radius: 16px;
}

.article-content figure {
    margin: 36px 0;
}

.article-content figcaption {
    margin-top: 10px;
    color: var(--ev-gray);
    font-size: 14px;
    text-align: center;
}

/* ARTICLE TABLES */

.article-content table {
    width: 100%;
    margin: 34px 0;
    border-collapse: collapse;
    font-size: 16px;
}

.article-content th,
.article-content td {
    padding: 14px 16px;
    border: 1px solid var(--ev-border);
    text-align: left;
    vertical-align: top;
}

.article-content th {
    background: var(--ev-light);
    color: var(--ev-black);
}

/* ARTICLE CTA */

.article-cta {
    padding: 0 0 90px;
}

.article-cta-box {
    width: min(calc(100% - 40px), 960px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 42px;
    padding: 46px;
    border-radius: 24px;
    background: var(--ev-black);
    color: var(--ev-white);
}

.article-cta-box > div {
    max-width: 620px;
}

.article-cta-box h2 {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -0.03em;
}

.article-cta-box p {
    margin: 16px 0 0;
    color: #b9bec3;
}

/* RELATED POSTS */

.related-posts {
    padding: 90px 0;
    background: var(--ev-light);
}

/* MOBILE ARTICLE */

@media (max-width: 700px) {

    .article-container {
        width: min(calc(100% - 28px), 820px);
    }

    .article-header {
        padding: 64px 0 38px;
    }

    .article-header h1 {
        font-size: 40px;
    }

    .article-description {
        font-size: 18px;
    }

    .article-featured {
        margin-bottom: 44px;
        border-radius: 16px;
    }

    .article-content {
        font-size: 17px;
    }

    .article-content h2 {
        margin-top: 46px;
        font-size: 29px;
    }

    .article-content h3 {
        font-size: 23px;
    }

    .article-content table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }

    .article-cta {
        padding-bottom: 64px;
    }

    .article-cta-box {
        width: min(calc(100% - 28px), 960px);
        flex-direction: column;
        align-items: flex-start;
        padding: 32px 26px;
    }

    .article-cta-box h2 {
        font-size: 29px;
    }

    .related-posts {
        padding: 64px 0;
    }
}

/* CONTRASTE DA LOGO NO HEADER */

.site-header .brand {
    display: inline-flex;
    align-items: center;
    padding: 8px 12px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.96);
    transition: background 0.2s ease;
}

.site-header .brand:hover {
    background: #ffffff;
}

.site-header .brand img {
    width: 164px;
    display: block;
}

@media (max-width: 640px) {
    .site-header .brand {
        padding: 7px 10px;
        border-radius: 10px;
    }

    .site-header .brand img {
        width: 144px;
    }
}

/* AJUSTE FINAL DA LOGO NO HEADER */

.site-header .brand {
    padding: 0;
    background: transparent !important;
    border-radius: 0;
}

.site-header .brand:hover {
    background: transparent !important;
}

.site-header .brand img {
    width: 164px;
    display: block;
}

@media (max-width: 640px) {
    .site-header .brand {
        padding: 0;
    }

    .site-header .brand img {
        width: 144px;
    }
}

/* REFINAMENTO DE LEITURA DOS ARTIGOS */

.article-content {
    max-width: 760px;
    margin-inline: auto;
}

.article-content p {
    margin-bottom: 26px;
}

.article-content h2 {
    margin-top: 64px;
    margin-bottom: 22px;
}

.article-content h3 {
    margin-top: 44px;
    margin-bottom: 16px;
}

.article-content strong {
    color: var(--ev-black);
    font-weight: 700;
}
