/* ==========================================================
   ELDER ALVES ADVOCACIA
   BLOG.CSS
   ----------------------------------------------------------
   Estilos para:
   - Página do blog
   - Listagem de posts
   - Página individual do artigo
   - Sidebar do blog
   - Cards finais do single
   - Correção full width no GeneratePress
========================================================== */


/* ==========================================================
   REMOVE HEADER PADRÃO DO GENERATEPRESS NO BLOG
========================================================== */

body.blog .site-header,
body.blog .main-navigation,
body.blog .secondary-navigation,
body.blog .inside-header,
body.blog .site-branding,
body.blog .site-logo,
body.blog .site-description,
body.blog .site-title,
body.blog .page-header,
body.blog .entry-header,
body.blog .entry-title,
body.blog .page-title,
body.single-post .site-header,
body.single-post .main-navigation,
body.single-post .secondary-navigation,
body.single-post .inside-header,
body.single-post .site-branding,
body.single-post .site-logo,
body.single-post .site-description,
body.single-post .site-title,
body.single-post .page-header,
body.single-post .entry-header,
body.single-post .entry-title,
body.single-post .page-title,
body.archive .site-header,
body.archive .main-navigation,
body.archive .secondary-navigation,
body.archive .inside-header,
body.archive .site-branding,
body.archive .site-logo,
body.archive .site-description,
body.archive .site-title,
body.archive .page-header,
body.archive .entry-header,
body.archive .entry-title,
body.archive .page-title,
body.search .site-header,
body.search .main-navigation,
body.search .secondary-navigation,
body.search .inside-header,
body.search .site-branding,
body.search .site-logo,
body.search .site-description,
body.search .site-title,
body.search .page-header,
body.search .entry-header,
body.search .entry-title,
body.search .page-title {
    display: none !important;
}


/* ==========================================================
   FULL WIDTH BLOG / SINGLE POST
   Corrige barra azul e footer ocupando 100% da tela
========================================================== */

body.blog .site,
body.blog #page,
body.blog #content,
body.blog .site-content,
body.blog .content-area,
body.blog .site-main,
body.blog .inside-article,
body.blog .entry-content,
body.blog article,
body.blog .post,
body.single-post .site,
body.single-post #page,
body.single-post #content,
body.single-post .site-content,
body.single-post .content-area,
body.single-post .site-main,
body.single-post .inside-article,
body.single-post .entry-content,
body.single-post article,
body.single-post .post,
body.archive .site,
body.archive #page,
body.archive #content,
body.archive .site-content,
body.archive .content-area,
body.archive .site-main,
body.archive .inside-article,
body.archive .entry-content,
body.archive article,
body.archive .post,
body.search .site,
body.search #page,
body.search #content,
body.search .site-content,
body.search .content-area,
body.search .site-main,
body.search .inside-article,
body.search .entry-content,
body.search article,
body.search .post {
    width: 100% !important;
    max-width: 100% !important;
}

body.blog .inside-article,
body.blog .entry-content,
body.blog .site-main,
body.blog .content-area,
body.blog #primary,
body.single-post .inside-article,
body.single-post .entry-content,
body.single-post .site-main,
body.single-post .content-area,
body.single-post #primary,
body.archive .inside-article,
body.archive .entry-content,
body.archive .site-main,
body.archive .content-area,
body.archive #primary,
body.search .inside-article,
body.search .entry-content,
body.search .site-main,
body.search .content-area,
body.search #primary {
    margin: 0 !important;
    padding: 0 !important;
}

.ea-blog-page,
.ea-single-post-page {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    overflow-x: hidden;
}

.ea-blog-hero,
.ea-single-hero,
.ea-blog-list-section,
.ea-single-content-section,
.ea-footer,
.ea-custom-footer,
footer.ea-footer,
footer.ea-custom-footer {
    width: 100vw !important;
    max-width: 100vw !important;
    margin-left: calc(50% - 50vw) !important;
    margin-right: calc(50% - 50vw) !important;
}


/* ==========================================================
   BASE BLOG
========================================================== */

.ea-blog-page,
.ea-single-post-page {
    background: var(--white);
}

.ea-blog-hero,
.ea-single-hero {
    padding: 178px 0 82px;
    background:
        radial-gradient(circle at 8% 0%, rgba(198, 163, 106, 0.14), transparent 28%),
        linear-gradient(135deg, var(--ea-navy-950), var(--ea-navy-800));
    color: var(--white);
    text-align: center;
    position: relative;
    overflow: hidden;
}

.ea-blog-hero::after,
.ea-single-hero::after {
    content: "";
    position: absolute;
    right: -140px;
    bottom: -220px;
    width: 520px;
    height: 520px;
    border-radius: 999px;
    background: rgba(198, 163, 106, 0.07);
    pointer-events: none;
}

.ea-blog-hero .ea-container,
.ea-single-hero .ea-container-sm {
    position: relative;
    z-index: 2;
}

.ea-blog-hero span,
.ea-single-hero .ea-blog-category {
    display: inline-block;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    font-size: 0.78rem;
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 16px;
}

.ea-blog-hero h1,
.ea-single-hero h1 {
    max-width: 920px;
    margin: 0 auto;
    color: var(--white);
    font-size: clamp(2.6rem, 5vw, 4.5rem);
    line-height: 1.05;
    letter-spacing: -0.055em;
}

.ea-blog-hero p {
    max-width: 760px;
    margin: 22px auto 0;
    color: rgba(255, 255, 255, 0.78);
    font-size: 1.08rem;
    line-height: 1.65;
}

.ea-single-meta {
    margin-top: 20px;
    color: rgba(255, 255, 255, 0.72);
    font-size: 0.95rem;
}


/* ==========================================================
   LAYOUT BLOG / LISTAGEM
========================================================== */

.ea-blog-list-section {
    padding: 86px 0;
    background: var(--ea-gray-50);
}

.ea-blog-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 42px;
    align-items: start;
}

.ea-blog-posts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 28px;
}


/* ==========================================================
   CARD LISTAGEM
========================================================== */

.ea-blog-list-card {
    overflow: hidden;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid #e8e2d8;
    box-shadow: 0 14px 34px rgba(5, 19, 34, 0.06);
    transition:
        transform var(--transition),
        box-shadow var(--transition),
        border-color var(--transition);
}

.ea-blog-list-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(5, 19, 34, 0.10);
    border-color: rgba(198, 163, 106, 0.42);
}

.ea-blog-list-image {
    display: block;
    overflow: hidden;
}

.ea-blog-list-image img {
    width: 100%;
    height: 260px;
    object-fit: cover;
    display: block;
    transition: transform 0.45s ease;
}

.ea-blog-list-card:hover img {
    transform: scale(1.05);
}

.ea-blog-list-content {
    padding: 28px;
}

.ea-blog-category {
    display: inline-block;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 10px;
}

.ea-blog-list-content h2 {
    color: var(--primary);
    font-size: 1.45rem;
    line-height: 1.22;
    letter-spacing: -0.025em;
    margin-bottom: 12px;
}

.ea-blog-list-content h2 a {
    color: inherit;
    text-decoration: none !important;
}

.ea-blog-list-content h2 a:hover {
    color: var(--gold);
}

.ea-blog-meta {
    color: var(--text-light);
    font-size: 0.84rem;
    margin-bottom: 16px;
}

.ea-blog-list-content p {
    color: var(--text-light);
    font-size: 0.96rem;
    line-height: 1.65;
    margin-bottom: 20px;
}

.ea-blog-read-more {
    color: var(--primary);
    font-size: 0.92rem;
    font-weight: 900;
    text-decoration: none !important;
}

.ea-blog-read-more:hover {
    color: var(--gold);
}


/* ==========================================================
   SIDEBAR BLOG
========================================================== */

.ea-blog-sidebar {
    display: grid;
    gap: 24px;
}

.ea-sidebar-card {
    padding: 28px;
    border-radius: 18px;
    background: var(--white);
    border: 1px solid #e8e2d8;
    box-shadow: 0 12px 30px rgba(5, 19, 34, 0.05);
}

.ea-sidebar-card h3 {
    color: var(--primary);
    font-size: 1.28rem;
    line-height: 1.2;
    margin-bottom: 18px;
}

.ea-sidebar-card ul {
    display: grid;
    gap: 14px;
    margin: 0;
    padding: 0;
}

.ea-sidebar-card li {
    list-style: none;
    padding-bottom: 14px;
    border-bottom: 1px solid var(--ea-gray-100);
}

.ea-sidebar-card li:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.ea-sidebar-card a {
    color: var(--primary);
    font-size: 0.94rem;
    line-height: 1.45;
    font-weight: 800;
    text-decoration: none !important;
}

.ea-sidebar-card a:hover {
    color: var(--gold);
}

.ea-sidebar-search form {
    display: grid;
    gap: 12px;
}

.ea-sidebar-search input {
    width: 100%;
    border: 1px solid var(--border);
    border-radius: 12px;
    background: var(--ea-gray-50);
    padding: 14px 16px;
    color: var(--text);
    outline: none;
}

.ea-sidebar-search input:focus {
    border-color: var(--gold);
    box-shadow: 0 0 0 4px rgba(198, 163, 106, 0.14);
}

.ea-sidebar-search button {
    width: 100%;
    border: 0;
    border-radius: 12px;
    background: var(--primary);
    color: var(--white);
    padding: 14px 18px;
    font-weight: 900;
}

.ea-sidebar-search button:hover {
    background: var(--gold);
}

.ea-sidebar-cta {
    background:
        radial-gradient(circle at 100% 0%, rgba(198, 163, 106, 0.16), transparent 34%),
        linear-gradient(135deg, var(--ea-navy-950), var(--ea-navy-800));
    color: var(--white);
}

.ea-sidebar-cta span {
    display: inline-block;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-size: 0.72rem;
    font-weight: 900;
    margin-bottom: 10px;
}

.ea-sidebar-cta h3 {
    color: var(--white);
    font-size: 1.35rem;
    margin-bottom: 22px;
}

.ea-sidebar-cta .ea-btn {
    width: 100%;
}


/* ==========================================================
   PAGINAÇÃO
========================================================== */

.ea-blog-pagination {
    margin-top: 48px;
}

.ea-blog-pagination .nav-links {
    display: flex;
    justify-content: center;
    gap: 10px;
    flex-wrap: wrap;
}

.ea-blog-pagination .page-numbers {
    min-width: 42px;
    height: 42px;
    padding: 0 14px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid #e8e2d8;
    color: var(--primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    text-decoration: none !important;
}

.ea-blog-pagination .page-numbers.current,
.ea-blog-pagination .page-numbers:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
}


/* ==========================================================
   SINGLE POST
========================================================== */

.ea-single-content-section {
    padding: 86px 0;
    background: var(--ea-gray-50);
}

.ea-single-featured-image {
    margin-top: -46px;
    position: relative;
    z-index: 4;
    border-radius: 22px;
    overflow: hidden;
    box-shadow: var(--shadow-medium);
}

.ea-single-featured-image img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    display: block;
}

/* Artigo centralizado, sem sidebar */
.ea-single-content {
    max-width: 900px;
    margin: 0 auto;
    padding: 46px 52px;
    border-radius: 22px;
    background: var(--white);
    border: 1px solid #e8e2d8;
    box-shadow: 0 14px 34px rgba(5, 19, 34, 0.06);
}

.ea-single-content h2,
.ea-single-content h3,
.ea-single-content h4 {
    color: var(--primary);
    line-height: 1.2;
    letter-spacing: -0.025em;
    margin: 38px 0 14px;
}

.ea-single-content h2 {
    font-size: clamp(1.8rem, 3vw, 2.25rem);
}

.ea-single-content h3 {
    font-size: clamp(1.45rem, 2.3vw, 1.7rem);
}

.ea-single-content h4 {
    font-size: 1.25rem;
}

.ea-single-content p {
    color: #39465a;
    font-size: 1.08rem;
    line-height: 1.88;
    margin-bottom: 22px;
}

.ea-single-content ul,
.ea-single-content ol {
    margin: 0 0 26px 22px;
    padding: 0;
}

.ea-single-content li {
    color: #39465a;
    font-size: 1.05rem;
    line-height: 1.75;
    margin-bottom: 8px;
    list-style: disc;
}

.ea-single-content a {
    color: var(--gold);
    font-weight: 800;
}

.ea-single-back {
    margin-top: 42px;
    padding-top: 24px;
    border-top: 1px solid var(--ea-gray-100);
}

.ea-single-back a {
    color: var(--primary);
    font-weight: 900;
    text-decoration: none !important;
}

.ea-single-back a:hover {
    color: var(--gold);
}


/* ==========================================================
   CARDS FINAIS DO SINGLE
========================================================== */

.ea-single-bottom-cards {
    max-width: 900px;
    margin: 34px auto 0;
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    gap: 24px;
    align-items: start;
}

/* Card base */
.ea-single-bottom-card {
    padding: 30px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid #e8e2d8;
    box-shadow: 0 14px 34px rgba(5, 19, 34, 0.06);
    overflow: hidden;
}

.ea-single-bottom-card > span,
.ea-related-header span {
    display: inline-block;
    color: var(--gold);
    text-transform: uppercase;
    letter-spacing: 0.13em;
    font-size: 0.72rem;
    line-height: 1.2;
    font-weight: 900;
    margin-bottom: 10px;
}

.ea-single-bottom-card h3,
.ea-related-header h3 {
    color: var(--primary);
    font-size: 1.45rem;
    line-height: 1.18;
    letter-spacing: -0.025em;
    margin-bottom: 14px;
}

.ea-single-bottom-card p {
    color: var(--text-light);
    font-size: 0.96rem;
    line-height: 1.6;
    margin-bottom: 22px;
}

.ea-single-bottom-card .ea-btn {
    width: 100%;
}

/* Card azul CTA */
.ea-single-cta-card {
    background:
        radial-gradient(circle at 100% 0%, rgba(198, 163, 106, 0.16), transparent 34%),
        linear-gradient(135deg, var(--ea-navy-950), var(--ea-navy-800));
    color: var(--white);
    min-height: auto;
    padding: 32px 30px;
    align-self: start;
}

.ea-single-cta-card h3 {
    color: var(--white);
    max-width: 360px;
}

.ea-single-cta-card p {
    color: rgba(255, 255, 255, 0.76);
    max-width: 380px;
}

.ea-single-cta-card .ea-btn {
    margin-top: 4px;
    min-height: 56px;
}

/* Card de artigos relacionados */
.ea-related-posts-card {
    padding: 26px;
}

.ea-related-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    margin-bottom: 18px;
}

.ea-related-header h3 {
    margin-bottom: 0;
}

/* Setas */
.ea-related-arrows {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 0 0 auto;
}

.ea-related-arrows button {
    width: 34px;
    height: 34px;
    border-radius: 999px;
    border: 1px solid #e5ddd1;
    background: #ffffff;
    color: var(--primary);
    display: grid;
    place-items: center;
    padding: 0;
    font-size: 1.45rem;
    line-height: 1;
    cursor: pointer;
    transition:
        background var(--transition),
        color var(--transition),
        border-color var(--transition),
        transform var(--transition),
        opacity var(--transition);
}

.ea-related-arrows button:hover {
    background: var(--gold);
    border-color: var(--gold);
    color: var(--white);
    transform: translateY(-1px);
}

.ea-related-arrows button:disabled {
    opacity: 0.35;
    cursor: not-allowed;
    pointer-events: none;
}

/* Slider */
.ea-related-slider {
    position: relative;
}

.ea-related-viewport {
    width: 100%;
    overflow: hidden;
}

.ea-related-track {
    display: flex;
    gap: 16px;
    transition: transform 0.42s ease;
    will-change: transform;
}

/* Card relacionado */
.ea-related-card {
    flex: 0 0 calc((100% - 16px) / 2);
    overflow: hidden;
    border-radius: 14px;
    background: #ffffff;
    border: 1px solid #ece7df;
    box-shadow: 0 10px 24px rgba(5, 19, 34, 0.05);
}

.ea-related-image {
    display: block;
    overflow: hidden;
}

.ea-related-image img {
    width: 100%;
    height: 118px;
    object-fit: cover;
    display: block;
    transition: transform 0.38s ease;
}

.ea-related-card:hover .ea-related-image img {
    transform: scale(1.05);
}

.ea-related-content {
    padding: 15px 15px 16px;
}

.ea-related-content h4 {
    margin: 0 0 8px;
    color: var(--primary);
    font-size: 0.98rem;
    line-height: 1.25;
    letter-spacing: -0.015em;
    font-weight: 900;
}

.ea-related-content h4 a {
    color: inherit;
    text-decoration: none !important;
}

.ea-related-content h4 a:hover {
    color: var(--gold);
}

.ea-related-content small {
    display: block;
    color: var(--text-light);
    font-size: 0.76rem;
    margin-bottom: 12px;
}

.ea-related-link {
    color: var(--gold);
    font-size: 0.82rem;
    font-weight: 900;
    text-decoration: none !important;
}

.ea-related-link:hover {
    color: var(--primary);
}

.ea-related-empty {
    margin: 0;
    color: var(--text-light);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* Responsivo dos cards finais */
@media (max-width: 768px) {
    .ea-single-bottom-cards {
        grid-template-columns: 1fr;
        margin-top: 26px;
    }

    .ea-single-bottom-card,
    .ea-single-cta-card,
    .ea-related-posts-card {
        padding: 26px;
    }

    .ea-related-card {
        flex: 0 0 100%;
    }

    .ea-related-image img {
        height: 160px;
    }
}

/* ==========================================================
   PÁGINA SEM RESULTADO
========================================================== */

.ea-blog-empty {
    padding: 46px;
    border-radius: 20px;
    background: var(--white);
    border: 1px solid #e8e2d8;
    box-shadow: 0 14px 34px rgba(5, 19, 34, 0.06);
}

.ea-blog-empty h2 {
    color: var(--primary);
    font-size: 2rem;
    margin-bottom: 12px;
}

.ea-blog-empty p {
    color: var(--text-light);
    font-size: 1rem;
}


/* ==========================================================
   RESPONSIVO BLOG
========================================================== */

@media (max-width: 1100px) {
    .ea-blog-layout {
        grid-template-columns: 1fr;
    }

    .ea-blog-sidebar {
        grid-template-columns: repeat(2, 1fr);
    }

    .ea-sidebar-cta {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .ea-blog-hero,
    .ea-single-hero {
        padding: 148px 0 68px;
        text-align: left;
    }

    .ea-blog-list-section,
    .ea-single-content-section {
        padding: 64px 0;
    }

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

    .ea-blog-list-image img {
        height: 220px;
    }

    .ea-blog-sidebar {
        grid-template-columns: 1fr;
    }

    .ea-sidebar-cta {
        grid-column: auto;
    }

    .ea-single-content {
        padding: 30px 26px;
    }

    .ea-single-content p {
        font-size: 1rem;
        line-height: 1.78;
    }

    .ea-single-bottom-cards {
        grid-template-columns: 1fr;
        margin-top: 26px;
    }

    .ea-single-bottom-card {
        padding: 26px;
    }

    .ea-single-featured-image {
        margin-top: -28px;
        border-radius: 18px;
    }
}