/**
Theme Name: Astra Child
Author: Brainstorm Force
Author URI: http://wpastra.com/about/
Description: Astra is the fastest, fully customizable & beautiful theme suitable for blogs, personal portfolios and business websites. It is very lightweight (less than 50KB on frontend) and offers unparalleled speed. Built with SEO in mind, Astra comes with schema.org code integrated so search engines will love your site. Astra offers plenty of sidebar options and widget areas giving you a full control for customizations. Furthermore, we have included special features and templates so feel free to choose any of your favorite page builder plugin to create pages flexibly. Some of the other features: # WooCommerce Ready # Responsive # Compatible with major plugins # Translation Ready # Extendible with premium addons # Regularly updated # Designed, Developed, Maintained & Supported by Brainstorm Force. Looking for a perfect base theme? Look no further. Astra is fast, fully customizable and beautiful theme!
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: astra-child
Template: astra
*/

/* =========================
   BASE
========================= */
.custom-blog-home {
    padding: 24px 0 48px;
    background: #fff;
}

.custom-blog-home .container {
    margin: 0 auto;
}

/* =========================
   HERO
========================= */
.blog-hero {
    padding: 8px 0 8px;
}

.blog-hero__content {
    max-width: 760px;
    margin: 0 auto;
    text-align: center;
}

.blog-hero__content h1 {
    font-size: 36px;
    line-height: 1.12;
    font-weight: 700;
    color: #262626;
    margin: 12px 0 24px;
}

.blog-hero__content p {
    font-size: 16px;
    line-height: 1.6;
    color: #666;
    margin: 0 auto;
    max-width: 680px;
}

/* =========================
   SEÇÕES
========================= */
.blog-categories,
.blog-section,
.blog-cta {
    margin-top: 28px;
}

.section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin: 36px 0 24px 0 !important;
}

.section-header h2 {
    font-size: 24px;
    line-height: 1.15;
    font-weight: 700;
    color: #262626;
    margin: 0;
}

.section-link {
    font-size: 12px;
    line-height: 12px;
    font-weight: 500;
    background-color: #705cf2;
    color: #ffffff;
    transition: 0.2s ease;
    padding: 6px 8px;
    border-radius: 8px;
}

.section-link:hover {
    background-color: #5a48d6;
    color: #ffffff;
}

/* =========================
   CATEGORIAS
========================= */
.blog-categories__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}

.category-card {
    display: block;
    background: #fff;
    border: 1px solid #ececec;
    border-radius: 14px;
    padding: 14px 16px;
    text-decoration: none;
    transition: 0.2s ease;
}

.category-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.06);
    border-color: #e4ddff;
}

.category-card__name {
    display: block;
    font-size: 14px;
    font-weight: 700;
    color: #262626;
    margin-bottom: 4px;
}

.category-card__count {
    display: block;
    font-size: 12px;
    color: #777;
}

/* =========================
   GRID DE POSTS
========================= */
.post-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 18px 20px;
    justify-content: flex-start;
}

.post-card {
    flex: 1 1 calc(33.333% - 14px);
    max-width: calc(33.333% - 14px);
    background: #f8f8f8;
    border: 1px solid #efefef;
    border-radius: 14px;
    overflow: hidden;
    transition: 0.25s ease;
}

/* Quando houver apenas 2 posts na linha/seção */
.post-grid:has(.post-card:nth-child(2):last-child) {
    justify-content: flex-start;
}

.post-grid:has(.post-card:nth-child(2):last-child) .post-card {
    flex: 1 1 calc(50% - 10px);
    max-width: calc(50% - 10px);
}

/* Quando houver apenas 1 post na linha/seção */
.post-grid:has(.post-card:only-child) {
    justify-content: flex-start;
}

.post-grid:has(.post-card:only-child) .post-card {
    flex: 1 1 100%;
    max-width: 100%;
}

.post-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.08);
}

.post-card__link {
    display: block;
    color: inherit;
    text-decoration: none;
    height: 100%;
}

.post-thumbnail {
    overflow: hidden;
}

.post-thumbnail img {
    width: 100%;
    aspect-ratio: 16 / 8.5;
    object-fit: cover;
    display: block;
    max-height: 340px;
}

.post-content {
    padding: 14px 16px 16px;
}

.post-card__category {
    display: inline-block;
    margin-bottom: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #705cf2;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.post-content h3 {
    font-size: 19px;
    line-height: 1.25;
    margin: 0 0 8px;
    color: #262626;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.post-content p {
    font-size: 13px;
    line-height: 1.45;
    color: #666;
    margin: 0;

    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* =========================
   CTA FINAL
========================= */
.blog-cta__box {
    background: #f6f3ff;
    border: 1px solid #e8e0ff;
    border-radius: 20px;
    padding: 24px 18px;
    text-align: center;
    margin-top: 24px !important;
}

.blog-cta__box h2 {
    font-size: 26px;
    line-height: 1.2;
    color: #262626;
    margin: 0 0 8px;
}

.blog-cta__box p {
    font-size: 15px;
    line-height: 1.6;
    color: #666;
    max-width: 720px;
    margin: 0 auto 16px;
}

.blog-cta__button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 20px;
    border-radius: 999px;
    background: #705cf2;
    color: #fff;
    font-weight: 700;
    font-size: 14px;
    text-decoration: none;
    transition: 0.2s ease;
}

.blog-cta__button:hover {
    background: #5f4de0;
    color: #fff;
}

.blog-pagination {
    margin-top: 32px;
    display: flex;
    justify-content: center;
}

.blog-pagination a,
.blog-pagination span {
    margin: 0 6px;
    padding: 8px 12px;
    border-radius: 8px;
    text-decoration: none;
    border: 1px solid #eee;
    color: #333;
}

.blog-pagination .current {
    background: #705cf2;
    color: #fff;
    border-color: #705cf2;
}

.category-rich-content {
    margin-top: 48px !important;
}

.category-rich-content__wrapper {
    max-width: 760px;
}

.category-rich-content h2 {
    font-size: 24px;
    margin-bottom: 16px;
    color: #262626;
}

.category-rich-content__text p {
    margin-bottom: 16px;
    line-height: 1.7;
    color: #555;
}

.category-rich-content__text ul {
    margin: 16px 0;
    padding-left: 20px;
}

.category-rich-content__text li {
    margin-bottom: 8px;
    line-height: 1.6;
}

/* =========================
   RESPONSIVO
========================= */
@media (max-width: 1100px) {
    .blog-categories__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 992px) {
    .blog-hero__content h1 {
        font-size: 32px;
    }

    .section-header h2 {
        font-size: 22px;
    }

    .post-content h3 {
        font-size: 18px;
    }

    .post-card {
        flex: 1 1 calc(50% - 10px);
        max-width: calc(50% - 10px);
    }

    .post-grid:has(.post-card:only-child) .post-card {
        flex: 1 1 100%;
        max-width: 100%;
    }
}

@media (max-width: 768px) {
    .custom-blog-home {
        padding: 20px 0 40px;
    }

    .post-card {
        flex: 1 1 100%;
        max-width: 100%;
    }

    .blog-hero {
        padding-top: 0;
    }

    .blog-hero__content h1 {
        font-size: 28px;
    }

    .blog-hero__content p {
        font-size: 15px;
    }

    .blog-categories__grid {
        grid-template-columns: 1fr;
    }

    .section-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
        margin: 24px 0 12px 0;
    }

    .section-header h2 {
        font-size: 21px;
    }

    .post-thumbnail img {
        aspect-ratio: 16 / 9;
    }

    .post-content {
        padding: 14px 14px 16px;
    }

    .post-content h3 {
        font-size: 18px;
    }

    .post-content p {
        font-size: 13px;
    }

    .blog-cta__box {
        padding: 22px 16px;
    }

    .blog-cta__box h2 {
        font-size: 22px;
    }

    .blog-cta__box p {
        font-size: 14px;
    }
}

@media (max-width: 480px) {
    .blog-hero__content h1 {
        font-size: 25px;
    }

    .blog-hero__content p {
        font-size: 14px;
    }

    .section-header h2 {
        font-size: 19px;
    }

    .category-card {
        padding: 12px 14px;
    }

    .post-content h3 {
        font-size: 17px;
    }

    .post-content p {
        font-size: 13px;
        line-height: 1.4;
    }

    .blog-cta__box h2 {
        font-size: 20px;
    }
}

/* =========================
   SUMÁRIO DO ARTIGO
========================= */

.cr-article-summary {
    margin: 0 0 24px;
}

.cr-article-summary__inner {
    background: #f6f4ff;
    border: 1px solid #e4ddff;
    border-radius: 4px;
    padding: 20px 24px;
}

.cr-article-summary__title {
    font-size: 18px !important;
    font-weight: 700;
    margin-bottom: 12px;
    color: #262626;
}

.cr-article-summary__list {
    padding-left: 18px !important;
    margin: 0;
}

.cr-article-summary__item {
    margin-bottom: 8px;
}

.cr-article-summary__item a {
    color: #705cf2;
    text-decoration: none;
    font-weight: 500;
    transition: 0.2s;
}

.cr-article-summary__item a:hover {
    text-decoration: underline;
}


/* =========================
   ARTIGOS RELACIONADOS
========================= */

.cr-related-posts {
    margin-top: 16px;
    padding-top: 32px;
}

.cr-related-posts__title {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #262626;
}

.cr-related-posts__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

/* CARD */
.cr-related-post {
    background: #f9f9f9;
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.2s ease;
    border: 1px solid #f0f0f0;
}

.cr-related-post:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(0,0,0,0.08);
}

.cr-related-post__link {
    text-decoration: none;
    color: inherit;
    display: block;
}

/* IMAGEM */
.cr-related-post__thumb img {
    width: 100%;
    height: 140px;
    object-fit: cover;
    display: block;
    padding-bottom: 0 !important;
}

/* TEXTO */
.cr-related-post__content {
    padding: 16px;
}

.cr-related-post__title-text {
    font-size: 14px !important;
    font-weight: 500;
    line-height: 1.3;
    color: #262626;
    margin-bottom: 0 !important;

    display: -webkit-box;
    -webkit-line-clamp: 2;      /* 🔥 limita em 2 linhas */
    -webkit-box-orient: vertical;
    overflow: hidden;

    min-height: calc(1.3em * 2); /* mantém altura consistente */
}


/* =========================
   SCROLL SUAVE (IMPORTANTE)
========================= */

html {
    scroll-behavior: smooth;
}


/* =========================
   RESPONSIVO
========================= */

@media (max-width: 992px) {
    .cr-related-posts__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .cr-article-summary {
        margin-top: 24px;
    }
}

@media (max-width: 768px) {
    .cr-article-summary__inner {
        padding: 16px;
    }

    .cr-article-summary__title {
        font-size: 14px;
    }

    .cr-related-posts__title {
        font-size: 16px;
    }

    .cr-related-posts__grid {
        grid-template-columns: 1fr;
    }
}