/* ================================================
   TEMAS — Estilos para index y ver
   Agregar al final de public/css/style.css
   ================================================ */

/* ── Hero de temas ── */
.temas-hero {
    background: linear-gradient(160deg, #f0ece4 0%, #e8f1f8 100%);
    border-bottom: 1px solid var(--border-light);
}

.temas-badge {
    background: var(--primary-light);
    color: var(--primary);
    border: 1px solid var(--primary);
    border-radius: 20px;
    padding: 0.3rem 1rem;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.temas-titulo {
    font-family: 'Lora', serif;
    font-size: 2.4rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.6rem;
}

.temas-subtitulo {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 480px;
}

.temas-hero-deco {
    width: 90px; height: 90px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 22px;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 8px 24px rgba(44, 95, 138, 0.30);
}
.temas-hero-deco i {
    font-size: 2.4rem;
    color: #fff;
    opacity: 1;
}

/* ── Buscador ── */
.temas-search-form {
    width: 50%;
}


.search-icon {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-right: none;
    color: var(--text-muted);
}

.search-input {
    border: 1px solid var(--border);
    border-left: none;
    border-right: none;
    background: var(--bg-card);
    font-size: 0.95rem;
    color: var(--text-primary);
}

.search-input:focus {
    box-shadow: none;
    border-color: var(--primary);
    background: var(--bg-card);
}

.btn-search {
    background: var(--primary);
    color: #fff;
    border: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0 1.2rem;
    transition: background 0.2s;
}

.btn-search:hover { background: var(--primary-dark); color: #fff; }

/* ── Sección temas body ── */
.temas-body {
    background: linear-gradient(150deg, #e8f1f8 0%, #f5f0ea 55%, #e8f1f8 100%);
}

/* ── Sidebar categorías ── */
.categorias-sidebar {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-heading {
    font-family: 'Lora', serif;
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-bottom: 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border-light);
}

.sidebar-nav,
.sidebar-subnav {
    list-style: none;
    padding: 0; margin: 0;
}

.sidebar-subnav { padding-left: 0.8rem; margin-top: 0.2rem; }

.sidebar-link {
    display: flex;
    align-items: center;
    padding: 0.42rem 0.6rem;
    border-radius: 6px;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all 0.18s;
    margin-bottom: 0.15rem;
}

.sidebar-link:hover {
    background: var(--primary-light);
    color: var(--primary);
}

.sidebar-link.active {
    background: var(--primary-light);
    color: var(--primary);
    font-weight: 600;
}

.sidebar-link-sub {
    font-size: 0.85rem;
    color: var(--text-muted);
    padding: 0.32rem 0.6rem;
}

.sidebar-chevron { font-size: 0.7rem; }

.sidebar-count {
    margin-left: auto;
    background: var(--bg-soft);
    color: var(--text-muted);
    border-radius: 10px;
    padding: 0.1rem 0.5rem;
    font-size: 0.75rem;
}

/* ── Cards de temas ── */
.tema-card-wrap {
    animation: fadeSlideUp 0.5s ease both;
}

.tema-card {
    display: flex;
    flex-direction: column;
    background: rgba(255, 255, 255, 0.70);
    backdrop-filter: blur(12px) saturate(160%);
    -webkit-backdrop-filter: blur(12px) saturate(160%);
    border: 1px solid rgba(255, 255, 255, 0.82);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 18px rgba(44, 95, 138, 0.07),
                inset 0 1px 0 rgba(255, 255, 255, 0.72);
    overflow: hidden;
    transition: box-shadow 0.25s, transform 0.25s, border-color 0.25s,
                background 0.25s;
    color: var(--text-primary);
}

.tema-card:hover {
    background: rgba(255, 255, 255, 0.92);
    box-shadow: 0 10px 36px rgba(44, 95, 138, 0.13),
                inset 0 1px 0 rgba(255, 255, 255, 0.9);
    transform: translateY(-4px);
    border-color: rgba(44, 95, 138, 0.25);
}

.tema-card-header {
    background: linear-gradient(135deg, var(--primary-light), #ddeaf5);
    padding: 1.1rem 1.2rem 0.8rem;
    display: flex;
    align-items: center;
    gap: 0.6rem;
    border-bottom: 1px solid var(--border-light);
}

.tema-card-icon {
    width: 36px; height: 36px;
    background: var(--primary);
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 0.9rem;
    flex-shrink: 0;
}

.tema-card-cat {
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--primary);
    letter-spacing: 0.3px;
}

.tema-card-body {
    padding: 1.2rem;
    flex: 1;
}

.tema-card-titulo {
    font-family: 'Lora', serif;
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
    line-height: 1.35;
}

.tema-card-resumen {
    font-size: 0.88rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin-bottom: 0;
}

.tema-card-footer {
    padding: 0.8rem 1.2rem;
    border-top: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-soft);
}

.tema-card-fecha {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.tema-card-leer {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary);
    transition: gap 0.2s;
}

.tema-card:hover .tema-card-leer {
    gap: 6px;
}

/* ── Paginación ── */
.temas-paginacion .page-link {
    color: var(--primary);
    border-color: var(--border);
    background: var(--bg-card);
    border-radius: 6px !important;
    margin: 0 2px;
    font-size: 0.9rem;
}

.temas-paginacion .page-item.active .page-link {
    background: var(--primary);
    border-color: var(--primary);
    color: #fff;
}

/* ================================================
   TEMA — DETALLE (ver.php)
   ================================================ */

/* ── Breadcrumb ── */
.tema-breadcrumb {
    background: var(--bg-soft);
    border-bottom: 1px solid var(--border-light);
}

.tema-breadcrumb .breadcrumb {
    font-size: 0.85rem;
    margin: 0;
}

.tema-breadcrumb .breadcrumb-item a {
    color: var(--primary);
    text-decoration: none;
}

.tema-breadcrumb .breadcrumb-item.active {
    color: var(--text-muted);
}

/* ── Cabecera tema ── */
.tema-titulo-principal {
    font-family: 'Lora', serif;
    font-size: 2.2rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.25;
    margin-bottom: 0.8rem;
}

.tema-resumen-principal {
    font-size: 1.1rem;
    color: var(--text-secondary);
    line-height: 1.75;
    font-family: 'Lora', serif;
    font-style: italic;
}

.tema-divider {
    border: none;
    border-top: 2px solid var(--border-light);
    margin: 1.8rem 0;
}

.tema-fecha {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin: 0;
}

/* ── Etiquetas ── */
.etiqueta-pill {
    display: inline-block;
    border: 1px solid;
    border-radius: 20px;
    padding: 0.22rem 0.75rem;
    font-size: 0.78rem;
    font-weight: 600;
    margin-right: 0.4rem;
    margin-bottom: 0.3rem;
}

/* ── Índice de contenido ── */
.tema-toc {
    background: var(--secondary-light);
    border-left: 4px solid var(--accent);
    border-radius: 0 var(--radius) var(--radius) 0;
    padding: 1.1rem 1.4rem;
}

.toc-titulo {
    font-weight: 700;
    color: var(--secondary);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    margin-bottom: 0.7rem;
}

.toc-lista {
    margin: 0; padding-left: 1.2rem;
}

.toc-lista li { margin-bottom: 0.35rem; }

.toc-lista a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.92rem;
    transition: color 0.18s;
}

.toc-lista a:hover { color: var(--primary); }

/* ── Secciones ── */
.seccion-titulo {
    font-family: 'Lora', serif;
    font-size: 1.4rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    flex-wrap: wrap;
}

.seccion-tipo-badge {
    font-family: 'Inter', sans-serif;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    flex-shrink: 0;
}

.seccion-tipo-introduccion { background: #e8f5e9; color: #2e7d32; }
.seccion-tipo-desarrollo    { background: var(--primary-light); color: var(--primary); }
.seccion-tipo-aplicacion    { background: #fff8e1; color: #f57f17; }
.seccion-tipo-conclusion    { background: #fce4ec; color: #c62828; }
.seccion-tipo-reflexion     { background: #f3e5f5; color: #6a1b9a; }
.seccion-tipo-historia      { background: #e8eaf6; color: #283593; }
.seccion-tipo-profecia      { background: #e0f7fa; color: #00695c; }

.seccion-contenido {
    font-family: 'Lora', serif;
    font-size: 1.02rem;
    line-height: 1.9;
    color: var(--text-primary);
}

/* ── Bloque de título para Referencias, Subtemas, etc ── */
.seccion-titulo-bloque {
    font-family: 'Lora', serif;
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--primary);
    padding-bottom: 0.6rem;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 1.2rem;
}

/* ── Referencias Bíblicas ── */
.referencias-grid { display: flex; flex-direction: column; gap: 1rem; }

.ref-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem 1.2rem;
    border-left: 4px solid var(--border);
}

.ref-tipo-principal { border-left-color: var(--primary); }
.ref-tipo-profetica  { border-left-color: #00695c; }
.ref-tipo-apoyo      { border-left-color: var(--accent); }
.ref-tipo-paralela   { border-left-color: #6a1b9a; }

.ref-header {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    flex-wrap: wrap;
    margin-bottom: 0.5rem;
}

.ref-cita {
    font-family: 'Lora', serif;
    font-weight: 700;
    color: var(--primary);
    font-size: 1rem;
}

.ref-version {
    font-size: 0.72rem;
    background: var(--bg-soft);
    color: var(--text-muted);
    border: 1px solid var(--border);
    border-radius: 4px;
    padding: 0.1rem 0.45rem;
    font-weight: 600;
}

.ref-tipo-badge {
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    color: var(--text-muted);
}

.ref-texto {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.97rem;
    color: var(--text-secondary);
    border: none;
    padding: 0;
    margin: 0.4rem 0 0.2rem;
    line-height: 1.7;
}

.ref-nota {
    font-size: 0.83rem;
    color: var(--text-muted);
    margin-top: 0.4rem;
    margin-bottom: 0;
}

/* ── Subtemas ── */
.subtema-card {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 0.9rem 1rem;
    color: var(--text-primary);
    transition: all 0.2s;
}

.subtema-card:hover {
    border-color: var(--primary);
    background: var(--primary-light);
    color: var(--primary);
    transform: translateX(4px);
}

.subtema-card i { color: var(--primary); margin-top: 2px; flex-shrink: 0; }

/* ── Multimedia ── */
.recurso-card {
    display: flex;
    align-items: flex-start;
    gap: 0.9rem;
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    padding: 1rem;
    color: var(--text-primary);
    transition: all 0.2s;
    position: relative;
}

.recurso-card:hover {
    border-color: var(--primary);
    box-shadow: var(--shadow-sm);
    transform: translateY(-2px);
}

.recurso-icono {
    width: 42px; height: 42px;
    border-radius: 8px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.2rem;
    flex-shrink: 0;
}

.recurso-tipo-video  { background: #ffebee; color: #c62828; }
.recurso-tipo-audio  { background: #e8eaf6; color: #283593; }
.recurso-tipo-pdf    { background: #fce4ec; color: #ad1457; }
.recurso-tipo-enlace { background: var(--primary-light); color: var(--primary); }

.recurso-info { flex: 1; }
.recurso-titulo { font-size: 0.92rem; color: var(--text-primary); display: block; margin-bottom: 2px; }
.recurso-fuente { font-size: 0.78rem; color: var(--text-muted); display: block; }
.recurso-desc   { font-size: 0.82rem; color: var(--text-secondary); margin-top: 4px; }
.recurso-ext    { color: var(--text-muted); font-size: 0.75rem; align-self: center; flex-shrink: 0; }

/* ── Sidebar widgets ── */
.sidebar-widget {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 1.2rem;
    box-shadow: var(--shadow-sm);
}

.sidebar-widget-titulo {
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.7px;
    color: var(--primary);
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--border-light);
}

/* ── Temas relacionados ── */
.relacionados-lista { list-style: none; padding: 0; margin: 0; }

.relacionado-item { margin-bottom: 0.9rem; }

.relacionado-link {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    padding: 0.5rem 0.6rem;
    border-radius: 6px;
    transition: background 0.18s;
}

.relacionado-link:hover { background: var(--primary-light); }

.relacionado-tipo {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.relacionado-tipo-complementa { color: var(--primary); }
.relacionado-tipo-amplia       { color: #2e7d32; }
.relacionado-tipo-profundiza   { color: #1565c0; }
.relacionado-tipo-contrasta    { color: #ad1457; }
.relacionado-tipo-prerequisito { color: #f57f17; }
.relacionado-tipo-continua     { color: #6a1b9a; }

.relacionado-titulo {
    font-size: 0.9rem;
    font-family: 'Lora', serif;
    color: var(--text-primary);
    font-weight: 600;
}

.relacionado-peso-bar {
    height: 3px;
    background: var(--border-light);
    border-radius: 2px;
    margin-top: 4px;
    overflow: hidden;
}

.relacionado-peso-bar div {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px;
    transition: width 0.5s ease;
}

/* ── Versículo sidebar ── */
.sidebar-versiculo {
    background: var(--secondary-light);
    border-color: var(--border-light);
    border-left: 3px solid var(--accent);
    border-radius: 0 var(--radius-lg) var(--radius-lg) 0;
}

.sidebar-versiculo i { color: var(--accent); }

.sidebar-versiculo blockquote {
    font-family: 'Lora', serif;
    font-style: italic;
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.65;
    border: none;
    padding: 0;
    margin: 0;
}

.sidebar-versiculo cite {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-style: normal;
    font-weight: 600;
}

/* ── Compartir ── */
.share-btns { display: flex; flex-direction: column; gap: 0.5rem; }

.share-btn {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.5rem 0.9rem;
    border-radius: 7px;
    font-size: 0.88rem;
    font-weight: 600;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-soft);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn:hover { transform: translateX(3px); }
.share-wa:hover  { background: #e8f5e9; border-color: #4caf50; color: #2e7d32; }
.share-tg:hover  { background: #e3f2fd; border-color: #1976d2; color: #1565c0; }
.share-copy:hover { background: var(--primary-light); border-color: var(--primary); color: var(--primary); }

/* ── Navegación inferior ── */
.tema-navegacion {
    background: var(--bg-soft);
    border-top: 1px solid var(--border-light);
}

.btn-nav-back {
    display: inline-flex;
    align-items: center;
    color: var(--primary);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.92rem;
    transition: gap 0.2s;
    gap: 0;
}

.btn-nav-back:hover { color: var(--primary-dark); }

/* ── Responsivo ── */
@media (max-width: 768px) {
    .temas-titulo          { font-size: 1.8rem; }
    .tema-titulo-principal { font-size: 1.6rem; }
    .temas-hero-deco       { display: none; }
    .categorias-sidebar    { position: static !important; }
}

/* ── Portada / Banner del tema ── */
.tema-portada {
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
}

.tema-portada-img {
    width: 100%;
    max-height: 520px;
    object-fit: cover;
    object-position: center top;
    display: block;
}

/* ── Galería de ilustraciones ── */
.galeria-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 1rem;
}
.galeria-item {
    margin: 0;
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    background: var(--bg-card);
    transition: box-shadow 0.2s, transform 0.2s;
}
.galeria-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}
.galeria-img {
    width: 100%;
    height: 160px;
    object-fit: cover;
    display: block;
    transition: transform 0.3s;
}
.galeria-item:hover .galeria-img {
    transform: scale(1.04);
}
.galeria-caption {
    padding: 0.5rem 0.75rem;
    font-size: 0.82rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.galeria-caption strong {
    color: var(--text-primary);
    font-size: 0.85rem;
}

.tema-card-header--img {
    height: 160px;
    background-size: 100%;
    background-position: center;
    background-repeat: no-repeat;
    padding: 0.6rem 0.8rem;
    align-items: flex-end;
    transition: background-size 0.45s ease;
}

.tema-card:hover .tema-card-header--img {
    background-size: 110%;
}

.tema-card-header--img .tema-card-cat {
    background: rgba(0,0,0,0.45);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 20px;
    font-size: 0.75rem;
    backdrop-filter: blur(4px);
}

.temas-hero-inner {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.temas-hero-inner > div:last-child {
    flex: 1;
}

@media (max-width: 576px) {
    .temas-hero-inner {
        flex-direction: column;
        text-align: center;
    }
}

/* ── Botón imprimir (pantalla) ── */
.share-print:hover {
    background: #e8f4fd;
    border-color: #1565c0;
    color: #1565c0;
}

/* ================================================
   IMPRESIÓN — @media print
   ================================================ */
@media print {

    /* Ocultar UI de navegación y widgets */
    .navbar,
    .site-footer,
    .tema-navegacion,
    .tema-breadcrumb,
    aside.col-lg-4,
    .tema-print-bar,
    #google_translate_element,
    .goog-te-banner-frame,
    .skiptranslate { display: none !important; }

    /* Columna principal al 100 % */
    .col-lg-8 {
        width: 100% !important;
        max-width: 100% !important;
        flex: 0 0 100% !important;
    }

    /* Página */
    @page { margin: 2cm 2.2cm; }

    body {
        background: #fff !important;
        color: #111 !important;
        font-size: 11pt;
    }

    /* Cabecera del sitio impresa encima del artículo */
    .tema-detalle::before {
        content: "El Último Remanente — Estudios Bíblicos  |  elultimoremanente.com";
        display: block;
        font-size: 8.5pt;
        color: #555;
        padding-bottom: 0.5rem;
        margin-bottom: 1.2rem;
        border-bottom: 1px solid #ccc;
        font-family: 'Inter', sans-serif;
    }

    /* Tipografía del artículo */
    .tema-titulo-principal {
        font-size: 22pt;
        color: #111 !important;
        line-height: 1.2;
    }

    .tema-resumen-principal {
        font-size: 11pt;
        color: #333 !important;
    }

    .tema-fecha { color: #555 !important; }

    .badge-biblica {
        border: 1px solid #555 !important;
        color: #333 !important;
        background: transparent !important;
    }

    .etiqueta-pill {
        border: 1px solid #888 !important;
        color: #333 !important;
        background: transparent !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* Índice de contenido */
    .tema-toc {
        border-left: 3px solid #555 !important;
        background: #f5f5f5 !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .toc-lista a { color: #111 !important; }
    .toc-lista a::after { content: none !important; }

    /* Secciones */
    .seccion-titulo {
        font-size: 14pt;
        color: #111 !important;
    }

    .seccion-tipo-badge {
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .seccion-contenido {
        font-size: 11pt;
        line-height: 1.8;
        color: #111 !important;
    }

    .tema-seccion { page-break-inside: avoid; break-inside: avoid; }

    .seccion-titulo-bloque {
        font-size: 13pt;
        color: #1a3a5c !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* Referencias bíblicas */
    .ref-card {
        page-break-inside: avoid;
        break-inside: avoid;
        border: 1px solid #ccc !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    .ref-tipo-principal  { border-left-color: #2c5f8a !important; }
    .ref-tipo-profetica  { border-left-color: #00695c !important; }
    .ref-tipo-apoyo      { border-left-color: #b8860b !important; }
    .ref-tipo-paralela   { border-left-color: #6a1b9a !important; }

    .ref-cita    { color: #1a3a5c !important; }
    .ref-texto   { color: #333 !important; }
    .ref-version { background: #eee !important; }

    /* Imagen de portada — limitada para reducir peso del PDF */
    .tema-portada {
        overflow: visible !important;
        box-shadow: none !important;
    }

    .tema-portada-img {
        max-height: 7cm !important;
        width: auto !important;
        max-width: 100% !important;
        object-fit: contain !important;
        print-color-adjust: exact;
        -webkit-print-color-adjust: exact;
    }

    /* Imágenes embebidas en secciones — limitar tamaño */
    .seccion-contenido img {
        max-width: 100% !important;
        max-height: 8cm !important;
        height: auto !important;
        object-fit: contain !important;
        display: block;
        margin: 0.5rem auto;
    }

    /* Galería — ocultar en impresión (peso elevado) */
    .tema-galeria { display: none !important; }

    /* Subtemas — mostrar como lista simple */
    .subtema-card {
        border: 1px solid #ddd !important;
        background: #fafafa !important;
    }

    .subtema-card::after { content: none !important; }

    /* No mostrar URLs de enlaces internos */
    a::after { content: none !important; }

    /* Pie de impresión con URL */
    .tema-detalle::after {
        content: "Disponible en: " attr(data-url);
        display: block;
        font-size: 8pt;
        color: #666;
        margin-top: 2rem;
        padding-top: 0.5rem;
        border-top: 1px solid #ccc;
        font-family: 'Inter', sans-serif;
    }
}