/* Reset Content and Texts */

/* Botão "X" nativo do input[type="search"] (Chrome/Safari/Edge) */
input[type="search"]::-webkit-search-cancel-button {
    cursor: pointer;
}

/* =====================================
   POSTIA CONTENT SYSTEM
   Estilo editorial isolado
===================================== */

.postia-content {
    color: var(--postia-text);
    font-size: 1.0625rem;
    line-height: 1.75;
}

/* Espaçamento vertical consistente */
.postia-content>*+* {
    margin-top: 1.5rem;
}

/* Headings */
.postia-content h1,
.postia-content h2,
.postia-content h3,
.postia-content h4,
.postia-content h5,
.postia-content h6 {
    color: var(--postia-text);
    font-weight: 700;
    line-height: 1.25;
    scroll-margin-top: 6rem;
}

.postia-content h2 {
    font-size: 1.75rem;
    margin-top: 3rem;
}

.postia-content h3 {
    font-size: 1.375rem;
    margin-top: 2.5rem;
}

.postia-content h4 {
    font-size: 1.125rem;
    margin-top: 2rem;
}

/* Parágrafos */
.postia-content p {
    color: var(--postia-text);
}

/* Links */
.postia-content a {
    color: var(--postia-primary);
    text-decoration: underline;
    text-underline-offset: 3px;
}

.postia-content a:hover {
    opacity: 0.85;
}

/* Listas */
.postia-content ul,
.postia-content ol {
    padding-left: 1.25rem;
}

.postia-content ul {
    list-style-type: disc;
}

.postia-content ol {
    list-style-type: decimal;
}

.postia-content li+li {
    margin-top: 0.5rem;
}

/* Blockquote */
.postia-content blockquote {
    border-left: 4px solid var(--postia-primary);
    padding-left: 1.25rem;
    color: var(--postia-muted);
    font-style: italic;
    margin: 2rem 0;
}

/* Imagens */
.postia-content img {
    max-width: 100%;
    height: auto;
    border-radius: 0.75rem;
}

/* Figure */
.postia-content figure {
    margin: 2rem 0;
}

.postia-content figcaption {
    margin-top: 0.5rem;
    font-size: 0.875rem;
    color: var(--postia-muted);
    text-align: center;
}

/* Código inline */
.postia-content code {
    background: var(--postia-bg);
    border: 1px solid var(--postia-border);
    border-radius: 0.375rem;
    padding: 0.125rem 0.375rem;
    font-size: 0.875rem;
}

/* Bloco de código */
.postia-content pre {
    background: var(--postia-bg);
    border: 1px solid var(--postia-border);
    border-radius: 0.75rem;
    padding: 1.25rem;
    overflow-x: auto;
    font-size: 0.875rem;
}

/* Tabelas */
.postia-content table {
    width: 100%;
    border-collapse: collapse;
    margin: 2rem 0;
    font-size: 0.9375rem;
}

.postia-content th,
.postia-content td {
    border: 1px solid var(--postia-border);
    padding: 0.75rem;
    text-align: left;
}

.postia-content th {
    background: var(--postia-bg);
    font-weight: 600;
}

/* Separador */
.postia-content hr {
    border: none;
    border-top: 1px solid var(--postia-border);
    margin: 3rem 0;
}

/* ============================
   POSTIA EXCERPT TOGGLE
============================ */

.postia-excerpt {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.postia-excerpt.is-expanded {
    -webkit-line-clamp: unset;
    overflow: visible;
}

/* ===========================
   Clamp de texto (3 linhas)
=========================== */
.postia-clamp-3 {
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.postia-swiper-slide {
    display: flex;
}

.postia-swiper-pagination {
    padding-bottom: 20px;
}

.postia-swiper-pagination .swiper-pagination-bullet {
    background-color: #fff;
}

.postia-swiper-pagination .swiper-pagination-bullet.swiper-pagination-bullet-active-main {
    background-color: #fff;
}

/* Índices dentro do artigo */

/* ===============================
   TOC Collapsible + Gradient Fade
   =============================== */

.postia-toc-wrap {
    position: relative;
    overflow: hidden;
    /* essencial pro fade funcionar */
    transition: max-height 250ms ease;
    will-change: max-height;
}

/* Overlay do gradiente por cima do conteúdo */
.postia-toc-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;

    height: 72px;
    /* ajuste fino do “sumir por trás” */
    pointer-events: none;

    /* Garante que fica por cima do texto */
    z-index: 5;

    /* Gradiente como na imagem:
     transparente em cima e vai “fechando” com a cor do fundo */
    background: linear-gradient(to bottom,
            rgba(0, 0, 0, 0) 0%,
            var(--postia-bg) 65%,
            var(--postia-bg) 100%);

    opacity: 0;
    transition: opacity 200ms ease;
}

/* Quando colapsado, mostra fade */
.postia-toc-wrap.is-collapsed .postia-toc-fade {
    opacity: 1;
}

/* Botão ver mais/menos */
.postia-toc-toggle {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    margin-top: 16px;

    font-size: 14px;
    font-weight: 600;

    color: var(--postia-text);
    background: transparent;
    border: 0;
    padding: 0;
    cursor: pointer;
}

.postia-toc-toggle:hover {
    opacity: 0.9;
}

/* Ícone circular */
.postia-toc-toggle-icon {
    width: 30px;
    height: 40px;
    border-radius: 90px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    /* usa variáveis do teu tema */
    background: var(--postia-surface);
    color: var(--postia-text);
}

.postia-toc-toggle-icon svg {
    width: 20px;
    height: 20px;
    display: block;
}

/* Footer: 2 colunas fluidas + 3ª fixa (260px) no desktop */
@media (min-width: 1200px) {
    .postia-footer-grid {
        display: grid;
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 260px;
        gap: 2.5rem;
        /* equivalente ao gap-10 */
    }

    .postia-footer-copyright {
        max-width: 260px;
        justify-self: end;
        /* encosta à direita */
        text-align: right;
    }
}