/*
 * Tema v2 (editorial) obrigatório.
 * Carregado depois de home.css em todas as páginas do site público.
 *
 * Seletores estáveis para exclusão no AdSense:
 *   .site-header  .hero  .cards-grid  .article-header  .programs-grid
 */

/* ---- Componentes das páginas de vídeos e download ---- */

.videos-page .videos-page__content {
    max-width: var(--v2-container);
    margin: 0 auto;
}

.videos-page .videos-page__content > h1 {
    margin: 0 0 var(--v2-s6);
    font-family: var(--v2-font-serif);
    font-size: 32px;
    line-height: 1.2;
}

.videos-page .videos-grid {
    display: grid;
    grid-template-columns: repeat(1, minmax(0, 1fr));
    gap: var(--v2-s5);
}

.videos-page .video-card {
    overflow: hidden;
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-radius);
    background: var(--v2-surface);
}

.videos-page .video-card img {
    display: block;
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.videos-page .video-card h2,
.videos-page .video-card p,
.videos-page .video-card a {
    margin-left: var(--v2-s4);
    margin-right: var(--v2-s4);
}

.videos-page .video-card h2 {
    margin-top: var(--v2-s4);
    margin-bottom: var(--v2-s2);
    font-family: var(--v2-font-serif);
    font-size: 20px;
    line-height: 1.3;
}

.videos-page .video-card p {
    margin-bottom: var(--v2-s3);
    color: var(--v2-text-2);
    font-size: 14px;
}

.videos-page .video-card a {
    display: inline-block;
    margin-bottom: var(--v2-s4);
    color: var(--v2-brand);
    font-weight: 600;
}

@media (min-width: 640px) {
    .videos-page .videos-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .videos-page .videos-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.download-page .download-page__content {
    max-width: 800px;
    margin: 0 auto;
}

.download-page .download-page__content > h2 {
    margin: var(--v2-s7) 0 var(--v2-s2);
    font-family: var(--v2-font-serif);
    font-size: 28px;
    line-height: 1.25;
}

.download-page .download-page__content > p {
    margin: 0 0 var(--v2-s5);
    color: var(--v2-text-2);
}

.download-page .download-btn {
    display: inline-block;
    padding: var(--v2-s3) var(--v2-s5);
    border-radius: var(--v2-radius);
    background: var(--v2-brand);
    color: #fff;
    font-weight: 700;
    text-decoration: none;
}

.download-page .download-btn:hover {
    background: var(--v2-brand-dark);
    color: #fff;
}

.download-page .affiliate-card {
    display: flex;
    flex-direction: column;
    gap: var(--v2-s4);
    margin-top: 0;
    padding: var(--v2-s5);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-radius);
    background: var(--v2-surface);
    box-shadow: none;
}

.download-page .affiliate-card h2 {
    margin: 0;
    font-family: var(--v2-font-serif);
    font-size: 22px;
}

.download-page .affiliate-card__list {
    display: flex;
    flex-direction: column;
    gap: var(--v2-s3);
}

.download-page .affiliate-card__item {
    display: grid;
    grid-template-columns: 80px minmax(0, 1fr);
    gap: var(--v2-s4);
    padding: var(--v2-s4);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-radius);
    background: var(--v2-bg);
    color: inherit;
    text-decoration: none;
}

.download-page .affiliate-card__image {
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-radius: var(--v2-s2);
    background: var(--v2-surface);
}

.download-page .affiliate-card__image img {
    width: 80px;
    height: 80px;
    object-fit: cover;
}

.download-page .affiliate-card__info {
    display: flex;
    flex-direction: column;
    gap: var(--v2-s1);
}

.download-page .affiliate-card__label,
.download-page .affiliate-card__status {
    color: var(--v2-text-2);
    font-size: 13px;
}

.download-page .affiliate-card__info strong {
    color: var(--v2-text);
    font-size: 16px;
}

.download-page .affiliate-card__info p {
    margin: 0;
    color: var(--v2-text-2);
    font-size: 14px;
}

.download-page .affiliate-card__price,
.download-page .affiliate-card__cta {
    color: var(--v2-brand);
    font-weight: 600;
}

@media (max-width: 480px) {
    .download-page .affiliate-card {
        padding: var(--v2-s4);
    }

    .download-page .affiliate-card__item {
        grid-template-columns: 56px minmax(0, 1fr);
        gap: var(--v2-s3);
    }

    .download-page .affiliate-card__image img {
        width: 56px;
        height: 56px;
    }
}
:root {
    /* Cor */
    --v2-brand: #C4170C;
    --v2-brand-dark: #A01209;
    --v2-bg: #F7F6F3;
    --v2-surface: #FFFFFF;
    --v2-text: #1A1A1A;
    --v2-text-2: #5F5F5F;
    --v2-line: #E3E0DA;
    --v2-placeholder: #ECE9E3;

    /* Espaçamento (escala de 4) */
    --v2-s1: 4px;
    --v2-s2: 8px;
    --v2-s3: 12px;
    --v2-s4: 16px;
    --v2-s5: 24px;
    --v2-s6: 32px;
    --v2-s7: 48px;

    /* Forma */
    --v2-radius: 8px;

    /* Tipografia (pilhas do sistema, sem fontes externas) */
    --v2-font-serif: Georgia, "Iowan Old Style", "Times New Roman", serif;
    --v2-font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

    /* Contêineres */
    --v2-container: 1200px;
    --v2-measure: 720px;

    /* Espaço reservado para anúncios (evita deslocamento de layout) */
    --v2-ad-min: 250px;
}

/* ---- Base ---- */

body {
    font-family: var(--v2-font-sans);
    font-size: 17px;
    line-height: 1.6;
    background: var(--v2-bg);
    color: var(--v2-text);
}

a:hover {
    color: var(--v2-brand);
}

:focus-visible {
    outline: 2px solid var(--v2-text);
    outline-offset: 2px;
}

.footer :focus-visible {
    outline-color: #fff;
}

#busca {
    scroll-margin-top: 88px;
}

/* URLs longas nas fontes das matérias estouravam a largura no celular (também em v1) */
.content a {
    overflow-wrap: anywhere;
}

@media (prefers-reduced-motion: no-preference) {
    html {
        scroll-behavior: smooth;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* ---- Cabeçalho (uma linha) ---- */

/* ---- Páginas legais ---- */

.legal-page .content {
    max-width: var(--v2-measure);
    margin: 0 auto;
}

.legal-page .content > header {
    margin: 0 0 var(--v2-s6);
}

.legal-page .content > header h1 {
    margin: 0 0 var(--v2-s2);
    font-family: var(--v2-font-serif);
    font-size: 32px;
    line-height: 1.2;
}

.legal-page .content > header p {
    margin: 0;
    color: var(--v2-text-2);
}

.legal-page .content > section + section {
    margin-top: var(--v2-s6);
}

.legal-page .content > section h2 {
    margin: 0 0 var(--v2-s3);
    font-family: var(--v2-font-serif);
    font-size: 22px;
    line-height: 1.3;
}

.legal-page .content > section p {
    margin: 0 0 var(--v2-s4);
}

.legal-page .content > section p:last-child {
    margin-bottom: 0;
}

.legal-page .content > section ul {
    margin: 0 0 var(--v2-s4) var(--v2-s5);
    padding-left: var(--v2-s4);
}

.legal-page .content > section li + li {
    margin-top: var(--v2-s2);
}

.top-wrapper {
    background: var(--v2-surface);
    box-shadow: none;
    border-bottom: 1px solid var(--v2-line);
}

.top-bar {
    max-width: var(--v2-container);
    min-height: 64px;
    padding: 0 var(--v2-s5);
    gap: var(--v2-s5);
}

.brand {
    flex: 0 0 auto;
    font-family: var(--v2-font-serif);
    font-size: 22px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -0.01em;
    text-transform: none;
}

.brand a {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    color: var(--v2-brand);
    white-space: nowrap;
}

.primary-nav {
    font-size: 14px;
    font-weight: 500;
    letter-spacing: 0;
    text-transform: none;
}

.primary-nav a {
    color: var(--v2-text);
    opacity: 1;
}

.primary-nav a:hover {
    color: var(--v2-brand);
}

.primary-nav a.is-active {
    color: var(--v2-brand);
    font-weight: 600;
}

/* Sub-bar repete as mesmas categorias do menu principal */
.sub-bar {
    display: none;
}

.header-search {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: var(--v2-radius);
    color: var(--v2-text);
}

.header-search:hover {
    background: var(--v2-bg);
    color: var(--v2-brand);
}

.header-search svg {
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
}

.user-area {
    flex: 0 0 auto;
    margin-left: 0;
}

.user-info {
    min-width: 44px;
    min-height: 44px;
    padding: 0 var(--v2-s2);
    justify-content: center;
    border: 0;
    border-radius: var(--v2-radius);
    background: none;
    color: var(--v2-text);
    font: inherit;
    cursor: pointer;
}

.user-info:hover {
    background: var(--v2-bg);
}

.user-info img {
    width: 32px;
    height: 32px;
    border: 1px solid var(--v2-line);
    background: var(--v2-placeholder);
    object-fit: cover;
    font-size: 0; /* imagem quebrada: não vaza o texto alternativo */
}

.user-info span {
    max-width: 110px;
    overflow: hidden;
    font-size: 14px;
    font-weight: 500;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-menu {
    padding: var(--v2-s1);
    border-radius: var(--v2-radius);
    box-shadow: 0 4px 12px rgba(26, 26, 26, 0.08);
}

.user-menu a {
    display: flex;
    align-items: center;
    min-height: 44px;
    border-radius: var(--v2-s1);
    font-size: 14px;
}

.user-menu a:hover {
    background: var(--v2-bg);
}

/* Desktop: menu em uma linha, com rolagem horizontal discreta se não couber */
@media (min-width: 901px) {
    .primary-nav {
        flex: 1 1 auto;
        align-self: stretch;
        flex-wrap: nowrap;
        gap: var(--v2-s5);
        min-width: 0;
        overflow-x: auto;
        overflow-y: hidden;
    }

    /* barra de rolagem fina (4px), só aparece quando o menu não cabe */
    .primary-nav::-webkit-scrollbar {
        height: 4px;
    }

    .primary-nav::-webkit-scrollbar-thumb {
        border-radius: 2px;
        background: var(--v2-line);
    }

    @supports not selector(::-webkit-scrollbar) {
        .primary-nav {
            scrollbar-width: thin;
            scrollbar-color: var(--v2-line) transparent;
        }
    }

    .primary-nav a {
        display: inline-flex;
        flex: 0 0 auto;
        align-items: center;
        border-bottom: 2px solid transparent;
        white-space: nowrap;
    }

    .primary-nav a.is-active {
        border-bottom-color: var(--v2-brand);
    }
}

/* Abaixo de 1200px o nome do usuário cede espaço ao menu */
@media (min-width: 901px) and (max-width: 1199px) {
    .user-info span {
        display: none;
    }
}

/* Entre 901 e 1080px: menu compacto para caber em uma linha sem rolagem */
@media (min-width: 901px) and (max-width: 1080px) {
    .top-bar {
        padding: 0 var(--v2-s4);
        gap: var(--v2-s3);
    }

    .brand {
        font-size: 18px;
    }

    .primary-nav {
        gap: var(--v2-s4);
        font-size: 13px;
    }
}

/* Celular / tablet: gaveta usando o JS existente (fecha acima de 900px) */
@media (max-width: 900px) {
    .top-bar {
        min-height: 56px;
        padding: 0 var(--v2-s4);
        gap: var(--v2-s1);
    }

    .brand {
        order: 1;
        flex: 1 1 auto;
        min-width: 0;
        font-size: 20px;
    }

    .header-search {
        order: 2;
    }

    .mobile-menu-toggle {
        order: 3;
        width: 44px;
        height: 44px;
        padding: 0;
        border: 0;
        border-radius: var(--v2-radius);
        background: none;
    }

    .mobile-menu-toggle:hover {
        background: var(--v2-bg);
    }

    /* home.css estende "span" do botão também ao texto .sr-only; aqui só o ícone é desenhado */
    .mobile-menu-toggle .sr-only {
        position: absolute;
        width: 1px;
        height: 1px;
        background: none;
    }

    .mobile-menu-toggle .sr-only::before,
    .mobile-menu-toggle .sr-only::after {
        display: none;
    }

    .mobile-menu-toggle[aria-expanded="true"] span {
        background: transparent;
    }

    .mobile-menu-toggle[aria-expanded="true"] span::before {
        transform: translateY(6px) rotate(45deg);
    }

    .mobile-menu-toggle[aria-expanded="true"] span::after {
        transform: translateY(-6px) rotate(-45deg);
    }

    .user-area {
        order: 4;
    }

    .user-info span {
        display: none;
    }

    .primary-nav {
        margin: 0;
        padding: var(--v2-s2) var(--v2-s4) var(--v2-s4);
        max-height: calc(100vh - 56px);
        overflow-y: auto;
        border-bottom: 1px solid var(--v2-line);
        box-shadow: none;
        font-size: 16px;
    }

    .primary-nav a {
        display: flex;
        align-items: center;
        min-height: 48px;
        padding: 0 var(--v2-s3);
        border-bottom: 1px solid var(--v2-line);
    }

    .primary-nav a:last-child {
        border-bottom: 0;
    }

    .primary-nav a.is-active {
        box-shadow: inset 3px 0 0 var(--v2-brand);
    }
}

/* ---- Layout e seções ---- */

.layout {
    max-width: var(--v2-container);
    padding: var(--v2-s6) var(--v2-s5) var(--v2-s7);
}

@media (max-width: 640px) {
    .layout {
        padding: var(--v2-s5) var(--v2-s4) var(--v2-s6);
    }
}

.section {
    padding: var(--v2-s6) 0 0;
}

.section-head {
    margin-bottom: var(--v2-s5);
    padding-bottom: var(--v2-s3);
    border-bottom: 1px solid var(--v2-line);
}

.section-head h2,
.category-section h2 {
    font-family: var(--v2-font-serif);
    font-size: 24px;
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: 0;
}

.category-sections {
    gap: var(--v2-s7);
    margin-top: var(--v2-s6);
}

.category-section h2 {
    margin: 0 0 var(--v2-s5);
    padding-bottom: var(--v2-s3);
    border-bottom: 1px solid var(--v2-line);
}

.section-heading h1 {
    font-family: var(--v2-font-serif);
    font-size: 32px;
    line-height: 1.2;
    color: var(--v2-text);
}

/* ---- Destaque ---- */

.hero {
    padding: var(--v2-s5) 0 var(--v2-s3);
}

.hero-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--v2-s6);
}

@media (min-width: 1024px) {
    .hero-grid {
        grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr);
    }
}

.hero-img {
    aspect-ratio: 16 / 9;
    border: 0;
    border-radius: var(--v2-radius);
    background: var(--v2-placeholder);
}

.hero-img img {
    transition: none;
}

.hero-img:hover img {
    transform: none;
}

.hero-cat {
    display: block;
    margin: var(--v2-s4) 0 var(--v2-s2);
    color: var(--v2-brand);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
}

/* O selo "Destaque" é substituído pela categoria acima do título */
.badge {
    display: none;
}

.hero-title {
    margin: 0 0 var(--v2-s3);
    font-family: var(--v2-font-serif);
    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

@media (min-width: 640px) {
    .hero-title {
        font-size: 32px;
    }
}

@media (min-width: 1024px) {
    .hero-title {
        font-size: 36px;
    }
}

.hero-excerpt {
    max-width: 60ch;
    margin: 0 0 var(--v2-s3);
    color: var(--v2-text-2);
    font-size: 17px;
    line-height: 1.6;
}

.hero-meta {
    color: var(--v2-text-2);
    font-size: 13px;
}

.hero-meta .dot {
    background: var(--v2-text-2);
}

/* ---- Mais recentes ---- */

.hero-side {
    display: block;
}

.hero-side__title {
    margin: 0 0 var(--v2-s1);
    padding-top: var(--v2-s3);
    border-top: 2px solid var(--v2-text);
    font-family: var(--v2-font-serif);
    font-size: 18px;
    line-height: 1.3;
}

.side-card {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr);
    align-content: start;
    column-gap: var(--v2-s3);
    row-gap: var(--v2-s1);
    padding: var(--v2-s4) 0;
    border: 0;
    border-bottom: 1px solid var(--v2-line);
    border-radius: 0;
    background: none;
}

.side-card:last-child {
    border-bottom: 0;
}

.side-card__thumb {
    grid-column: 1;
    grid-row: 1 / span 2;
    display: block;
    width: 64px;
    height: 48px;
    overflow: hidden;
    border-radius: var(--v2-s1);
    background: var(--v2-placeholder);
}

.side-card__thumb img {
    display: block;
    width: 64px;
    height: 48px;
    object-fit: cover;
}

.side-card .eyebrow {
    grid-column: 2;
    grid-row: 1;
    margin: 0;
    color: var(--v2-brand);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
}

.side-card h3 {
    grid-column: 2;
    grid-row: 2;
    display: -webkit-box;
    margin: 0;
    overflow: hidden;
    font-family: var(--v2-font-serif);
    font-size: 16px;
    line-height: 1.35;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    line-clamp: 2;
}

.side-card p {
    display: none;
}

/* ---- Faixa de autoria ---- */

.author-strip {
    max-width: none;
    margin: var(--v2-s5) 0 0;
    padding: var(--v2-s3) var(--v2-s4);
    border-radius: var(--v2-radius);
    color: var(--v2-text-2);
    font-size: 13px;
}

.author-strip strong {
    color: var(--v2-text);
}

/* ---- Grade e cards ---- */

.grid,
.cards-grid {
    grid-template-columns: minmax(0, 1fr);
    gap: var(--v2-s5);
}

@media (min-width: 640px) {
    .grid,
    .cards-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 1024px) {
    .grid,
    .cards-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.card {
    display: flex;
    flex-direction: column;
    border-radius: var(--v2-radius);
    box-shadow: none;
    transition: border-color 0.15s ease;
}

.card:hover {
    border-color: var(--v2-text-2);
    box-shadow: none;
    transform: none;
}

.card-img {
    background: var(--v2-placeholder);
}

.card-body {
    display: flex;
    flex: 1;
    flex-direction: column;
    padding: var(--v2-s4);
}

.tag {
    margin-bottom: var(--v2-s2);
    color: var(--v2-brand);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    letter-spacing: 0;
    text-transform: none;
}

.card h3 {
    margin: 0 0 var(--v2-s3);
    font-family: var(--v2-font-serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.card p {
    display: none;
}

.card-foot {
    flex-wrap: wrap;
    gap: var(--v2-s1) var(--v2-s3);
    margin-top: auto;
    color: var(--v2-text-2);
    font-size: 13px;
}

/* ---- Faixa de confiança ---- */

.trust {
    margin-top: var(--v2-s6);
    padding: var(--v2-s5) 0;
}

.trust-item {
    color: var(--v2-text-2);
    font-size: 13px;
}

.trust-item strong {
    font-family: var(--v2-font-serif);
    font-size: 18px;
}

/* ---- Busca, ofertas e boletins ---- */

.search-card,
.list-card,
.affiliate-card {
    padding: var(--v2-s5);
    border-radius: var(--v2-radius);
}

.search-card h2,
.list-card h2,
.affiliate-card h2 {
    font-family: var(--v2-font-serif);
    font-size: 18px;
    line-height: 1.3;
}

.search-card__legend {
    color: var(--v2-text-2);
    font-size: 15px;
}

.search-form input {
    min-height: 44px;
    border: 1px solid var(--v2-text-2);
    border-radius: var(--v2-radius);
    background: var(--v2-surface);
    font-size: 16px;
}

.search-form button {
    min-height: 44px;
    border-radius: var(--v2-radius);
    background: var(--v2-brand);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0;
    text-transform: none;
}

.search-form button:hover {
    background: var(--v2-brand-dark);
}

.result-item {
    border-left-width: 3px;
}

.affiliate-card__item {
    border-radius: var(--v2-radius);
    transition: none;
}

.affiliate-card__item:hover {
    transform: none;
    box-shadow: none;
}

.affiliate-card__label,
.affiliate-card__item--aliexpress .affiliate-card__label,
.affiliate-card__item--shopee .affiliate-card__label {
    color: var(--v2-text-2);
    font-size: 12px;
    letter-spacing: 0;
    text-transform: none;
}

.affiliate-card__price,
.affiliate-card__cta,
.affiliate-card__item--aliexpress .affiliate-card__price,
.affiliate-card__item--aliexpress .affiliate-card__cta,
.affiliate-card__item--shopee .affiliate-card__price,
.affiliate-card__item--shopee .affiliate-card__cta {
    color: var(--v2-brand);
}

/* ---- Publicidade ---- */
/*
 * Regras genéricas: nenhuma altura fixa e nenhum overflow hidden em ins.adsbygoogle
 * (o AdSense ajusta largura e margens inline no modo full-width-responsive).
 * O espaço é reservado no contêiner (.ad-box) para evitar deslocamento de layout.
 */

.ad-slot {
    max-width: none;
    margin: var(--v2-s5) auto;
}

.ad-slot__label {
    margin-bottom: var(--v2-s2);
    color: var(--v2-text-2);
    font-size: 12px;
    font-weight: 400;
    letter-spacing: 0.02em;
    text-transform: none;
}

.ad-box {
    min-height: var(--v2-ad-min);
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
}

.ad-box .adsbygoogle {
    min-height: 0;
}

/* Sem anúncio veiculado: libera o espaço e esconde o rótulo */
.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) .ad-box {
    min-height: 0;
}

.ad-slot:has(ins.adsbygoogle[data-ad-status="unfilled"]) .ad-slot__label {
    display: none;
}

/* Anúncios automáticos injetados pelo Google (podem cair dentro de grades) */
.google-auto-placed {
    clear: both;
    max-width: 100% !important;
    margin: var(--v2-s5) auto !important;
    text-align: center;
}

.google-auto-placed::before {
    content: "Publicidade";
    display: block;
    margin-bottom: var(--v2-s2);
    color: var(--v2-text-2);
    font-family: var(--v2-font-sans);
    font-size: 12px;
    line-height: 1.4;
    letter-spacing: 0.02em;
    text-align: center;
}

.google-auto-placed:has(ins[data-ad-status="unfilled"])::before {
    display: none;
}

:where(.grid, .cards-grid, .programs-grid, .hero-grid, .extras-grid, .trust-grid) > :is(.google-auto-placed, ins.adsbygoogle) {
    grid-column: 1 / -1;
    clear: both;
}

/* ---- Rodapé (apenas ajustes de toque) ---- */

@media (max-width: 600px) {
    .foot-col a {
        display: flex;
        align-items: center;
        min-height: 44px;
        margin-bottom: 0;
    }
}

/* ==== Página de matéria (fase 3) ==== */
/*
 * Seletores estáveis (existem também sem o tema v2): #conteudo-completo, .article-detail, .article-detail .content.
 * .article-header e .breadcrumb só existem com o tema v2 ativo.
 */

.article-detail {
    max-width: var(--v2-measure);
    margin: 0 auto var(--v2-s7);
    padding: 0;
    border-radius: 0;
    background: none;
    box-shadow: none;
    scroll-margin-top: 88px;
}

.article-error {
    border-radius: var(--v2-radius);
    font-size: 16px;
}

.article-detail h1 {
    margin: 0 0 var(--v2-s3);
    font-family: var(--v2-font-serif);
    font-size: 27px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
}

@media (min-width: 640px) {
    .article-detail h1 {
        font-size: 34px;
    }
}

@media (min-width: 1024px) {
    .article-detail h1 {
        font-size: 40px;
    }
}

/* Meta: Categoria · Autor · Data · Tempo de leitura */
.article-detail .meta {
    align-items: center;
    gap: var(--v2-s1) 0;
    margin: 0 0 var(--v2-s5);
    color: var(--v2-text-2);
    font-size: 13px;
    line-height: 1.5;
}

/* separador ao fim do item: se a meta quebrar de linha, o ponto não fica no começo da linha */
.article-detail .meta span:not(:last-child)::after {
    content: "\00B7";
    margin: 0 var(--v2-s2);
}

.article-detail .meta span:first-child {
    color: var(--v2-brand);
    font-weight: 600;
}

/* Trilha de navegação (hunk opcional) */
.breadcrumb {
    margin: 0 0 var(--v2-s3);
    font-size: 13px;
    line-height: 1.4;
}

.breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin: 0;
    padding: 0;
    list-style: none;
}

.breadcrumb li + li::before {
    content: "\203A";
    margin: 0 var(--v2-s2);
    color: var(--v2-text-2);
}

.breadcrumb a {
    display: inline-block;
    padding: 3px 0;
    color: var(--v2-text-2);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

.breadcrumb li:last-child a {
    color: var(--v2-brand);
    font-weight: 600;
}

/* Com a trilha, a categoria já aparece nela e sai da meta */
.breadcrumb ~ .meta span:first-child {
    display: none;
}

/* Imagem 16:9 acima do texto (caixa neutra se faltar ou quebrar) */
.article-detail article > img {
    display: block;
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    margin: 0 0 var(--v2-s6);
    border-radius: var(--v2-radius);
    background: var(--v2-placeholder);
    object-fit: cover;
}

/* Corpo do texto */
.article-detail .content {
    font-size: 18px;
    line-height: 1.75;
    overflow-wrap: break-word;
}

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

.article-detail .content p {
    margin: 0 0 1.25em;
}

.article-detail .content h2,
.article-detail .content h3,
.article-detail .content h4 {
    margin: 2em 0 0.6em;
    font-family: var(--v2-font-serif);
    font-weight: 700;
    line-height: 1.25;
    color: var(--v2-text);
}

.article-detail .content h2 {
    font-size: 26px;
}

.article-detail .content h3 {
    margin-top: 1.75em;
    font-size: 21px;
}

.article-detail .content h4 {
    font-size: 18px;
}

.article-detail .content ul,
.article-detail .content ol {
    margin: 0 0 1.25em;
    padding-left: 1.4em;
}

.article-detail .content li {
    margin: 0.4em 0;
}

.article-detail .content li > p {
    margin: 0;
}

.article-detail .content blockquote {
    margin: 1.5em 0;
    padding: 0.25em 0 0.25em var(--v2-s4);
    border-left: 3px solid var(--v2-brand);
    color: var(--v2-text-2);
    font-family: var(--v2-font-serif);
    font-style: italic;
}

.article-detail .content blockquote > :last-child {
    margin-bottom: 0;
}

.article-detail .content table {
    display: block;
    width: 100%;
    margin: 1.5em 0;
    overflow-x: auto;
    border-collapse: collapse;
    font-size: 16px;
    line-height: 1.5;
}

.article-detail .content th,
.article-detail .content td {
    padding: var(--v2-s2) var(--v2-s3);
    border: 1px solid var(--v2-line);
    text-align: left;
    vertical-align: top;
}

.article-detail .content th {
    background: var(--v2-surface);
    font-weight: 600;
}

.article-detail .content hr {
    margin: 2em 0;
    border: 0;
    border-top: 1px solid var(--v2-line);
}

.article-detail .content pre {
    margin: 1.5em 0;
    padding: var(--v2-s4);
    overflow-x: auto;
    border-radius: var(--v2-radius);
    background: var(--v2-surface);
    font-size: 15px;
    line-height: 1.5;
}

.article-detail .content img {
    max-width: 100%;
    height: auto;
    margin: 1.5em 0;
    border-radius: var(--v2-radius);
}

/* Links no texto sublinhados (fora de blocos de anúncio) */
.article-detail .content :is(p, li, blockquote, td, th) a {
    color: var(--v2-brand);
    text-decoration: underline;
    text-decoration-thickness: 1px;
    text-underline-offset: 0.18em;
}

.article-detail .content :is(p, li, blockquote, td, th) a:hover {
    color: var(--v2-brand-dark);
}

/* Fontes: rótulo em parágrafo seguido da lista final, sem mexer no conteúdo */
.article-detail .content > p:has(+ ul:last-child) {
    margin: var(--v2-s7) 0 var(--v2-s2);
    padding-top: var(--v2-s4);
    border-top: 1px solid var(--v2-line);
    color: var(--v2-text-2);
    font-size: 14px;
    line-height: 1.5;
}

.article-detail .content > ul:last-child {
    margin: 0;
    padding-left: 1.2em;
    color: var(--v2-text-2);
    font-size: 15px;
    line-height: 1.5;
}

.article-detail .content > ul:last-child li {
    margin: 0.5em 0;
}

.article-detail .content > ul:last-child a {
    color: inherit;
}

.article-detail .content > ul:last-child a:hover {
    color: var(--v2-brand);
}

.article-video {
    width: 100%;
    margin: var(--v2-s6) 0 0;
    border-radius: var(--v2-radius);
    box-shadow: none;
}

.article-detail .back-link {
    display: inline-flex;
    align-items: center;
    min-height: 44px;
    margin-top: var(--v2-s5);
    text-decoration: underline;
    text-underline-offset: 0.18em;
}

/* ---- Busca no topo ---- */

#busca,
.programs-hero__intro > .results {
    display: none !important;
}

.busca-topo-painel {
    position: fixed;
    top: var(--busca-topo-top, 0px);
    left: 50%;
    z-index: 2147483000;
    display: block;
    width: min(720px, calc(100vw - 32px));
    max-height: calc(100vh - var(--busca-topo-top, 0px) - 16px);
    overflow: hidden;
    transform: translateX(-50%);
    border: 1px solid var(--v2-line);
    border-radius: var(--v2-radius);
    background: var(--v2-surface);
    box-shadow: 0 16px 48px rgba(26, 26, 26, 0.24);
}

.busca-topo-painel[hidden] { display: none; }

.busca-topo-cabecalho {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--v2-s3);
    padding: var(--v2-s4) var(--v2-s5) var(--v2-s3);
}

.busca-topo-titulo {
    margin: 0;
    font-family: var(--v2-font-serif);
    font-size: 20px;
    line-height: 1.2;
}

.busca-topo-fechar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border: 0;
    border-radius: var(--v2-radius);
    background: transparent;
    color: var(--v2-text);
    font-size: 26px;
    line-height: 1;
    cursor: pointer;
}

.busca-topo-fechar:hover { background: var(--v2-bg); color: var(--v2-brand); }

.busca-topo-form {
    display: flex;
    gap: var(--v2-s2);
    padding: 0 var(--v2-s5) var(--v2-s4);
}

.busca-topo-form input {
    min-width: 0;
    min-height: 44px;
    flex: 1;
    padding: 0 var(--v2-s3);
    border: 1px solid var(--v2-text-2);
    border-radius: var(--v2-radius);
    background: var(--v2-surface);
    color: var(--v2-text);
    font: inherit;
    font-size: 16px;
}

.busca-topo-form button[type="submit"] {
    min-height: 44px;
    padding: 0 var(--v2-s4);
    border: 0;
    border-radius: var(--v2-radius);
    background: var(--v2-brand);
    color: #fff;
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.busca-topo-form button[type="submit"]:hover { background: var(--v2-brand-dark); }

.busca-topo-resultados {
    max-height: 70vh;
    overflow: auto;
    padding: 0 var(--v2-s5) var(--v2-s5);
}

.busca-topo-mensagem {
    margin: 0;
    padding: var(--v2-s4) 0 0;
    color: var(--v2-text-2);
}

.busca-topo-item {
    padding: var(--v2-s4) 0;
    border-top: 1px solid var(--v2-line);
}

.busca-topo-item:first-child { border-top: 0; }

.busca-topo-item a { display: block; color: var(--v2-text); }
.busca-topo-item a:hover { color: var(--v2-brand); }

.busca-topo-item__categoria {
    display: block;
    margin-bottom: var(--v2-s1);
    color: var(--v2-brand);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.busca-topo-item__titulo {
    display: block;
    font-family: var(--v2-font-serif);
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
}

.busca-topo-item__resumo {
    display: block;
    margin-top: var(--v2-s2);
    color: var(--v2-text-2);
    font-size: 14px;
    line-height: 1.45;
}

@media (max-width: 600px) {
    .busca-topo-painel {
        left: 0;
        width: 100%;
        max-height: calc(100vh - var(--busca-topo-top, 0px));
        border-right: 0;
        border-left: 0;
        border-radius: 0;
        transform: none;
    }

    .busca-topo-cabecalho,
    .busca-topo-form,
    .busca-topo-resultados {
        padding-right: var(--v2-s4);
        padding-left: var(--v2-s4);
    }
}
