/* ======================================
   ESTILOS PARA IMPRESSÃO
   ====================================== */

@media print {
    /* Ocultar elementos desnecessários */
    .header,
    .main-nav,
    .footer,
    .share-buttons,
    .relacionadas,
    .menu-toggle,
    .no-print {
        display: none !important;
    }

    /* Resetar cores de fundo para economizar tinta */
    * {
        background: white !important;
        color: black !important;
        box-shadow: none !important;
        text-shadow: none !important;
    }

    /* Configurações gerais */
    body {
        font-family: Georgia, serif;
        font-size: 12pt;
        line-height: 1.5;
        margin: 0;
        padding: 0;
    }

    /* Container principal */
    .main-content {
        padding: 0;
        margin: 0;
    }

    .container {
        max-width: 100%;
        padding: 0;
        margin: 0;
    }

    /* Notícia completa */
    .noticia-detalhe {
        padding: 0;
        border-radius: 0;
        box-shadow: none;
    }

    /* Cabeçalho da notícia */
    .noticia-header {
        margin-bottom: 1.5cm;
        border-bottom: 2pt solid black;
        padding-bottom: 0.5cm;
    }

    .editoria-tag {
        background: white !important;
        color: black !important;
        border: 1pt solid black;
        padding: 2pt 5pt;
        font-size: 9pt;
        font-weight: bold;
        text-transform: uppercase;
        display: inline-block;
        margin-bottom: 0.5cm;
    }

    .noticia-titulo-principal {
        font-size: 20pt;
        font-weight: bold;
        line-height: 1.3;
        margin: 0.5cm 0;
        color: black !important;
    }

    .noticia-meta-principal {
        font-size: 9pt;
        border-top: 1pt solid #ccc;
        border-bottom: 1pt solid #ccc;
        padding: 0.3cm 0;
        margin: 0.5cm 0;
    }

    .noticia-meta-principal span {
        margin-right: 1cm;
    }

    .noticia-resumo-destaque {
        font-size: 13pt;
        font-weight: bold;
        line-height: 1.6;
        margin: 0.5cm 0;
        padding: 0.5cm;
        border-left: 3pt solid black;
        background: #f5f5f5 !important;
    }

    /* Foto da notícia */
    .noticia-foto {
        margin: 1cm 0;
        page-break-inside: avoid;
    }

    .noticia-foto img {
        max-width: 100%;
        height: auto;
        border: 1pt solid #ccc;
    }

    .noticia-foto figcaption {
        font-size: 9pt;
        font-style: italic;
        margin-top: 0.2cm;
        color: #666 !important;
    }

    /* Texto da notícia */
    .noticia-texto {
        font-size: 12pt;
        line-height: 1.7;
        text-align: justify;
        orphans: 3;
        widows: 3;
    }

    .noticia-texto p {
        margin-bottom: 0.5cm;
    }

    /* Footer da notícia */
    .noticia-footer {
        margin-top: 1cm;
        padding-top: 0.5cm;
        border-top: 1pt solid #ccc;
        font-size: 9pt;
    }

    .aviso-ia {
        background: #f9f9f9 !important;
        border-left: 3pt solid black;
        padding: 0.3cm;
        margin: 0.5cm 0;
    }

    .fonte-original {
        margin-top: 0.3cm;
    }

    .fonte-original a {
        text-decoration: underline;
    }

    /* Cabeçalho customizado para impressão */
    @page {
        margin: 2cm;

        @top-center {
            content: "Correio Diário";
            font-family: Georgia, serif;
            font-size: 10pt;
            font-weight: bold;
        }

        @bottom-right {
            content: "Página " counter(page) " de " counter(pages);
            font-size: 9pt;
        }
    }

    /* Quebras de página */
    h1, h2, h3, h4, h5, h6 {
        page-break-after: avoid;
        page-break-inside: avoid;
    }

    img, figure, table {
        page-break-inside: avoid;
    }

    /* Links */
    a[href]:after {
        content: " (" attr(href) ")";
        font-size: 9pt;
        color: #666 !important;
    }

    /* Não mostrar URL para links internos */
    a[href^="#"]:after,
    a[href^="/"]:after {
        content: "";
    }

    /* Ícones - converter para texto */
    .fas, .far, .fab {
        font-family: Georgia, serif !important;
    }

    .fas::before,
    .far::before,
    .fab::before {
        content: "•";
    }

    /* Metadados adicionais */
    .noticia-meta i {
        display: none;
    }

    /* Impressão de listas de notícias (se necessário) */
    .noticias-grid,
    .noticias-lista {
        display: block;
    }

    .noticia-card,
    .noticia-item {
        page-break-inside: avoid;
        margin-bottom: 1cm;
        padding-bottom: 0.5cm;
        border-bottom: 1pt solid #ccc;
    }

    .noticia-imagem img,
    .noticia-thumb img {
        max-height: 8cm;
        width: auto;
    }
}

/* Impressão em preto e branco (economia de tinta) */
@media print and (monochrome) {
    * {
        background: white !important;
        color: black !important;
    }

    .noticia-resumo-destaque {
        background: white !important;
        border-left: 3pt solid black;
        padding-left: 0.5cm;
    }
}
