/* ============================================
   ESTILOS DE IMPRESIÓN - TEMARIO PDF
   ============================================ */

@media print {
    /* 1. Ocultar elementos innecesarios */
	.bg-light.rounded.border.py-4.mb-3,
    .bg-light.rounded.border.py-3.mb-3,
    .card.bg-light.rounded-4.mb-4,
    .bg-secondary.bg-opacity-10,
    .sticky-top,
    header, 
    footer, 
    aside, 
    nav, 
    .alert, 
    .btn, 
    #download-container, 
    #ad-section, 
    .spinner-border, 
    hr, 
    .breadcrumb, 
    .badge,
    .d-none-print {
        display: none !important;
    }
	body.no-session article.theory-content {
        display: none !important;
    }

    /* 2. Resetear el cuerpo de la página */
    body {
        background: white !important;
        color: black !important;
        font-family: serif; /* Las fuentes con serifa se leen mejor en papel */
        font-size: 12pt;
        line-height: 1.5;
        margin: 0;
        padding: 0;
    }

    /* 3. Ajustar el contenedor principal */
    main.container {
        width: 100% !important;
        max-width: none !important;
        margin: 0 !important;
        padding: 0 !important;
    }

    .col-lg-8 {
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }

    /* 4. Formatear el artículo del tema */
    article.theory-content {
        border: none !important;
        box-shadow: none !important;
        padding: 0 !important;
        margin: 0 !important;
        background: transparent !important;
    }

    /* Títulos */
    h1 {
        font-size: 24pt;
        margin-top: 0;
        margin-bottom: 10pt;
        border-bottom: 2pt solid #000;
        padding-bottom: 5pt;
    }

    .text-primary {
        color: #000 !important; /* El azul no siempre se imprime bien */
        font-weight: bold;
    }

    /* 5. Control de saltos de página */
    h1, h2, h3 {
        page-break-after: avoid; /* Evita que un título quede solo al final */
    }

    img {
        max-width: 100% !important;
        page-break-inside: avoid;
    }

    /* Mostrar URLs de los enlaces (opcional pero útil en papel) */
    /* a:after { content: " (" attr(href) ")"; font-size: 9pt; } */
}