@layer reset, base, theme, layouts, components, utilities, child-base, child;

@layer child {
    .wrapper{
        margin: 0 5%;
    }

    .main {
        margin: var(--big-gap) auto; 
    }

    @media (min-width: 768px) {
        .menu-top {
            margin: 0 20px;
        }
    }

    @media (max-width: 768px) {
        body .main {
            margin-top: 10px;
        }
    }

    /* Header */

    @media (max-width: 768px) {
        body header#header .menu-top .wrapper {
            grid-template-columns: 50px 1fr 0;
        }
    }

    /* Logo */

    .brand img {
        object-fit: contain;
    }

    /* *** Custom Underline *** */
    .underline--full::after {
        background-color: #CCC !important;
    }

    /* *** Customizações de plugins *** */
    .web-stories-list.is-carousel.has-archive-link {
        margin: 0 !important;
    }

    a.serverdoin-widgets--button.serverdoin-widgets--whatsapp {
        display: none !important;
    }

    .serverdoin-whatsapp-button {
        margin-top: 10px;
    }


    .wps-story-ring {
        border-color: var(--primary-color) !important;
    }



    .publicacao-legal-wrapper {
        display: grid;
        grid-template-columns: 1fr 300px;
        gap: var(--big-gap);
    }

    .publicacao-legal-wrapper .grid-posts-01{
        grid-template-columns: 1fr;
        margin-bottom: var(--big-gap);
    }
    .filter-group {
        min-width: 31%;
    }

    .pl-filters {
        max-width: 100% !important;
    }

    #publicacoes-legais li.publicacao {
        max-width: 100% !important;
    }

    #publicacoes-legais li.publicacao > a > div > .category {
        color: var(--primary-color);                  
        filter: brightness(100%);
    }
    #publicacoes-legais li.publicacao > a:hover {
        filter: brightness(100%) !important;
    }
    .pl-filters .btn-filter {
        background-color: var(--primary-color) !important;
    }

    .serverdoin-widgets--share-buttons {
        justify-content: left !important;
        margin-top: var(--medium-gap);
    }

    @media (max-width: 768px) {
        .publicacao-legal-wrapper{
            grid-template-columns: 1fr;
        }

        .filter-group {
            width: 100%;
        }   

    }

    /* *** blocos da home *** */

    @media (min-width: 768px) {
        .grid-3-cols.item-17 {
            grid-template-columns: 1fr .5fr !important;
        }
    }

    @media (max-width: 768px) {
        .grid-posts-01 {
            gap: 0;
        }

        .grid-posts-01 .post-item:not(:last-child):after {
            display: inline-block;
            content: "";
            height: 1px;
            background-color: #ccc;
            width: 100%;
            margin-bottom: 10px;
        }

        .layout-section:not(:last-child) .grid-posts-01:after {
            display: inline-block;
            content: "";
            height: 1px;
            background-color: #ccc;
            width: 100%;
            margin-top: 20px;
        }

        .grid-posts-02 .post-item:not(:last-child) {
            position: relative;
        }

        .grid-posts-02 .post-item:not(:last-child):after {
            display: inline-block;
            content: "";
            height: 1px;
            background-color: #ccc;
            width: 100%;
            position: absolute;
            bottom: -20px;
        }

        .layout-section:not(:last-child) .grid-posts-02:after {
            display: inline-block;
            content: "";
            height: 1px;
            background-color: #ccc;
            width: 100%;
        }

        .rank-math-breadcrumb {
            font-size: 14px;
        }
    }

    /* bloco destaque - home*/
    .post-hero__overlay .post-item-category {
        font-size: 12px;
    }

    /* bloco colunistas - Home*/

    .columnists-posts-01 .grid-columnists-posts-01 {
        gap: var(--big-gap);
    }

    .columnist-item .latest-post-title a {
        display: -webkit-box;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 2;
        overflow: hidden;
    }

    /* Posts */

    .single .main-region.item-4:after {
        display: block;
        content: "";
        width: 100%;
        height: 1px;
        background-color: #ccc;
        margin-top: var(--big-gap);
    }

    @media (max-width: 768px) {

        .single a[class="post-item-title"] {
            text-align: center;
            font-size: 24px !important;
        }

        .single a[class="post-item-subtitle"] {
            text-align: center;
            font-size: 16px !important;
        }

        .single .post-item-meta span.update-info
        {
            display: block;
            color: #555;
        }
    }

    /* Bloco de Autor */

    .author-block {
        border: none !important;
        padding: 0 !important;
        margin-top: 20px;
    }

    .author-block__avatar img {
        height: 50px !important;
        width: auto;
    }

    .author-block__name {
        font-size: 14px !important;
    }

    .author-block__description {
        font-size: 12px !important;
    }
}

/* Corrigindo espaçamento da listagem de categorias ao criar um post */

.wp-admin.post-type-post .css-1n451hs {
    height: auto !important;
}

  /* Define altura de 1000px apenas para Desktop (telas maiores que 1024px) */
  @media (min-width: 1024px) {
    .tradingview-widget-container {
      height: 1000px !important;
    }
  }

  /* Garante que no mobile ele respeite o fluxo ou 100% do pai */
  @media (max-width: 1023px) {
    .tradingview-widget-container {
      height: 100%; /* Ou min-height: 500px se o container pai não tiver altura fixa */
    }
  }

  body :where(figure) {
    margin: 0;
  }
